Debian Codegraph @

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

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 call mtr.add_suppression("Can.t find record in .t[12].* Error_code: MY-001032");
7 call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: MY-001451");
8 call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: MY-001452");
9 call mtr.add_suppression("Duplicate entry '1' for key 'ti1.PRIMARY'.* Error_code: MY-001062.*");
10 call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
11 set @saved_slave_rows_search_algorithms= @@global.slave_rows_search_algorithms;
12 Warnings:
13 Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
14 SET GLOBAL slave_rows_search_algorithms= 'INDEX_SCAN,TABLE_SCAN';
15 Warnings:
16 Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
17 set @old_replica_exec_mode= @@global.replica_exec_mode;
18 set @@global.replica_exec_mode= IDEMPOTENT;
19 create table ti1 (b int primary key) engine = innodb;
20 create table ti2 (a int primary key, b int, foreign key (b) references ti1(b))
21 engine = innodb;
22 set foreign_key_checks=1 /* ensure the check */;
23 insert into ti1 values (1),(2),(3);
24 insert into ti2 set a=2, b=2;
25 include/sync_slave_sql_with_master.inc
26 select * from ti1 order by b /* must be (1),(2),(3) */;
27 b
28 1
29 2
30 3
31 insert into ti2 set a=1, b=1;
32 select * from ti2 order by b /* must be (1,1) (2,2) */;
33 a b
34 1 1
35 2 2
36 set @save_binlog_format= @@session.binlog_format;
37 Warnings:
38 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
39 set @@session.binlog_format= 'row';
40 Warnings:
41 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
42 delete from ti1 where b=1;
43 select * from ti1 order by b /* must be (2),(3) */;
44 b
45 2
46 3
47 include/sync_slave_sql_with_master.inc
48 select * from ti1 order by b /* must stays as were on master (1),(2),(3) */;
49 b
50 1
51 2
52 3
53 delete from ti1 where b=3;
54 insert into ti2 set a=3, b=3;
55 include/sync_slave_sql_with_master.inc
56 select * from ti2 order by b /* must be (1,1),(2,2) - not inserted */;
57 a b
58 1 1
59 2 2
60 set global replica_exec_mode='IDEMPOTENT';
61 set global replica_exec_mode='STRICT';
62 set global replica_exec_mode='IDEMPOTENT,STRICT';
63 ERROR 42000: Variable 'replica_exec_mode' can't be set to the value of 'IDEMPOTENT,STRICT'
64 select @@global.replica_exec_mode /* must be STRICT */;
65 @@global.replica_exec_mode
66 STRICT
67 *** foreign keys errors as above now forces to stop
68 set foreign_key_checks=0;
69 drop table ti2, ti1;
70 create table ti1 (b int primary key) engine = innodb;
71 create table ti2 (a int primary key, b int, foreign key (b) references ti1(b))
72 engine = innodb;
73 set foreign_key_checks=1 /* ensure the check */;
74 insert into ti1 values (1),(2),(3);
75 insert into ti2 set a=2, b=2;
76 include/sync_slave_sql_with_master.inc
77 select * from ti1 order by b /* must be (1),(2),(3) */;
78 b
79 1
80 2
81 3
82 *** conspire future problem
83 insert into ti2 set a=1, b=1;
84 select * from ti2 order by b /* must be (1,1) (2,2) */;
85 a b
86 1 1
87 2 2
88 delete from ti1 where b=1 /* offending delete event */;
89 select * from ti1 order by b /* must be (2),(3) */;
90 b
91 2
92 3
93 *** slave must stop (Trying to delete a referenced foreing key)
94 include/wait_for_slave_sql_to_stop.inc
95 Last_SQL_Error
96 1451
97 select * from ti1 order by b /* must be (1),(2),(3) - not deleted */;
98 b
99 1
100 2
101 3
102 set foreign_key_checks= 0;
103 delete from ti2 where b=1;
104 set foreign_key_checks= 1;
105 set global replica_exec_mode='IDEMPOTENT';
106 start slave sql_thread;
107 Warnings:
108 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
109 include/sync_slave_sql_with_master.inc
110 set global replica_exec_mode='STRICT';
111 include/sync_slave_sql_with_master.inc
112 *** conspire the following insert failure
113 *** conspire future problem
114 delete from ti1 where b=3;
115 insert into ti2 set a=3, b=3 /* offending write event */;
116 *** slave must stop (Trying to insert an invalid foreign key)
117 include/wait_for_slave_sql_to_stop.inc
118 Last_SQL_Error
119 1452
120 select * from ti2 order by b /* must be (2,2) */;
121 a b
122 2 2
123 set foreign_key_checks= 0;
124 insert into ti1 set b=3;
125 set foreign_key_checks= 1;
126 set global replica_exec_mode='IDEMPOTENT';
127 start slave sql_thread;
128 Warnings:
129 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
130 include/sync_slave_sql_with_master.inc
131 set global replica_exec_mode='STRICT';
132 include/sync_slave_sql_with_master.inc
133 select * from ti2 order by b /* must be (2,2),(3,3) */;
134 a b
135 2 2
136 3 3
137 *** other errors
138 *** conspiring query
139 insert into ti1 set b=1;
140 insert into ti1 set b=1 /* offending write event */;
141 *** slave must stop (Trying to insert a dupliacte key)
142 include/wait_for_slave_sql_to_stop.inc
143 Last_SQL_Error
144 1062
145 set foreign_key_checks= 0;
146 delete from ti1 where b=1;
147 set foreign_key_checks= 1;
148 set global replica_exec_mode='IDEMPOTENT';
149 start slave sql_thread;
150 Warnings:
151 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
152 include/sync_slave_sql_with_master.inc
153 set global replica_exec_mode='STRICT';
154 CREATE TABLE t1 (a INT PRIMARY KEY);
155 CREATE TABLE t2 (a INT);
156 INSERT INTO t1 VALUES (-1),(-2),(-3);
157 INSERT INTO t2 VALUES (-1),(-2),(-3);
158 include/sync_slave_sql_with_master.inc
159 DELETE FROM t1 WHERE a = -2;
160 DELETE FROM t2 WHERE a = -2;
161 DELETE FROM t1 WHERE a = -2;
162 *** slave must stop (Key was not found)
163 include/wait_for_slave_sql_to_stop.inc
164 Last_SQL_Error
165 1032
166 set global replica_exec_mode='IDEMPOTENT';
167 start slave sql_thread;
168 Warnings:
169 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
170 include/sync_slave_sql_with_master.inc
171 set global replica_exec_mode='STRICT';
172 DELETE FROM t2 WHERE a = -2;
173 *** slave must stop (Key was not found)
174 include/wait_for_slave_sql_to_stop.inc
175 Last_SQL_Error
176 1032
177 set global replica_exec_mode='IDEMPOTENT';
178 start slave sql_thread;
179 Warnings:
180 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
181 include/sync_slave_sql_with_master.inc
182 set global replica_exec_mode='STRICT';
183 UPDATE t1 SET a = 1 WHERE a = -1;
184 UPDATE t2 SET a = 1 WHERE a = -1;
185 UPDATE t1 SET a = 1 WHERE a = -1;
186 *** slave must stop (Key was not found)
187 include/wait_for_slave_sql_to_stop.inc
188 Last_SQL_Error
189 1032
190 set global replica_exec_mode='IDEMPOTENT';
191 start slave sql_thread;
192 Warnings:
193 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
194 include/sync_slave_sql_with_master.inc
195 set global replica_exec_mode='STRICT';
196 UPDATE t2 SET a = 1 WHERE a = -1;
197 *** slave must stop (Key was not found)
198 include/wait_for_slave_sql_to_stop.inc
199 Last_SQL_Error
200 1032
201 set global replica_exec_mode='IDEMPOTENT';
202 start slave sql_thread;
203 Warnings:
204 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
205 include/sync_slave_sql_with_master.inc
206 SET @@global.replica_exec_mode= @old_replica_exec_mode;
207 drop table t1,t2,ti2,ti1;
208 include/sync_slave_sql_with_master.inc
209 set @@global.replica_exec_mode= @old_replica_exec_mode;
210 include/rpl_reset.inc
211 SET GLOBAL slave_rows_search_algorithms= 'INDEX_SCAN,HASH_SCAN';
212 Warnings:
213 Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
214 set @old_replica_exec_mode= @@global.replica_exec_mode;
215 set @@global.replica_exec_mode= IDEMPOTENT;
216 create table ti1 (b int primary key) engine = innodb;
217 create table ti2 (a int primary key, b int, foreign key (b) references ti1(b))
218 engine = innodb;
219 set foreign_key_checks=1 /* ensure the check */;
220 insert into ti1 values (1),(2),(3);
221 insert into ti2 set a=2, b=2;
222 include/sync_slave_sql_with_master.inc
223 select * from ti1 order by b /* must be (1),(2),(3) */;
224 b
225 1
226 2
227 3
228 insert into ti2 set a=1, b=1;
229 select * from ti2 order by b /* must be (1,1) (2,2) */;
230 a b
231 1 1
232 2 2
233 set @save_binlog_format= @@session.binlog_format;
234 Warnings:
235 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
236 set @@session.binlog_format= 'row';
237 Warnings:
238 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
239 delete from ti1 where b=1;
240 select * from ti1 order by b /* must be (2),(3) */;
241 b
242 2
243 3
244 include/sync_slave_sql_with_master.inc
245 select * from ti1 order by b /* must stays as were on master (1),(2),(3) */;
246 b
247 1
248 2
249 3
250 delete from ti1 where b=3;
251 insert into ti2 set a=3, b=3;
252 include/sync_slave_sql_with_master.inc
253 select * from ti2 order by b /* must be (1,1),(2,2) - not inserted */;
254 a b
255 1 1
256 2 2
257 set global replica_exec_mode='IDEMPOTENT';
258 set global replica_exec_mode='STRICT';
259 set global replica_exec_mode='IDEMPOTENT,STRICT';
260 ERROR 42000: Variable 'replica_exec_mode' can't be set to the value of 'IDEMPOTENT,STRICT'
261 select @@global.replica_exec_mode /* must be STRICT */;
262 @@global.replica_exec_mode
263 STRICT
264 *** foreign keys errors as above now forces to stop
265 set foreign_key_checks=0;
266 drop table ti2, ti1;
267 create table ti1 (b int primary key) engine = innodb;
268 create table ti2 (a int primary key, b int, foreign key (b) references ti1(b))
269 engine = innodb;
270 set foreign_key_checks=1 /* ensure the check */;
271 insert into ti1 values (1),(2),(3);
272 insert into ti2 set a=2, b=2;
273 include/sync_slave_sql_with_master.inc
274 select * from ti1 order by b /* must be (1),(2),(3) */;
275 b
276 1
277 2
278 3
279 *** conspire future problem
280 insert into ti2 set a=1, b=1;
281 select * from ti2 order by b /* must be (1,1) (2,2) */;
282 a b
283 1 1
284 2 2
285 delete from ti1 where b=1 /* offending delete event */;
286 select * from ti1 order by b /* must be (2),(3) */;
287 b
288 2
289 3
290 *** slave must stop (Trying to delete a referenced foreing key)
291 include/wait_for_slave_sql_to_stop.inc
292 Last_SQL_Error
293 1451
294 select * from ti1 order by b /* must be (1),(2),(3) - not deleted */;
295 b
296 1
297 2
298 3
299 set foreign_key_checks= 0;
300 delete from ti2 where b=1;
301 set foreign_key_checks= 1;
302 set global replica_exec_mode='IDEMPOTENT';
303 start slave sql_thread;
304 Warnings:
305 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
306 include/sync_slave_sql_with_master.inc
307 set global replica_exec_mode='STRICT';
308 include/sync_slave_sql_with_master.inc
309 *** conspire the following insert failure
310 *** conspire future problem
311 delete from ti1 where b=3;
312 insert into ti2 set a=3, b=3 /* offending write event */;
313 *** slave must stop (Trying to insert an invalid foreign key)
314 include/wait_for_slave_sql_to_stop.inc
315 Last_SQL_Error
316 1452
317 select * from ti2 order by b /* must be (2,2) */;
318 a b
319 2 2
320 set foreign_key_checks= 0;
321 insert into ti1 set b=3;
322 set foreign_key_checks= 1;
323 set global replica_exec_mode='IDEMPOTENT';
324 start slave sql_thread;
325 Warnings:
326 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
327 include/sync_slave_sql_with_master.inc
328 set global replica_exec_mode='STRICT';
329 include/sync_slave_sql_with_master.inc
330 select * from ti2 order by b /* must be (2,2),(3,3) */;
331 a b
332 2 2
333 3 3
334 *** other errors
335 *** conspiring query
336 insert into ti1 set b=1;
337 insert into ti1 set b=1 /* offending write event */;
338 *** slave must stop (Trying to insert a dupliacte key)
339 include/wait_for_slave_sql_to_stop.inc
340 Last_SQL_Error
341 1062
342 set foreign_key_checks= 0;
343 delete from ti1 where b=1;
344 set foreign_key_checks= 1;
345 set global replica_exec_mode='IDEMPOTENT';
346 start slave sql_thread;
347 Warnings:
348 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
349 include/sync_slave_sql_with_master.inc
350 set global replica_exec_mode='STRICT';
351 CREATE TABLE t1 (a INT PRIMARY KEY);
352 CREATE TABLE t2 (a INT);
353 INSERT INTO t1 VALUES (-1),(-2),(-3);
354 INSERT INTO t2 VALUES (-1),(-2),(-3);
355 include/sync_slave_sql_with_master.inc
356 DELETE FROM t1 WHERE a = -2;
357 DELETE FROM t2 WHERE a = -2;
358 DELETE FROM t1 WHERE a = -2;
359 *** slave must stop (Key was not found)
360 include/wait_for_slave_sql_to_stop.inc
361 Last_SQL_Error
362 1032
363 set global replica_exec_mode='IDEMPOTENT';
364 start slave sql_thread;
365 Warnings:
366 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
367 include/sync_slave_sql_with_master.inc
368 set global replica_exec_mode='STRICT';
369 DELETE FROM t2 WHERE a = -2;
370 *** slave must stop (Key was not found)
371 include/wait_for_slave_sql_to_stop.inc
372 Last_SQL_Error
373 1032
374 set global replica_exec_mode='IDEMPOTENT';
375 start slave sql_thread;
376 Warnings:
377 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
378 include/sync_slave_sql_with_master.inc
379 set global replica_exec_mode='STRICT';
380 UPDATE t1 SET a = 1 WHERE a = -1;
381 UPDATE t2 SET a = 1 WHERE a = -1;
382 UPDATE t1 SET a = 1 WHERE a = -1;
383 *** slave must stop (Key was not found)
384 include/wait_for_slave_sql_to_stop.inc
385 Last_SQL_Error
386 1032
387 set global replica_exec_mode='IDEMPOTENT';
388 start slave sql_thread;
389 Warnings:
390 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
391 include/sync_slave_sql_with_master.inc
392 set global replica_exec_mode='STRICT';
393 UPDATE t2 SET a = 1 WHERE a = -1;
394 *** slave must stop (Key was not found)
395 include/wait_for_slave_sql_to_stop.inc
396 Last_SQL_Error
397 1032
398 set global replica_exec_mode='IDEMPOTENT';
399 start slave sql_thread;
400 Warnings:
401 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
402 include/sync_slave_sql_with_master.inc
403 SET @@global.replica_exec_mode= @old_replica_exec_mode;
404 drop table t1,t2,ti2,ti1;
405 include/sync_slave_sql_with_master.inc
406 set @@global.replica_exec_mode= @old_replica_exec_mode;
407 set @@global.slave_rows_search_algorithms= @saved_slave_rows_search_algorithms;
408 Warnings:
409 Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
410 *** end of tests
411 include/rpl_end.inc