Debian Codegraph @

mysql-test/suite/rpl_ndb/r/rpl_ndb_row_basic.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 CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'NDB' ;
7 SELECT * FROM t1;
8 C1 C2
9 include/sync_slave_sql_with_master.inc
10 SELECT * FROM t1;
11 C1 C2
12 INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X');
13 INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A');
14 SELECT * FROM t1 ORDER BY C1,C2;
15 C1 C2
16 A A
17 A B
18 A C
19 X X
20 X Y
21 X Z
22 include/sync_slave_sql_with_master.inc
23 SELECT * FROM t1 ORDER BY C1,C2;
24 C1 C2
25 A A
26 A B
27 A C
28 X X
29 X Y
30 X Z
31 DELETE FROM t1 WHERE C1 = C2;
32 SELECT * FROM t1 ORDER BY C1,C2;
33 C1 C2
34 A B
35 A C
36 X Y
37 X Z
38 include/sync_slave_sql_with_master.inc
39 SELECT * FROM t1 ORDER BY C1,C2;
40 C1 C2
41 A B
42 A C
43 X Y
44 X Z
45 UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
46 SELECT * FROM t1 ORDER BY C1,C2;
47 C1 C2
48 A B
49 A I
50 X Y
51 X Z
52 include/sync_slave_sql_with_master.inc
53 SELECT * FROM t1 ORDER BY C1,C2;
54 C1 C2
55 A B
56 A I
57 X Y
58 X Z
59 UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N';
60 SELECT * FROM t1 ORDER BY c1,c2;
61 C1 C2
62 A B
63 A I
64 X Y
65 X Z
66 include/sync_slave_sql_with_master.inc
67 SELECT * FROM t1 ORDER BY c1,c2;
68 C1 C2
69 A B
70 A I
71 X Y
72 X Z
73 CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'NDB' ;
74 INSERT INTO t2
75 VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25),
76 (6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81);
77 SELECT * FROM t2 ORDER BY c1,c2;
78 c1 c12 c2
79 1 A 2
80 2 A 4
81 3 A 9
82 4 A 15
83 5 A 25
84 6 A 35
85 7 A 50
86 8 A 64
87 9 A 81
88 SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
89 c1 c12 c2
90 2 A 4
91 3 A 9
92 5 A 25
93 8 A 64
94 9 A 81
95 include/sync_slave_sql_with_master.inc
96 SELECT * FROM t2 ORDER BY c1,c2;
97 c1 c12 c2
98 1 A 2
99 2 A 4
100 3 A 9
101 4 A 15
102 5 A 25
103 6 A 35
104 7 A 50
105 8 A 64
106 9 A 81
107 SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
108 c1 c12 c2
109 2 A 4
110 3 A 9
111 5 A 25
112 8 A 64
113 9 A 81
114 UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1;
115 SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
116 c1 c12 c2
117 1 A 1
118 2 A 4
119 3 A 9
120 4 A 16
121 5 A 25
122 6 A 36
123 7 A 49
124 8 A 64
125 9 A 81
126 include/sync_slave_sql_with_master.inc
127 SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
128 c1 c12 c2
129 1 A 1
130 2 A 4
131 3 A 9
132 4 A 16
133 5 A 25
134 6 A 36
135 7 A 49
136 8 A 64
137 9 A 81
138 UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999;
139 SELECT * FROM t2 ORDER BY c1,c2;
140 c1 c12 c2
141 1 A 1
142 2 A 4
143 3 A 9
144 4 A 16
145 5 A 25
146 6 A 36
147 7 A 49
148 8 A 64
149 9 A 81
150 include/sync_slave_sql_with_master.inc
151 SELECT * FROM t2 ORDER BY c1,c2;
152 c1 c12 c2
153 1 A 1
154 2 A 4
155 3 A 9
156 4 A 16
157 5 A 25
158 6 A 36
159 7 A 49
160 8 A 64
161 9 A 81
162 DELETE FROM t2 WHERE c1 % 4 = 0;
163 SELECT * FROM t2 ORDER BY c1,c2;
164 c1 c12 c2
165 1 A 1
166 2 A 4
167 3 A 9
168 5 A 25
169 6 A 36
170 7 A 49
171 9 A 81
172 include/sync_slave_sql_with_master.inc
173 SELECT * FROM t2 ORDER BY c1,c2;
174 c1 c12 c2
175 1 A 1
176 2 A 4
177 3 A 9
178 5 A 25
179 6 A 36
180 7 A 49
181 9 A 81
182 UPDATE t2 SET c12='X';
183 CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'NDB' ;
184 INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1);
185 INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2);
186 SELECT * FROM t3 ORDER BY C1,C2;
187 C1 C2 pk1 C3 pk2
188 A A 3 B 2
189 A B 1 B 1
190 A C 1 B 2
191 X X 3 B 1
192 X Y 2 B 1
193 X Z 2 B 2
194 include/sync_slave_sql_with_master.inc
195 SELECT * FROM t3 ORDER BY C1,C2;
196 C1 C2 pk1 C3 pk2
197 A A 3 B 2
198 A B 1 B 1
199 A C 1 B 2
200 X X 3 B 1
201 X Y 2 B 1
202 X Z 2 B 2
203 DELETE FROM t3 WHERE C1 = C2;
204 SELECT * FROM t3 ORDER BY C1,C2;
205 C1 C2 pk1 C3 pk2
206 A B 1 B 1
207 A C 1 B 2
208 X Y 2 B 1
209 X Z 2 B 2
210 include/sync_slave_sql_with_master.inc
211 SELECT * FROM t3 ORDER BY C1,C2;
212 C1 C2 pk1 C3 pk2
213 A B 1 B 1
214 A C 1 B 2
215 X Y 2 B 1
216 X Z 2 B 2
217 UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
218 SELECT * FROM t3 ORDER BY C1,C2;
219 C1 C2 pk1 C3 pk2
220 A B 1 B 1
221 A I 1 B 2
222 X Y 2 B 1
223 X Z 2 B 2
224 include/sync_slave_sql_with_master.inc
225 SELECT * FROM t3 ORDER BY C1,C2;
226 C1 C2 pk1 C3 pk2
227 A B 1 B 1
228 A I 1 B 2
229 X Y 2 B 1
230 X Z 2 B 2
231 CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'NDB' ;
232 INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3);
233 INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
234 SELECT * FROM t6 ORDER BY C3;
235 C1 C2 C3
236 A B 1
237 X Y 2
238 X X 3
239 A C 4
240 X Z 5
241 A A 6
242 include/sync_slave_sql_with_master.inc
243 SELECT * FROM t6 ORDER BY C3;
244 C1 C2 C3
245 A B 1
246 X Y 2
247 X X 3
248 A C 4
249 X Z 5
250 A A 6
251 DELETE FROM t6 WHERE C1 = C2;
252 SELECT * FROM t6 ORDER BY C3;
253 C1 C2 C3
254 A B 1
255 X Y 2
256 A C 4
257 X Z 5
258 include/sync_slave_sql_with_master.inc
259 SELECT * FROM t6 ORDER BY C3;
260 C1 C2 C3
261 A B 1
262 X Y 2
263 A C 4
264 X Z 5
265 UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
266 SELECT * FROM t6 ORDER BY C3;
267 C1 C2 C3
268 A B 1
269 X Y 2
270 A I 4
271 X Z 5
272 include/sync_slave_sql_with_master.inc
273 SELECT * FROM t6 ORDER BY C3;
274 C1 C2 C3
275 A B 1
276 X Y 2
277 A I 4
278 X Z 5
279 CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'NDB' ;
280 INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3);
281 INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
282 UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1;
283 SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2;
284 C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2
285 X Q 2 1 R 1 X Y 2 S 1
286 X Q 2 1 R 1 X Z 2 S 2
287 X Q 2 2 R 4 X Y 2 S 1
288 X Q 2 2 R 4 X Z 2 S 2
289 X Q 2 3 R 9 X Y 2 S 1
290 X Q 2 3 R 9 X Z 2 S 2
291 X Q 2 5 R 25 X Y 2 S 1
292 X Q 2 5 R 25 X Z 2 S 2
293 X Q 2 6 R 36 X Y 2 S 1
294 X Q 2 6 R 36 X Z 2 S 2
295 X Q 2 7 R 49 X Y 2 S 1
296 X Q 2 7 R 49 X Z 2 S 2
297 X Q 2 9 R 81 X Y 2 S 1
298 X Q 2 9 R 81 X Z 2 S 2
299 X Q 3 1 R 1 X Y 2 S 1
300 X Q 3 1 R 1 X Z 2 S 2
301 X Q 3 2 R 4 X Y 2 S 1
302 X Q 3 2 R 4 X Z 2 S 2
303 X Q 3 3 R 9 X Y 2 S 1
304 X Q 3 3 R 9 X Z 2 S 2
305 X Q 3 5 R 25 X Y 2 S 1
306 X Q 3 5 R 25 X Z 2 S 2
307 X Q 3 6 R 36 X Y 2 S 1
308 X Q 3 6 R 36 X Z 2 S 2
309 X Q 3 7 R 49 X Y 2 S 1
310 X Q 3 7 R 49 X Z 2 S 2
311 X Q 3 9 R 81 X Y 2 S 1
312 X Q 3 9 R 81 X Z 2 S 2
313 X Q 5 1 R 1 X Y 2 S 1
314 X Q 5 1 R 1 X Z 2 S 2
315 X Q 5 2 R 4 X Y 2 S 1
316 X Q 5 2 R 4 X Z 2 S 2
317 X Q 5 3 R 9 X Y 2 S 1
318 X Q 5 3 R 9 X Z 2 S 2
319 X Q 5 5 R 25 X Y 2 S 1
320 X Q 5 5 R 25 X Z 2 S 2
321 X Q 5 6 R 36 X Y 2 S 1
322 X Q 5 6 R 36 X Z 2 S 2
323 X Q 5 7 R 49 X Y 2 S 1
324 X Q 5 7 R 49 X Z 2 S 2
325 X Q 5 9 R 81 X Y 2 S 1
326 X Q 5 9 R 81 X Z 2 S 2
327 include/sync_slave_sql_with_master.inc
328 SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2;
329 C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2
330 X Q 2 1 R 1 X Y 2 S 1
331 X Q 2 1 R 1 X Z 2 S 2
332 X Q 2 2 R 4 X Y 2 S 1
333 X Q 2 2 R 4 X Z 2 S 2
334 X Q 2 3 R 9 X Y 2 S 1
335 X Q 2 3 R 9 X Z 2 S 2
336 X Q 2 5 R 25 X Y 2 S 1
337 X Q 2 5 R 25 X Z 2 S 2
338 X Q 2 6 R 36 X Y 2 S 1
339 X Q 2 6 R 36 X Z 2 S 2
340 X Q 2 7 R 49 X Y 2 S 1
341 X Q 2 7 R 49 X Z 2 S 2
342 X Q 2 9 R 81 X Y 2 S 1
343 X Q 2 9 R 81 X Z 2 S 2
344 X Q 3 1 R 1 X Y 2 S 1
345 X Q 3 1 R 1 X Z 2 S 2
346 X Q 3 2 R 4 X Y 2 S 1
347 X Q 3 2 R 4 X Z 2 S 2
348 X Q 3 3 R 9 X Y 2 S 1
349 X Q 3 3 R 9 X Z 2 S 2
350 X Q 3 5 R 25 X Y 2 S 1
351 X Q 3 5 R 25 X Z 2 S 2
352 X Q 3 6 R 36 X Y 2 S 1
353 X Q 3 6 R 36 X Z 2 S 2
354 X Q 3 7 R 49 X Y 2 S 1
355 X Q 3 7 R 49 X Z 2 S 2
356 X Q 3 9 R 81 X Y 2 S 1
357 X Q 3 9 R 81 X Z 2 S 2
358 X Q 5 1 R 1 X Y 2 S 1
359 X Q 5 1 R 1 X Z 2 S 2
360 X Q 5 2 R 4 X Y 2 S 1
361 X Q 5 2 R 4 X Z 2 S 2
362 X Q 5 3 R 9 X Y 2 S 1
363 X Q 5 3 R 9 X Z 2 S 2
364 X Q 5 5 R 25 X Y 2 S 1
365 X Q 5 5 R 25 X Z 2 S 2
366 X Q 5 6 R 36 X Y 2 S 1
367 X Q 5 6 R 36 X Z 2 S 2
368 X Q 5 7 R 49 X Y 2 S 1
369 X Q 5 7 R 49 X Z 2 S 2
370 X Q 5 9 R 81 X Y 2 S 1
371 X Q 5 9 R 81 X Z 2 S 2
372 CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'NDB' ;
373 INSERT INTO t4 SET C1 = 1;
374 SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
375 C1 HEX(B1) HEX(B2)
376 1 NULL 0
377 include/sync_slave_sql_with_master.inc
378 SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
379 C1 HEX(B1) HEX(B2)
380 1 NULL 0
381 CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'NDB' ;
382 include/sync_slave_sql_with_master.inc
383 --- on slave: original values ---
384 INSERT INTO t7 VALUES (1,3), (2,6), (3,9);
385 SELECT * FROM t7 ORDER BY C1;
386 C1 C2
387 1 3
388 2 6
389 3 9
390 set @@global.replica_exec_mode= 'IDEMPOTENT';
391 --- on master: new values inserted ---
392 INSERT INTO t7 VALUES (1,2), (2,4), (3,6);
393 SELECT * FROM t7 ORDER BY C1;
394 C1 C2
395 1 2
396 2 4
397 3 6
398 include/sync_slave_sql_with_master.inc
399 set @@global.replica_exec_mode= default;
400 --- on slave: old values should be overwritten by replicated values ---
401 SELECT * FROM t7 ORDER BY C1;
402 C1 C2
403 1 2
404 2 4
405 3 6
406 --- on master ---
407 CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'NDB' ;
408 INSERT INTO t8 VALUES (99,99,99);
409 INSERT INTO t8 VALUES (99,22,33);
410 ERROR 23000: Duplicate entry '99' for key 't8.PRIMARY'
411 INSERT INTO t8 VALUES (11,99,33);
412 ERROR 23000: Duplicate entry '99' for key 't8.b'
413 INSERT INTO t8 VALUES (11,22,99);
414 ERROR 23000: Duplicate entry '99' for key 't8.c'
415 SELECT * FROM t8 ORDER BY a;
416 a b c
417 99 99 99
418 include/sync_slave_sql_with_master.inc
419 --- on slave ---
420 SELECT * FROM t8 ORDER BY a;
421 a b c
422 99 99 99
423 INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9);
424 SELECT * FROM t8 ORDER BY a;
425 a b c
426 1 2 3
427 2 4 6
428 3 6 9
429 99 99 99
430 set @@global.replica_exec_mode= 'IDEMPOTENT';
431 --- on master ---
432 INSERT INTO t8 VALUES (2,4,8);
433 include/sync_slave_sql_with_master.inc
434 set @@global.replica_exec_mode= default;
435 --- on slave ---
436 SELECT * FROM t8 ORDER BY a;
437 a b c
438 1 2 3
439 2 4 8
440 3 6 9
441 99 99 99
442 **** Test for BUG#31552 ****
443 **** On Master ****
444 DELETE FROM t1;
445 include/sync_slave_sql_with_master.inc
446 include/rpl_reset.inc
447 **** On Master ****
448 INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
449 **** On Master ****
450 include/sync_slave_sql_with_master.inc
451 set @@global.replica_exec_mode= 'IDEMPOTENT';
452 DELETE FROM t1 WHERE C1 = 'L';
453 DELETE FROM t1;
454 SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
455 COUNT(*) 0
456 include/sync_slave_sql_with_master.inc
457 set @@global.replica_exec_mode= default;
458 include/check_slave_is_running.inc
459 SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
460 COUNT(*) 0
461 **** Test for BUG#37076 ****
462 **** On Master ****
463 DROP TABLE IF EXISTS t1;
464 CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE);
465 INSERT INTO t1 VALUES(
466 '2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14');
467 **** On Slave ****
468 include/sync_slave_sql_with_master.inc
469 SELECT * FROM t1;
470 a b c
471 2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14
472 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
473 include/sync_slave_sql_with_master.inc
474 CREATE TABLE t1 (i INT NOT NULL,
475 c CHAR(16) CHARACTER SET utf8 NOT NULL,
476 j INT NOT NULL) ENGINE = 'NDB' ;
477 Warnings:
478 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
479 CREATE TABLE t2 (i INT NOT NULL,
480 c CHAR(16) CHARACTER SET utf8 NOT NULL,
481 j INT NOT NULL) ENGINE = 'NDB' ;
482 Warnings:
483 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
484 include/sync_slave_sql_with_master.inc
485 ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
486 Warnings:
487 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
488 CREATE TABLE t3 (i INT NOT NULL,
489 c CHAR(128) CHARACTER SET utf8 NOT NULL,
490 j INT NOT NULL) ENGINE = 'NDB' ;
491 Warnings:
492 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
493 include/sync_slave_sql_with_master.inc
494 ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
495 Warnings:
496 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
497 CREATE TABLE t4 (i INT NOT NULL,
498 c CHAR(128) CHARACTER SET utf8 NOT NULL,
499 j INT NOT NULL) ENGINE = 'NDB' ;
500 Warnings:
501 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
502 CREATE TABLE t5 (i INT NOT NULL,
503 c CHAR(255) CHARACTER SET utf8 NOT NULL,
504 j INT NOT NULL) ENGINE = 'NDB' ;
505 Warnings:
506 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
507 include/sync_slave_sql_with_master.inc
508 ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
509 Warnings:
510 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
511 CREATE TABLE t6 (i INT NOT NULL,
512 c CHAR(255) CHARACTER SET utf8 NOT NULL,
513 j INT NOT NULL) ENGINE = 'NDB' ;
514 Warnings:
515 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
516 include/sync_slave_sql_with_master.inc
517 ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
518 Warnings:
519 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
520 CREATE TABLE t7 (i INT NOT NULL,
521 c CHAR(255) CHARACTER SET utf8 NOT NULL,
522 j INT NOT NULL) ENGINE = 'NDB' ;
523 Warnings:
524 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
525 SET @saved_replica_type_conversions = @@replica_type_conversions;
526 SET GLOBAL REPLICA_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
527 [expecting slave to replicate correctly]
528 INSERT INTO t1 VALUES (1, "", 1);
529 INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
530 Warnings:
531 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
532 include/sync_slave_sql_with_master.inc
533 include/diff_tables.inc [master:t1, slave:t1]
534 [expecting slave to replicate correctly]
535 INSERT INTO t2 VALUES (1, "", 1);
536 INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
537 Warnings:
538 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
539 include/sync_slave_sql_with_master.inc
540 include/diff_tables.inc [master:t2, slave:t2]
541 SET GLOBAL REPLICA_TYPE_CONVERSIONS = @saved_replica_type_conversions;
542 call mtr.add_suppression("Replica SQL.*Table definition on source and replica does not match: Column 1 size mismatch.* Error_code: MY-001535");
543 call mtr.add_suppression("Replica SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: MY-001032");
544 call mtr.add_suppression("Replica SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: MY-013146");
545 call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
546 include/rpl_reset.inc
547 [expecting slave to replicate correctly]
548 INSERT INTO t4 VALUES (1, "", 1);
549 INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
550 Warnings:
551 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
552 include/sync_slave_sql_with_master.inc
553 include/diff_tables.inc [master:t4, slave:t4]
554 [expecting slave to stop]
555 INSERT INTO t5 VALUES (1, "", 1);
556 INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
557 Warnings:
558 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
559 include/wait_for_slave_sql_error.inc [errno=13146]
560 include/rpl_reset.inc
561 [expecting slave to stop]
562 INSERT INTO t6 VALUES (1, "", 1);
563 INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
564 Warnings:
565 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
566 include/wait_for_slave_sql_error.inc [errno=13146]
567 include/rpl_reset.inc
568 [expecting slave to replicate correctly]
569 INSERT INTO t7 VALUES (1, "", 1);
570 INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
571 Warnings:
572 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
573 include/sync_slave_sql_with_master.inc
574 include/diff_tables.inc [master:t7, slave:t7]
575 drop table t1, t2, t3, t4, t5, t6, t7;
576 include/sync_slave_sql_with_master.inc
577 CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='NDB' ;
578 INSERT INTO t1 VALUES (1), (2), (3);
579 UPDATE t1 SET a = 10;
580 ERROR 23000: Duplicate entry '10' for key 't1.PRIMARY'
581 INSERT INTO t1 VALUES (4);
582 include/sync_slave_sql_with_master.inc
583 include/diff_tables.inc [master:t1, slave:t1]
584 drop table t1;
585 include/sync_slave_sql_with_master.inc
586 DROP TABLE IF EXISTS t1, t2;
587 CREATE TABLE t1 (
588 `pk` int(11) NOT NULL AUTO_INCREMENT,
589 `int_nokey` int(11) NOT NULL,
590 `int_key` int(11) NOT NULL,
591 `date_key` date NOT NULL,
592 `date_nokey` date NOT NULL,
593 `time_key` time NOT NULL,
594 `time_nokey` time NOT NULL,
595 `datetime_key` datetime NOT NULL,
596 `datetime_nokey` datetime NOT NULL,
597 `varchar_key` varchar(1) NOT NULL,
598 `varchar_nokey` varchar(1) NOT NULL,
599 PRIMARY KEY (`pk`),
600 KEY `int_key` (`int_key`),
601 KEY `date_key` (`date_key`),
602 KEY `time_key` (`time_key`),
603 KEY `datetime_key` (`datetime_key`),
604 KEY `varchar_key` (`varchar_key`)
605 ) ENGINE='NDB' ;
606 Warnings:
607 Warning 1681 Integer display width is deprecated and will be removed in a future release.
608 Warning 1681 Integer display width is deprecated and will be removed in a future release.
609 Warning 1681 Integer display width is deprecated and will be removed in a future release.
610 INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'),(2,0,9,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-10-14 00:00:00','2007-10-14 00:00:00','d','d');
611 ERROR 22007: Incorrect date value: '0000-00-00' for column 'date_key' at row 1
612 CREATE TABLE t2 (
613 `pk` int(11) NOT NULL AUTO_INCREMENT,
614 `int_nokey` int(11) NOT NULL,
615 `int_key` int(11) NOT NULL,
616 `date_key` date NOT NULL,
617 `date_nokey` date NOT NULL,
618 `time_key` time NOT NULL,
619 `time_nokey` time NOT NULL,
620 `datetime_key` datetime NOT NULL,
621 `datetime_nokey` datetime NOT NULL,
622 `varchar_key` varchar(1) NOT NULL,
623 `varchar_nokey` varchar(1) NOT NULL,
624 PRIMARY KEY (`pk`),
625 KEY `int_key` (`int_key`),
626 KEY `date_key` (`date_key`),
627 KEY `time_key` (`time_key`),
628 KEY `datetime_key` (`datetime_key`),
629 KEY `varchar_key` (`varchar_key`)
630 ) ENGINE='NDB' ;
631 Warnings:
632 Warning 1681 Integer display width is deprecated and will be removed in a future release.
633 Warning 1681 Integer display width is deprecated and will be removed in a future release.
634 Warning 1681 Integer display width is deprecated and will be removed in a future release.
635 INSERT INTO t2 VALUES (1,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),(2,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'),(3,0,3,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','c','c'),(4,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(5,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'),(6,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'),(7,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(8,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'),(9,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'),(10,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'),(11,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'),(12,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'),(13,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''),(14,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'),(15,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'),(16,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'),(17,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''),(18,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'),(19,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'),(20,0,0,'2002-04-09','2002-04-09','16:06:03','16:06:03','2009-04-22 00:00:00','2009-04-22 00:00:00','n','n');
636 ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'datetime_key' at row 1
637 DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
638 UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4;
639 DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
640 DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
641 UPDATE t1 SET `int_key` = 6 ORDER BY `pk` LIMIT 3;
642 DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
643 UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6;
644 DELETE FROM t2 WHERE `pk` < 7 LIMIT 1;
645 UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
646 include/sync_slave_sql_with_master.inc
647 *** results: t2 must be consistent ****
648 include/diff_tables.inc [master:t2, slave:t2]
649 DROP TABLE t1, t2;
650 EOF OF TESTS
651 CREATE TABLE t1 (a int) ENGINE='NDB' ;
652 INSERT IGNORE INTO t1 VALUES (NULL);
653 INSERT INTO t1 ( a ) VALUES ( 0 );
654 INSERT INTO t1 ( a ) VALUES ( 9 );
655 INSERT INTO t1 ( a ) VALUES ( 2 );
656 INSERT INTO t1 ( a ) VALUES ( 9 );
657 INSERT INTO t1 ( a ) VALUES ( 5 );
658 UPDATE t1 SET a = 5 WHERE a = 9;
659 DELETE FROM t1 WHERE a < 6;
660 UPDATE t1 SET a = 9 WHERE a < 3;
661 INSERT INTO t1 ( a ) VALUES ( 3 );
662 UPDATE t1 SET a = 0 WHERE a < 4;
663 UPDATE t1 SET a = 8 WHERE a < 5;
664 include/sync_slave_sql_with_master.inc
665 include/diff_tables.inc [master:t1, slave:t1]
666 drop table t1;
667 include/sync_slave_sql_with_master.inc
668 CREATE TABLE t1 (a bit) ENGINE='NDB' ;
669 INSERT IGNORE INTO t1 VALUES (NULL);
670 INSERT INTO t1 ( a ) VALUES ( 0 );
671 UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
672 INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
673 DELETE FROM t1 WHERE a < 2 LIMIT 4;
674 DELETE FROM t1 WHERE a < 9 LIMIT 4;
675 INSERT IGNORE INTO t1 ( a ) VALUES ( 9 );
676 UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
677 INSERT IGNORE INTO t1 ( a ) VALUES ( 8 );
678 UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0;
679 INSERT IGNORE INTO t1 ( a ) VALUES ( 4 );
680 INSERT IGNORE INTO t1 ( a ) VALUES ( 3 );
681 UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6;
682 DELETE FROM t1 WHERE a = 4 LIMIT 7;
683 UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9;
684 UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2;
685 DELETE FROM t1 WHERE a < 0 LIMIT 5;
686 INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
687 UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4;
688 INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
689 UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8;
690 DELETE FROM t1 WHERE a < 8 LIMIT 8;
691 INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
692 DELETE FROM t1 WHERE a < 6 LIMIT 7;
693 UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7;
694 UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
695 INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
696 DELETE FROM t1 WHERE a < 9 LIMIT 4;
697 INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
698 INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
699 UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4;
700 DELETE FROM t1 WHERE a = 2 LIMIT 9;
701 DELETE FROM t1 WHERE a = 1 LIMIT 4;
702 UPDATE t1 SET a = 4 WHERE a = 2 LIMIT 7;
703 INSERT IGNORE INTO t1 ( a ) VALUES ( 0 );
704 DELETE FROM t1 WHERE a < 3 LIMIT 0;
705 UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
706 INSERT IGNORE INTO t1 ( a ) VALUES ( 1 );
707 UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3;
708 include/sync_slave_sql_with_master.inc
709 include/diff_tables.inc [master:t1, slave:t1]
710 drop table t1;
711 include/sync_slave_sql_with_master.inc
712 include/rpl_end.inc