Debian Codegraph @

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