SET @saved_binlog_error_action= @@GLOBAL.binlog_error_action;
SET GLOBAL binlog_error_action= ABORT_SERVER;
SET @saved_sync_binlog= @@GLOBAL.sync_binlog;
SET GLOBAL sync_binlog= 2;
[connection conn1]
CREATE TABLE t1 (c1 INT) ENGINE=MyISAM;
SET DEBUG_SYNC= 'before_sync_binlog_file SIGNAL holding_before_bgc_sync_binlog_file WAIT_FOR continue_bgc_sync_binlog_file';
INSERT INTO t1 VALUES (1);
[connection conn2]
SET DEBUG_SYNC= 'NOW WAIT_FOR holding_before_bgc_sync_binlog_file';
SET DEBUG_SYNC= 'before_rotate_binlog_file SIGNAL holding_before_rotate_binlog_file WAIT_FOR continue_rotate_binlog_file';
FLUSH LOGS;
[connection default]
SET DEBUG_SYNC= 'now WAIT_FOR holding_before_rotate_binlog_file';
SET DEBUG_SYNC= 'now SIGNAL continue_bgc_sync_binlog_file';
SET DEBUG_SYNC= 'before_rotate_binlog_file CLEAR';
SET DEBUG_SYNC = 'now SIGNAL continue_rotate_binlog_file';
[connection conn1]
[connection conn2]
[connection default]
DROP TABLE t1;
SET DEBUG_SYNC= 'RESET';
[connection conn1]
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
SET DEBUG_SYNC= 'before_sync_binlog_file SIGNAL holding_before_bgc_sync_binlog_file WAIT_FOR continue_bgc_sync_binlog_file';
INSERT INTO t1 VALUES (1);
[connection conn2]
SET DEBUG_SYNC= 'NOW WAIT_FOR holding_before_bgc_sync_binlog_file';
SET DEBUG_SYNC= 'before_rotate_binlog_file SIGNAL holding_before_rotate_binlog_file WAIT_FOR continue_rotate_binlog_file';
FLUSH LOGS;
[connection default]
SET DEBUG_SYNC= 'now WAIT_FOR holding_before_rotate_binlog_file';
SET DEBUG_SYNC= 'now SIGNAL continue_bgc_sync_binlog_file';
SET DEBUG_SYNC= 'before_rotate_binlog_file CLEAR';
SET DEBUG_SYNC = 'now SIGNAL continue_rotate_binlog_file';
[connection conn1]
[connection conn2]
[connection default]
DROP TABLE t1;
SET DEBUG_SYNC= 'RESET';
SET GLOBAL binlog_error_action= @saved_binlog_error_action;
SET GLOBAL sync_binlog= @saved_sync_binlog;
