mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 15:31:55 +00:00
Convert pt-table-checksum boundaries to SQL WHERE clauses.
This commit is contained in:
@@ -39,22 +39,17 @@ $sb->create_dbs($master_dbh, [qw(test)]);
|
||||
# Issue 560: mk-table-sync generates impossible WHERE
|
||||
# #############################################################################
|
||||
diag(`/tmp/12345/use < $trunk/t/pt-table-sync/samples/issue_560.sql`);
|
||||
sleep 1;
|
||||
PerconaTest::wait_for_table($slave_dbh, "issue_560.buddy_list", "player_id=353");
|
||||
|
||||
# Make slave differ.
|
||||
$slave_dbh->do('UPDATE issue_560.buddy_list SET buddy_id=0 WHERE player_id IN (333,334)');
|
||||
$slave_dbh->do('UPDATE issue_560.buddy_list SET buddy_id=0 WHERE player_id=486');
|
||||
|
||||
diag(`$trunk/bin/pt-table-checksum --replicate issue_560.checksum h=127.1,P=12345,u=msandbox,p=msandbox -d issue_560 --chunk-size 50 > /dev/null`);
|
||||
sleep 1;
|
||||
$output = `$trunk/bin/pt-table-checksum --replicate issue_560.checksum h=127.1,P=12345,u=msandbox,p=msandbox -d issue_560 --replicate-check 1 --chunk-size 50`;
|
||||
$output =~ s/\d\d:\d\d:\d\d/00:00:00/g;
|
||||
ok(
|
||||
no_diff(
|
||||
$output,
|
||||
"t/pt-table-sync/samples/issue_560_output_1.txt",
|
||||
cmd_output => 1,
|
||||
),
|
||||
$output = `$trunk/bin/pt-table-checksum --replicate issue_560.checksum h=127.1,P=12345,u=msandbox,p=msandbox -d issue_560 --chunk-size 50 --lock-wait-time 3`;
|
||||
|
||||
is(
|
||||
PerconaTest::count_checksum_results($output, 'diffs'),
|
||||
2,
|
||||
'Found checksum differences (issue 560)'
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user