lp:~percona-toolkit-dev/percona-toolkit/fix-917770-pt-config-diff-uninit-value-crash

Created by Brian Fraser and last modified
Get this branch:
bzr branch lp:~percona-toolkit-dev/percona-toolkit/fix-917770-pt-config-diff-uninit-value-crash
Members of Percona Toolkit developers can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Recent revisions

469. By Brian Fraser

Refactor _parse_varvals.

Now it takes two arguments: A regexp and a string to match against.
_parse_varvals itself was split in three: _preprocess_varvals,
_parse_varvals, and _process_val.

This also modifies the three places that call _parse_varvals; For
two, no real changes were needed, but parse_mysqld() required a fix
to deal with the two final lines of mysqld --help --verbose:

   To see what values a running MySQL server is using, type
   'mysqladmin variables' instead of 'mysqld --verbose --help'.

468. By Brian Fraser

Fix for 917770: Use of uninitialized value in substitution (s///) at pt-config-diff line 1996

This turned out to be two bugs mangled into one.

First, _parse_varvals can deal with (var, undef), but not with (undef).
This is a problem because two of the trhee spots that call
_parse_varvals can return undef because of this:

      map { $_ =~ m/^([^=]+)(?:=(.*))?$/ }
      grep { $_ !~ m/^\s*#/ } # no # comment lines
      split("\n", $mysqld_section)

The problem is twofold. First, we are not skipping empty or
whitespace-only lines. That means that the map will fail,
and pass an undef to _parse_varvals. So this ended up in
a triple fix: Make _parse_varvals deal with a sole undef,
skip empty/whitespace lines, and change that map to

 map { $_ =~ m/^([^=]+)(?:=(.*))?$/ ? ($1, $2) : () }

so even if the regex fails in the future, no sole undef
will be passed down the chain.

467. By Brian Fraser

Fixed various failing tests

466. By Brian Fraser

Remove the @INC shifts from the test files. This is no longer needed since the tools do their %INC mangling

465. By Daniel Nichter

Merge release-2.1.7.

464. By Daniel Nichter

Fix how start-sandbox looks for mysqld, broken by previous commit.

463. By Daniel Nichter

Make start-sandbox sed -e MYSQLD in the start script in case mysqld isn't in basedir/bin.

462. By Brian Fraser

Merged test-for-957442-pqd-custom-filter-group-by

461. By Brian Fraser

Merged fix-1041391-rowchecker-wrong-debug-statement

460. By Brian Fraser <email address hidden>

Merged 2.1.6-release

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:percona-toolkit/2.1
This branch contains Public information 
Everyone can see this information.