mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
Fix t/pt-table-checksum/replication_filters.t again, better.
This commit is contained in:
@@ -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)"
|
||||
);
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user