1include/master-slave.inc
2Warnings:
3Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
4Note	####	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.
5[connection master]
6call mtr.add_suppression("Slave SQL for channel '':.* Could not execute Write_rows event on table test.t1");
7call mtr.add_suppression("Slave SQL for channel '':.* Could not execute Update_rows event on table d1.t1; Deadlock found when trying to get lock");
8call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
9create view worker_proc_list as SELECT id  from Information_Schema.processlist
10where state like 'Waiting for an event from Coordinator';
11create view coord_proc_list  as SELECT id from Information_Schema.processlist where state like 'Slave has read all relay log%';
12include/stop_slave.inc
13set @save.slave_parallel_workers= @@global.slave_parallel_workers;
14set @@global.slave_parallel_workers= 4;
15include/start_slave.inc
16select min(id) from worker_proc_list into @w_id;
17kill query @w_id;
18include/wait_for_slave_sql_to_stop.inc
19include/start_slave.inc
20select id from coord_proc_list into @c_id;
21kill query @c_id;
22include/wait_for_slave_sql_error.inc [errno=1756]
23include/start_slave.inc
24CREATE TABLE t1 (a int primary key) engine=innodb;
25insert into t1 values (1),(2);
26include/sync_slave_sql_with_master.inc
27insert into t1 values (3);
28insert into t1 values (3);
29include/wait_for_slave_sql_to_stop.inc
30delete from t1 where a=3;
31set @save.slave_transaction_retries= @@global.slave_transaction_retries;
32set @@global.slave_transaction_retries= 10;
33include/start_slave.inc
34include/sync_slave_sql_with_master.inc
35delete from t1;
36include/sync_slave_sql_with_master.inc
37insert into t1 values (1),(2),(3);
38create table t2m (a int) engine=myisam;
39insert into t2m values (1);
40include/sync_slave_sql_with_master.inc
41begin;
42update t1 set a=31 where a=3;
43insert into t1 values (5),(6),(7);
44update t1 set a=a+10;
45begin;
46update t1 set a=20 where a=2;
47insert into t2m values (2);
48update t1 set a=30 where a=3;
49commit;
50update t1 set a=21 where a=2;
51rollback;
52include/sync_slave_sql_with_master.inc
53stop slave sql_thread;
54set @@global.sql_slave_skip_counter=7;
55begin;
56select max(a) + 1 from t1 into @a;
57insert into t1 set a=@a;
58commit;
59begin;
60select max(a) + 1 from t1 into @a;
61insert into t1 set a=@a;
62commit;
63begin;
64select max(a) + 1 from t1 into @a;
65insert into t1 set a=@a;
66commit;
67start slave sql_thread;
68include/sync_slave_sql_with_master.inc
69include/stop_slave.inc
70create table t2 (a int);
71insert into t2 values (1);
72start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
73Warnings:
74Note	1753	UNTIL condtion is not supported in multi-threaded slave mode. Slave is started in the sequential execution mode.
75include/wait_for_slave_sql_to_stop.inc
76include/start_slave.inc
77drop table t1;
78drop table t2m;
79drop table t2;
80include/sync_slave_sql_with_master.inc
81drop view worker_proc_list;
82drop view coord_proc_list;
83set @@global.slave_transaction_retries= 0;
84include/stop_slave.inc
85start slave until sql_after_mts_gaps relay_log_file='dummy';
86ERROR 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
87start slave until sql_after_mts_gaps relay_log_pos=0;
88ERROR 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
89start slave until sql_after_mts_gaps master_log_file='dummy';
90ERROR 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
91start slave until sql_after_mts_gaps master_log_pos=0;
92ERROR 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
93start slave until sql_after_mts_gaps SQL_BEFORE_GTIDS='dummy';
94ERROR 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
95call mtr.add_suppression('Slave SQL for channel '': Could not execute Update_rows event on table d1.t1; Deadlock found when trying to get lock');
96include/start_slave.inc
97create database d1;
98create database d2;
99create table d1.t1 (a int primary key) engine=innodb;
100create table d2.t1 (a int primary key) engine=innodb;
101create table d1.t2m (a int) engine=myisam;
102insert into d1.t1 values (1),(2),(3);
103insert into d2.t1 values (1),(2),(3);
104insert into d1.t2m values (1);
105include/sync_slave_sql_with_master.inc
106begin;
107update d1.t1 set a=31 where a=3;
108insert into d1.t1 values (5),(6),(7);
109begin;
110update d1.t1 set a=20 where a=2;
111insert into d1.t2m values (2);
112update d1.t1 set a=30 where a=3;
113insert into d1.t1 values (4);
114begin;
115delete from d2.t1;
116commit;
117commit;
118delete from d1.t1;
119update d1.t1 set a=21 where a=2;
120include/wait_for_slave_sql_error.inc [errno=1213, 1205]
121rollback;
122start slave until sql_after_mts_gaps;
123include/wait_for_slave_sql_to_stop.inc
124set @@global.slave_parallel_workers= @save.slave_parallel_workers;
125include/start_slave.inc
126drop database d1;
127drop database d2;
128include/sync_slave_sql_with_master.inc
129set @@global.slave_transaction_retries= @save.slave_transaction_retries;
130include/rpl_end.inc
131