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
+5 -14
View File
@@ -282,18 +282,11 @@ elsif ( -x "$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog" ) {
$mysqlbinlog = "$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' ? my $use_dbs = "use mysql/*!*/;
"use `mysql`/*!*/;
use `percona_test`/*!*/;
use `percona`/*!*/;
use `sakila`/*!*/;
"
:
"use mysql/*!*/;
use percona/*!*/;
use percona_test/*!*/; use percona_test/*!*/;
use percona/*!*/;
use sakila/*!*/; use sakila/*!*/;
"; ";
@@ -308,13 +301,11 @@ $row = $master_dbh->selectrow_hashref('show master status');
pt_table_checksum::main(@args, qw(--quiet --replicate-database percona)); 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( is(
$output, $output,
$use_dbs, "use percona/*!*/;\n",
"USE only --replicate-database (binlog dump)" "USE only --replicate-database (binlog dump)"
); );
+1 -2
View File
@@ -44,7 +44,7 @@ $exit_status = pt_table_checksum::main(@args,
my $t = time - $t0; my $t = time - $t0;
ok( ok(
$t >= 1.1 && $t <= 2.5, $t >= 1.0 && $t <= 2.5,
"Ran in roughly --run-time 1 second" "Ran in roughly --run-time 1 second"
) or diag("Actual run time: $t"); ) or diag("Actual run time: $t");
@@ -72,4 +72,3 @@ ok(
$sb->wipe_clean($master_dbh); $sb->wipe_clean($master_dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
done_testing; done_testing;
exit;