Debian Codegraph @

mysql-test/suite/rpl/r/rpl_semisync_ali_issues.result

raw
1 include/master-slave.inc
2 [connection master]
3 CALL mtr.add_suppression("Failed to start semi-sync ACK receiver thread.*");
4 CALL mtr.add_suppression("Failed to register slave to semi-sync ACK receiver thread.*");
5 CALL mtr.add_suppression("Failed to stop ack receiver thread on pthread_join.*");
6 CALL mtr.add_suppression("Got an error reading communication packets:*");
7 CALL mtr.add_suppression("Timeout waiting for reply of binlog*");
8 CALL mtr.add_suppression("slave_read_sync_header*");
9 CALL mtr.add_suppression("Missing magic number for semi-sync*");
10 CALL mtr.add_suppression("Got timeout reading communication packets*");
11 CALL mtr.add_suppression("Failed to call*");
12 CALL mtr.add_suppression("Execution failed on master*");
13 CALL mtr.add_suppression("Failed on request_dump()*");
14 CALL mtr.add_suppression("Semi-sync master failed on*");
15 CALL mtr.add_suppression("Master command COM_BINLOG_DUMP failed*");
16 CALL mtr.add_suppression("on master failed*");
17 CALL mtr.add_suppression("Semi-sync slave net_flush*");
18 CALL mtr.add_suppression("Failed to flush master info*");
19 CALL mtr.add_suppression("Request to stop slave SQL Thread received while apply*");
20 connection master;
21 [ enable semi-sync on master ]
22 set global rpl_semi_sync_master_enabled = 1;
23 show variables like 'rpl_semi_sync_master_enabled';
24 Variable_name Value
25 rpl_semi_sync_master_enabled ON
26 connection slave;
27 [ enable semi-sync on slave ]
28 stop slave;
29 set global rpl_semi_sync_slave_enabled = 1;
30 start slave;
31 show status like 'rpl_semi_sync_slave%';
32 Variable_name Value
33 Rpl_semi_sync_slave_send_ack 0
34 Rpl_semi_sync_slave_status ON
35 connection master;
36 CREATE TABLE t1(a INT) ENGINE=InnoDB;
37 connection slave;
38 connection master;
39 connect con1,localhost,root,,;
40 connect con2,localhost,root,,;
41 connect con3,localhost,root,,;
42 show status like 'Rpl_semi_sync_master_clients';
43 Variable_name Value
44 Rpl_semi_sync_master_clients 1
45 show status like "rpl_semi_sync_master_yes_tx";
46 Variable_name Value
47 Rpl_semi_sync_master_yes_tx 1
48 #########################################
49 # Test rpl_semi_sync_master_wait_point #
50 #########################################
51 # Test after_sync and after_commit first.
52 #Test after_sync
53 connection con1;
54 SET GLOBAL rpl_semi_sync_master_timeout = 1000000;
55 SET GLOBAL rpl_semi_sync_master_wait_point= 'AFTER_SYNC';
56 SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL after_sync_done WAIT_FOR end";
57 INSERT into t1 values (1);;
58 connection con2;
59 SET DEBUG_SYNC= "now WAIT_FOR after_sync_done";
60 connection slave;
61 #slave can see record (1) after sync slave with master
62 select * from t1;
63 a
64 1
65 connection con2;
66 #con2 shouldn't see record (1)
67 select * from t1;
68 a
69 SET DEBUG_SYNC= "now SIGNAL end";
70 connection con1;
71 connection con1;
72 select * from t1;
73 a
74 1
75 truncate table t1;
76 INSERT INTO t1 VALUES (100);
77 connection slave;
78 connection con1;
79 SET DEBUG_SYNC= 'reset';
80 SET DEBUG_SYNC= "commit_before_get_LOCK_log SIGNAL before_fetch_done WAIT_FOR more_queue";
81 INSERT into t1 VALUES (1);;
82 connection con2;
83 SET DEBUG_SYNC= "now WAIT_FOR before_fetch_done";
84 SET DEBUG_SYNC= "after_semisync_queue SIGNAL more_queue";
85 INSERT INTO t1 VALUES (2);
86 connection con1;
87 connection con1;
88 SET DEBUG_SYNC= 'reset';
89 SET DEBUG_SYNC= "commit_before_get_LOCK_log SIGNAL before_fetch_done WAIT_FOR disable_semisync";
90 INSERT into t1 VALUES (3);;
91 connection con2;
92 SET DEBUG_SYNC= "now WAIT_FOR before_fetch_done";
93 SET GLOBAL rpl_semi_sync_master_enabled= 0;
94 SET DEBUG_SYNC= "now SIGNAL disable_semisync";
95 connection con1;
96 SET GLOBAL rpl_semi_sync_master_enabled = 1;
97 show status like 'Rpl_semi_sync_master_clients';
98 Variable_name Value
99 Rpl_semi_sync_master_clients 1
100 #Test after_commit
101 connection con1;
102 SET GLOBAL rpl_semi_sync_master_wait_point= 'AFTER_COMMIT';
103 SET DEBUG_SYNC= "after_group_after_commit SIGNAL after_commit_done WAIT_FOR end";
104 INSERT into t1 values (4);;
105 connection con2;
106 SET DEBUG_SYNC= "now WAIT_FOR after_commit_done";
107 connection slave;
108 select * from t1;
109 a
110 100
111 1
112 2
113 3
114 4
115 connection con2;
116 select * from t1;
117 a
118 100
119 1
120 2
121 3
122 4
123 SET DEBUG_SYNC= "now SIGNAL end";
124 connection con1;
125 connection con1;
126 select * from t1;
127 a
128 100
129 1
130 2
131 3
132 4
133 truncate table t1;
134 #######################################################
135 # Test some other options in order to cover the patch #
136 #######################################################
137 connection slave;
138 # Test rpl_semi_sync_slave_trace_level
139 SET GLOBAL rpl_semi_sync_slave_trace_level= 1;
140 SET GLOBAL rpl_semi_sync_slave_trace_level= 16;
141 SET GLOBAL rpl_semi_sync_slave_trace_level= 64;
142 SET GLOBAL rpl_semi_sync_slave_trace_level= 128;
143 SET GLOBAL rpl_semi_sync_slave_trace_level= 32;
144 connection master;
145 # Test rpl_semi_sync_master_trace_level
146 SET GLOBAL rpl_semi_sync_master_trace_level= 1;
147 SET GLOBAL rpl_semi_sync_master_trace_level= 16;
148 SET GLOBAL rpl_semi_sync_master_trace_level= 64;
149 SET GLOBAL rpl_semi_sync_master_trace_level= 128;
150 SET GLOBAL rpl_semi_sync_master_trace_level= 32;
151 # Test rpl_semi_sync_master_timeout
152 SET GLOBAL rpl_semi_sync_master_timeout= 1000;
153 SET GLOBAL rpl_semi_sync_master_timeout= 10000;
154 SET GLOBAL rpl_semi_sync_master_timeout = 1000000;
155 # Test rpl_semi_sync_slave_kill_conn_timeout
156 SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout= 10;
157 SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout= 20;
158 SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout= 60;
159 SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout= 5;
160 ############################################
161 # Test rpl_semi_sync_master_wait_no_slave #
162 ############################################
163 SET GLOBAL rpl_semi_sync_master_wait_no_slave = 1;
164 connection slave;
165 STOP SLAVE IO_THREAD;
166 include/wait_for_slave_io_to_stop.inc
167 connection con1;
168 SET GLOBAL rpl_semi_sync_master_timeout = 1000;
169 INSERT INTO t1 values (1);;
170 connection con1;
171 # Rpl_semi_sync_master_no_tx should be non-zero
172 SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx'
173 connection slave;
174 START SLAVE IO_THREAD;
175 include/wait_for_slave_io_to_start.inc
176 connection con1;
177 INSERT INTO t1 values (2);
178 connection slave;
179 connection con1;
180 show status like 'Rpl_semi_sync_master_clients';
181 Variable_name Value
182 Rpl_semi_sync_master_clients 1
183 show status like 'Rpl_semi_sync_master_status';
184 Variable_name Value
185 Rpl_semi_sync_master_status ON
186 connection slave;
187 STOP SLAVE IO_THREAD;
188 include/wait_for_slave_io_to_stop.inc
189 connection con1;
190 SET GLOBAL rpl_semi_sync_master_wait_no_slave= 0;
191 SET GLOBAL rpl_semi_sync_master_timeout= 1000000000;
192 INSERT INTO t1 values (3);
193 show status like 'Rpl_semi_sync_master_clients';
194 Variable_name Value
195 Rpl_semi_sync_master_clients 0
196 show status like 'Rpl_semi_sync_master_status';
197 Variable_name Value
198 Rpl_semi_sync_master_status ON
199 connection slave;
200 START SLAVE IO_THREAD;
201 include/wait_for_slave_io_to_start.inc
202 connection con1;
203 SET GLOBAL rpl_semi_sync_master_timeout= 10000000;
204 SET GLOBAL rpl_semi_sync_master_wait_no_slave= 1;
205 INSERT INTO t1 values (4);
206 connection slave;
207 connection con1;
208 show status like 'Rpl_semi_sync_master_status';
209 Variable_name Value
210 Rpl_semi_sync_master_status ON
211 show status like 'Rpl_semi_sync_master_clients';
212 Variable_name Value
213 Rpl_semi_sync_master_clients 1
214 ##########################################
215 # Test rpl_semi_sync_slave_delay_master #
216 ##########################################
217 connection slave;
218 SET GLOBAL rpl_semi_sync_slave_delay_master= 1;
219 START SLAVE IO_THREAD;
220 Warnings:
221 Note 1254 Slave is already running
222 include/wait_for_slave_io_to_start.inc
223 connection con1;
224 INSERT INTO t1 values (3);
225 include/sync_slave_io_with_master.inc
226 connection con1;
227 show status like 'Rpl_semi_sync_master_clients';
228 Variable_name Value
229 Rpl_semi_sync_master_clients 1
230 show status like 'Rpl_semi_sync_master_status';
231 Variable_name Value
232 Rpl_semi_sync_master_status ON
233 connection slave;
234 connection slave;
235 select * from t1 order by a;
236 a
237 1
238 2
239 3
240 3
241 4
242 connection con1;
243 select * from t1 order by a;
244 a
245 1
246 2
247 3
248 3
249 4
250 connection slave;
251 SET GLOBAL rpl_semi_sync_slave_delay_master = 0;
252 STOP SLAVE IO_THREAD;
253 include/wait_for_slave_io_to_stop.inc
254 START SLAVE IO_THREAD;
255 include/wait_for_slave_io_to_start.inc
256 ##########################################################
257 # Test rpl_semi_sync_master_enabled and new ACK thread #
258 #########################################################
259 connection con1;
260 SET GLOBAL rpl_semi_sync_master_enabled = 0;
261 show status like 'Rpl_semi_sync_master_clients';
262 Variable_name Value
263 Rpl_semi_sync_master_clients 1
264 INSERT INTO t1 VALUES (1);
265 SET GLOBAL rpl_semi_sync_master_enabled = 1;
266 INSERT INTO t1 VALUES (2);
267 show status like 'Rpl_semi_sync_master_clients';
268 Variable_name Value
269 Rpl_semi_sync_master_clients 1
270 # Test failure of select error .
271 SET GLOBAL debug_dbug = 'd,rpl_semisync_simulate_select_error';
272 INSERT INTO t1 VALUES(3);
273 connection slave;
274 connection con1;
275 # Test failure of pthread_create
276 SET GLOBAL rpl_semi_sync_master_enabled = 0;
277 SET GLOBAL debug_dbug = 'd,rpl_semisync_simulate_create_thread_failure';
278 SET GLOBAL rpl_semi_sync_master_enabled= ON;
279 # Test failure of pthread_join
280 SET GLOBAL rpl_semi_sync_master_enabled= OFF;
281 #
282 # Failure on registering semisync slave
283 #
284 SET GLOBAL debug_dbug= 'd,rpl_semisync_simulate_add_slave_failure';
285 SET GLOBAL rpl_semi_sync_master_enabled= ON;
286 connection slave;
287 STOP SLAVE IO_THREAD;
288 include/wait_for_slave_io_to_stop.inc
289 START SLAVE IO_THREAD;
290 include/wait_for_slave_io_to_start.inc
291 connection con1;
292 SET GLOBAL debug_dbug='';
293 connection slave;
294 START SLAVE IO_THREAD;
295 include/wait_for_slave_io_to_start.inc
296 connection con1;
297 connection slave;
298 show status like 'Rpl_semi_sync_master_clients';
299 Variable_name Value
300 Rpl_semi_sync_master_clients 0
301 ##################################################################
302 # Test fixing of BUG#70669 #
303 #SLAVE CAN'T CONTINUE REPLICATION AFTER MASTER'S CRASH RECOVERY #
304 #################################################################
305 connection con1;
306 SET GLOBAL sync_binlog = 1;
307 CREATE TABLE t2 (c1 INT);
308 connection slave;
309 connection con1;
310 INSERT INTO t2 values (1);
311 connection slave;
312 connection con2;
313 connection con1;
314 connection slave;
315 show tables like 't2';
316 Tables_in_test (t2)
317 t2
318 select * from t2;
319 c1
320 1
321 connection con1;
322 INSERT INTO t2 VALUES (2);
323 connection con2;
324 INSERT INTO t2 VALUES (3);
325 connection con1;
326 connection con2;
327 connection con1;
328 SET GLOBAL sync_binlog = 0;
329 DROP TABLE t2;
330 connection con2;
331 connection slave;
332 show tables like 't2';
333 Tables_in_test (t2)
334 connection con2;
335 #cleanup
336 connection master;
337 SET DEBUG_SYNC= 'reset';
338 disconnect con1;
339 disconnect con2;
340 disconnect con3;
341 SET GLOBAL rpl_semi_sync_master_timeout= 10000;
342 SET GLOBAL rpl_semi_sync_master_enabled = 0;
343 DROP TABLE t1;
344 connection slave;
345 SET GLOBAL rpl_semi_sync_slave_enabled = 0;
346 include/rpl_end.inc