Fix t/pt-table-checksum/replication_filters.t again, better.

This commit is contained in:
Daniel Nichter
2013-03-01 15:06:47 -07:00
parent be048f9674
commit fad6d17647
2 changed files with 6 additions and 16 deletions

View File

@@ -282,18 +282,11 @@ elsif ( -x "$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog" ) {
$mysqlbinlog = "$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog";
}
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | sort -u`;
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | sort -u | sed -e 's/\`//g'`;
my $use_dbs = $sandbox_version ge '5.6' ?
"use `mysql`/*!*/;
use `percona_test`/*!*/;
use `percona`/*!*/;
use `sakila`/*!*/;
"
:
"use mysql/*!*/;
use percona/*!*/;
my $use_dbs = "use mysql/*!*/;
use percona_test/*!*/;
use percona/*!*/;
use sakila/*!*/;
";
@@ -308,13 +301,11 @@ $row = $master_dbh->selectrow_hashref('show master status');
pt_table_checksum::main(@args, qw(--quiet --replicate-database percona));
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | sort -u`;
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | sort -u | sed -e 's/\`//g'`;
$use_dbs = $sandbox_version ge '5.6' ? "use `percona`/*!*/;\n"
: "use percona/*!*/;\n";
is(
$output,
$use_dbs,
"use percona/*!*/;\n",
"USE only --replicate-database (binlog dump)"
);

View File

@@ -44,7 +44,7 @@ $exit_status = pt_table_checksum::main(@args,
my $t = time - $t0;
ok(
$t >= 1.1 && $t <= 2.5,
$t >= 1.0 && $t <= 2.5,
"Ran in roughly --run-time 1 second"
) or diag("Actual run time: $t");
@@ -72,4 +72,3 @@ ok(
$sb->wipe_clean($master_dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
done_testing;
exit;