Skip to content

Commit

Permalink
Fix flaky rpl_binlog_trx_meta_data_multi_table
Browse files Browse the repository at this point in the history
Summary:
`purge binary logs before now()` is flaky because it depends on time.
Replacing that with `purge binary logs to $binlog`.

Squash with D10120351

Reviewed By: yashtc

Differential Revision: D10185280

fbshipit-source-id: c65c6c7
  • Loading branch information
abhinav04sharma authored and facebook-github-bot committed Oct 4, 2018
1 parent b45040a commit 9503743
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ insert into t1 values();
insert into t2 values();
insert into t2 values();
flush logs;
purge binary logs before now();
purge binary logs to 'binlog';
flush logs;
purge binary logs before now();
purge binary logs to 'binlog';
delete t1, t2 from t1, t2;
flush logs;
"There should be only one rows_query event in master binlog"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ sync_slave_with_master;
# start a fresh binlog
connection master;
flush logs;
purge binary logs before now();
let $binlog= query_get_value(SHOW MASTER STATUS, File, 1);
replace_result $binlog binlog;
eval purge binary logs to '$binlog';

connection slave;
flush logs;
purge binary logs before now();
let $binlog= query_get_value(SHOW MASTER STATUS, File, 1);
replace_result $binlog binlog;
eval purge binary logs to '$binlog';

# multi-table statement, there should only be one rows_query event for this
connection master;
Expand Down

0 comments on commit 9503743

Please sign in to comment.