summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result
blob: 2d7d3087faf727916d544e5484880d24293e40a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
include/rpl_init.inc [topology=1->2->3->4]
connection server_1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
connection server_2;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
SET GLOBAL slave_parallel_mode='optimistic';
connection server_3;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
SET GLOBAL slave_parallel_mode='optimistic';
connection server_4;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
SET GLOBAL slave_parallel_mode='optimistic';
*** MDEV-6676: Test that @@skip_parallel_replication is preserved in slave binlog ***
connection server_1;
INSERT INTO t1 VALUES(1,1);
BEGIN;
INSERT INTO t1 VALUES(2,1);
INSERT INTO t1 VALUES(3,1);
COMMIT;
SET SESSION skip_parallel_replication=1;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
UPDATE t1 SET b=b+1 WHERE a=2;
SET SESSION skip_parallel_replication=0;
SELECT * FROM t1 ORDER BY a;
a	b
1	1
2	11
3	1
include/save_master_gtid.inc
connection server_2;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
a	b
1	1
2	11
3	1
status
Ok, no retry
connection server_3;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
a	b
1	1
2	11
3	1
status
Ok, no retry
connection server_4;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
a	b
1	1
2	11
3	1
status
Ok, no retry
*** MDEV-6676: Test that the FL_WAITED flag in GTID is preserved in slave binlog ***
connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=slave_pos;
SET GLOBAL slave_parallel_mode='optimistic';
connection server_3;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=slave_pos;
SET GLOBAL slave_parallel_mode='optimistic';
connection server_4;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=slave_pos;
SET GLOBAL slave_parallel_mode='optimistic';
connection server_1;
BEGIN;
UPDATE t1 SET b=b+1 WHERE a=2;
connect  con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync="thd_report_wait_for SIGNAL waiting1";
UPDATE t1 SET b=b+1 WHERE a=2;
connection server_1;
SET debug_sync="now WAIT_FOR waiting1";
connect  con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync="thd_report_wait_for SIGNAL waiting2";
UPDATE t1 SET b=b+1 WHERE a=2;
connection server_1;
SET debug_sync="now WAIT_FOR waiting2";
connect  con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync="thd_report_wait_for SIGNAL waiting3";
UPDATE t1 SET b=b+1 WHERE a=2;
connection server_1;
SET debug_sync="now WAIT_FOR waiting3";
connect  con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync="thd_report_wait_for SIGNAL waiting4";
UPDATE t1 SET b=b+1 WHERE a=2;
connection server_1;
SET debug_sync="now WAIT_FOR waiting4";
connect  con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync="thd_report_wait_for SIGNAL waiting5";
UPDATE t1 SET b=b+1 WHERE a=2;
connection server_1;
SET debug_sync="now WAIT_FOR waiting5";
connect  con_temp6,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync="thd_report_wait_for SIGNAL waiting6";
UPDATE t1 SET b=b+1 WHERE a=2;
connection server_1;
SET debug_sync="now WAIT_FOR waiting6";
connect  con_temp7,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync="thd_report_wait_for SIGNAL waiting7";
UPDATE t1 SET b=b+1 WHERE a=2;
connection server_1;
SET debug_sync="now WAIT_FOR waiting7";
connect  con_temp8,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
SET debug_sync="thd_report_wait_for SIGNAL waiting8";
UPDATE t1 SET b=b+1 WHERE a=2;
connection server_1;
SET debug_sync="now WAIT_FOR waiting8";
COMMIT;
SET debug_sync="RESET";
connection con_temp1;
COMMIT;
connection con_temp2;
COMMIT;
connection con_temp3;
COMMIT;
connection con_temp4;
COMMIT;
connection con_temp5;
COMMIT;
connection con_temp6;
COMMIT;
connection con_temp7;
COMMIT;
connection con_temp8;
connection server_1;
SELECT * FROM t1 ORDER BY a;
a	b
1	1
2	20
3	1
include/save_master_gtid.inc
connection server_2;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
a	b
1	1
2	20
3	1
status
Ok, no retry
connection server_3;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
a	b
1	1
2	20
3	1
status
Ok, no retry
connection server_4;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
a	b
1	1
2	20
3	1
status
Ok, no retry
connection server_2;
include/stop_slave.inc
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
connection server_3;
include/stop_slave.inc
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
connection server_4;
include/stop_slave.inc
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
connection server_1;
DROP TABLE t1;
include/rpl_end.inc