Fix t/pt-table-checksum/replication_filters.t fofor MySQL 5.6.

This commit is contained in:
Daniel Nichter
2013-02-27 21:59:34 -07:00
parent 2ffe8737a4
commit c1a11168bc
+18 -7
View File
@@ -284,13 +284,22 @@ elsif ( -x "$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`;
is( my $use_dbs = $sandbox_version ge '5.6' ?
$output, "use `mysql`/*!*/;
"use mysql/*!*/; use `percona_test`/*!*/;
use `percona`/*!*/;
use `sakila`/*!*/;
"
:
"use mysql/*!*/;
use percona/*!*/; use percona/*!*/;
use percona_test/*!*/; use percona_test/*!*/;
use sakila/*!*/; use sakila/*!*/;
", ";
is(
$output,
$use_dbs,
"USE each table's database (binlog dump)" "USE each table's database (binlog dump)"
); );
@@ -299,11 +308,13 @@ $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'`; $output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | sort -u`;
$use_dbs = $sandbox_version ge '5.6' ? "use `percona`/*!*/;\n"
: "use percona/*!*/;\n";
is( is(
$output, $output,
"use percona/*!*/; $use_dbs,
",
"USE only --replicate-database (binlog dump)" "USE only --replicate-database (binlog dump)"
); );