| 1 |
# Binlog format independent |
| 2 |
include/master-slave.inc |
| 3 |
[connection master] |
| 4 |
# |
| 5 |
# Initialize test data |
| 6 |
connection slave; |
| 7 |
include/stop_slave.inc |
| 8 |
change master to master_heartbeat_period=2; |
| 9 |
include/start_slave.inc |
| 10 |
# Rotating master logs and pausing after Rotate_event is written.. |
| 11 |
connection master; |
| 12 |
set @old_dbug= @@global.debug_dbug; |
| 13 |
set @@global.debug_dbug= "+d,stop_after_rotate_written"; |
| 14 |
flush binary logs; |
| 15 |
# Waiting for Rotate event to write/sync to disk |
| 16 |
connection server_1; |
| 17 |
set debug_sync="now wait_for rotate_written"; |
| 18 |
# Sleep 3s so the master sends a heartbeat event to the slave |
| 19 |
connection server_1; |
| 20 |
set debug_sync="now signal finish_rotate"; |
| 21 |
connection master; |
| 22 |
set @@global.debug_dbug= @old_dbug; |
| 23 |
# |
| 24 |
# Ensure replication continues without error.. |
| 25 |
connection master; |
| 26 |
create table t1 (a int); |
| 27 |
insert into t1 values (1); |
| 28 |
connection slave; |
| 29 |
include/diff_tables.inc [master:test.t1,slave:test.t1] |
| 30 |
# |
| 31 |
# Cleanup |
| 32 |
connection master; |
| 33 |
drop table t1; |
| 34 |
include/save_master_gtid.inc |
| 35 |
connection slave; |
| 36 |
include/sync_with_master_gtid.inc |
| 37 |
include/rpl_end.inc |
| 38 |
# End of rpl_heartbeat_at_rotate.test |