mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-28 17:15:44 +00:00
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:
@@ -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),
|
||||
|
@@ -1,3 +1,4 @@
|
||||
CREATE DATABASE IF NOT EXISTS test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS `issue_94`;
|
||||
CREATE TABLE `issue_94` (
|
||||
|
Reference in New Issue
Block a user