include/master-slave.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection master] call mtr.add_suppression('Slave SQL:.* Could not execute Write_rows event on table test.t1'); call mtr.add_suppression("Slave SQL:.* Could not execute Update_rows event on table d1.t1; Deadlock found when trying to get lock"); call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); create view worker_proc_list as SELECT id from Information_Schema.processlist where state like 'Waiting for an event from Coordinator'; create view coord_proc_list as SELECT id from Information_Schema.processlist where state like 'Slave has read all relay log%'; include/stop_slave.inc set @save.slave_parallel_workers= @@global.slave_parallel_workers; set @@global.slave_parallel_workers= 4; include/start_slave.inc select min(id) from worker_proc_list into @w_id; kill query @w_id; include/wait_for_slave_sql_to_stop.inc include/start_slave.inc select id from coord_proc_list into @c_id; kill query @c_id; include/wait_for_slave_sql_error.inc [errno=1756] include/start_slave.inc CREATE TABLE t1 (a int primary key) engine=innodb; insert into t1 values (1),(2); include/sync_slave_sql_with_master.inc insert into t1 values (3); insert into t1 values (3); include/wait_for_slave_sql_to_stop.inc delete from t1 where a=3; include/start_slave.inc include/sync_slave_sql_with_master.inc delete from t1; include/sync_slave_sql_with_master.inc insert into t1 values (1),(2),(3); create table t2m (a int) engine=myisam; insert into t2m values (1); include/sync_slave_sql_with_master.inc begin; update t1 set a=31 where a=3; insert into t1 values (5),(6),(7); update t1 set a=a+10; begin; update t1 set a=20 where a=2; insert into t2m values (2); update t1 set a=30 where a=3; commit; update t1 set a=21 where a=2; include/wait_for_slave_sql_error.inc [errno=1213, 1205] rollback; include/start_slave.inc include/sync_slave_sql_with_master.inc stop slave sql_thread; set @@global.sql_slave_skip_counter=7; begin; select max(a) + 1 from t1 into @a; insert into t1 set a=@a; commit; begin; select max(a) + 1 from t1 into @a; insert into t1 set a=@a; commit; begin; select max(a) + 1 from t1 into @a; insert into t1 set a=@a; commit; set @save.slave_transaction_retries= @@global.slave_transaction_retries; set @@global.slave_transaction_retries= 1; start slave sql_thread; Warnings: Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop. include/sync_slave_sql_with_master.inc include/stop_slave.inc create table t2 (a int); insert into t2 values (1); start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS; Warnings: Note 1753 UNTIL condtion is not supported in multi-threaded slave mode. Slave is started in the sequential execution mode. include/wait_for_slave_sql_to_stop.inc include/start_slave.inc Warnings: Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop. drop table t1; drop table t2m; drop table t2; include/sync_slave_sql_with_master.inc drop view worker_proc_list; drop view coord_proc_list; set @@global.slave_transaction_retries= @save.slave_transaction_retries; include/stop_slave.inc start slave until sql_after_mts_gaps relay_log_file='dummy'; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'relay_log_file='dummy'' at line 1 start slave until sql_after_mts_gaps relay_log_pos=0; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'relay_log_pos=0' at line 1 start slave until sql_after_mts_gaps master_log_file='dummy'; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'master_log_file='dummy'' at line 1 start slave until sql_after_mts_gaps master_log_pos=0; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'master_log_pos=0' at line 1 start slave until sql_after_mts_gaps SQL_BEFORE_GTIDS='dummy'; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL_BEFORE_GTIDS='dummy'' at line 1 call mtr.add_suppression('Slave SQL: Could not execute Update_rows event on table d1.t1; Deadlock found when trying to get lock'); include/start_slave.inc create database d1; create database d2; create table d1.t1 (a int primary key) engine=innodb; create table d2.t1 (a int primary key) engine=innodb; create table d1.t2m (a int) engine=myisam; insert into d1.t1 values (1),(2),(3); insert into d2.t1 values (1),(2),(3); insert into d1.t2m values (1); include/sync_slave_sql_with_master.inc begin; update d1.t1 set a=31 where a=3; insert into d1.t1 values (5),(6),(7); begin; update d1.t1 set a=20 where a=2; insert into d1.t2m values (2); update d1.t1 set a=30 where a=3; insert into d1.t1 values (4); commit; delete from d2.t1; delete from d1.t1; update d1.t1 set a=21 where a=2; include/wait_for_slave_sql_error.inc [errno=1213, 1205] rollback; start slave until sql_after_mts_gaps; include/wait_for_slave_sql_to_stop.inc include/start_slave.inc drop database d1; drop database d2; include/sync_slave_sql_with_master.inc set @@global.slave_parallel_workers= @save.slave_parallel_workers; include/rpl_end.inc