include/master-slave.inc [connection master] connection master; call mtr.add_suppression("Timeout waiting for reply of binlog"); call mtr.add_suppression("Semi-sync master .* waiting for slave reply"); call mtr.add_suppression("Read semi-sync reply"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); call mtr.add_suppression("mysqld: Got an error reading communication packets"); connection slave; call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Semi-sync slave .* reply"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); connection master; set global rpl_semi_sync_master_enabled = 1; connection slave; include/stop_slave.inc set global rpl_semi_sync_slave_enabled = 1; include/start_slave.inc connection master; SET GLOBAL event_scheduler = ON; CREATE TABLE t1 (i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f varchar(8)) ENGINE=ENGINE_TYPE; INSERT INTO t1 (f) VALUES ('a'),('a'),('a'),('a'),('a'); INSERT INTO t1 SELECT i+5, f FROM t1; INSERT INTO t1 SELECT i+10, f FROM t1; CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (SLEEP(5),CONCAT('ev1_',CONNECTION_ID())); CREATE EVENT ev2 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (SLEEP(5),CONCAT('ev2_',CONNECTION_ID())); connection slave; STOP SLAVE IO_THREAD; connection master; connect m$run,localhost,root,,; connection m20; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 20; connection master; connect m$run,localhost,root,,; connection m19; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 19; connection master; connect m$run,localhost,root,,; connection m18; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 18; connection master; connect m$run,localhost,root,,; connection m17; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 17; connection master; connect m$run,localhost,root,,; connection m16; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 16; connection master; connect m$run,localhost,root,,; connection m15; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 15; connection master; connect m$run,localhost,root,,; connection m14; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 14; connection master; connect m$run,localhost,root,,; connection m13; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 13; connection master; connect m$run,localhost,root,,; connection m12; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 12; connection master; connect m$run,localhost,root,,; connection m11; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 11; connection master; connect m$run,localhost,root,,; connection m10; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 10; connection master; connect m$run,localhost,root,,; connection m9; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 9; connection master; connect m$run,localhost,root,,; connection m8; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 8; connection master; connect m$run,localhost,root,,; connection m7; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 7; connection master; connect m$run,localhost,root,,; connection m6; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 6; connection master; connect m$run,localhost,root,,; connection m5; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 5; connection master; connect m$run,localhost,root,,; connection m4; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 4; connection master; connect m$run,localhost,root,,; connection m3; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 3; connection master; connect m$run,localhost,root,,; connection m2; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 2; connection master; connect m$run,localhost,root,,; connection m1; UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 1; connection master; connection master; SET GLOBAL event_scheduler = OFF; connection m20; disconnect m20; connection m19; disconnect m19; connection m18; disconnect m18; connection m17; disconnect m17; connection m16; disconnect m16; connection m15; disconnect m15; connection m14; disconnect m14; connection m13; disconnect m13; connection m12; disconnect m12; connection m11; disconnect m11; connection m10; disconnect m10; connection m9; disconnect m9; connection m8; disconnect m8; connection m7; disconnect m7; connection m6; disconnect m6; connection m5; disconnect m5; connection m4; disconnect m4; connection m3; disconnect m3; connection m2; disconnect m2; connection m1; disconnect m1; connection slave; include/stop_slave.inc set global rpl_semi_sync_slave_enabled = 0; connection master; set global rpl_semi_sync_master_enabled = 0; connection slave; include/start_slave.inc connection master; DROP EVENT ev1; DROP EVENT ev2; DROP TABLE t1; connection slave; include/rpl_end.inc