lp:~percona-toolkit-dev/percona-toolkit/fix-929046-pt-qa-sub.001-lit.001-lit.002-fix

Created by Brian Fraser and last modified
Get this branch:
bzr branch lp:~percona-toolkit-dev/percona-toolkit/fix-929046-pt-qa-sub.001-lit.001-lit.002-fix
Members of Percona Toolkit developers can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

473. By Brian Fraser

Fix for bug 929046: SUB.001, LIT.001 and LIT.002 are sensitive to program state

The original bug was about SUB.001, but LIT.00[12] were affected
as well. The bug boiled down to using //g on $event->{arg}, but
here's a simplified version:

 my $str = "abc in stuff";
 # This will print "6"
 say $str =~ /in/g ? pos($str) : "no match";
 # This will print "no match"
 say $str =~ /abc/g ? pos($str) : "no match";

The second doesn't match because it will start from after
the "in" that the previous regex matched, at which point
it's too late to match abc.

There's two solutions to this: First, to use lvalue pos() before
each match, ala pos($str) = 0; -- But that's doing a lot of
extra stuff to work around our own bug. The other solution,
and what this commit implements, is not using //g and pos() at all,
instead using the @+ variable. $+[0] already holds the data we need,
at no extra cost, and to boot makes things slightly faster.

So what was previously

 if ( $str =~ m/./g ) {
   return pos($str)
 }

Is now

 if ( $str =~ m/./ ) {
   return $+[0];
 }

472. By Brian Fraser

Merged fix-1079341-pt-osc-skip-myisam-fk-checks

471. By Brian Fraser

Merged fix-1074179-ptc-replicate-check-only-filters

470. By Brian Fraser

Merged fix-1052475-ptc-uninit-crash-slave-errors

469. By Brian Fraser

Merged fix-831525-pqd-mangled-help

468. By Brian Fraser

Merged fix-887638-ptqa-negative-at-byte

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.

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.