PT-1551 New wait for master method to pt-table-checksum

This is part of PT-1554. While I was testing pt-table-checksum
ignore_columns.t was failing and it was because the original method in
pt-table-checksum to wait for the slaves to catch up, wasn't enough.
I added a new method who calls MySQL's SELECT MASTER_POS_WAIT from the
MasterSlave package.
This commit is contained in:
Carlos Salguero
2018-06-22 13:00:41 -03:00
parent c1d0134525
commit d9142df0f6
3 changed files with 24 additions and 5 deletions

View File

@@ -42,14 +42,14 @@ $sb->load_file('master', 't/pt-table-checksum/samples/issue_94.sql');
$slave_dbh->do("update test.issue_94 set c=''");
$output = output(
sub { pt_table_checksum::main(@args, qw(-d test -t issue_94)) },
sub { pt_table_checksum::main(@args, qw(-d test --ignore-databases mysql -t issue_94)) },
trf => sub { return PerconaTest::count_checksum_results(@_, 'DIFFS') },
);
is(
$output,
"1",
"Diff when column not ignored"
);
) or diag($output);
$output = output(
sub { pt_table_checksum::main(@args, qw(-d test -t issue_94),
@@ -60,7 +60,7 @@ is(
$output,
"0",
"No diff when column ignored"
);
) or diag($output);
$output = output(
sub { pt_table_checksum::main(@args, qw(-d test -t issue_94),

View File

@@ -1,3 +1,4 @@
CREATE DATABASE IF NOT EXISTS test;
USE test;
DROP TABLE IF EXISTS `issue_94`;
CREATE TABLE `issue_94` (