Debian Codegraph @

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

raw
1 include/rpl_init.inc [topology=1->2->3]
2 connection server_1;
3 connection server_2;
4 connection server_3;
5 connection server_1;
6 CON: 'server_1', IMG: 'NOBLOB', RESTART SLAVE: 'N'
7 connection server_1;
8 SET SESSION binlog_row_image= 'NOBLOB';
9 SET GLOBAL binlog_row_image= 'NOBLOB';
10 FLUSH TABLES;
11 SHOW VARIABLES LIKE 'binlog_row_image';
12 Variable_name Value
13 binlog_row_image NOBLOB
14 CON: 'server_2', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
15 connection server_2;
16 SET SESSION binlog_row_image= 'NOBLOB';
17 SET GLOBAL binlog_row_image= 'NOBLOB';
18 include/stop_slave.inc
19 include/start_slave.inc
20 FLUSH TABLES;
21 SHOW VARIABLES LIKE 'binlog_row_image';
22 Variable_name Value
23 binlog_row_image NOBLOB
24 CON: 'server_3', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
25 connection server_3;
26 SET SESSION binlog_row_image= 'NOBLOB';
27 SET GLOBAL binlog_row_image= 'NOBLOB';
28 include/stop_slave.inc
29 include/start_slave.inc
30 FLUSH TABLES;
31 SHOW VARIABLES LIKE 'binlog_row_image';
32 Variable_name Value
33 binlog_row_image NOBLOB
34 connection server_1;
35 ### engines: MyISAM, MyISAM, MyISAM
36 connection server_1;
37 connection server_1;
38 SET SQL_LOG_BIN=0;
39 connection server_2;
40 SET SQL_LOG_BIN=0;
41 connection server_3;
42 SET SQL_LOG_BIN=0;
43 ### Asserts that updates without blobs in the AI (they are not updated)
44 ### will not break replication (check when there is no key in the table)
45 connection server_1;
46 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
47 connection server_2;
48 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
49 connection server_3;
50 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
51 connection server_1;
52 SET SQL_LOG_BIN=1;
53 connection server_2;
54 SET SQL_LOG_BIN=1;
55 connection server_3;
56 SET SQL_LOG_BIN=1;
57 connection server_1;
58 INSERT INTO t VALUES (1, "a", 10);
59 INSERT INTO t VALUES (2, "b", 20);
60 INSERT INTO t VALUES (3, "c", 30);
61 include/rpl_sync.inc
62 connection server_1;
63 UPDATE t SET c1=10 WHERE c2="a";
64 UPDATE t SET c1=20 WHERE c1=2;
65 UPDATE t SET c1=30 WHERE c3=30;
66 UPDATE t SET c3=40 WHERE c1=30;
67 include/rpl_sync.inc
68 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
69 connection server_1;
70 DELETE FROM t WHERE c2="a";
71 DELETE FROM t WHERE c1=20;
72 DELETE FROM t;
73 include/rpl_sync.inc
74 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
75 connection server_1;
76 DROP TABLE t;
77 include/rpl_sync.inc
78 connection server_1;
79 SET SQL_LOG_BIN=0;
80 connection server_2;
81 SET SQL_LOG_BIN=0;
82 connection server_3;
83 SET SQL_LOG_BIN=0;
84 ### Asserts that updates without blobs in the AI (they are not updated)
85 ### will not break replication (check even if there is a key in the table)
86 connection server_1;
87 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
88 connection server_2;
89 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
90 connection server_3;
91 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
92 connection server_1;
93 SET SQL_LOG_BIN=1;
94 connection server_2;
95 SET SQL_LOG_BIN=1;
96 connection server_3;
97 SET SQL_LOG_BIN=1;
98 connection server_1;
99 INSERT INTO t VALUES (1, "a", 10);
100 INSERT INTO t VALUES (2, "b", 20);
101 INSERT INTO t VALUES (3, "c", 30);
102 include/rpl_sync.inc
103 connection server_1;
104 UPDATE t SET c1=10 WHERE c2="a";
105 UPDATE t SET c1=20 WHERE c1=2;
106 UPDATE t SET c1=30 WHERE c3=30;
107 UPDATE t SET c3=40 WHERE c1=30;
108 include/rpl_sync.inc
109 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
110 connection server_1;
111 DELETE FROM t WHERE c2="a";
112 DELETE FROM t WHERE c1=20;
113 DELETE FROM t;
114 include/rpl_sync.inc
115 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
116 connection server_1;
117 DROP TABLE t;
118 include/rpl_sync.inc
119 connection server_1;
120 SET SQL_LOG_BIN=0;
121 connection server_2;
122 SET SQL_LOG_BIN=0;
123 connection server_3;
124 SET SQL_LOG_BIN=0;
125 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
126 ### will not break replication
127 connection server_1;
128 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
129 connection server_2;
130 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
131 connection server_3;
132 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
133 connection server_1;
134 SET SQL_LOG_BIN=1;
135 connection server_2;
136 SET SQL_LOG_BIN=1;
137 connection server_3;
138 SET SQL_LOG_BIN=1;
139 connection server_1;
140 INSERT INTO t VALUES (1, "a", 10);
141 INSERT INTO t VALUES (2, "b", 20);
142 INSERT INTO t VALUES (3, "c", 30);
143 include/rpl_sync.inc
144 connection server_1;
145 UPDATE t SET c1=10 WHERE c2="a";
146 UPDATE t SET c1=20 WHERE c1=2;
147 UPDATE t SET c1=30 WHERE c3=30;
148 UPDATE t SET c3=40 WHERE c1=30;
149 include/rpl_sync.inc
150 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
151 connection server_1;
152 DELETE FROM t WHERE c2="a";
153 DELETE FROM t WHERE c1=20;
154 DELETE FROM t;
155 include/rpl_sync.inc
156 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
157 connection server_1;
158 DROP TABLE t;
159 include/rpl_sync.inc
160 connection server_1;
161 SET SQL_LOG_BIN=0;
162 connection server_2;
163 SET SQL_LOG_BIN=0;
164 connection server_3;
165 SET SQL_LOG_BIN=0;
166 ### Asserts that updates without blobs in the BI (PK exists int the table)
167 ### will not break replication
168 connection server_1;
169 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
170 connection server_2;
171 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
172 connection server_3;
173 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
174 connection server_1;
175 SET SQL_LOG_BIN=1;
176 connection server_2;
177 SET SQL_LOG_BIN=1;
178 connection server_3;
179 SET SQL_LOG_BIN=1;
180 connection server_1;
181 INSERT INTO t VALUES (1, "a", 10);
182 INSERT INTO t VALUES (2, "b", 20);
183 INSERT INTO t VALUES (3, "c", 30);
184 include/rpl_sync.inc
185 connection server_1;
186 UPDATE t SET c1=10 WHERE c2="a";
187 UPDATE t SET c1=20 WHERE c1=2;
188 UPDATE t SET c1=30 WHERE c3=30;
189 UPDATE t SET c3=40 WHERE c1=30;
190 include/rpl_sync.inc
191 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
192 connection server_1;
193 DELETE FROM t WHERE c2="a";
194 DELETE FROM t WHERE c1=20;
195 DELETE FROM t;
196 include/rpl_sync.inc
197 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
198 connection server_1;
199 DROP TABLE t;
200 include/rpl_sync.inc
201 connection server_1;
202 SET SQL_LOG_BIN=0;
203 connection server_2;
204 SET SQL_LOG_BIN=0;
205 connection server_3;
206 SET SQL_LOG_BIN=0;
207 ### Asserts that declaring a blob in a key does not break replication
208 connection server_1;
209 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
210 connection server_2;
211 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
212 connection server_3;
213 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
214 connection server_1;
215 SET SQL_LOG_BIN=1;
216 connection server_2;
217 SET SQL_LOG_BIN=1;
218 connection server_3;
219 SET SQL_LOG_BIN=1;
220 connection server_1;
221 INSERT INTO t VALUES (1, "a", 10);
222 INSERT INTO t VALUES (2, "b", 20);
223 INSERT INTO t VALUES (3, "c", 30);
224 include/rpl_sync.inc
225 connection server_1;
226 UPDATE t SET c1=10 WHERE c2="a";
227 UPDATE t SET c1=20 WHERE c1=2;
228 UPDATE t SET c1=30 WHERE c3=30;
229 UPDATE t SET c3=40 WHERE c1=30;
230 include/rpl_sync.inc
231 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
232 connection server_1;
233 DELETE FROM t WHERE c2="a";
234 DELETE FROM t WHERE c1=20;
235 DELETE FROM t;
236 include/rpl_sync.inc
237 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
238 connection server_1;
239 DROP TABLE t;
240 include/rpl_sync.inc
241 connection server_1;
242 SET SQL_LOG_BIN=0;
243 connection server_2;
244 SET SQL_LOG_BIN=0;
245 connection server_3;
246 SET SQL_LOG_BIN=0;
247 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
248 connection server_1;
249 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
250 connection server_2;
251 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
252 connection server_3;
253 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
254 connection server_1;
255 SET SQL_LOG_BIN=1;
256 connection server_2;
257 SET SQL_LOG_BIN=1;
258 connection server_3;
259 SET SQL_LOG_BIN=1;
260 connection server_1;
261 INSERT INTO t VALUES (1, "a", 10);
262 INSERT INTO t VALUES (2, "b", 20);
263 INSERT INTO t VALUES (3, "c", 30);
264 include/rpl_sync.inc
265 connection server_1;
266 UPDATE t SET c1=10 WHERE c2="a";
267 UPDATE t SET c1=20 WHERE c1=2;
268 UPDATE t SET c1=30 WHERE c3=30;
269 UPDATE t SET c3=40 WHERE c1=30;
270 include/rpl_sync.inc
271 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
272 connection server_1;
273 DELETE FROM t WHERE c2="a";
274 DELETE FROM t WHERE c1=20;
275 DELETE FROM t;
276 include/rpl_sync.inc
277 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
278 connection server_1;
279 DROP TABLE t;
280 include/rpl_sync.inc
281 connection server_1;
282 SET SQL_LOG_BIN=0;
283 connection server_2;
284 SET SQL_LOG_BIN=0;
285 connection server_3;
286 SET SQL_LOG_BIN=0;
287 ### Asserts that declaring a blob as part of a primary key does not break replication
288 connection server_1;
289 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
290 connection server_2;
291 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
292 connection server_3;
293 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
294 connection server_1;
295 SET SQL_LOG_BIN=1;
296 connection server_2;
297 SET SQL_LOG_BIN=1;
298 connection server_3;
299 SET SQL_LOG_BIN=1;
300 connection server_1;
301 INSERT INTO t VALUES (1, "a", 10);
302 INSERT INTO t VALUES (2, "b", 20);
303 INSERT INTO t VALUES (3, "c", 30);
304 include/rpl_sync.inc
305 connection server_1;
306 UPDATE t SET c1=10 WHERE c2="a";
307 UPDATE t SET c1=20 WHERE c1=2;
308 UPDATE t SET c1=30 WHERE c3=30;
309 UPDATE t SET c3=40 WHERE c1=30;
310 include/rpl_sync.inc
311 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
312 connection server_1;
313 DELETE FROM t WHERE c2="a";
314 DELETE FROM t WHERE c1=20;
315 DELETE FROM t;
316 include/rpl_sync.inc
317 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
318 connection server_1;
319 DROP TABLE t;
320 include/rpl_sync.inc
321 ### engines: MyISAM, MyISAM, InnoDB
322 connection server_1;
323 connection server_1;
324 SET SQL_LOG_BIN=0;
325 connection server_2;
326 SET SQL_LOG_BIN=0;
327 connection server_3;
328 SET SQL_LOG_BIN=0;
329 ### Asserts that updates without blobs in the AI (they are not updated)
330 ### will not break replication (check when there is no key in the table)
331 connection server_1;
332 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
333 connection server_2;
334 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
335 connection server_3;
336 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
337 connection server_1;
338 SET SQL_LOG_BIN=1;
339 connection server_2;
340 SET SQL_LOG_BIN=1;
341 connection server_3;
342 SET SQL_LOG_BIN=1;
343 connection server_1;
344 INSERT INTO t VALUES (1, "a", 10);
345 INSERT INTO t VALUES (2, "b", 20);
346 INSERT INTO t VALUES (3, "c", 30);
347 include/rpl_sync.inc
348 connection server_1;
349 UPDATE t SET c1=10 WHERE c2="a";
350 UPDATE t SET c1=20 WHERE c1=2;
351 UPDATE t SET c1=30 WHERE c3=30;
352 UPDATE t SET c3=40 WHERE c1=30;
353 include/rpl_sync.inc
354 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
355 connection server_1;
356 DELETE FROM t WHERE c2="a";
357 DELETE FROM t WHERE c1=20;
358 DELETE FROM t;
359 include/rpl_sync.inc
360 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
361 connection server_1;
362 DROP TABLE t;
363 include/rpl_sync.inc
364 connection server_1;
365 SET SQL_LOG_BIN=0;
366 connection server_2;
367 SET SQL_LOG_BIN=0;
368 connection server_3;
369 SET SQL_LOG_BIN=0;
370 ### Asserts that updates without blobs in the AI (they are not updated)
371 ### will not break replication (check even if there is a key in the table)
372 connection server_1;
373 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
374 connection server_2;
375 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
376 connection server_3;
377 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
378 connection server_1;
379 SET SQL_LOG_BIN=1;
380 connection server_2;
381 SET SQL_LOG_BIN=1;
382 connection server_3;
383 SET SQL_LOG_BIN=1;
384 connection server_1;
385 INSERT INTO t VALUES (1, "a", 10);
386 INSERT INTO t VALUES (2, "b", 20);
387 INSERT INTO t VALUES (3, "c", 30);
388 include/rpl_sync.inc
389 connection server_1;
390 UPDATE t SET c1=10 WHERE c2="a";
391 UPDATE t SET c1=20 WHERE c1=2;
392 UPDATE t SET c1=30 WHERE c3=30;
393 UPDATE t SET c3=40 WHERE c1=30;
394 include/rpl_sync.inc
395 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
396 connection server_1;
397 DELETE FROM t WHERE c2="a";
398 DELETE FROM t WHERE c1=20;
399 DELETE FROM t;
400 include/rpl_sync.inc
401 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
402 connection server_1;
403 DROP TABLE t;
404 include/rpl_sync.inc
405 connection server_1;
406 SET SQL_LOG_BIN=0;
407 connection server_2;
408 SET SQL_LOG_BIN=0;
409 connection server_3;
410 SET SQL_LOG_BIN=0;
411 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
412 ### will not break replication
413 connection server_1;
414 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
415 connection server_2;
416 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
417 connection server_3;
418 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
419 connection server_1;
420 SET SQL_LOG_BIN=1;
421 connection server_2;
422 SET SQL_LOG_BIN=1;
423 connection server_3;
424 SET SQL_LOG_BIN=1;
425 connection server_1;
426 INSERT INTO t VALUES (1, "a", 10);
427 INSERT INTO t VALUES (2, "b", 20);
428 INSERT INTO t VALUES (3, "c", 30);
429 include/rpl_sync.inc
430 connection server_1;
431 UPDATE t SET c1=10 WHERE c2="a";
432 UPDATE t SET c1=20 WHERE c1=2;
433 UPDATE t SET c1=30 WHERE c3=30;
434 UPDATE t SET c3=40 WHERE c1=30;
435 include/rpl_sync.inc
436 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
437 connection server_1;
438 DELETE FROM t WHERE c2="a";
439 DELETE FROM t WHERE c1=20;
440 DELETE FROM t;
441 include/rpl_sync.inc
442 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
443 connection server_1;
444 DROP TABLE t;
445 include/rpl_sync.inc
446 connection server_1;
447 SET SQL_LOG_BIN=0;
448 connection server_2;
449 SET SQL_LOG_BIN=0;
450 connection server_3;
451 SET SQL_LOG_BIN=0;
452 ### Asserts that updates without blobs in the BI (PK exists int the table)
453 ### will not break replication
454 connection server_1;
455 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
456 connection server_2;
457 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
458 connection server_3;
459 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
460 connection server_1;
461 SET SQL_LOG_BIN=1;
462 connection server_2;
463 SET SQL_LOG_BIN=1;
464 connection server_3;
465 SET SQL_LOG_BIN=1;
466 connection server_1;
467 INSERT INTO t VALUES (1, "a", 10);
468 INSERT INTO t VALUES (2, "b", 20);
469 INSERT INTO t VALUES (3, "c", 30);
470 include/rpl_sync.inc
471 connection server_1;
472 UPDATE t SET c1=10 WHERE c2="a";
473 UPDATE t SET c1=20 WHERE c1=2;
474 UPDATE t SET c1=30 WHERE c3=30;
475 UPDATE t SET c3=40 WHERE c1=30;
476 include/rpl_sync.inc
477 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
478 connection server_1;
479 DELETE FROM t WHERE c2="a";
480 DELETE FROM t WHERE c1=20;
481 DELETE FROM t;
482 include/rpl_sync.inc
483 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
484 connection server_1;
485 DROP TABLE t;
486 include/rpl_sync.inc
487 connection server_1;
488 SET SQL_LOG_BIN=0;
489 connection server_2;
490 SET SQL_LOG_BIN=0;
491 connection server_3;
492 SET SQL_LOG_BIN=0;
493 ### Asserts that declaring a blob in a key does not break replication
494 connection server_1;
495 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
496 connection server_2;
497 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
498 connection server_3;
499 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
500 connection server_1;
501 SET SQL_LOG_BIN=1;
502 connection server_2;
503 SET SQL_LOG_BIN=1;
504 connection server_3;
505 SET SQL_LOG_BIN=1;
506 connection server_1;
507 INSERT INTO t VALUES (1, "a", 10);
508 INSERT INTO t VALUES (2, "b", 20);
509 INSERT INTO t VALUES (3, "c", 30);
510 include/rpl_sync.inc
511 connection server_1;
512 UPDATE t SET c1=10 WHERE c2="a";
513 UPDATE t SET c1=20 WHERE c1=2;
514 UPDATE t SET c1=30 WHERE c3=30;
515 UPDATE t SET c3=40 WHERE c1=30;
516 include/rpl_sync.inc
517 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
518 connection server_1;
519 DELETE FROM t WHERE c2="a";
520 DELETE FROM t WHERE c1=20;
521 DELETE FROM t;
522 include/rpl_sync.inc
523 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
524 connection server_1;
525 DROP TABLE t;
526 include/rpl_sync.inc
527 connection server_1;
528 SET SQL_LOG_BIN=0;
529 connection server_2;
530 SET SQL_LOG_BIN=0;
531 connection server_3;
532 SET SQL_LOG_BIN=0;
533 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
534 connection server_1;
535 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
536 connection server_2;
537 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
538 connection server_3;
539 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
540 connection server_1;
541 SET SQL_LOG_BIN=1;
542 connection server_2;
543 SET SQL_LOG_BIN=1;
544 connection server_3;
545 SET SQL_LOG_BIN=1;
546 connection server_1;
547 INSERT INTO t VALUES (1, "a", 10);
548 INSERT INTO t VALUES (2, "b", 20);
549 INSERT INTO t VALUES (3, "c", 30);
550 include/rpl_sync.inc
551 connection server_1;
552 UPDATE t SET c1=10 WHERE c2="a";
553 UPDATE t SET c1=20 WHERE c1=2;
554 UPDATE t SET c1=30 WHERE c3=30;
555 UPDATE t SET c3=40 WHERE c1=30;
556 include/rpl_sync.inc
557 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
558 connection server_1;
559 DELETE FROM t WHERE c2="a";
560 DELETE FROM t WHERE c1=20;
561 DELETE FROM t;
562 include/rpl_sync.inc
563 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
564 connection server_1;
565 DROP TABLE t;
566 include/rpl_sync.inc
567 connection server_1;
568 SET SQL_LOG_BIN=0;
569 connection server_2;
570 SET SQL_LOG_BIN=0;
571 connection server_3;
572 SET SQL_LOG_BIN=0;
573 ### Asserts that declaring a blob as part of a primary key does not break replication
574 connection server_1;
575 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
576 connection server_2;
577 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
578 connection server_3;
579 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
580 connection server_1;
581 SET SQL_LOG_BIN=1;
582 connection server_2;
583 SET SQL_LOG_BIN=1;
584 connection server_3;
585 SET SQL_LOG_BIN=1;
586 connection server_1;
587 INSERT INTO t VALUES (1, "a", 10);
588 INSERT INTO t VALUES (2, "b", 20);
589 INSERT INTO t VALUES (3, "c", 30);
590 include/rpl_sync.inc
591 connection server_1;
592 UPDATE t SET c1=10 WHERE c2="a";
593 UPDATE t SET c1=20 WHERE c1=2;
594 UPDATE t SET c1=30 WHERE c3=30;
595 UPDATE t SET c3=40 WHERE c1=30;
596 include/rpl_sync.inc
597 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
598 connection server_1;
599 DELETE FROM t WHERE c2="a";
600 DELETE FROM t WHERE c1=20;
601 DELETE FROM t;
602 include/rpl_sync.inc
603 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
604 connection server_1;
605 DROP TABLE t;
606 include/rpl_sync.inc
607 ### engines: MyISAM, InnoDB, MyISAM
608 connection server_1;
609 connection server_1;
610 SET SQL_LOG_BIN=0;
611 connection server_2;
612 SET SQL_LOG_BIN=0;
613 connection server_3;
614 SET SQL_LOG_BIN=0;
615 ### Asserts that updates without blobs in the AI (they are not updated)
616 ### will not break replication (check when there is no key in the table)
617 connection server_1;
618 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
619 connection server_2;
620 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
621 connection server_3;
622 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
623 connection server_1;
624 SET SQL_LOG_BIN=1;
625 connection server_2;
626 SET SQL_LOG_BIN=1;
627 connection server_3;
628 SET SQL_LOG_BIN=1;
629 connection server_1;
630 INSERT INTO t VALUES (1, "a", 10);
631 INSERT INTO t VALUES (2, "b", 20);
632 INSERT INTO t VALUES (3, "c", 30);
633 include/rpl_sync.inc
634 connection server_1;
635 UPDATE t SET c1=10 WHERE c2="a";
636 UPDATE t SET c1=20 WHERE c1=2;
637 UPDATE t SET c1=30 WHERE c3=30;
638 UPDATE t SET c3=40 WHERE c1=30;
639 include/rpl_sync.inc
640 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
641 connection server_1;
642 DELETE FROM t WHERE c2="a";
643 DELETE FROM t WHERE c1=20;
644 DELETE FROM t;
645 include/rpl_sync.inc
646 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
647 connection server_1;
648 DROP TABLE t;
649 include/rpl_sync.inc
650 connection server_1;
651 SET SQL_LOG_BIN=0;
652 connection server_2;
653 SET SQL_LOG_BIN=0;
654 connection server_3;
655 SET SQL_LOG_BIN=0;
656 ### Asserts that updates without blobs in the AI (they are not updated)
657 ### will not break replication (check even if there is a key in the table)
658 connection server_1;
659 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
660 connection server_2;
661 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
662 connection server_3;
663 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
664 connection server_1;
665 SET SQL_LOG_BIN=1;
666 connection server_2;
667 SET SQL_LOG_BIN=1;
668 connection server_3;
669 SET SQL_LOG_BIN=1;
670 connection server_1;
671 INSERT INTO t VALUES (1, "a", 10);
672 INSERT INTO t VALUES (2, "b", 20);
673 INSERT INTO t VALUES (3, "c", 30);
674 include/rpl_sync.inc
675 connection server_1;
676 UPDATE t SET c1=10 WHERE c2="a";
677 UPDATE t SET c1=20 WHERE c1=2;
678 UPDATE t SET c1=30 WHERE c3=30;
679 UPDATE t SET c3=40 WHERE c1=30;
680 include/rpl_sync.inc
681 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
682 connection server_1;
683 DELETE FROM t WHERE c2="a";
684 DELETE FROM t WHERE c1=20;
685 DELETE FROM t;
686 include/rpl_sync.inc
687 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
688 connection server_1;
689 DROP TABLE t;
690 include/rpl_sync.inc
691 connection server_1;
692 SET SQL_LOG_BIN=0;
693 connection server_2;
694 SET SQL_LOG_BIN=0;
695 connection server_3;
696 SET SQL_LOG_BIN=0;
697 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
698 ### will not break replication
699 connection server_1;
700 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
701 connection server_2;
702 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
703 connection server_3;
704 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
705 connection server_1;
706 SET SQL_LOG_BIN=1;
707 connection server_2;
708 SET SQL_LOG_BIN=1;
709 connection server_3;
710 SET SQL_LOG_BIN=1;
711 connection server_1;
712 INSERT INTO t VALUES (1, "a", 10);
713 INSERT INTO t VALUES (2, "b", 20);
714 INSERT INTO t VALUES (3, "c", 30);
715 include/rpl_sync.inc
716 connection server_1;
717 UPDATE t SET c1=10 WHERE c2="a";
718 UPDATE t SET c1=20 WHERE c1=2;
719 UPDATE t SET c1=30 WHERE c3=30;
720 UPDATE t SET c3=40 WHERE c1=30;
721 include/rpl_sync.inc
722 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
723 connection server_1;
724 DELETE FROM t WHERE c2="a";
725 DELETE FROM t WHERE c1=20;
726 DELETE FROM t;
727 include/rpl_sync.inc
728 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
729 connection server_1;
730 DROP TABLE t;
731 include/rpl_sync.inc
732 connection server_1;
733 SET SQL_LOG_BIN=0;
734 connection server_2;
735 SET SQL_LOG_BIN=0;
736 connection server_3;
737 SET SQL_LOG_BIN=0;
738 ### Asserts that updates without blobs in the BI (PK exists int the table)
739 ### will not break replication
740 connection server_1;
741 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
742 connection server_2;
743 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
744 connection server_3;
745 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
746 connection server_1;
747 SET SQL_LOG_BIN=1;
748 connection server_2;
749 SET SQL_LOG_BIN=1;
750 connection server_3;
751 SET SQL_LOG_BIN=1;
752 connection server_1;
753 INSERT INTO t VALUES (1, "a", 10);
754 INSERT INTO t VALUES (2, "b", 20);
755 INSERT INTO t VALUES (3, "c", 30);
756 include/rpl_sync.inc
757 connection server_1;
758 UPDATE t SET c1=10 WHERE c2="a";
759 UPDATE t SET c1=20 WHERE c1=2;
760 UPDATE t SET c1=30 WHERE c3=30;
761 UPDATE t SET c3=40 WHERE c1=30;
762 include/rpl_sync.inc
763 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
764 connection server_1;
765 DELETE FROM t WHERE c2="a";
766 DELETE FROM t WHERE c1=20;
767 DELETE FROM t;
768 include/rpl_sync.inc
769 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
770 connection server_1;
771 DROP TABLE t;
772 include/rpl_sync.inc
773 connection server_1;
774 SET SQL_LOG_BIN=0;
775 connection server_2;
776 SET SQL_LOG_BIN=0;
777 connection server_3;
778 SET SQL_LOG_BIN=0;
779 ### Asserts that declaring a blob in a key does not break replication
780 connection server_1;
781 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
782 connection server_2;
783 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
784 connection server_3;
785 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
786 connection server_1;
787 SET SQL_LOG_BIN=1;
788 connection server_2;
789 SET SQL_LOG_BIN=1;
790 connection server_3;
791 SET SQL_LOG_BIN=1;
792 connection server_1;
793 INSERT INTO t VALUES (1, "a", 10);
794 INSERT INTO t VALUES (2, "b", 20);
795 INSERT INTO t VALUES (3, "c", 30);
796 include/rpl_sync.inc
797 connection server_1;
798 UPDATE t SET c1=10 WHERE c2="a";
799 UPDATE t SET c1=20 WHERE c1=2;
800 UPDATE t SET c1=30 WHERE c3=30;
801 UPDATE t SET c3=40 WHERE c1=30;
802 include/rpl_sync.inc
803 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
804 connection server_1;
805 DELETE FROM t WHERE c2="a";
806 DELETE FROM t WHERE c1=20;
807 DELETE FROM t;
808 include/rpl_sync.inc
809 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
810 connection server_1;
811 DROP TABLE t;
812 include/rpl_sync.inc
813 connection server_1;
814 SET SQL_LOG_BIN=0;
815 connection server_2;
816 SET SQL_LOG_BIN=0;
817 connection server_3;
818 SET SQL_LOG_BIN=0;
819 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
820 connection server_1;
821 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
822 connection server_2;
823 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
824 connection server_3;
825 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
826 connection server_1;
827 SET SQL_LOG_BIN=1;
828 connection server_2;
829 SET SQL_LOG_BIN=1;
830 connection server_3;
831 SET SQL_LOG_BIN=1;
832 connection server_1;
833 INSERT INTO t VALUES (1, "a", 10);
834 INSERT INTO t VALUES (2, "b", 20);
835 INSERT INTO t VALUES (3, "c", 30);
836 include/rpl_sync.inc
837 connection server_1;
838 UPDATE t SET c1=10 WHERE c2="a";
839 UPDATE t SET c1=20 WHERE c1=2;
840 UPDATE t SET c1=30 WHERE c3=30;
841 UPDATE t SET c3=40 WHERE c1=30;
842 include/rpl_sync.inc
843 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
844 connection server_1;
845 DELETE FROM t WHERE c2="a";
846 DELETE FROM t WHERE c1=20;
847 DELETE FROM t;
848 include/rpl_sync.inc
849 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
850 connection server_1;
851 DROP TABLE t;
852 include/rpl_sync.inc
853 connection server_1;
854 SET SQL_LOG_BIN=0;
855 connection server_2;
856 SET SQL_LOG_BIN=0;
857 connection server_3;
858 SET SQL_LOG_BIN=0;
859 ### Asserts that declaring a blob as part of a primary key does not break replication
860 connection server_1;
861 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
862 connection server_2;
863 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
864 connection server_3;
865 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
866 connection server_1;
867 SET SQL_LOG_BIN=1;
868 connection server_2;
869 SET SQL_LOG_BIN=1;
870 connection server_3;
871 SET SQL_LOG_BIN=1;
872 connection server_1;
873 INSERT INTO t VALUES (1, "a", 10);
874 INSERT INTO t VALUES (2, "b", 20);
875 INSERT INTO t VALUES (3, "c", 30);
876 include/rpl_sync.inc
877 connection server_1;
878 UPDATE t SET c1=10 WHERE c2="a";
879 UPDATE t SET c1=20 WHERE c1=2;
880 UPDATE t SET c1=30 WHERE c3=30;
881 UPDATE t SET c3=40 WHERE c1=30;
882 include/rpl_sync.inc
883 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
884 connection server_1;
885 DELETE FROM t WHERE c2="a";
886 DELETE FROM t WHERE c1=20;
887 DELETE FROM t;
888 include/rpl_sync.inc
889 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
890 connection server_1;
891 DROP TABLE t;
892 include/rpl_sync.inc
893 ### engines: MyISAM, InnoDB, InnoDB
894 connection server_1;
895 connection server_1;
896 SET SQL_LOG_BIN=0;
897 connection server_2;
898 SET SQL_LOG_BIN=0;
899 connection server_3;
900 SET SQL_LOG_BIN=0;
901 ### Asserts that updates without blobs in the AI (they are not updated)
902 ### will not break replication (check when there is no key in the table)
903 connection server_1;
904 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
905 connection server_2;
906 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
907 connection server_3;
908 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
909 connection server_1;
910 SET SQL_LOG_BIN=1;
911 connection server_2;
912 SET SQL_LOG_BIN=1;
913 connection server_3;
914 SET SQL_LOG_BIN=1;
915 connection server_1;
916 INSERT INTO t VALUES (1, "a", 10);
917 INSERT INTO t VALUES (2, "b", 20);
918 INSERT INTO t VALUES (3, "c", 30);
919 include/rpl_sync.inc
920 connection server_1;
921 UPDATE t SET c1=10 WHERE c2="a";
922 UPDATE t SET c1=20 WHERE c1=2;
923 UPDATE t SET c1=30 WHERE c3=30;
924 UPDATE t SET c3=40 WHERE c1=30;
925 include/rpl_sync.inc
926 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
927 connection server_1;
928 DELETE FROM t WHERE c2="a";
929 DELETE FROM t WHERE c1=20;
930 DELETE FROM t;
931 include/rpl_sync.inc
932 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
933 connection server_1;
934 DROP TABLE t;
935 include/rpl_sync.inc
936 connection server_1;
937 SET SQL_LOG_BIN=0;
938 connection server_2;
939 SET SQL_LOG_BIN=0;
940 connection server_3;
941 SET SQL_LOG_BIN=0;
942 ### Asserts that updates without blobs in the AI (they are not updated)
943 ### will not break replication (check even if there is a key in the table)
944 connection server_1;
945 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
946 connection server_2;
947 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
948 connection server_3;
949 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
950 connection server_1;
951 SET SQL_LOG_BIN=1;
952 connection server_2;
953 SET SQL_LOG_BIN=1;
954 connection server_3;
955 SET SQL_LOG_BIN=1;
956 connection server_1;
957 INSERT INTO t VALUES (1, "a", 10);
958 INSERT INTO t VALUES (2, "b", 20);
959 INSERT INTO t VALUES (3, "c", 30);
960 include/rpl_sync.inc
961 connection server_1;
962 UPDATE t SET c1=10 WHERE c2="a";
963 UPDATE t SET c1=20 WHERE c1=2;
964 UPDATE t SET c1=30 WHERE c3=30;
965 UPDATE t SET c3=40 WHERE c1=30;
966 include/rpl_sync.inc
967 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
968 connection server_1;
969 DELETE FROM t WHERE c2="a";
970 DELETE FROM t WHERE c1=20;
971 DELETE FROM t;
972 include/rpl_sync.inc
973 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
974 connection server_1;
975 DROP TABLE t;
976 include/rpl_sync.inc
977 connection server_1;
978 SET SQL_LOG_BIN=0;
979 connection server_2;
980 SET SQL_LOG_BIN=0;
981 connection server_3;
982 SET SQL_LOG_BIN=0;
983 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
984 ### will not break replication
985 connection server_1;
986 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
987 connection server_2;
988 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
989 connection server_3;
990 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
991 connection server_1;
992 SET SQL_LOG_BIN=1;
993 connection server_2;
994 SET SQL_LOG_BIN=1;
995 connection server_3;
996 SET SQL_LOG_BIN=1;
997 connection server_1;
998 INSERT INTO t VALUES (1, "a", 10);
999 INSERT INTO t VALUES (2, "b", 20);
1000 INSERT INTO t VALUES (3, "c", 30);
1001 include/rpl_sync.inc
1002 connection server_1;
1003 UPDATE t SET c1=10 WHERE c2="a";
1004 UPDATE t SET c1=20 WHERE c1=2;
1005 UPDATE t SET c1=30 WHERE c3=30;
1006 UPDATE t SET c3=40 WHERE c1=30;
1007 include/rpl_sync.inc
1008 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1009 connection server_1;
1010 DELETE FROM t WHERE c2="a";
1011 DELETE FROM t WHERE c1=20;
1012 DELETE FROM t;
1013 include/rpl_sync.inc
1014 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1015 connection server_1;
1016 DROP TABLE t;
1017 include/rpl_sync.inc
1018 connection server_1;
1019 SET SQL_LOG_BIN=0;
1020 connection server_2;
1021 SET SQL_LOG_BIN=0;
1022 connection server_3;
1023 SET SQL_LOG_BIN=0;
1024 ### Asserts that updates without blobs in the BI (PK exists int the table)
1025 ### will not break replication
1026 connection server_1;
1027 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1028 connection server_2;
1029 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1030 connection server_3;
1031 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1032 connection server_1;
1033 SET SQL_LOG_BIN=1;
1034 connection server_2;
1035 SET SQL_LOG_BIN=1;
1036 connection server_3;
1037 SET SQL_LOG_BIN=1;
1038 connection server_1;
1039 INSERT INTO t VALUES (1, "a", 10);
1040 INSERT INTO t VALUES (2, "b", 20);
1041 INSERT INTO t VALUES (3, "c", 30);
1042 include/rpl_sync.inc
1043 connection server_1;
1044 UPDATE t SET c1=10 WHERE c2="a";
1045 UPDATE t SET c1=20 WHERE c1=2;
1046 UPDATE t SET c1=30 WHERE c3=30;
1047 UPDATE t SET c3=40 WHERE c1=30;
1048 include/rpl_sync.inc
1049 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1050 connection server_1;
1051 DELETE FROM t WHERE c2="a";
1052 DELETE FROM t WHERE c1=20;
1053 DELETE FROM t;
1054 include/rpl_sync.inc
1055 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1056 connection server_1;
1057 DROP TABLE t;
1058 include/rpl_sync.inc
1059 connection server_1;
1060 SET SQL_LOG_BIN=0;
1061 connection server_2;
1062 SET SQL_LOG_BIN=0;
1063 connection server_3;
1064 SET SQL_LOG_BIN=0;
1065 ### Asserts that declaring a blob in a key does not break replication
1066 connection server_1;
1067 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1068 connection server_2;
1069 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1070 connection server_3;
1071 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1072 connection server_1;
1073 SET SQL_LOG_BIN=1;
1074 connection server_2;
1075 SET SQL_LOG_BIN=1;
1076 connection server_3;
1077 SET SQL_LOG_BIN=1;
1078 connection server_1;
1079 INSERT INTO t VALUES (1, "a", 10);
1080 INSERT INTO t VALUES (2, "b", 20);
1081 INSERT INTO t VALUES (3, "c", 30);
1082 include/rpl_sync.inc
1083 connection server_1;
1084 UPDATE t SET c1=10 WHERE c2="a";
1085 UPDATE t SET c1=20 WHERE c1=2;
1086 UPDATE t SET c1=30 WHERE c3=30;
1087 UPDATE t SET c3=40 WHERE c1=30;
1088 include/rpl_sync.inc
1089 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1090 connection server_1;
1091 DELETE FROM t WHERE c2="a";
1092 DELETE FROM t WHERE c1=20;
1093 DELETE FROM t;
1094 include/rpl_sync.inc
1095 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1096 connection server_1;
1097 DROP TABLE t;
1098 include/rpl_sync.inc
1099 connection server_1;
1100 SET SQL_LOG_BIN=0;
1101 connection server_2;
1102 SET SQL_LOG_BIN=0;
1103 connection server_3;
1104 SET SQL_LOG_BIN=0;
1105 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1106 connection server_1;
1107 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1108 connection server_2;
1109 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1110 connection server_3;
1111 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1112 connection server_1;
1113 SET SQL_LOG_BIN=1;
1114 connection server_2;
1115 SET SQL_LOG_BIN=1;
1116 connection server_3;
1117 SET SQL_LOG_BIN=1;
1118 connection server_1;
1119 INSERT INTO t VALUES (1, "a", 10);
1120 INSERT INTO t VALUES (2, "b", 20);
1121 INSERT INTO t VALUES (3, "c", 30);
1122 include/rpl_sync.inc
1123 connection server_1;
1124 UPDATE t SET c1=10 WHERE c2="a";
1125 UPDATE t SET c1=20 WHERE c1=2;
1126 UPDATE t SET c1=30 WHERE c3=30;
1127 UPDATE t SET c3=40 WHERE c1=30;
1128 include/rpl_sync.inc
1129 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1130 connection server_1;
1131 DELETE FROM t WHERE c2="a";
1132 DELETE FROM t WHERE c1=20;
1133 DELETE FROM t;
1134 include/rpl_sync.inc
1135 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1136 connection server_1;
1137 DROP TABLE t;
1138 include/rpl_sync.inc
1139 connection server_1;
1140 SET SQL_LOG_BIN=0;
1141 connection server_2;
1142 SET SQL_LOG_BIN=0;
1143 connection server_3;
1144 SET SQL_LOG_BIN=0;
1145 ### Asserts that declaring a blob as part of a primary key does not break replication
1146 connection server_1;
1147 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1148 connection server_2;
1149 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1150 connection server_3;
1151 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1152 connection server_1;
1153 SET SQL_LOG_BIN=1;
1154 connection server_2;
1155 SET SQL_LOG_BIN=1;
1156 connection server_3;
1157 SET SQL_LOG_BIN=1;
1158 connection server_1;
1159 INSERT INTO t VALUES (1, "a", 10);
1160 INSERT INTO t VALUES (2, "b", 20);
1161 INSERT INTO t VALUES (3, "c", 30);
1162 include/rpl_sync.inc
1163 connection server_1;
1164 UPDATE t SET c1=10 WHERE c2="a";
1165 UPDATE t SET c1=20 WHERE c1=2;
1166 UPDATE t SET c1=30 WHERE c3=30;
1167 UPDATE t SET c3=40 WHERE c1=30;
1168 include/rpl_sync.inc
1169 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1170 connection server_1;
1171 DELETE FROM t WHERE c2="a";
1172 DELETE FROM t WHERE c1=20;
1173 DELETE FROM t;
1174 include/rpl_sync.inc
1175 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1176 connection server_1;
1177 DROP TABLE t;
1178 include/rpl_sync.inc
1179 ### engines: InnoDB, MyISAM, MyISAM
1180 connection server_1;
1181 connection server_1;
1182 SET SQL_LOG_BIN=0;
1183 connection server_2;
1184 SET SQL_LOG_BIN=0;
1185 connection server_3;
1186 SET SQL_LOG_BIN=0;
1187 ### Asserts that updates without blobs in the AI (they are not updated)
1188 ### will not break replication (check when there is no key in the table)
1189 connection server_1;
1190 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1191 connection server_2;
1192 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1193 connection server_3;
1194 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1195 connection server_1;
1196 SET SQL_LOG_BIN=1;
1197 connection server_2;
1198 SET SQL_LOG_BIN=1;
1199 connection server_3;
1200 SET SQL_LOG_BIN=1;
1201 connection server_1;
1202 INSERT INTO t VALUES (1, "a", 10);
1203 INSERT INTO t VALUES (2, "b", 20);
1204 INSERT INTO t VALUES (3, "c", 30);
1205 include/rpl_sync.inc
1206 connection server_1;
1207 UPDATE t SET c1=10 WHERE c2="a";
1208 UPDATE t SET c1=20 WHERE c1=2;
1209 UPDATE t SET c1=30 WHERE c3=30;
1210 UPDATE t SET c3=40 WHERE c1=30;
1211 include/rpl_sync.inc
1212 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1213 connection server_1;
1214 DELETE FROM t WHERE c2="a";
1215 DELETE FROM t WHERE c1=20;
1216 DELETE FROM t;
1217 include/rpl_sync.inc
1218 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1219 connection server_1;
1220 DROP TABLE t;
1221 include/rpl_sync.inc
1222 connection server_1;
1223 SET SQL_LOG_BIN=0;
1224 connection server_2;
1225 SET SQL_LOG_BIN=0;
1226 connection server_3;
1227 SET SQL_LOG_BIN=0;
1228 ### Asserts that updates without blobs in the AI (they are not updated)
1229 ### will not break replication (check even if there is a key in the table)
1230 connection server_1;
1231 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1232 connection server_2;
1233 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1234 connection server_3;
1235 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1236 connection server_1;
1237 SET SQL_LOG_BIN=1;
1238 connection server_2;
1239 SET SQL_LOG_BIN=1;
1240 connection server_3;
1241 SET SQL_LOG_BIN=1;
1242 connection server_1;
1243 INSERT INTO t VALUES (1, "a", 10);
1244 INSERT INTO t VALUES (2, "b", 20);
1245 INSERT INTO t VALUES (3, "c", 30);
1246 include/rpl_sync.inc
1247 connection server_1;
1248 UPDATE t SET c1=10 WHERE c2="a";
1249 UPDATE t SET c1=20 WHERE c1=2;
1250 UPDATE t SET c1=30 WHERE c3=30;
1251 UPDATE t SET c3=40 WHERE c1=30;
1252 include/rpl_sync.inc
1253 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1254 connection server_1;
1255 DELETE FROM t WHERE c2="a";
1256 DELETE FROM t WHERE c1=20;
1257 DELETE FROM t;
1258 include/rpl_sync.inc
1259 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1260 connection server_1;
1261 DROP TABLE t;
1262 include/rpl_sync.inc
1263 connection server_1;
1264 SET SQL_LOG_BIN=0;
1265 connection server_2;
1266 SET SQL_LOG_BIN=0;
1267 connection server_3;
1268 SET SQL_LOG_BIN=0;
1269 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
1270 ### will not break replication
1271 connection server_1;
1272 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1273 connection server_2;
1274 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1275 connection server_3;
1276 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1277 connection server_1;
1278 SET SQL_LOG_BIN=1;
1279 connection server_2;
1280 SET SQL_LOG_BIN=1;
1281 connection server_3;
1282 SET SQL_LOG_BIN=1;
1283 connection server_1;
1284 INSERT INTO t VALUES (1, "a", 10);
1285 INSERT INTO t VALUES (2, "b", 20);
1286 INSERT INTO t VALUES (3, "c", 30);
1287 include/rpl_sync.inc
1288 connection server_1;
1289 UPDATE t SET c1=10 WHERE c2="a";
1290 UPDATE t SET c1=20 WHERE c1=2;
1291 UPDATE t SET c1=30 WHERE c3=30;
1292 UPDATE t SET c3=40 WHERE c1=30;
1293 include/rpl_sync.inc
1294 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1295 connection server_1;
1296 DELETE FROM t WHERE c2="a";
1297 DELETE FROM t WHERE c1=20;
1298 DELETE FROM t;
1299 include/rpl_sync.inc
1300 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1301 connection server_1;
1302 DROP TABLE t;
1303 include/rpl_sync.inc
1304 connection server_1;
1305 SET SQL_LOG_BIN=0;
1306 connection server_2;
1307 SET SQL_LOG_BIN=0;
1308 connection server_3;
1309 SET SQL_LOG_BIN=0;
1310 ### Asserts that updates without blobs in the BI (PK exists int the table)
1311 ### will not break replication
1312 connection server_1;
1313 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1314 connection server_2;
1315 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1316 connection server_3;
1317 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1318 connection server_1;
1319 SET SQL_LOG_BIN=1;
1320 connection server_2;
1321 SET SQL_LOG_BIN=1;
1322 connection server_3;
1323 SET SQL_LOG_BIN=1;
1324 connection server_1;
1325 INSERT INTO t VALUES (1, "a", 10);
1326 INSERT INTO t VALUES (2, "b", 20);
1327 INSERT INTO t VALUES (3, "c", 30);
1328 include/rpl_sync.inc
1329 connection server_1;
1330 UPDATE t SET c1=10 WHERE c2="a";
1331 UPDATE t SET c1=20 WHERE c1=2;
1332 UPDATE t SET c1=30 WHERE c3=30;
1333 UPDATE t SET c3=40 WHERE c1=30;
1334 include/rpl_sync.inc
1335 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1336 connection server_1;
1337 DELETE FROM t WHERE c2="a";
1338 DELETE FROM t WHERE c1=20;
1339 DELETE FROM t;
1340 include/rpl_sync.inc
1341 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1342 connection server_1;
1343 DROP TABLE t;
1344 include/rpl_sync.inc
1345 connection server_1;
1346 SET SQL_LOG_BIN=0;
1347 connection server_2;
1348 SET SQL_LOG_BIN=0;
1349 connection server_3;
1350 SET SQL_LOG_BIN=0;
1351 ### Asserts that declaring a blob in a key does not break replication
1352 connection server_1;
1353 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1354 connection server_2;
1355 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1356 connection server_3;
1357 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1358 connection server_1;
1359 SET SQL_LOG_BIN=1;
1360 connection server_2;
1361 SET SQL_LOG_BIN=1;
1362 connection server_3;
1363 SET SQL_LOG_BIN=1;
1364 connection server_1;
1365 INSERT INTO t VALUES (1, "a", 10);
1366 INSERT INTO t VALUES (2, "b", 20);
1367 INSERT INTO t VALUES (3, "c", 30);
1368 include/rpl_sync.inc
1369 connection server_1;
1370 UPDATE t SET c1=10 WHERE c2="a";
1371 UPDATE t SET c1=20 WHERE c1=2;
1372 UPDATE t SET c1=30 WHERE c3=30;
1373 UPDATE t SET c3=40 WHERE c1=30;
1374 include/rpl_sync.inc
1375 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1376 connection server_1;
1377 DELETE FROM t WHERE c2="a";
1378 DELETE FROM t WHERE c1=20;
1379 DELETE FROM t;
1380 include/rpl_sync.inc
1381 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1382 connection server_1;
1383 DROP TABLE t;
1384 include/rpl_sync.inc
1385 connection server_1;
1386 SET SQL_LOG_BIN=0;
1387 connection server_2;
1388 SET SQL_LOG_BIN=0;
1389 connection server_3;
1390 SET SQL_LOG_BIN=0;
1391 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1392 connection server_1;
1393 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1394 connection server_2;
1395 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1396 connection server_3;
1397 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1398 connection server_1;
1399 SET SQL_LOG_BIN=1;
1400 connection server_2;
1401 SET SQL_LOG_BIN=1;
1402 connection server_3;
1403 SET SQL_LOG_BIN=1;
1404 connection server_1;
1405 INSERT INTO t VALUES (1, "a", 10);
1406 INSERT INTO t VALUES (2, "b", 20);
1407 INSERT INTO t VALUES (3, "c", 30);
1408 include/rpl_sync.inc
1409 connection server_1;
1410 UPDATE t SET c1=10 WHERE c2="a";
1411 UPDATE t SET c1=20 WHERE c1=2;
1412 UPDATE t SET c1=30 WHERE c3=30;
1413 UPDATE t SET c3=40 WHERE c1=30;
1414 include/rpl_sync.inc
1415 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1416 connection server_1;
1417 DELETE FROM t WHERE c2="a";
1418 DELETE FROM t WHERE c1=20;
1419 DELETE FROM t;
1420 include/rpl_sync.inc
1421 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1422 connection server_1;
1423 DROP TABLE t;
1424 include/rpl_sync.inc
1425 connection server_1;
1426 SET SQL_LOG_BIN=0;
1427 connection server_2;
1428 SET SQL_LOG_BIN=0;
1429 connection server_3;
1430 SET SQL_LOG_BIN=0;
1431 ### Asserts that declaring a blob as part of a primary key does not break replication
1432 connection server_1;
1433 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1434 connection server_2;
1435 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1436 connection server_3;
1437 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1438 connection server_1;
1439 SET SQL_LOG_BIN=1;
1440 connection server_2;
1441 SET SQL_LOG_BIN=1;
1442 connection server_3;
1443 SET SQL_LOG_BIN=1;
1444 connection server_1;
1445 INSERT INTO t VALUES (1, "a", 10);
1446 INSERT INTO t VALUES (2, "b", 20);
1447 INSERT INTO t VALUES (3, "c", 30);
1448 include/rpl_sync.inc
1449 connection server_1;
1450 UPDATE t SET c1=10 WHERE c2="a";
1451 UPDATE t SET c1=20 WHERE c1=2;
1452 UPDATE t SET c1=30 WHERE c3=30;
1453 UPDATE t SET c3=40 WHERE c1=30;
1454 include/rpl_sync.inc
1455 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1456 connection server_1;
1457 DELETE FROM t WHERE c2="a";
1458 DELETE FROM t WHERE c1=20;
1459 DELETE FROM t;
1460 include/rpl_sync.inc
1461 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1462 connection server_1;
1463 DROP TABLE t;
1464 include/rpl_sync.inc
1465 ### engines: InnoDB, MyISAM, InnoDB
1466 connection server_1;
1467 connection server_1;
1468 SET SQL_LOG_BIN=0;
1469 connection server_2;
1470 SET SQL_LOG_BIN=0;
1471 connection server_3;
1472 SET SQL_LOG_BIN=0;
1473 ### Asserts that updates without blobs in the AI (they are not updated)
1474 ### will not break replication (check when there is no key in the table)
1475 connection server_1;
1476 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1477 connection server_2;
1478 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1479 connection server_3;
1480 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1481 connection server_1;
1482 SET SQL_LOG_BIN=1;
1483 connection server_2;
1484 SET SQL_LOG_BIN=1;
1485 connection server_3;
1486 SET SQL_LOG_BIN=1;
1487 connection server_1;
1488 INSERT INTO t VALUES (1, "a", 10);
1489 INSERT INTO t VALUES (2, "b", 20);
1490 INSERT INTO t VALUES (3, "c", 30);
1491 include/rpl_sync.inc
1492 connection server_1;
1493 UPDATE t SET c1=10 WHERE c2="a";
1494 UPDATE t SET c1=20 WHERE c1=2;
1495 UPDATE t SET c1=30 WHERE c3=30;
1496 UPDATE t SET c3=40 WHERE c1=30;
1497 include/rpl_sync.inc
1498 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1499 connection server_1;
1500 DELETE FROM t WHERE c2="a";
1501 DELETE FROM t WHERE c1=20;
1502 DELETE FROM t;
1503 include/rpl_sync.inc
1504 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1505 connection server_1;
1506 DROP TABLE t;
1507 include/rpl_sync.inc
1508 connection server_1;
1509 SET SQL_LOG_BIN=0;
1510 connection server_2;
1511 SET SQL_LOG_BIN=0;
1512 connection server_3;
1513 SET SQL_LOG_BIN=0;
1514 ### Asserts that updates without blobs in the AI (they are not updated)
1515 ### will not break replication (check even if there is a key in the table)
1516 connection server_1;
1517 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1518 connection server_2;
1519 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1520 connection server_3;
1521 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1522 connection server_1;
1523 SET SQL_LOG_BIN=1;
1524 connection server_2;
1525 SET SQL_LOG_BIN=1;
1526 connection server_3;
1527 SET SQL_LOG_BIN=1;
1528 connection server_1;
1529 INSERT INTO t VALUES (1, "a", 10);
1530 INSERT INTO t VALUES (2, "b", 20);
1531 INSERT INTO t VALUES (3, "c", 30);
1532 include/rpl_sync.inc
1533 connection server_1;
1534 UPDATE t SET c1=10 WHERE c2="a";
1535 UPDATE t SET c1=20 WHERE c1=2;
1536 UPDATE t SET c1=30 WHERE c3=30;
1537 UPDATE t SET c3=40 WHERE c1=30;
1538 include/rpl_sync.inc
1539 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1540 connection server_1;
1541 DELETE FROM t WHERE c2="a";
1542 DELETE FROM t WHERE c1=20;
1543 DELETE FROM t;
1544 include/rpl_sync.inc
1545 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1546 connection server_1;
1547 DROP TABLE t;
1548 include/rpl_sync.inc
1549 connection server_1;
1550 SET SQL_LOG_BIN=0;
1551 connection server_2;
1552 SET SQL_LOG_BIN=0;
1553 connection server_3;
1554 SET SQL_LOG_BIN=0;
1555 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
1556 ### will not break replication
1557 connection server_1;
1558 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1559 connection server_2;
1560 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1561 connection server_3;
1562 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1563 connection server_1;
1564 SET SQL_LOG_BIN=1;
1565 connection server_2;
1566 SET SQL_LOG_BIN=1;
1567 connection server_3;
1568 SET SQL_LOG_BIN=1;
1569 connection server_1;
1570 INSERT INTO t VALUES (1, "a", 10);
1571 INSERT INTO t VALUES (2, "b", 20);
1572 INSERT INTO t VALUES (3, "c", 30);
1573 include/rpl_sync.inc
1574 connection server_1;
1575 UPDATE t SET c1=10 WHERE c2="a";
1576 UPDATE t SET c1=20 WHERE c1=2;
1577 UPDATE t SET c1=30 WHERE c3=30;
1578 UPDATE t SET c3=40 WHERE c1=30;
1579 include/rpl_sync.inc
1580 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1581 connection server_1;
1582 DELETE FROM t WHERE c2="a";
1583 DELETE FROM t WHERE c1=20;
1584 DELETE FROM t;
1585 include/rpl_sync.inc
1586 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1587 connection server_1;
1588 DROP TABLE t;
1589 include/rpl_sync.inc
1590 connection server_1;
1591 SET SQL_LOG_BIN=0;
1592 connection server_2;
1593 SET SQL_LOG_BIN=0;
1594 connection server_3;
1595 SET SQL_LOG_BIN=0;
1596 ### Asserts that updates without blobs in the BI (PK exists int the table)
1597 ### will not break replication
1598 connection server_1;
1599 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1600 connection server_2;
1601 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1602 connection server_3;
1603 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1604 connection server_1;
1605 SET SQL_LOG_BIN=1;
1606 connection server_2;
1607 SET SQL_LOG_BIN=1;
1608 connection server_3;
1609 SET SQL_LOG_BIN=1;
1610 connection server_1;
1611 INSERT INTO t VALUES (1, "a", 10);
1612 INSERT INTO t VALUES (2, "b", 20);
1613 INSERT INTO t VALUES (3, "c", 30);
1614 include/rpl_sync.inc
1615 connection server_1;
1616 UPDATE t SET c1=10 WHERE c2="a";
1617 UPDATE t SET c1=20 WHERE c1=2;
1618 UPDATE t SET c1=30 WHERE c3=30;
1619 UPDATE t SET c3=40 WHERE c1=30;
1620 include/rpl_sync.inc
1621 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1622 connection server_1;
1623 DELETE FROM t WHERE c2="a";
1624 DELETE FROM t WHERE c1=20;
1625 DELETE FROM t;
1626 include/rpl_sync.inc
1627 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1628 connection server_1;
1629 DROP TABLE t;
1630 include/rpl_sync.inc
1631 connection server_1;
1632 SET SQL_LOG_BIN=0;
1633 connection server_2;
1634 SET SQL_LOG_BIN=0;
1635 connection server_3;
1636 SET SQL_LOG_BIN=0;
1637 ### Asserts that declaring a blob in a key does not break replication
1638 connection server_1;
1639 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1640 connection server_2;
1641 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1642 connection server_3;
1643 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1644 connection server_1;
1645 SET SQL_LOG_BIN=1;
1646 connection server_2;
1647 SET SQL_LOG_BIN=1;
1648 connection server_3;
1649 SET SQL_LOG_BIN=1;
1650 connection server_1;
1651 INSERT INTO t VALUES (1, "a", 10);
1652 INSERT INTO t VALUES (2, "b", 20);
1653 INSERT INTO t VALUES (3, "c", 30);
1654 include/rpl_sync.inc
1655 connection server_1;
1656 UPDATE t SET c1=10 WHERE c2="a";
1657 UPDATE t SET c1=20 WHERE c1=2;
1658 UPDATE t SET c1=30 WHERE c3=30;
1659 UPDATE t SET c3=40 WHERE c1=30;
1660 include/rpl_sync.inc
1661 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1662 connection server_1;
1663 DELETE FROM t WHERE c2="a";
1664 DELETE FROM t WHERE c1=20;
1665 DELETE FROM t;
1666 include/rpl_sync.inc
1667 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1668 connection server_1;
1669 DROP TABLE t;
1670 include/rpl_sync.inc
1671 connection server_1;
1672 SET SQL_LOG_BIN=0;
1673 connection server_2;
1674 SET SQL_LOG_BIN=0;
1675 connection server_3;
1676 SET SQL_LOG_BIN=0;
1677 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1678 connection server_1;
1679 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1680 connection server_2;
1681 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1682 connection server_3;
1683 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1684 connection server_1;
1685 SET SQL_LOG_BIN=1;
1686 connection server_2;
1687 SET SQL_LOG_BIN=1;
1688 connection server_3;
1689 SET SQL_LOG_BIN=1;
1690 connection server_1;
1691 INSERT INTO t VALUES (1, "a", 10);
1692 INSERT INTO t VALUES (2, "b", 20);
1693 INSERT INTO t VALUES (3, "c", 30);
1694 include/rpl_sync.inc
1695 connection server_1;
1696 UPDATE t SET c1=10 WHERE c2="a";
1697 UPDATE t SET c1=20 WHERE c1=2;
1698 UPDATE t SET c1=30 WHERE c3=30;
1699 UPDATE t SET c3=40 WHERE c1=30;
1700 include/rpl_sync.inc
1701 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1702 connection server_1;
1703 DELETE FROM t WHERE c2="a";
1704 DELETE FROM t WHERE c1=20;
1705 DELETE FROM t;
1706 include/rpl_sync.inc
1707 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1708 connection server_1;
1709 DROP TABLE t;
1710 include/rpl_sync.inc
1711 connection server_1;
1712 SET SQL_LOG_BIN=0;
1713 connection server_2;
1714 SET SQL_LOG_BIN=0;
1715 connection server_3;
1716 SET SQL_LOG_BIN=0;
1717 ### Asserts that declaring a blob as part of a primary key does not break replication
1718 connection server_1;
1719 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1720 connection server_2;
1721 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1722 connection server_3;
1723 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1724 connection server_1;
1725 SET SQL_LOG_BIN=1;
1726 connection server_2;
1727 SET SQL_LOG_BIN=1;
1728 connection server_3;
1729 SET SQL_LOG_BIN=1;
1730 connection server_1;
1731 INSERT INTO t VALUES (1, "a", 10);
1732 INSERT INTO t VALUES (2, "b", 20);
1733 INSERT INTO t VALUES (3, "c", 30);
1734 include/rpl_sync.inc
1735 connection server_1;
1736 UPDATE t SET c1=10 WHERE c2="a";
1737 UPDATE t SET c1=20 WHERE c1=2;
1738 UPDATE t SET c1=30 WHERE c3=30;
1739 UPDATE t SET c3=40 WHERE c1=30;
1740 include/rpl_sync.inc
1741 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1742 connection server_1;
1743 DELETE FROM t WHERE c2="a";
1744 DELETE FROM t WHERE c1=20;
1745 DELETE FROM t;
1746 include/rpl_sync.inc
1747 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1748 connection server_1;
1749 DROP TABLE t;
1750 include/rpl_sync.inc
1751 ### engines: InnoDB, InnoDB, MyISAM
1752 connection server_1;
1753 connection server_1;
1754 SET SQL_LOG_BIN=0;
1755 connection server_2;
1756 SET SQL_LOG_BIN=0;
1757 connection server_3;
1758 SET SQL_LOG_BIN=0;
1759 ### Asserts that updates without blobs in the AI (they are not updated)
1760 ### will not break replication (check when there is no key in the table)
1761 connection server_1;
1762 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1763 connection server_2;
1764 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1765 connection server_3;
1766 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1767 connection server_1;
1768 SET SQL_LOG_BIN=1;
1769 connection server_2;
1770 SET SQL_LOG_BIN=1;
1771 connection server_3;
1772 SET SQL_LOG_BIN=1;
1773 connection server_1;
1774 INSERT INTO t VALUES (1, "a", 10);
1775 INSERT INTO t VALUES (2, "b", 20);
1776 INSERT INTO t VALUES (3, "c", 30);
1777 include/rpl_sync.inc
1778 connection server_1;
1779 UPDATE t SET c1=10 WHERE c2="a";
1780 UPDATE t SET c1=20 WHERE c1=2;
1781 UPDATE t SET c1=30 WHERE c3=30;
1782 UPDATE t SET c3=40 WHERE c1=30;
1783 include/rpl_sync.inc
1784 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1785 connection server_1;
1786 DELETE FROM t WHERE c2="a";
1787 DELETE FROM t WHERE c1=20;
1788 DELETE FROM t;
1789 include/rpl_sync.inc
1790 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1791 connection server_1;
1792 DROP TABLE t;
1793 include/rpl_sync.inc
1794 connection server_1;
1795 SET SQL_LOG_BIN=0;
1796 connection server_2;
1797 SET SQL_LOG_BIN=0;
1798 connection server_3;
1799 SET SQL_LOG_BIN=0;
1800 ### Asserts that updates without blobs in the AI (they are not updated)
1801 ### will not break replication (check even if there is a key in the table)
1802 connection server_1;
1803 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1804 connection server_2;
1805 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1806 connection server_3;
1807 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1808 connection server_1;
1809 SET SQL_LOG_BIN=1;
1810 connection server_2;
1811 SET SQL_LOG_BIN=1;
1812 connection server_3;
1813 SET SQL_LOG_BIN=1;
1814 connection server_1;
1815 INSERT INTO t VALUES (1, "a", 10);
1816 INSERT INTO t VALUES (2, "b", 20);
1817 INSERT INTO t VALUES (3, "c", 30);
1818 include/rpl_sync.inc
1819 connection server_1;
1820 UPDATE t SET c1=10 WHERE c2="a";
1821 UPDATE t SET c1=20 WHERE c1=2;
1822 UPDATE t SET c1=30 WHERE c3=30;
1823 UPDATE t SET c3=40 WHERE c1=30;
1824 include/rpl_sync.inc
1825 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1826 connection server_1;
1827 DELETE FROM t WHERE c2="a";
1828 DELETE FROM t WHERE c1=20;
1829 DELETE FROM t;
1830 include/rpl_sync.inc
1831 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1832 connection server_1;
1833 DROP TABLE t;
1834 include/rpl_sync.inc
1835 connection server_1;
1836 SET SQL_LOG_BIN=0;
1837 connection server_2;
1838 SET SQL_LOG_BIN=0;
1839 connection server_3;
1840 SET SQL_LOG_BIN=0;
1841 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
1842 ### will not break replication
1843 connection server_1;
1844 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1845 connection server_2;
1846 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1847 connection server_3;
1848 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1849 connection server_1;
1850 SET SQL_LOG_BIN=1;
1851 connection server_2;
1852 SET SQL_LOG_BIN=1;
1853 connection server_3;
1854 SET SQL_LOG_BIN=1;
1855 connection server_1;
1856 INSERT INTO t VALUES (1, "a", 10);
1857 INSERT INTO t VALUES (2, "b", 20);
1858 INSERT INTO t VALUES (3, "c", 30);
1859 include/rpl_sync.inc
1860 connection server_1;
1861 UPDATE t SET c1=10 WHERE c2="a";
1862 UPDATE t SET c1=20 WHERE c1=2;
1863 UPDATE t SET c1=30 WHERE c3=30;
1864 UPDATE t SET c3=40 WHERE c1=30;
1865 include/rpl_sync.inc
1866 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1867 connection server_1;
1868 DELETE FROM t WHERE c2="a";
1869 DELETE FROM t WHERE c1=20;
1870 DELETE FROM t;
1871 include/rpl_sync.inc
1872 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1873 connection server_1;
1874 DROP TABLE t;
1875 include/rpl_sync.inc
1876 connection server_1;
1877 SET SQL_LOG_BIN=0;
1878 connection server_2;
1879 SET SQL_LOG_BIN=0;
1880 connection server_3;
1881 SET SQL_LOG_BIN=0;
1882 ### Asserts that updates without blobs in the BI (PK exists int the table)
1883 ### will not break replication
1884 connection server_1;
1885 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1886 connection server_2;
1887 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1888 connection server_3;
1889 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1890 connection server_1;
1891 SET SQL_LOG_BIN=1;
1892 connection server_2;
1893 SET SQL_LOG_BIN=1;
1894 connection server_3;
1895 SET SQL_LOG_BIN=1;
1896 connection server_1;
1897 INSERT INTO t VALUES (1, "a", 10);
1898 INSERT INTO t VALUES (2, "b", 20);
1899 INSERT INTO t VALUES (3, "c", 30);
1900 include/rpl_sync.inc
1901 connection server_1;
1902 UPDATE t SET c1=10 WHERE c2="a";
1903 UPDATE t SET c1=20 WHERE c1=2;
1904 UPDATE t SET c1=30 WHERE c3=30;
1905 UPDATE t SET c3=40 WHERE c1=30;
1906 include/rpl_sync.inc
1907 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1908 connection server_1;
1909 DELETE FROM t WHERE c2="a";
1910 DELETE FROM t WHERE c1=20;
1911 DELETE FROM t;
1912 include/rpl_sync.inc
1913 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1914 connection server_1;
1915 DROP TABLE t;
1916 include/rpl_sync.inc
1917 connection server_1;
1918 SET SQL_LOG_BIN=0;
1919 connection server_2;
1920 SET SQL_LOG_BIN=0;
1921 connection server_3;
1922 SET SQL_LOG_BIN=0;
1923 ### Asserts that declaring a blob in a key does not break replication
1924 connection server_1;
1925 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1926 connection server_2;
1927 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1928 connection server_3;
1929 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1930 connection server_1;
1931 SET SQL_LOG_BIN=1;
1932 connection server_2;
1933 SET SQL_LOG_BIN=1;
1934 connection server_3;
1935 SET SQL_LOG_BIN=1;
1936 connection server_1;
1937 INSERT INTO t VALUES (1, "a", 10);
1938 INSERT INTO t VALUES (2, "b", 20);
1939 INSERT INTO t VALUES (3, "c", 30);
1940 include/rpl_sync.inc
1941 connection server_1;
1942 UPDATE t SET c1=10 WHERE c2="a";
1943 UPDATE t SET c1=20 WHERE c1=2;
1944 UPDATE t SET c1=30 WHERE c3=30;
1945 UPDATE t SET c3=40 WHERE c1=30;
1946 include/rpl_sync.inc
1947 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1948 connection server_1;
1949 DELETE FROM t WHERE c2="a";
1950 DELETE FROM t WHERE c1=20;
1951 DELETE FROM t;
1952 include/rpl_sync.inc
1953 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1954 connection server_1;
1955 DROP TABLE t;
1956 include/rpl_sync.inc
1957 connection server_1;
1958 SET SQL_LOG_BIN=0;
1959 connection server_2;
1960 SET SQL_LOG_BIN=0;
1961 connection server_3;
1962 SET SQL_LOG_BIN=0;
1963 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1964 connection server_1;
1965 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1966 connection server_2;
1967 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1968 connection server_3;
1969 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1970 connection server_1;
1971 SET SQL_LOG_BIN=1;
1972 connection server_2;
1973 SET SQL_LOG_BIN=1;
1974 connection server_3;
1975 SET SQL_LOG_BIN=1;
1976 connection server_1;
1977 INSERT INTO t VALUES (1, "a", 10);
1978 INSERT INTO t VALUES (2, "b", 20);
1979 INSERT INTO t VALUES (3, "c", 30);
1980 include/rpl_sync.inc
1981 connection server_1;
1982 UPDATE t SET c1=10 WHERE c2="a";
1983 UPDATE t SET c1=20 WHERE c1=2;
1984 UPDATE t SET c1=30 WHERE c3=30;
1985 UPDATE t SET c3=40 WHERE c1=30;
1986 include/rpl_sync.inc
1987 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1988 connection server_1;
1989 DELETE FROM t WHERE c2="a";
1990 DELETE FROM t WHERE c1=20;
1991 DELETE FROM t;
1992 include/rpl_sync.inc
1993 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1994 connection server_1;
1995 DROP TABLE t;
1996 include/rpl_sync.inc
1997 connection server_1;
1998 SET SQL_LOG_BIN=0;
1999 connection server_2;
2000 SET SQL_LOG_BIN=0;
2001 connection server_3;
2002 SET SQL_LOG_BIN=0;
2003 ### Asserts that declaring a blob as part of a primary key does not break replication
2004 connection server_1;
2005 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2006 connection server_2;
2007 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2008 connection server_3;
2009 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2010 connection server_1;
2011 SET SQL_LOG_BIN=1;
2012 connection server_2;
2013 SET SQL_LOG_BIN=1;
2014 connection server_3;
2015 SET SQL_LOG_BIN=1;
2016 connection server_1;
2017 INSERT INTO t VALUES (1, "a", 10);
2018 INSERT INTO t VALUES (2, "b", 20);
2019 INSERT INTO t VALUES (3, "c", 30);
2020 include/rpl_sync.inc
2021 connection server_1;
2022 UPDATE t SET c1=10 WHERE c2="a";
2023 UPDATE t SET c1=20 WHERE c1=2;
2024 UPDATE t SET c1=30 WHERE c3=30;
2025 UPDATE t SET c3=40 WHERE c1=30;
2026 include/rpl_sync.inc
2027 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2028 connection server_1;
2029 DELETE FROM t WHERE c2="a";
2030 DELETE FROM t WHERE c1=20;
2031 DELETE FROM t;
2032 include/rpl_sync.inc
2033 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2034 connection server_1;
2035 DROP TABLE t;
2036 include/rpl_sync.inc
2037 ### engines: InnoDB, InnoDB, InnoDB
2038 connection server_1;
2039 connection server_1;
2040 SET SQL_LOG_BIN=0;
2041 connection server_2;
2042 SET SQL_LOG_BIN=0;
2043 connection server_3;
2044 SET SQL_LOG_BIN=0;
2045 ### Asserts that updates without blobs in the AI (they are not updated)
2046 ### will not break replication (check when there is no key in the table)
2047 connection server_1;
2048 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2049 connection server_2;
2050 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2051 connection server_3;
2052 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2053 connection server_1;
2054 SET SQL_LOG_BIN=1;
2055 connection server_2;
2056 SET SQL_LOG_BIN=1;
2057 connection server_3;
2058 SET SQL_LOG_BIN=1;
2059 connection server_1;
2060 INSERT INTO t VALUES (1, "a", 10);
2061 INSERT INTO t VALUES (2, "b", 20);
2062 INSERT INTO t VALUES (3, "c", 30);
2063 include/rpl_sync.inc
2064 connection server_1;
2065 UPDATE t SET c1=10 WHERE c2="a";
2066 UPDATE t SET c1=20 WHERE c1=2;
2067 UPDATE t SET c1=30 WHERE c3=30;
2068 UPDATE t SET c3=40 WHERE c1=30;
2069 include/rpl_sync.inc
2070 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2071 connection server_1;
2072 DELETE FROM t WHERE c2="a";
2073 DELETE FROM t WHERE c1=20;
2074 DELETE FROM t;
2075 include/rpl_sync.inc
2076 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2077 connection server_1;
2078 DROP TABLE t;
2079 include/rpl_sync.inc
2080 connection server_1;
2081 SET SQL_LOG_BIN=0;
2082 connection server_2;
2083 SET SQL_LOG_BIN=0;
2084 connection server_3;
2085 SET SQL_LOG_BIN=0;
2086 ### Asserts that updates without blobs in the AI (they are not updated)
2087 ### will not break replication (check even if there is a key in the table)
2088 connection server_1;
2089 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2090 connection server_2;
2091 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2092 connection server_3;
2093 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2094 connection server_1;
2095 SET SQL_LOG_BIN=1;
2096 connection server_2;
2097 SET SQL_LOG_BIN=1;
2098 connection server_3;
2099 SET SQL_LOG_BIN=1;
2100 connection server_1;
2101 INSERT INTO t VALUES (1, "a", 10);
2102 INSERT INTO t VALUES (2, "b", 20);
2103 INSERT INTO t VALUES (3, "c", 30);
2104 include/rpl_sync.inc
2105 connection server_1;
2106 UPDATE t SET c1=10 WHERE c2="a";
2107 UPDATE t SET c1=20 WHERE c1=2;
2108 UPDATE t SET c1=30 WHERE c3=30;
2109 UPDATE t SET c3=40 WHERE c1=30;
2110 include/rpl_sync.inc
2111 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2112 connection server_1;
2113 DELETE FROM t WHERE c2="a";
2114 DELETE FROM t WHERE c1=20;
2115 DELETE FROM t;
2116 include/rpl_sync.inc
2117 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2118 connection server_1;
2119 DROP TABLE t;
2120 include/rpl_sync.inc
2121 connection server_1;
2122 SET SQL_LOG_BIN=0;
2123 connection server_2;
2124 SET SQL_LOG_BIN=0;
2125 connection server_3;
2126 SET SQL_LOG_BIN=0;
2127 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
2128 ### will not break replication
2129 connection server_1;
2130 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2131 connection server_2;
2132 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2133 connection server_3;
2134 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2135 connection server_1;
2136 SET SQL_LOG_BIN=1;
2137 connection server_2;
2138 SET SQL_LOG_BIN=1;
2139 connection server_3;
2140 SET SQL_LOG_BIN=1;
2141 connection server_1;
2142 INSERT INTO t VALUES (1, "a", 10);
2143 INSERT INTO t VALUES (2, "b", 20);
2144 INSERT INTO t VALUES (3, "c", 30);
2145 include/rpl_sync.inc
2146 connection server_1;
2147 UPDATE t SET c1=10 WHERE c2="a";
2148 UPDATE t SET c1=20 WHERE c1=2;
2149 UPDATE t SET c1=30 WHERE c3=30;
2150 UPDATE t SET c3=40 WHERE c1=30;
2151 include/rpl_sync.inc
2152 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2153 connection server_1;
2154 DELETE FROM t WHERE c2="a";
2155 DELETE FROM t WHERE c1=20;
2156 DELETE FROM t;
2157 include/rpl_sync.inc
2158 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2159 connection server_1;
2160 DROP TABLE t;
2161 include/rpl_sync.inc
2162 connection server_1;
2163 SET SQL_LOG_BIN=0;
2164 connection server_2;
2165 SET SQL_LOG_BIN=0;
2166 connection server_3;
2167 SET SQL_LOG_BIN=0;
2168 ### Asserts that updates without blobs in the BI (PK exists int the table)
2169 ### will not break replication
2170 connection server_1;
2171 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2172 connection server_2;
2173 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2174 connection server_3;
2175 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2176 connection server_1;
2177 SET SQL_LOG_BIN=1;
2178 connection server_2;
2179 SET SQL_LOG_BIN=1;
2180 connection server_3;
2181 SET SQL_LOG_BIN=1;
2182 connection server_1;
2183 INSERT INTO t VALUES (1, "a", 10);
2184 INSERT INTO t VALUES (2, "b", 20);
2185 INSERT INTO t VALUES (3, "c", 30);
2186 include/rpl_sync.inc
2187 connection server_1;
2188 UPDATE t SET c1=10 WHERE c2="a";
2189 UPDATE t SET c1=20 WHERE c1=2;
2190 UPDATE t SET c1=30 WHERE c3=30;
2191 UPDATE t SET c3=40 WHERE c1=30;
2192 include/rpl_sync.inc
2193 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2194 connection server_1;
2195 DELETE FROM t WHERE c2="a";
2196 DELETE FROM t WHERE c1=20;
2197 DELETE FROM t;
2198 include/rpl_sync.inc
2199 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2200 connection server_1;
2201 DROP TABLE t;
2202 include/rpl_sync.inc
2203 connection server_1;
2204 SET SQL_LOG_BIN=0;
2205 connection server_2;
2206 SET SQL_LOG_BIN=0;
2207 connection server_3;
2208 SET SQL_LOG_BIN=0;
2209 ### Asserts that declaring a blob in a key does not break replication
2210 connection server_1;
2211 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2212 connection server_2;
2213 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2214 connection server_3;
2215 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2216 connection server_1;
2217 SET SQL_LOG_BIN=1;
2218 connection server_2;
2219 SET SQL_LOG_BIN=1;
2220 connection server_3;
2221 SET SQL_LOG_BIN=1;
2222 connection server_1;
2223 INSERT INTO t VALUES (1, "a", 10);
2224 INSERT INTO t VALUES (2, "b", 20);
2225 INSERT INTO t VALUES (3, "c", 30);
2226 include/rpl_sync.inc
2227 connection server_1;
2228 UPDATE t SET c1=10 WHERE c2="a";
2229 UPDATE t SET c1=20 WHERE c1=2;
2230 UPDATE t SET c1=30 WHERE c3=30;
2231 UPDATE t SET c3=40 WHERE c1=30;
2232 include/rpl_sync.inc
2233 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2234 connection server_1;
2235 DELETE FROM t WHERE c2="a";
2236 DELETE FROM t WHERE c1=20;
2237 DELETE FROM t;
2238 include/rpl_sync.inc
2239 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2240 connection server_1;
2241 DROP TABLE t;
2242 include/rpl_sync.inc
2243 connection server_1;
2244 SET SQL_LOG_BIN=0;
2245 connection server_2;
2246 SET SQL_LOG_BIN=0;
2247 connection server_3;
2248 SET SQL_LOG_BIN=0;
2249 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
2250 connection server_1;
2251 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2252 connection server_2;
2253 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2254 connection server_3;
2255 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2256 connection server_1;
2257 SET SQL_LOG_BIN=1;
2258 connection server_2;
2259 SET SQL_LOG_BIN=1;
2260 connection server_3;
2261 SET SQL_LOG_BIN=1;
2262 connection server_1;
2263 INSERT INTO t VALUES (1, "a", 10);
2264 INSERT INTO t VALUES (2, "b", 20);
2265 INSERT INTO t VALUES (3, "c", 30);
2266 include/rpl_sync.inc
2267 connection server_1;
2268 UPDATE t SET c1=10 WHERE c2="a";
2269 UPDATE t SET c1=20 WHERE c1=2;
2270 UPDATE t SET c1=30 WHERE c3=30;
2271 UPDATE t SET c3=40 WHERE c1=30;
2272 include/rpl_sync.inc
2273 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2274 connection server_1;
2275 DELETE FROM t WHERE c2="a";
2276 DELETE FROM t WHERE c1=20;
2277 DELETE FROM t;
2278 include/rpl_sync.inc
2279 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2280 connection server_1;
2281 DROP TABLE t;
2282 include/rpl_sync.inc
2283 connection server_1;
2284 SET SQL_LOG_BIN=0;
2285 connection server_2;
2286 SET SQL_LOG_BIN=0;
2287 connection server_3;
2288 SET SQL_LOG_BIN=0;
2289 ### Asserts that declaring a blob as part of a primary key does not break replication
2290 connection server_1;
2291 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2292 connection server_2;
2293 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2294 connection server_3;
2295 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2296 connection server_1;
2297 SET SQL_LOG_BIN=1;
2298 connection server_2;
2299 SET SQL_LOG_BIN=1;
2300 connection server_3;
2301 SET SQL_LOG_BIN=1;
2302 connection server_1;
2303 INSERT INTO t VALUES (1, "a", 10);
2304 INSERT INTO t VALUES (2, "b", 20);
2305 INSERT INTO t VALUES (3, "c", 30);
2306 include/rpl_sync.inc
2307 connection server_1;
2308 UPDATE t SET c1=10 WHERE c2="a";
2309 UPDATE t SET c1=20 WHERE c1=2;
2310 UPDATE t SET c1=30 WHERE c3=30;
2311 UPDATE t SET c3=40 WHERE c1=30;
2312 include/rpl_sync.inc
2313 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2314 connection server_1;
2315 DELETE FROM t WHERE c2="a";
2316 DELETE FROM t WHERE c1=20;
2317 DELETE FROM t;
2318 include/rpl_sync.inc
2319 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2320 connection server_1;
2321 DROP TABLE t;
2322 include/rpl_sync.inc
2323 CON: 'server_1', IMG: 'MINIMAL', RESTART SLAVE: 'N'
2324 connection server_1;
2325 SET SESSION binlog_row_image= 'MINIMAL';
2326 SET GLOBAL binlog_row_image= 'MINIMAL';
2327 FLUSH TABLES;
2328 SHOW VARIABLES LIKE 'binlog_row_image';
2329 Variable_name Value
2330 binlog_row_image MINIMAL
2331 CON: 'server_2', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
2332 connection server_2;
2333 SET SESSION binlog_row_image= 'MINIMAL';
2334 SET GLOBAL binlog_row_image= 'MINIMAL';
2335 include/stop_slave.inc
2336 include/start_slave.inc
2337 FLUSH TABLES;
2338 SHOW VARIABLES LIKE 'binlog_row_image';
2339 Variable_name Value
2340 binlog_row_image MINIMAL
2341 CON: 'server_3', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
2342 connection server_3;
2343 SET SESSION binlog_row_image= 'MINIMAL';
2344 SET GLOBAL binlog_row_image= 'MINIMAL';
2345 include/stop_slave.inc
2346 include/start_slave.inc
2347 FLUSH TABLES;
2348 SHOW VARIABLES LIKE 'binlog_row_image';
2349 Variable_name Value
2350 binlog_row_image MINIMAL
2351 connection server_1;
2352 ### engines: MyISAM, MyISAM, MyISAM
2353 connection server_1;
2354 connection server_1;
2355 SET SQL_LOG_BIN=0;
2356 connection server_2;
2357 SET SQL_LOG_BIN=0;
2358 connection server_3;
2359 SET SQL_LOG_BIN=0;
2360 ### Asserts that updates without blobs in the AI (they are not updated)
2361 ### will not break replication (check when there is no key in the table)
2362 connection server_1;
2363 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2364 connection server_2;
2365 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2366 connection server_3;
2367 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2368 connection server_1;
2369 SET SQL_LOG_BIN=1;
2370 connection server_2;
2371 SET SQL_LOG_BIN=1;
2372 connection server_3;
2373 SET SQL_LOG_BIN=1;
2374 connection server_1;
2375 INSERT INTO t VALUES (1, "a", 10);
2376 INSERT INTO t VALUES (2, "b", 20);
2377 INSERT INTO t VALUES (3, "c", 30);
2378 include/rpl_sync.inc
2379 connection server_1;
2380 UPDATE t SET c1=10 WHERE c2="a";
2381 UPDATE t SET c1=20 WHERE c1=2;
2382 UPDATE t SET c1=30 WHERE c3=30;
2383 UPDATE t SET c3=40 WHERE c1=30;
2384 include/rpl_sync.inc
2385 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2386 connection server_1;
2387 DELETE FROM t WHERE c2="a";
2388 DELETE FROM t WHERE c1=20;
2389 DELETE FROM t;
2390 include/rpl_sync.inc
2391 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2392 connection server_1;
2393 DROP TABLE t;
2394 include/rpl_sync.inc
2395 connection server_1;
2396 SET SQL_LOG_BIN=0;
2397 connection server_2;
2398 SET SQL_LOG_BIN=0;
2399 connection server_3;
2400 SET SQL_LOG_BIN=0;
2401 ### Asserts that updates without blobs in the AI (they are not updated)
2402 ### will not break replication (check even if there is a key in the table)
2403 connection server_1;
2404 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2405 connection server_2;
2406 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2407 connection server_3;
2408 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2409 connection server_1;
2410 SET SQL_LOG_BIN=1;
2411 connection server_2;
2412 SET SQL_LOG_BIN=1;
2413 connection server_3;
2414 SET SQL_LOG_BIN=1;
2415 connection server_1;
2416 INSERT INTO t VALUES (1, "a", 10);
2417 INSERT INTO t VALUES (2, "b", 20);
2418 INSERT INTO t VALUES (3, "c", 30);
2419 include/rpl_sync.inc
2420 connection server_1;
2421 UPDATE t SET c1=10 WHERE c2="a";
2422 UPDATE t SET c1=20 WHERE c1=2;
2423 UPDATE t SET c1=30 WHERE c3=30;
2424 UPDATE t SET c3=40 WHERE c1=30;
2425 include/rpl_sync.inc
2426 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2427 connection server_1;
2428 DELETE FROM t WHERE c2="a";
2429 DELETE FROM t WHERE c1=20;
2430 DELETE FROM t;
2431 include/rpl_sync.inc
2432 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2433 connection server_1;
2434 DROP TABLE t;
2435 include/rpl_sync.inc
2436 connection server_1;
2437 SET SQL_LOG_BIN=0;
2438 connection server_2;
2439 SET SQL_LOG_BIN=0;
2440 connection server_3;
2441 SET SQL_LOG_BIN=0;
2442 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
2443 ### will not break replication
2444 connection server_1;
2445 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2446 connection server_2;
2447 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2448 connection server_3;
2449 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2450 connection server_1;
2451 SET SQL_LOG_BIN=1;
2452 connection server_2;
2453 SET SQL_LOG_BIN=1;
2454 connection server_3;
2455 SET SQL_LOG_BIN=1;
2456 connection server_1;
2457 INSERT INTO t VALUES (1, "a", 10);
2458 INSERT INTO t VALUES (2, "b", 20);
2459 INSERT INTO t VALUES (3, "c", 30);
2460 include/rpl_sync.inc
2461 connection server_1;
2462 UPDATE t SET c1=10 WHERE c2="a";
2463 UPDATE t SET c1=20 WHERE c1=2;
2464 UPDATE t SET c1=30 WHERE c3=30;
2465 UPDATE t SET c3=40 WHERE c1=30;
2466 include/rpl_sync.inc
2467 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2468 connection server_1;
2469 DELETE FROM t WHERE c2="a";
2470 DELETE FROM t WHERE c1=20;
2471 DELETE FROM t;
2472 include/rpl_sync.inc
2473 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2474 connection server_1;
2475 DROP TABLE t;
2476 include/rpl_sync.inc
2477 connection server_1;
2478 SET SQL_LOG_BIN=0;
2479 connection server_2;
2480 SET SQL_LOG_BIN=0;
2481 connection server_3;
2482 SET SQL_LOG_BIN=0;
2483 ### Asserts that updates without blobs in the BI (PK exists int the table)
2484 ### will not break replication
2485 connection server_1;
2486 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2487 connection server_2;
2488 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2489 connection server_3;
2490 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2491 connection server_1;
2492 SET SQL_LOG_BIN=1;
2493 connection server_2;
2494 SET SQL_LOG_BIN=1;
2495 connection server_3;
2496 SET SQL_LOG_BIN=1;
2497 connection server_1;
2498 INSERT INTO t VALUES (1, "a", 10);
2499 INSERT INTO t VALUES (2, "b", 20);
2500 INSERT INTO t VALUES (3, "c", 30);
2501 include/rpl_sync.inc
2502 connection server_1;
2503 UPDATE t SET c1=10 WHERE c2="a";
2504 UPDATE t SET c1=20 WHERE c1=2;
2505 UPDATE t SET c1=30 WHERE c3=30;
2506 UPDATE t SET c3=40 WHERE c1=30;
2507 include/rpl_sync.inc
2508 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2509 connection server_1;
2510 DELETE FROM t WHERE c2="a";
2511 DELETE FROM t WHERE c1=20;
2512 DELETE FROM t;
2513 include/rpl_sync.inc
2514 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2515 connection server_1;
2516 DROP TABLE t;
2517 include/rpl_sync.inc
2518 connection server_1;
2519 SET SQL_LOG_BIN=0;
2520 connection server_2;
2521 SET SQL_LOG_BIN=0;
2522 connection server_3;
2523 SET SQL_LOG_BIN=0;
2524 ### Asserts that declaring a blob in a key does not break replication
2525 connection server_1;
2526 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2527 connection server_2;
2528 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2529 connection server_3;
2530 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2531 connection server_1;
2532 SET SQL_LOG_BIN=1;
2533 connection server_2;
2534 SET SQL_LOG_BIN=1;
2535 connection server_3;
2536 SET SQL_LOG_BIN=1;
2537 connection server_1;
2538 INSERT INTO t VALUES (1, "a", 10);
2539 INSERT INTO t VALUES (2, "b", 20);
2540 INSERT INTO t VALUES (3, "c", 30);
2541 include/rpl_sync.inc
2542 connection server_1;
2543 UPDATE t SET c1=10 WHERE c2="a";
2544 UPDATE t SET c1=20 WHERE c1=2;
2545 UPDATE t SET c1=30 WHERE c3=30;
2546 UPDATE t SET c3=40 WHERE c1=30;
2547 include/rpl_sync.inc
2548 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2549 connection server_1;
2550 DELETE FROM t WHERE c2="a";
2551 DELETE FROM t WHERE c1=20;
2552 DELETE FROM t;
2553 include/rpl_sync.inc
2554 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2555 connection server_1;
2556 DROP TABLE t;
2557 include/rpl_sync.inc
2558 connection server_1;
2559 SET SQL_LOG_BIN=0;
2560 connection server_2;
2561 SET SQL_LOG_BIN=0;
2562 connection server_3;
2563 SET SQL_LOG_BIN=0;
2564 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
2565 connection server_1;
2566 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2567 connection server_2;
2568 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2569 connection server_3;
2570 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2571 connection server_1;
2572 SET SQL_LOG_BIN=1;
2573 connection server_2;
2574 SET SQL_LOG_BIN=1;
2575 connection server_3;
2576 SET SQL_LOG_BIN=1;
2577 connection server_1;
2578 INSERT INTO t VALUES (1, "a", 10);
2579 INSERT INTO t VALUES (2, "b", 20);
2580 INSERT INTO t VALUES (3, "c", 30);
2581 include/rpl_sync.inc
2582 connection server_1;
2583 UPDATE t SET c1=10 WHERE c2="a";
2584 UPDATE t SET c1=20 WHERE c1=2;
2585 UPDATE t SET c1=30 WHERE c3=30;
2586 UPDATE t SET c3=40 WHERE c1=30;
2587 include/rpl_sync.inc
2588 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2589 connection server_1;
2590 DELETE FROM t WHERE c2="a";
2591 DELETE FROM t WHERE c1=20;
2592 DELETE FROM t;
2593 include/rpl_sync.inc
2594 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2595 connection server_1;
2596 DROP TABLE t;
2597 include/rpl_sync.inc
2598 connection server_1;
2599 SET SQL_LOG_BIN=0;
2600 connection server_2;
2601 SET SQL_LOG_BIN=0;
2602 connection server_3;
2603 SET SQL_LOG_BIN=0;
2604 ### Asserts that declaring a blob as part of a primary key does not break replication
2605 connection server_1;
2606 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2607 connection server_2;
2608 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2609 connection server_3;
2610 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2611 connection server_1;
2612 SET SQL_LOG_BIN=1;
2613 connection server_2;
2614 SET SQL_LOG_BIN=1;
2615 connection server_3;
2616 SET SQL_LOG_BIN=1;
2617 connection server_1;
2618 INSERT INTO t VALUES (1, "a", 10);
2619 INSERT INTO t VALUES (2, "b", 20);
2620 INSERT INTO t VALUES (3, "c", 30);
2621 include/rpl_sync.inc
2622 connection server_1;
2623 UPDATE t SET c1=10 WHERE c2="a";
2624 UPDATE t SET c1=20 WHERE c1=2;
2625 UPDATE t SET c1=30 WHERE c3=30;
2626 UPDATE t SET c3=40 WHERE c1=30;
2627 include/rpl_sync.inc
2628 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2629 connection server_1;
2630 DELETE FROM t WHERE c2="a";
2631 DELETE FROM t WHERE c1=20;
2632 DELETE FROM t;
2633 include/rpl_sync.inc
2634 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2635 connection server_1;
2636 DROP TABLE t;
2637 include/rpl_sync.inc
2638 ### engines: MyISAM, MyISAM, InnoDB
2639 connection server_1;
2640 connection server_1;
2641 SET SQL_LOG_BIN=0;
2642 connection server_2;
2643 SET SQL_LOG_BIN=0;
2644 connection server_3;
2645 SET SQL_LOG_BIN=0;
2646 ### Asserts that updates without blobs in the AI (they are not updated)
2647 ### will not break replication (check when there is no key in the table)
2648 connection server_1;
2649 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2650 connection server_2;
2651 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2652 connection server_3;
2653 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2654 connection server_1;
2655 SET SQL_LOG_BIN=1;
2656 connection server_2;
2657 SET SQL_LOG_BIN=1;
2658 connection server_3;
2659 SET SQL_LOG_BIN=1;
2660 connection server_1;
2661 INSERT INTO t VALUES (1, "a", 10);
2662 INSERT INTO t VALUES (2, "b", 20);
2663 INSERT INTO t VALUES (3, "c", 30);
2664 include/rpl_sync.inc
2665 connection server_1;
2666 UPDATE t SET c1=10 WHERE c2="a";
2667 UPDATE t SET c1=20 WHERE c1=2;
2668 UPDATE t SET c1=30 WHERE c3=30;
2669 UPDATE t SET c3=40 WHERE c1=30;
2670 include/rpl_sync.inc
2671 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2672 connection server_1;
2673 DELETE FROM t WHERE c2="a";
2674 DELETE FROM t WHERE c1=20;
2675 DELETE FROM t;
2676 include/rpl_sync.inc
2677 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2678 connection server_1;
2679 DROP TABLE t;
2680 include/rpl_sync.inc
2681 connection server_1;
2682 SET SQL_LOG_BIN=0;
2683 connection server_2;
2684 SET SQL_LOG_BIN=0;
2685 connection server_3;
2686 SET SQL_LOG_BIN=0;
2687 ### Asserts that updates without blobs in the AI (they are not updated)
2688 ### will not break replication (check even if there is a key in the table)
2689 connection server_1;
2690 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2691 connection server_2;
2692 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2693 connection server_3;
2694 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2695 connection server_1;
2696 SET SQL_LOG_BIN=1;
2697 connection server_2;
2698 SET SQL_LOG_BIN=1;
2699 connection server_3;
2700 SET SQL_LOG_BIN=1;
2701 connection server_1;
2702 INSERT INTO t VALUES (1, "a", 10);
2703 INSERT INTO t VALUES (2, "b", 20);
2704 INSERT INTO t VALUES (3, "c", 30);
2705 include/rpl_sync.inc
2706 connection server_1;
2707 UPDATE t SET c1=10 WHERE c2="a";
2708 UPDATE t SET c1=20 WHERE c1=2;
2709 UPDATE t SET c1=30 WHERE c3=30;
2710 UPDATE t SET c3=40 WHERE c1=30;
2711 include/rpl_sync.inc
2712 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2713 connection server_1;
2714 DELETE FROM t WHERE c2="a";
2715 DELETE FROM t WHERE c1=20;
2716 DELETE FROM t;
2717 include/rpl_sync.inc
2718 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2719 connection server_1;
2720 DROP TABLE t;
2721 include/rpl_sync.inc
2722 connection server_1;
2723 SET SQL_LOG_BIN=0;
2724 connection server_2;
2725 SET SQL_LOG_BIN=0;
2726 connection server_3;
2727 SET SQL_LOG_BIN=0;
2728 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
2729 ### will not break replication
2730 connection server_1;
2731 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2732 connection server_2;
2733 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2734 connection server_3;
2735 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2736 connection server_1;
2737 SET SQL_LOG_BIN=1;
2738 connection server_2;
2739 SET SQL_LOG_BIN=1;
2740 connection server_3;
2741 SET SQL_LOG_BIN=1;
2742 connection server_1;
2743 INSERT INTO t VALUES (1, "a", 10);
2744 INSERT INTO t VALUES (2, "b", 20);
2745 INSERT INTO t VALUES (3, "c", 30);
2746 include/rpl_sync.inc
2747 connection server_1;
2748 UPDATE t SET c1=10 WHERE c2="a";
2749 UPDATE t SET c1=20 WHERE c1=2;
2750 UPDATE t SET c1=30 WHERE c3=30;
2751 UPDATE t SET c3=40 WHERE c1=30;
2752 include/rpl_sync.inc
2753 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2754 connection server_1;
2755 DELETE FROM t WHERE c2="a";
2756 DELETE FROM t WHERE c1=20;
2757 DELETE FROM t;
2758 include/rpl_sync.inc
2759 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2760 connection server_1;
2761 DROP TABLE t;
2762 include/rpl_sync.inc
2763 connection server_1;
2764 SET SQL_LOG_BIN=0;
2765 connection server_2;
2766 SET SQL_LOG_BIN=0;
2767 connection server_3;
2768 SET SQL_LOG_BIN=0;
2769 ### Asserts that updates without blobs in the BI (PK exists int the table)
2770 ### will not break replication
2771 connection server_1;
2772 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2773 connection server_2;
2774 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2775 connection server_3;
2776 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2777 connection server_1;
2778 SET SQL_LOG_BIN=1;
2779 connection server_2;
2780 SET SQL_LOG_BIN=1;
2781 connection server_3;
2782 SET SQL_LOG_BIN=1;
2783 connection server_1;
2784 INSERT INTO t VALUES (1, "a", 10);
2785 INSERT INTO t VALUES (2, "b", 20);
2786 INSERT INTO t VALUES (3, "c", 30);
2787 include/rpl_sync.inc
2788 connection server_1;
2789 UPDATE t SET c1=10 WHERE c2="a";
2790 UPDATE t SET c1=20 WHERE c1=2;
2791 UPDATE t SET c1=30 WHERE c3=30;
2792 UPDATE t SET c3=40 WHERE c1=30;
2793 include/rpl_sync.inc
2794 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2795 connection server_1;
2796 DELETE FROM t WHERE c2="a";
2797 DELETE FROM t WHERE c1=20;
2798 DELETE FROM t;
2799 include/rpl_sync.inc
2800 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2801 connection server_1;
2802 DROP TABLE t;
2803 include/rpl_sync.inc
2804 connection server_1;
2805 SET SQL_LOG_BIN=0;
2806 connection server_2;
2807 SET SQL_LOG_BIN=0;
2808 connection server_3;
2809 SET SQL_LOG_BIN=0;
2810 ### Asserts that declaring a blob in a key does not break replication
2811 connection server_1;
2812 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2813 connection server_2;
2814 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2815 connection server_3;
2816 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2817 connection server_1;
2818 SET SQL_LOG_BIN=1;
2819 connection server_2;
2820 SET SQL_LOG_BIN=1;
2821 connection server_3;
2822 SET SQL_LOG_BIN=1;
2823 connection server_1;
2824 INSERT INTO t VALUES (1, "a", 10);
2825 INSERT INTO t VALUES (2, "b", 20);
2826 INSERT INTO t VALUES (3, "c", 30);
2827 include/rpl_sync.inc
2828 connection server_1;
2829 UPDATE t SET c1=10 WHERE c2="a";
2830 UPDATE t SET c1=20 WHERE c1=2;
2831 UPDATE t SET c1=30 WHERE c3=30;
2832 UPDATE t SET c3=40 WHERE c1=30;
2833 include/rpl_sync.inc
2834 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2835 connection server_1;
2836 DELETE FROM t WHERE c2="a";
2837 DELETE FROM t WHERE c1=20;
2838 DELETE FROM t;
2839 include/rpl_sync.inc
2840 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2841 connection server_1;
2842 DROP TABLE t;
2843 include/rpl_sync.inc
2844 connection server_1;
2845 SET SQL_LOG_BIN=0;
2846 connection server_2;
2847 SET SQL_LOG_BIN=0;
2848 connection server_3;
2849 SET SQL_LOG_BIN=0;
2850 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
2851 connection server_1;
2852 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2853 connection server_2;
2854 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2855 connection server_3;
2856 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2857 connection server_1;
2858 SET SQL_LOG_BIN=1;
2859 connection server_2;
2860 SET SQL_LOG_BIN=1;
2861 connection server_3;
2862 SET SQL_LOG_BIN=1;
2863 connection server_1;
2864 INSERT INTO t VALUES (1, "a", 10);
2865 INSERT INTO t VALUES (2, "b", 20);
2866 INSERT INTO t VALUES (3, "c", 30);
2867 include/rpl_sync.inc
2868 connection server_1;
2869 UPDATE t SET c1=10 WHERE c2="a";
2870 UPDATE t SET c1=20 WHERE c1=2;
2871 UPDATE t SET c1=30 WHERE c3=30;
2872 UPDATE t SET c3=40 WHERE c1=30;
2873 include/rpl_sync.inc
2874 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2875 connection server_1;
2876 DELETE FROM t WHERE c2="a";
2877 DELETE FROM t WHERE c1=20;
2878 DELETE FROM t;
2879 include/rpl_sync.inc
2880 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2881 connection server_1;
2882 DROP TABLE t;
2883 include/rpl_sync.inc
2884 connection server_1;
2885 SET SQL_LOG_BIN=0;
2886 connection server_2;
2887 SET SQL_LOG_BIN=0;
2888 connection server_3;
2889 SET SQL_LOG_BIN=0;
2890 ### Asserts that declaring a blob as part of a primary key does not break replication
2891 connection server_1;
2892 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2893 connection server_2;
2894 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2895 connection server_3;
2896 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2897 connection server_1;
2898 SET SQL_LOG_BIN=1;
2899 connection server_2;
2900 SET SQL_LOG_BIN=1;
2901 connection server_3;
2902 SET SQL_LOG_BIN=1;
2903 connection server_1;
2904 INSERT INTO t VALUES (1, "a", 10);
2905 INSERT INTO t VALUES (2, "b", 20);
2906 INSERT INTO t VALUES (3, "c", 30);
2907 include/rpl_sync.inc
2908 connection server_1;
2909 UPDATE t SET c1=10 WHERE c2="a";
2910 UPDATE t SET c1=20 WHERE c1=2;
2911 UPDATE t SET c1=30 WHERE c3=30;
2912 UPDATE t SET c3=40 WHERE c1=30;
2913 include/rpl_sync.inc
2914 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2915 connection server_1;
2916 DELETE FROM t WHERE c2="a";
2917 DELETE FROM t WHERE c1=20;
2918 DELETE FROM t;
2919 include/rpl_sync.inc
2920 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2921 connection server_1;
2922 DROP TABLE t;
2923 include/rpl_sync.inc
2924 ### engines: MyISAM, InnoDB, MyISAM
2925 connection server_1;
2926 connection server_1;
2927 SET SQL_LOG_BIN=0;
2928 connection server_2;
2929 SET SQL_LOG_BIN=0;
2930 connection server_3;
2931 SET SQL_LOG_BIN=0;
2932 ### Asserts that updates without blobs in the AI (they are not updated)
2933 ### will not break replication (check when there is no key in the table)
2934 connection server_1;
2935 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2936 connection server_2;
2937 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2938 connection server_3;
2939 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2940 connection server_1;
2941 SET SQL_LOG_BIN=1;
2942 connection server_2;
2943 SET SQL_LOG_BIN=1;
2944 connection server_3;
2945 SET SQL_LOG_BIN=1;
2946 connection server_1;
2947 INSERT INTO t VALUES (1, "a", 10);
2948 INSERT INTO t VALUES (2, "b", 20);
2949 INSERT INTO t VALUES (3, "c", 30);
2950 include/rpl_sync.inc
2951 connection server_1;
2952 UPDATE t SET c1=10 WHERE c2="a";
2953 UPDATE t SET c1=20 WHERE c1=2;
2954 UPDATE t SET c1=30 WHERE c3=30;
2955 UPDATE t SET c3=40 WHERE c1=30;
2956 include/rpl_sync.inc
2957 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2958 connection server_1;
2959 DELETE FROM t WHERE c2="a";
2960 DELETE FROM t WHERE c1=20;
2961 DELETE FROM t;
2962 include/rpl_sync.inc
2963 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2964 connection server_1;
2965 DROP TABLE t;
2966 include/rpl_sync.inc
2967 connection server_1;
2968 SET SQL_LOG_BIN=0;
2969 connection server_2;
2970 SET SQL_LOG_BIN=0;
2971 connection server_3;
2972 SET SQL_LOG_BIN=0;
2973 ### Asserts that updates without blobs in the AI (they are not updated)
2974 ### will not break replication (check even if there is a key in the table)
2975 connection server_1;
2976 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2977 connection server_2;
2978 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2979 connection server_3;
2980 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2981 connection server_1;
2982 SET SQL_LOG_BIN=1;
2983 connection server_2;
2984 SET SQL_LOG_BIN=1;
2985 connection server_3;
2986 SET SQL_LOG_BIN=1;
2987 connection server_1;
2988 INSERT INTO t VALUES (1, "a", 10);
2989 INSERT INTO t VALUES (2, "b", 20);
2990 INSERT INTO t VALUES (3, "c", 30);
2991 include/rpl_sync.inc
2992 connection server_1;
2993 UPDATE t SET c1=10 WHERE c2="a";
2994 UPDATE t SET c1=20 WHERE c1=2;
2995 UPDATE t SET c1=30 WHERE c3=30;
2996 UPDATE t SET c3=40 WHERE c1=30;
2997 include/rpl_sync.inc
2998 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2999 connection server_1;
3000 DELETE FROM t WHERE c2="a";
3001 DELETE FROM t WHERE c1=20;
3002 DELETE FROM t;
3003 include/rpl_sync.inc
3004 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3005 connection server_1;
3006 DROP TABLE t;
3007 include/rpl_sync.inc
3008 connection server_1;
3009 SET SQL_LOG_BIN=0;
3010 connection server_2;
3011 SET SQL_LOG_BIN=0;
3012 connection server_3;
3013 SET SQL_LOG_BIN=0;
3014 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3015 ### will not break replication
3016 connection server_1;
3017 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3018 connection server_2;
3019 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3020 connection server_3;
3021 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3022 connection server_1;
3023 SET SQL_LOG_BIN=1;
3024 connection server_2;
3025 SET SQL_LOG_BIN=1;
3026 connection server_3;
3027 SET SQL_LOG_BIN=1;
3028 connection server_1;
3029 INSERT INTO t VALUES (1, "a", 10);
3030 INSERT INTO t VALUES (2, "b", 20);
3031 INSERT INTO t VALUES (3, "c", 30);
3032 include/rpl_sync.inc
3033 connection server_1;
3034 UPDATE t SET c1=10 WHERE c2="a";
3035 UPDATE t SET c1=20 WHERE c1=2;
3036 UPDATE t SET c1=30 WHERE c3=30;
3037 UPDATE t SET c3=40 WHERE c1=30;
3038 include/rpl_sync.inc
3039 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3040 connection server_1;
3041 DELETE FROM t WHERE c2="a";
3042 DELETE FROM t WHERE c1=20;
3043 DELETE FROM t;
3044 include/rpl_sync.inc
3045 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3046 connection server_1;
3047 DROP TABLE t;
3048 include/rpl_sync.inc
3049 connection server_1;
3050 SET SQL_LOG_BIN=0;
3051 connection server_2;
3052 SET SQL_LOG_BIN=0;
3053 connection server_3;
3054 SET SQL_LOG_BIN=0;
3055 ### Asserts that updates without blobs in the BI (PK exists int the table)
3056 ### will not break replication
3057 connection server_1;
3058 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3059 connection server_2;
3060 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3061 connection server_3;
3062 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3063 connection server_1;
3064 SET SQL_LOG_BIN=1;
3065 connection server_2;
3066 SET SQL_LOG_BIN=1;
3067 connection server_3;
3068 SET SQL_LOG_BIN=1;
3069 connection server_1;
3070 INSERT INTO t VALUES (1, "a", 10);
3071 INSERT INTO t VALUES (2, "b", 20);
3072 INSERT INTO t VALUES (3, "c", 30);
3073 include/rpl_sync.inc
3074 connection server_1;
3075 UPDATE t SET c1=10 WHERE c2="a";
3076 UPDATE t SET c1=20 WHERE c1=2;
3077 UPDATE t SET c1=30 WHERE c3=30;
3078 UPDATE t SET c3=40 WHERE c1=30;
3079 include/rpl_sync.inc
3080 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3081 connection server_1;
3082 DELETE FROM t WHERE c2="a";
3083 DELETE FROM t WHERE c1=20;
3084 DELETE FROM t;
3085 include/rpl_sync.inc
3086 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3087 connection server_1;
3088 DROP TABLE t;
3089 include/rpl_sync.inc
3090 connection server_1;
3091 SET SQL_LOG_BIN=0;
3092 connection server_2;
3093 SET SQL_LOG_BIN=0;
3094 connection server_3;
3095 SET SQL_LOG_BIN=0;
3096 ### Asserts that declaring a blob in a key does not break replication
3097 connection server_1;
3098 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3099 connection server_2;
3100 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3101 connection server_3;
3102 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3103 connection server_1;
3104 SET SQL_LOG_BIN=1;
3105 connection server_2;
3106 SET SQL_LOG_BIN=1;
3107 connection server_3;
3108 SET SQL_LOG_BIN=1;
3109 connection server_1;
3110 INSERT INTO t VALUES (1, "a", 10);
3111 INSERT INTO t VALUES (2, "b", 20);
3112 INSERT INTO t VALUES (3, "c", 30);
3113 include/rpl_sync.inc
3114 connection server_1;
3115 UPDATE t SET c1=10 WHERE c2="a";
3116 UPDATE t SET c1=20 WHERE c1=2;
3117 UPDATE t SET c1=30 WHERE c3=30;
3118 UPDATE t SET c3=40 WHERE c1=30;
3119 include/rpl_sync.inc
3120 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3121 connection server_1;
3122 DELETE FROM t WHERE c2="a";
3123 DELETE FROM t WHERE c1=20;
3124 DELETE FROM t;
3125 include/rpl_sync.inc
3126 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3127 connection server_1;
3128 DROP TABLE t;
3129 include/rpl_sync.inc
3130 connection server_1;
3131 SET SQL_LOG_BIN=0;
3132 connection server_2;
3133 SET SQL_LOG_BIN=0;
3134 connection server_3;
3135 SET SQL_LOG_BIN=0;
3136 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3137 connection server_1;
3138 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3139 connection server_2;
3140 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3141 connection server_3;
3142 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3143 connection server_1;
3144 SET SQL_LOG_BIN=1;
3145 connection server_2;
3146 SET SQL_LOG_BIN=1;
3147 connection server_3;
3148 SET SQL_LOG_BIN=1;
3149 connection server_1;
3150 INSERT INTO t VALUES (1, "a", 10);
3151 INSERT INTO t VALUES (2, "b", 20);
3152 INSERT INTO t VALUES (3, "c", 30);
3153 include/rpl_sync.inc
3154 connection server_1;
3155 UPDATE t SET c1=10 WHERE c2="a";
3156 UPDATE t SET c1=20 WHERE c1=2;
3157 UPDATE t SET c1=30 WHERE c3=30;
3158 UPDATE t SET c3=40 WHERE c1=30;
3159 include/rpl_sync.inc
3160 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3161 connection server_1;
3162 DELETE FROM t WHERE c2="a";
3163 DELETE FROM t WHERE c1=20;
3164 DELETE FROM t;
3165 include/rpl_sync.inc
3166 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3167 connection server_1;
3168 DROP TABLE t;
3169 include/rpl_sync.inc
3170 connection server_1;
3171 SET SQL_LOG_BIN=0;
3172 connection server_2;
3173 SET SQL_LOG_BIN=0;
3174 connection server_3;
3175 SET SQL_LOG_BIN=0;
3176 ### Asserts that declaring a blob as part of a primary key does not break replication
3177 connection server_1;
3178 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3179 connection server_2;
3180 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3181 connection server_3;
3182 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3183 connection server_1;
3184 SET SQL_LOG_BIN=1;
3185 connection server_2;
3186 SET SQL_LOG_BIN=1;
3187 connection server_3;
3188 SET SQL_LOG_BIN=1;
3189 connection server_1;
3190 INSERT INTO t VALUES (1, "a", 10);
3191 INSERT INTO t VALUES (2, "b", 20);
3192 INSERT INTO t VALUES (3, "c", 30);
3193 include/rpl_sync.inc
3194 connection server_1;
3195 UPDATE t SET c1=10 WHERE c2="a";
3196 UPDATE t SET c1=20 WHERE c1=2;
3197 UPDATE t SET c1=30 WHERE c3=30;
3198 UPDATE t SET c3=40 WHERE c1=30;
3199 include/rpl_sync.inc
3200 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3201 connection server_1;
3202 DELETE FROM t WHERE c2="a";
3203 DELETE FROM t WHERE c1=20;
3204 DELETE FROM t;
3205 include/rpl_sync.inc
3206 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3207 connection server_1;
3208 DROP TABLE t;
3209 include/rpl_sync.inc
3210 ### engines: MyISAM, InnoDB, InnoDB
3211 connection server_1;
3212 connection server_1;
3213 SET SQL_LOG_BIN=0;
3214 connection server_2;
3215 SET SQL_LOG_BIN=0;
3216 connection server_3;
3217 SET SQL_LOG_BIN=0;
3218 ### Asserts that updates without blobs in the AI (they are not updated)
3219 ### will not break replication (check when there is no key in the table)
3220 connection server_1;
3221 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3222 connection server_2;
3223 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3224 connection server_3;
3225 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3226 connection server_1;
3227 SET SQL_LOG_BIN=1;
3228 connection server_2;
3229 SET SQL_LOG_BIN=1;
3230 connection server_3;
3231 SET SQL_LOG_BIN=1;
3232 connection server_1;
3233 INSERT INTO t VALUES (1, "a", 10);
3234 INSERT INTO t VALUES (2, "b", 20);
3235 INSERT INTO t VALUES (3, "c", 30);
3236 include/rpl_sync.inc
3237 connection server_1;
3238 UPDATE t SET c1=10 WHERE c2="a";
3239 UPDATE t SET c1=20 WHERE c1=2;
3240 UPDATE t SET c1=30 WHERE c3=30;
3241 UPDATE t SET c3=40 WHERE c1=30;
3242 include/rpl_sync.inc
3243 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3244 connection server_1;
3245 DELETE FROM t WHERE c2="a";
3246 DELETE FROM t WHERE c1=20;
3247 DELETE FROM t;
3248 include/rpl_sync.inc
3249 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3250 connection server_1;
3251 DROP TABLE t;
3252 include/rpl_sync.inc
3253 connection server_1;
3254 SET SQL_LOG_BIN=0;
3255 connection server_2;
3256 SET SQL_LOG_BIN=0;
3257 connection server_3;
3258 SET SQL_LOG_BIN=0;
3259 ### Asserts that updates without blobs in the AI (they are not updated)
3260 ### will not break replication (check even if there is a key in the table)
3261 connection server_1;
3262 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3263 connection server_2;
3264 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3265 connection server_3;
3266 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3267 connection server_1;
3268 SET SQL_LOG_BIN=1;
3269 connection server_2;
3270 SET SQL_LOG_BIN=1;
3271 connection server_3;
3272 SET SQL_LOG_BIN=1;
3273 connection server_1;
3274 INSERT INTO t VALUES (1, "a", 10);
3275 INSERT INTO t VALUES (2, "b", 20);
3276 INSERT INTO t VALUES (3, "c", 30);
3277 include/rpl_sync.inc
3278 connection server_1;
3279 UPDATE t SET c1=10 WHERE c2="a";
3280 UPDATE t SET c1=20 WHERE c1=2;
3281 UPDATE t SET c1=30 WHERE c3=30;
3282 UPDATE t SET c3=40 WHERE c1=30;
3283 include/rpl_sync.inc
3284 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3285 connection server_1;
3286 DELETE FROM t WHERE c2="a";
3287 DELETE FROM t WHERE c1=20;
3288 DELETE FROM t;
3289 include/rpl_sync.inc
3290 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3291 connection server_1;
3292 DROP TABLE t;
3293 include/rpl_sync.inc
3294 connection server_1;
3295 SET SQL_LOG_BIN=0;
3296 connection server_2;
3297 SET SQL_LOG_BIN=0;
3298 connection server_3;
3299 SET SQL_LOG_BIN=0;
3300 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3301 ### will not break replication
3302 connection server_1;
3303 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3304 connection server_2;
3305 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3306 connection server_3;
3307 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3308 connection server_1;
3309 SET SQL_LOG_BIN=1;
3310 connection server_2;
3311 SET SQL_LOG_BIN=1;
3312 connection server_3;
3313 SET SQL_LOG_BIN=1;
3314 connection server_1;
3315 INSERT INTO t VALUES (1, "a", 10);
3316 INSERT INTO t VALUES (2, "b", 20);
3317 INSERT INTO t VALUES (3, "c", 30);
3318 include/rpl_sync.inc
3319 connection server_1;
3320 UPDATE t SET c1=10 WHERE c2="a";
3321 UPDATE t SET c1=20 WHERE c1=2;
3322 UPDATE t SET c1=30 WHERE c3=30;
3323 UPDATE t SET c3=40 WHERE c1=30;
3324 include/rpl_sync.inc
3325 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3326 connection server_1;
3327 DELETE FROM t WHERE c2="a";
3328 DELETE FROM t WHERE c1=20;
3329 DELETE FROM t;
3330 include/rpl_sync.inc
3331 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3332 connection server_1;
3333 DROP TABLE t;
3334 include/rpl_sync.inc
3335 connection server_1;
3336 SET SQL_LOG_BIN=0;
3337 connection server_2;
3338 SET SQL_LOG_BIN=0;
3339 connection server_3;
3340 SET SQL_LOG_BIN=0;
3341 ### Asserts that updates without blobs in the BI (PK exists int the table)
3342 ### will not break replication
3343 connection server_1;
3344 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3345 connection server_2;
3346 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3347 connection server_3;
3348 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3349 connection server_1;
3350 SET SQL_LOG_BIN=1;
3351 connection server_2;
3352 SET SQL_LOG_BIN=1;
3353 connection server_3;
3354 SET SQL_LOG_BIN=1;
3355 connection server_1;
3356 INSERT INTO t VALUES (1, "a", 10);
3357 INSERT INTO t VALUES (2, "b", 20);
3358 INSERT INTO t VALUES (3, "c", 30);
3359 include/rpl_sync.inc
3360 connection server_1;
3361 UPDATE t SET c1=10 WHERE c2="a";
3362 UPDATE t SET c1=20 WHERE c1=2;
3363 UPDATE t SET c1=30 WHERE c3=30;
3364 UPDATE t SET c3=40 WHERE c1=30;
3365 include/rpl_sync.inc
3366 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3367 connection server_1;
3368 DELETE FROM t WHERE c2="a";
3369 DELETE FROM t WHERE c1=20;
3370 DELETE FROM t;
3371 include/rpl_sync.inc
3372 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3373 connection server_1;
3374 DROP TABLE t;
3375 include/rpl_sync.inc
3376 connection server_1;
3377 SET SQL_LOG_BIN=0;
3378 connection server_2;
3379 SET SQL_LOG_BIN=0;
3380 connection server_3;
3381 SET SQL_LOG_BIN=0;
3382 ### Asserts that declaring a blob in a key does not break replication
3383 connection server_1;
3384 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3385 connection server_2;
3386 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3387 connection server_3;
3388 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3389 connection server_1;
3390 SET SQL_LOG_BIN=1;
3391 connection server_2;
3392 SET SQL_LOG_BIN=1;
3393 connection server_3;
3394 SET SQL_LOG_BIN=1;
3395 connection server_1;
3396 INSERT INTO t VALUES (1, "a", 10);
3397 INSERT INTO t VALUES (2, "b", 20);
3398 INSERT INTO t VALUES (3, "c", 30);
3399 include/rpl_sync.inc
3400 connection server_1;
3401 UPDATE t SET c1=10 WHERE c2="a";
3402 UPDATE t SET c1=20 WHERE c1=2;
3403 UPDATE t SET c1=30 WHERE c3=30;
3404 UPDATE t SET c3=40 WHERE c1=30;
3405 include/rpl_sync.inc
3406 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3407 connection server_1;
3408 DELETE FROM t WHERE c2="a";
3409 DELETE FROM t WHERE c1=20;
3410 DELETE FROM t;
3411 include/rpl_sync.inc
3412 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3413 connection server_1;
3414 DROP TABLE t;
3415 include/rpl_sync.inc
3416 connection server_1;
3417 SET SQL_LOG_BIN=0;
3418 connection server_2;
3419 SET SQL_LOG_BIN=0;
3420 connection server_3;
3421 SET SQL_LOG_BIN=0;
3422 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3423 connection server_1;
3424 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3425 connection server_2;
3426 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3427 connection server_3;
3428 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3429 connection server_1;
3430 SET SQL_LOG_BIN=1;
3431 connection server_2;
3432 SET SQL_LOG_BIN=1;
3433 connection server_3;
3434 SET SQL_LOG_BIN=1;
3435 connection server_1;
3436 INSERT INTO t VALUES (1, "a", 10);
3437 INSERT INTO t VALUES (2, "b", 20);
3438 INSERT INTO t VALUES (3, "c", 30);
3439 include/rpl_sync.inc
3440 connection server_1;
3441 UPDATE t SET c1=10 WHERE c2="a";
3442 UPDATE t SET c1=20 WHERE c1=2;
3443 UPDATE t SET c1=30 WHERE c3=30;
3444 UPDATE t SET c3=40 WHERE c1=30;
3445 include/rpl_sync.inc
3446 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3447 connection server_1;
3448 DELETE FROM t WHERE c2="a";
3449 DELETE FROM t WHERE c1=20;
3450 DELETE FROM t;
3451 include/rpl_sync.inc
3452 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3453 connection server_1;
3454 DROP TABLE t;
3455 include/rpl_sync.inc
3456 connection server_1;
3457 SET SQL_LOG_BIN=0;
3458 connection server_2;
3459 SET SQL_LOG_BIN=0;
3460 connection server_3;
3461 SET SQL_LOG_BIN=0;
3462 ### Asserts that declaring a blob as part of a primary key does not break replication
3463 connection server_1;
3464 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3465 connection server_2;
3466 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3467 connection server_3;
3468 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3469 connection server_1;
3470 SET SQL_LOG_BIN=1;
3471 connection server_2;
3472 SET SQL_LOG_BIN=1;
3473 connection server_3;
3474 SET SQL_LOG_BIN=1;
3475 connection server_1;
3476 INSERT INTO t VALUES (1, "a", 10);
3477 INSERT INTO t VALUES (2, "b", 20);
3478 INSERT INTO t VALUES (3, "c", 30);
3479 include/rpl_sync.inc
3480 connection server_1;
3481 UPDATE t SET c1=10 WHERE c2="a";
3482 UPDATE t SET c1=20 WHERE c1=2;
3483 UPDATE t SET c1=30 WHERE c3=30;
3484 UPDATE t SET c3=40 WHERE c1=30;
3485 include/rpl_sync.inc
3486 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3487 connection server_1;
3488 DELETE FROM t WHERE c2="a";
3489 DELETE FROM t WHERE c1=20;
3490 DELETE FROM t;
3491 include/rpl_sync.inc
3492 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3493 connection server_1;
3494 DROP TABLE t;
3495 include/rpl_sync.inc
3496 ### engines: InnoDB, MyISAM, MyISAM
3497 connection server_1;
3498 connection server_1;
3499 SET SQL_LOG_BIN=0;
3500 connection server_2;
3501 SET SQL_LOG_BIN=0;
3502 connection server_3;
3503 SET SQL_LOG_BIN=0;
3504 ### Asserts that updates without blobs in the AI (they are not updated)
3505 ### will not break replication (check when there is no key in the table)
3506 connection server_1;
3507 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3508 connection server_2;
3509 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3510 connection server_3;
3511 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3512 connection server_1;
3513 SET SQL_LOG_BIN=1;
3514 connection server_2;
3515 SET SQL_LOG_BIN=1;
3516 connection server_3;
3517 SET SQL_LOG_BIN=1;
3518 connection server_1;
3519 INSERT INTO t VALUES (1, "a", 10);
3520 INSERT INTO t VALUES (2, "b", 20);
3521 INSERT INTO t VALUES (3, "c", 30);
3522 include/rpl_sync.inc
3523 connection server_1;
3524 UPDATE t SET c1=10 WHERE c2="a";
3525 UPDATE t SET c1=20 WHERE c1=2;
3526 UPDATE t SET c1=30 WHERE c3=30;
3527 UPDATE t SET c3=40 WHERE c1=30;
3528 include/rpl_sync.inc
3529 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3530 connection server_1;
3531 DELETE FROM t WHERE c2="a";
3532 DELETE FROM t WHERE c1=20;
3533 DELETE FROM t;
3534 include/rpl_sync.inc
3535 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3536 connection server_1;
3537 DROP TABLE t;
3538 include/rpl_sync.inc
3539 connection server_1;
3540 SET SQL_LOG_BIN=0;
3541 connection server_2;
3542 SET SQL_LOG_BIN=0;
3543 connection server_3;
3544 SET SQL_LOG_BIN=0;
3545 ### Asserts that updates without blobs in the AI (they are not updated)
3546 ### will not break replication (check even if there is a key in the table)
3547 connection server_1;
3548 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3549 connection server_2;
3550 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3551 connection server_3;
3552 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3553 connection server_1;
3554 SET SQL_LOG_BIN=1;
3555 connection server_2;
3556 SET SQL_LOG_BIN=1;
3557 connection server_3;
3558 SET SQL_LOG_BIN=1;
3559 connection server_1;
3560 INSERT INTO t VALUES (1, "a", 10);
3561 INSERT INTO t VALUES (2, "b", 20);
3562 INSERT INTO t VALUES (3, "c", 30);
3563 include/rpl_sync.inc
3564 connection server_1;
3565 UPDATE t SET c1=10 WHERE c2="a";
3566 UPDATE t SET c1=20 WHERE c1=2;
3567 UPDATE t SET c1=30 WHERE c3=30;
3568 UPDATE t SET c3=40 WHERE c1=30;
3569 include/rpl_sync.inc
3570 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3571 connection server_1;
3572 DELETE FROM t WHERE c2="a";
3573 DELETE FROM t WHERE c1=20;
3574 DELETE FROM t;
3575 include/rpl_sync.inc
3576 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3577 connection server_1;
3578 DROP TABLE t;
3579 include/rpl_sync.inc
3580 connection server_1;
3581 SET SQL_LOG_BIN=0;
3582 connection server_2;
3583 SET SQL_LOG_BIN=0;
3584 connection server_3;
3585 SET SQL_LOG_BIN=0;
3586 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3587 ### will not break replication
3588 connection server_1;
3589 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3590 connection server_2;
3591 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3592 connection server_3;
3593 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3594 connection server_1;
3595 SET SQL_LOG_BIN=1;
3596 connection server_2;
3597 SET SQL_LOG_BIN=1;
3598 connection server_3;
3599 SET SQL_LOG_BIN=1;
3600 connection server_1;
3601 INSERT INTO t VALUES (1, "a", 10);
3602 INSERT INTO t VALUES (2, "b", 20);
3603 INSERT INTO t VALUES (3, "c", 30);
3604 include/rpl_sync.inc
3605 connection server_1;
3606 UPDATE t SET c1=10 WHERE c2="a";
3607 UPDATE t SET c1=20 WHERE c1=2;
3608 UPDATE t SET c1=30 WHERE c3=30;
3609 UPDATE t SET c3=40 WHERE c1=30;
3610 include/rpl_sync.inc
3611 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3612 connection server_1;
3613 DELETE FROM t WHERE c2="a";
3614 DELETE FROM t WHERE c1=20;
3615 DELETE FROM t;
3616 include/rpl_sync.inc
3617 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3618 connection server_1;
3619 DROP TABLE t;
3620 include/rpl_sync.inc
3621 connection server_1;
3622 SET SQL_LOG_BIN=0;
3623 connection server_2;
3624 SET SQL_LOG_BIN=0;
3625 connection server_3;
3626 SET SQL_LOG_BIN=0;
3627 ### Asserts that updates without blobs in the BI (PK exists int the table)
3628 ### will not break replication
3629 connection server_1;
3630 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3631 connection server_2;
3632 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3633 connection server_3;
3634 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3635 connection server_1;
3636 SET SQL_LOG_BIN=1;
3637 connection server_2;
3638 SET SQL_LOG_BIN=1;
3639 connection server_3;
3640 SET SQL_LOG_BIN=1;
3641 connection server_1;
3642 INSERT INTO t VALUES (1, "a", 10);
3643 INSERT INTO t VALUES (2, "b", 20);
3644 INSERT INTO t VALUES (3, "c", 30);
3645 include/rpl_sync.inc
3646 connection server_1;
3647 UPDATE t SET c1=10 WHERE c2="a";
3648 UPDATE t SET c1=20 WHERE c1=2;
3649 UPDATE t SET c1=30 WHERE c3=30;
3650 UPDATE t SET c3=40 WHERE c1=30;
3651 include/rpl_sync.inc
3652 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3653 connection server_1;
3654 DELETE FROM t WHERE c2="a";
3655 DELETE FROM t WHERE c1=20;
3656 DELETE FROM t;
3657 include/rpl_sync.inc
3658 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3659 connection server_1;
3660 DROP TABLE t;
3661 include/rpl_sync.inc
3662 connection server_1;
3663 SET SQL_LOG_BIN=0;
3664 connection server_2;
3665 SET SQL_LOG_BIN=0;
3666 connection server_3;
3667 SET SQL_LOG_BIN=0;
3668 ### Asserts that declaring a blob in a key does not break replication
3669 connection server_1;
3670 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3671 connection server_2;
3672 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3673 connection server_3;
3674 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3675 connection server_1;
3676 SET SQL_LOG_BIN=1;
3677 connection server_2;
3678 SET SQL_LOG_BIN=1;
3679 connection server_3;
3680 SET SQL_LOG_BIN=1;
3681 connection server_1;
3682 INSERT INTO t VALUES (1, "a", 10);
3683 INSERT INTO t VALUES (2, "b", 20);
3684 INSERT INTO t VALUES (3, "c", 30);
3685 include/rpl_sync.inc
3686 connection server_1;
3687 UPDATE t SET c1=10 WHERE c2="a";
3688 UPDATE t SET c1=20 WHERE c1=2;
3689 UPDATE t SET c1=30 WHERE c3=30;
3690 UPDATE t SET c3=40 WHERE c1=30;
3691 include/rpl_sync.inc
3692 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3693 connection server_1;
3694 DELETE FROM t WHERE c2="a";
3695 DELETE FROM t WHERE c1=20;
3696 DELETE FROM t;
3697 include/rpl_sync.inc
3698 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3699 connection server_1;
3700 DROP TABLE t;
3701 include/rpl_sync.inc
3702 connection server_1;
3703 SET SQL_LOG_BIN=0;
3704 connection server_2;
3705 SET SQL_LOG_BIN=0;
3706 connection server_3;
3707 SET SQL_LOG_BIN=0;
3708 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3709 connection server_1;
3710 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3711 connection server_2;
3712 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3713 connection server_3;
3714 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3715 connection server_1;
3716 SET SQL_LOG_BIN=1;
3717 connection server_2;
3718 SET SQL_LOG_BIN=1;
3719 connection server_3;
3720 SET SQL_LOG_BIN=1;
3721 connection server_1;
3722 INSERT INTO t VALUES (1, "a", 10);
3723 INSERT INTO t VALUES (2, "b", 20);
3724 INSERT INTO t VALUES (3, "c", 30);
3725 include/rpl_sync.inc
3726 connection server_1;
3727 UPDATE t SET c1=10 WHERE c2="a";
3728 UPDATE t SET c1=20 WHERE c1=2;
3729 UPDATE t SET c1=30 WHERE c3=30;
3730 UPDATE t SET c3=40 WHERE c1=30;
3731 include/rpl_sync.inc
3732 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3733 connection server_1;
3734 DELETE FROM t WHERE c2="a";
3735 DELETE FROM t WHERE c1=20;
3736 DELETE FROM t;
3737 include/rpl_sync.inc
3738 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3739 connection server_1;
3740 DROP TABLE t;
3741 include/rpl_sync.inc
3742 connection server_1;
3743 SET SQL_LOG_BIN=0;
3744 connection server_2;
3745 SET SQL_LOG_BIN=0;
3746 connection server_3;
3747 SET SQL_LOG_BIN=0;
3748 ### Asserts that declaring a blob as part of a primary key does not break replication
3749 connection server_1;
3750 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3751 connection server_2;
3752 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3753 connection server_3;
3754 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3755 connection server_1;
3756 SET SQL_LOG_BIN=1;
3757 connection server_2;
3758 SET SQL_LOG_BIN=1;
3759 connection server_3;
3760 SET SQL_LOG_BIN=1;
3761 connection server_1;
3762 INSERT INTO t VALUES (1, "a", 10);
3763 INSERT INTO t VALUES (2, "b", 20);
3764 INSERT INTO t VALUES (3, "c", 30);
3765 include/rpl_sync.inc
3766 connection server_1;
3767 UPDATE t SET c1=10 WHERE c2="a";
3768 UPDATE t SET c1=20 WHERE c1=2;
3769 UPDATE t SET c1=30 WHERE c3=30;
3770 UPDATE t SET c3=40 WHERE c1=30;
3771 include/rpl_sync.inc
3772 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3773 connection server_1;
3774 DELETE FROM t WHERE c2="a";
3775 DELETE FROM t WHERE c1=20;
3776 DELETE FROM t;
3777 include/rpl_sync.inc
3778 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3779 connection server_1;
3780 DROP TABLE t;
3781 include/rpl_sync.inc
3782 ### engines: InnoDB, MyISAM, InnoDB
3783 connection server_1;
3784 connection server_1;
3785 SET SQL_LOG_BIN=0;
3786 connection server_2;
3787 SET SQL_LOG_BIN=0;
3788 connection server_3;
3789 SET SQL_LOG_BIN=0;
3790 ### Asserts that updates without blobs in the AI (they are not updated)
3791 ### will not break replication (check when there is no key in the table)
3792 connection server_1;
3793 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3794 connection server_2;
3795 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3796 connection server_3;
3797 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3798 connection server_1;
3799 SET SQL_LOG_BIN=1;
3800 connection server_2;
3801 SET SQL_LOG_BIN=1;
3802 connection server_3;
3803 SET SQL_LOG_BIN=1;
3804 connection server_1;
3805 INSERT INTO t VALUES (1, "a", 10);
3806 INSERT INTO t VALUES (2, "b", 20);
3807 INSERT INTO t VALUES (3, "c", 30);
3808 include/rpl_sync.inc
3809 connection server_1;
3810 UPDATE t SET c1=10 WHERE c2="a";
3811 UPDATE t SET c1=20 WHERE c1=2;
3812 UPDATE t SET c1=30 WHERE c3=30;
3813 UPDATE t SET c3=40 WHERE c1=30;
3814 include/rpl_sync.inc
3815 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3816 connection server_1;
3817 DELETE FROM t WHERE c2="a";
3818 DELETE FROM t WHERE c1=20;
3819 DELETE FROM t;
3820 include/rpl_sync.inc
3821 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3822 connection server_1;
3823 DROP TABLE t;
3824 include/rpl_sync.inc
3825 connection server_1;
3826 SET SQL_LOG_BIN=0;
3827 connection server_2;
3828 SET SQL_LOG_BIN=0;
3829 connection server_3;
3830 SET SQL_LOG_BIN=0;
3831 ### Asserts that updates without blobs in the AI (they are not updated)
3832 ### will not break replication (check even if there is a key in the table)
3833 connection server_1;
3834 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3835 connection server_2;
3836 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3837 connection server_3;
3838 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3839 connection server_1;
3840 SET SQL_LOG_BIN=1;
3841 connection server_2;
3842 SET SQL_LOG_BIN=1;
3843 connection server_3;
3844 SET SQL_LOG_BIN=1;
3845 connection server_1;
3846 INSERT INTO t VALUES (1, "a", 10);
3847 INSERT INTO t VALUES (2, "b", 20);
3848 INSERT INTO t VALUES (3, "c", 30);
3849 include/rpl_sync.inc
3850 connection server_1;
3851 UPDATE t SET c1=10 WHERE c2="a";
3852 UPDATE t SET c1=20 WHERE c1=2;
3853 UPDATE t SET c1=30 WHERE c3=30;
3854 UPDATE t SET c3=40 WHERE c1=30;
3855 include/rpl_sync.inc
3856 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3857 connection server_1;
3858 DELETE FROM t WHERE c2="a";
3859 DELETE FROM t WHERE c1=20;
3860 DELETE FROM t;
3861 include/rpl_sync.inc
3862 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3863 connection server_1;
3864 DROP TABLE t;
3865 include/rpl_sync.inc
3866 connection server_1;
3867 SET SQL_LOG_BIN=0;
3868 connection server_2;
3869 SET SQL_LOG_BIN=0;
3870 connection server_3;
3871 SET SQL_LOG_BIN=0;
3872 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3873 ### will not break replication
3874 connection server_1;
3875 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3876 connection server_2;
3877 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3878 connection server_3;
3879 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3880 connection server_1;
3881 SET SQL_LOG_BIN=1;
3882 connection server_2;
3883 SET SQL_LOG_BIN=1;
3884 connection server_3;
3885 SET SQL_LOG_BIN=1;
3886 connection server_1;
3887 INSERT INTO t VALUES (1, "a", 10);
3888 INSERT INTO t VALUES (2, "b", 20);
3889 INSERT INTO t VALUES (3, "c", 30);
3890 include/rpl_sync.inc
3891 connection server_1;
3892 UPDATE t SET c1=10 WHERE c2="a";
3893 UPDATE t SET c1=20 WHERE c1=2;
3894 UPDATE t SET c1=30 WHERE c3=30;
3895 UPDATE t SET c3=40 WHERE c1=30;
3896 include/rpl_sync.inc
3897 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3898 connection server_1;
3899 DELETE FROM t WHERE c2="a";
3900 DELETE FROM t WHERE c1=20;
3901 DELETE FROM t;
3902 include/rpl_sync.inc
3903 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3904 connection server_1;
3905 DROP TABLE t;
3906 include/rpl_sync.inc
3907 connection server_1;
3908 SET SQL_LOG_BIN=0;
3909 connection server_2;
3910 SET SQL_LOG_BIN=0;
3911 connection server_3;
3912 SET SQL_LOG_BIN=0;
3913 ### Asserts that updates without blobs in the BI (PK exists int the table)
3914 ### will not break replication
3915 connection server_1;
3916 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3917 connection server_2;
3918 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3919 connection server_3;
3920 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3921 connection server_1;
3922 SET SQL_LOG_BIN=1;
3923 connection server_2;
3924 SET SQL_LOG_BIN=1;
3925 connection server_3;
3926 SET SQL_LOG_BIN=1;
3927 connection server_1;
3928 INSERT INTO t VALUES (1, "a", 10);
3929 INSERT INTO t VALUES (2, "b", 20);
3930 INSERT INTO t VALUES (3, "c", 30);
3931 include/rpl_sync.inc
3932 connection server_1;
3933 UPDATE t SET c1=10 WHERE c2="a";
3934 UPDATE t SET c1=20 WHERE c1=2;
3935 UPDATE t SET c1=30 WHERE c3=30;
3936 UPDATE t SET c3=40 WHERE c1=30;
3937 include/rpl_sync.inc
3938 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3939 connection server_1;
3940 DELETE FROM t WHERE c2="a";
3941 DELETE FROM t WHERE c1=20;
3942 DELETE FROM t;
3943 include/rpl_sync.inc
3944 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3945 connection server_1;
3946 DROP TABLE t;
3947 include/rpl_sync.inc
3948 connection server_1;
3949 SET SQL_LOG_BIN=0;
3950 connection server_2;
3951 SET SQL_LOG_BIN=0;
3952 connection server_3;
3953 SET SQL_LOG_BIN=0;
3954 ### Asserts that declaring a blob in a key does not break replication
3955 connection server_1;
3956 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3957 connection server_2;
3958 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3959 connection server_3;
3960 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3961 connection server_1;
3962 SET SQL_LOG_BIN=1;
3963 connection server_2;
3964 SET SQL_LOG_BIN=1;
3965 connection server_3;
3966 SET SQL_LOG_BIN=1;
3967 connection server_1;
3968 INSERT INTO t VALUES (1, "a", 10);
3969 INSERT INTO t VALUES (2, "b", 20);
3970 INSERT INTO t VALUES (3, "c", 30);
3971 include/rpl_sync.inc
3972 connection server_1;
3973 UPDATE t SET c1=10 WHERE c2="a";
3974 UPDATE t SET c1=20 WHERE c1=2;
3975 UPDATE t SET c1=30 WHERE c3=30;
3976 UPDATE t SET c3=40 WHERE c1=30;
3977 include/rpl_sync.inc
3978 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3979 connection server_1;
3980 DELETE FROM t WHERE c2="a";
3981 DELETE FROM t WHERE c1=20;
3982 DELETE FROM t;
3983 include/rpl_sync.inc
3984 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3985 connection server_1;
3986 DROP TABLE t;
3987 include/rpl_sync.inc
3988 connection server_1;
3989 SET SQL_LOG_BIN=0;
3990 connection server_2;
3991 SET SQL_LOG_BIN=0;
3992 connection server_3;
3993 SET SQL_LOG_BIN=0;
3994 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3995 connection server_1;
3996 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3997 connection server_2;
3998 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3999 connection server_3;
4000 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4001 connection server_1;
4002 SET SQL_LOG_BIN=1;
4003 connection server_2;
4004 SET SQL_LOG_BIN=1;
4005 connection server_3;
4006 SET SQL_LOG_BIN=1;
4007 connection server_1;
4008 INSERT INTO t VALUES (1, "a", 10);
4009 INSERT INTO t VALUES (2, "b", 20);
4010 INSERT INTO t VALUES (3, "c", 30);
4011 include/rpl_sync.inc
4012 connection server_1;
4013 UPDATE t SET c1=10 WHERE c2="a";
4014 UPDATE t SET c1=20 WHERE c1=2;
4015 UPDATE t SET c1=30 WHERE c3=30;
4016 UPDATE t SET c3=40 WHERE c1=30;
4017 include/rpl_sync.inc
4018 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4019 connection server_1;
4020 DELETE FROM t WHERE c2="a";
4021 DELETE FROM t WHERE c1=20;
4022 DELETE FROM t;
4023 include/rpl_sync.inc
4024 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4025 connection server_1;
4026 DROP TABLE t;
4027 include/rpl_sync.inc
4028 connection server_1;
4029 SET SQL_LOG_BIN=0;
4030 connection server_2;
4031 SET SQL_LOG_BIN=0;
4032 connection server_3;
4033 SET SQL_LOG_BIN=0;
4034 ### Asserts that declaring a blob as part of a primary key does not break replication
4035 connection server_1;
4036 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4037 connection server_2;
4038 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4039 connection server_3;
4040 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4041 connection server_1;
4042 SET SQL_LOG_BIN=1;
4043 connection server_2;
4044 SET SQL_LOG_BIN=1;
4045 connection server_3;
4046 SET SQL_LOG_BIN=1;
4047 connection server_1;
4048 INSERT INTO t VALUES (1, "a", 10);
4049 INSERT INTO t VALUES (2, "b", 20);
4050 INSERT INTO t VALUES (3, "c", 30);
4051 include/rpl_sync.inc
4052 connection server_1;
4053 UPDATE t SET c1=10 WHERE c2="a";
4054 UPDATE t SET c1=20 WHERE c1=2;
4055 UPDATE t SET c1=30 WHERE c3=30;
4056 UPDATE t SET c3=40 WHERE c1=30;
4057 include/rpl_sync.inc
4058 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4059 connection server_1;
4060 DELETE FROM t WHERE c2="a";
4061 DELETE FROM t WHERE c1=20;
4062 DELETE FROM t;
4063 include/rpl_sync.inc
4064 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4065 connection server_1;
4066 DROP TABLE t;
4067 include/rpl_sync.inc
4068 ### engines: InnoDB, InnoDB, MyISAM
4069 connection server_1;
4070 connection server_1;
4071 SET SQL_LOG_BIN=0;
4072 connection server_2;
4073 SET SQL_LOG_BIN=0;
4074 connection server_3;
4075 SET SQL_LOG_BIN=0;
4076 ### Asserts that updates without blobs in the AI (they are not updated)
4077 ### will not break replication (check when there is no key in the table)
4078 connection server_1;
4079 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4080 connection server_2;
4081 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4082 connection server_3;
4083 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
4084 connection server_1;
4085 SET SQL_LOG_BIN=1;
4086 connection server_2;
4087 SET SQL_LOG_BIN=1;
4088 connection server_3;
4089 SET SQL_LOG_BIN=1;
4090 connection server_1;
4091 INSERT INTO t VALUES (1, "a", 10);
4092 INSERT INTO t VALUES (2, "b", 20);
4093 INSERT INTO t VALUES (3, "c", 30);
4094 include/rpl_sync.inc
4095 connection server_1;
4096 UPDATE t SET c1=10 WHERE c2="a";
4097 UPDATE t SET c1=20 WHERE c1=2;
4098 UPDATE t SET c1=30 WHERE c3=30;
4099 UPDATE t SET c3=40 WHERE c1=30;
4100 include/rpl_sync.inc
4101 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4102 connection server_1;
4103 DELETE FROM t WHERE c2="a";
4104 DELETE FROM t WHERE c1=20;
4105 DELETE FROM t;
4106 include/rpl_sync.inc
4107 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4108 connection server_1;
4109 DROP TABLE t;
4110 include/rpl_sync.inc
4111 connection server_1;
4112 SET SQL_LOG_BIN=0;
4113 connection server_2;
4114 SET SQL_LOG_BIN=0;
4115 connection server_3;
4116 SET SQL_LOG_BIN=0;
4117 ### Asserts that updates without blobs in the AI (they are not updated)
4118 ### will not break replication (check even if there is a key in the table)
4119 connection server_1;
4120 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4121 connection server_2;
4122 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4123 connection server_3;
4124 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
4125 connection server_1;
4126 SET SQL_LOG_BIN=1;
4127 connection server_2;
4128 SET SQL_LOG_BIN=1;
4129 connection server_3;
4130 SET SQL_LOG_BIN=1;
4131 connection server_1;
4132 INSERT INTO t VALUES (1, "a", 10);
4133 INSERT INTO t VALUES (2, "b", 20);
4134 INSERT INTO t VALUES (3, "c", 30);
4135 include/rpl_sync.inc
4136 connection server_1;
4137 UPDATE t SET c1=10 WHERE c2="a";
4138 UPDATE t SET c1=20 WHERE c1=2;
4139 UPDATE t SET c1=30 WHERE c3=30;
4140 UPDATE t SET c3=40 WHERE c1=30;
4141 include/rpl_sync.inc
4142 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4143 connection server_1;
4144 DELETE FROM t WHERE c2="a";
4145 DELETE FROM t WHERE c1=20;
4146 DELETE FROM t;
4147 include/rpl_sync.inc
4148 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4149 connection server_1;
4150 DROP TABLE t;
4151 include/rpl_sync.inc
4152 connection server_1;
4153 SET SQL_LOG_BIN=0;
4154 connection server_2;
4155 SET SQL_LOG_BIN=0;
4156 connection server_3;
4157 SET SQL_LOG_BIN=0;
4158 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
4159 ### will not break replication
4160 connection server_1;
4161 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4162 connection server_2;
4163 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4164 connection server_3;
4165 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
4166 connection server_1;
4167 SET SQL_LOG_BIN=1;
4168 connection server_2;
4169 SET SQL_LOG_BIN=1;
4170 connection server_3;
4171 SET SQL_LOG_BIN=1;
4172 connection server_1;
4173 INSERT INTO t VALUES (1, "a", 10);
4174 INSERT INTO t VALUES (2, "b", 20);
4175 INSERT INTO t VALUES (3, "c", 30);
4176 include/rpl_sync.inc
4177 connection server_1;
4178 UPDATE t SET c1=10 WHERE c2="a";
4179 UPDATE t SET c1=20 WHERE c1=2;
4180 UPDATE t SET c1=30 WHERE c3=30;
4181 UPDATE t SET c3=40 WHERE c1=30;
4182 include/rpl_sync.inc
4183 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4184 connection server_1;
4185 DELETE FROM t WHERE c2="a";
4186 DELETE FROM t WHERE c1=20;
4187 DELETE FROM t;
4188 include/rpl_sync.inc
4189 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4190 connection server_1;
4191 DROP TABLE t;
4192 include/rpl_sync.inc
4193 connection server_1;
4194 SET SQL_LOG_BIN=0;
4195 connection server_2;
4196 SET SQL_LOG_BIN=0;
4197 connection server_3;
4198 SET SQL_LOG_BIN=0;
4199 ### Asserts that updates without blobs in the BI (PK exists int the table)
4200 ### will not break replication
4201 connection server_1;
4202 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4203 connection server_2;
4204 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4205 connection server_3;
4206 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
4207 connection server_1;
4208 SET SQL_LOG_BIN=1;
4209 connection server_2;
4210 SET SQL_LOG_BIN=1;
4211 connection server_3;
4212 SET SQL_LOG_BIN=1;
4213 connection server_1;
4214 INSERT INTO t VALUES (1, "a", 10);
4215 INSERT INTO t VALUES (2, "b", 20);
4216 INSERT INTO t VALUES (3, "c", 30);
4217 include/rpl_sync.inc
4218 connection server_1;
4219 UPDATE t SET c1=10 WHERE c2="a";
4220 UPDATE t SET c1=20 WHERE c1=2;
4221 UPDATE t SET c1=30 WHERE c3=30;
4222 UPDATE t SET c3=40 WHERE c1=30;
4223 include/rpl_sync.inc
4224 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4225 connection server_1;
4226 DELETE FROM t WHERE c2="a";
4227 DELETE FROM t WHERE c1=20;
4228 DELETE FROM t;
4229 include/rpl_sync.inc
4230 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4231 connection server_1;
4232 DROP TABLE t;
4233 include/rpl_sync.inc
4234 connection server_1;
4235 SET SQL_LOG_BIN=0;
4236 connection server_2;
4237 SET SQL_LOG_BIN=0;
4238 connection server_3;
4239 SET SQL_LOG_BIN=0;
4240 ### Asserts that declaring a blob in a key does not break replication
4241 connection server_1;
4242 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4243 connection server_2;
4244 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4245 connection server_3;
4246 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
4247 connection server_1;
4248 SET SQL_LOG_BIN=1;
4249 connection server_2;
4250 SET SQL_LOG_BIN=1;
4251 connection server_3;
4252 SET SQL_LOG_BIN=1;
4253 connection server_1;
4254 INSERT INTO t VALUES (1, "a", 10);
4255 INSERT INTO t VALUES (2, "b", 20);
4256 INSERT INTO t VALUES (3, "c", 30);
4257 include/rpl_sync.inc
4258 connection server_1;
4259 UPDATE t SET c1=10 WHERE c2="a";
4260 UPDATE t SET c1=20 WHERE c1=2;
4261 UPDATE t SET c1=30 WHERE c3=30;
4262 UPDATE t SET c3=40 WHERE c1=30;
4263 include/rpl_sync.inc
4264 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4265 connection server_1;
4266 DELETE FROM t WHERE c2="a";
4267 DELETE FROM t WHERE c1=20;
4268 DELETE FROM t;
4269 include/rpl_sync.inc
4270 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4271 connection server_1;
4272 DROP TABLE t;
4273 include/rpl_sync.inc
4274 connection server_1;
4275 SET SQL_LOG_BIN=0;
4276 connection server_2;
4277 SET SQL_LOG_BIN=0;
4278 connection server_3;
4279 SET SQL_LOG_BIN=0;
4280 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
4281 connection server_1;
4282 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4283 connection server_2;
4284 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4285 connection server_3;
4286 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
4287 connection server_1;
4288 SET SQL_LOG_BIN=1;
4289 connection server_2;
4290 SET SQL_LOG_BIN=1;
4291 connection server_3;
4292 SET SQL_LOG_BIN=1;
4293 connection server_1;
4294 INSERT INTO t VALUES (1, "a", 10);
4295 INSERT INTO t VALUES (2, "b", 20);
4296 INSERT INTO t VALUES (3, "c", 30);
4297 include/rpl_sync.inc
4298 connection server_1;
4299 UPDATE t SET c1=10 WHERE c2="a";
4300 UPDATE t SET c1=20 WHERE c1=2;
4301 UPDATE t SET c1=30 WHERE c3=30;
4302 UPDATE t SET c3=40 WHERE c1=30;
4303 include/rpl_sync.inc
4304 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4305 connection server_1;
4306 DELETE FROM t WHERE c2="a";
4307 DELETE FROM t WHERE c1=20;
4308 DELETE FROM t;
4309 include/rpl_sync.inc
4310 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4311 connection server_1;
4312 DROP TABLE t;
4313 include/rpl_sync.inc
4314 connection server_1;
4315 SET SQL_LOG_BIN=0;
4316 connection server_2;
4317 SET SQL_LOG_BIN=0;
4318 connection server_3;
4319 SET SQL_LOG_BIN=0;
4320 ### Asserts that declaring a blob as part of a primary key does not break replication
4321 connection server_1;
4322 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4323 connection server_2;
4324 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4325 connection server_3;
4326 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4327 connection server_1;
4328 SET SQL_LOG_BIN=1;
4329 connection server_2;
4330 SET SQL_LOG_BIN=1;
4331 connection server_3;
4332 SET SQL_LOG_BIN=1;
4333 connection server_1;
4334 INSERT INTO t VALUES (1, "a", 10);
4335 INSERT INTO t VALUES (2, "b", 20);
4336 INSERT INTO t VALUES (3, "c", 30);
4337 include/rpl_sync.inc
4338 connection server_1;
4339 UPDATE t SET c1=10 WHERE c2="a";
4340 UPDATE t SET c1=20 WHERE c1=2;
4341 UPDATE t SET c1=30 WHERE c3=30;
4342 UPDATE t SET c3=40 WHERE c1=30;
4343 include/rpl_sync.inc
4344 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4345 connection server_1;
4346 DELETE FROM t WHERE c2="a";
4347 DELETE FROM t WHERE c1=20;
4348 DELETE FROM t;
4349 include/rpl_sync.inc
4350 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4351 connection server_1;
4352 DROP TABLE t;
4353 include/rpl_sync.inc
4354 ### engines: InnoDB, InnoDB, InnoDB
4355 connection server_1;
4356 connection server_1;
4357 SET SQL_LOG_BIN=0;
4358 connection server_2;
4359 SET SQL_LOG_BIN=0;
4360 connection server_3;
4361 SET SQL_LOG_BIN=0;
4362 ### Asserts that updates without blobs in the AI (they are not updated)
4363 ### will not break replication (check when there is no key in the table)
4364 connection server_1;
4365 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4366 connection server_2;
4367 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4368 connection server_3;
4369 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4370 connection server_1;
4371 SET SQL_LOG_BIN=1;
4372 connection server_2;
4373 SET SQL_LOG_BIN=1;
4374 connection server_3;
4375 SET SQL_LOG_BIN=1;
4376 connection server_1;
4377 INSERT INTO t VALUES (1, "a", 10);
4378 INSERT INTO t VALUES (2, "b", 20);
4379 INSERT INTO t VALUES (3, "c", 30);
4380 include/rpl_sync.inc
4381 connection server_1;
4382 UPDATE t SET c1=10 WHERE c2="a";
4383 UPDATE t SET c1=20 WHERE c1=2;
4384 UPDATE t SET c1=30 WHERE c3=30;
4385 UPDATE t SET c3=40 WHERE c1=30;
4386 include/rpl_sync.inc
4387 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4388 connection server_1;
4389 DELETE FROM t WHERE c2="a";
4390 DELETE FROM t WHERE c1=20;
4391 DELETE FROM t;
4392 include/rpl_sync.inc
4393 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4394 connection server_1;
4395 DROP TABLE t;
4396 include/rpl_sync.inc
4397 connection server_1;
4398 SET SQL_LOG_BIN=0;
4399 connection server_2;
4400 SET SQL_LOG_BIN=0;
4401 connection server_3;
4402 SET SQL_LOG_BIN=0;
4403 ### Asserts that updates without blobs in the AI (they are not updated)
4404 ### will not break replication (check even if there is a key in the table)
4405 connection server_1;
4406 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4407 connection server_2;
4408 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4409 connection server_3;
4410 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4411 connection server_1;
4412 SET SQL_LOG_BIN=1;
4413 connection server_2;
4414 SET SQL_LOG_BIN=1;
4415 connection server_3;
4416 SET SQL_LOG_BIN=1;
4417 connection server_1;
4418 INSERT INTO t VALUES (1, "a", 10);
4419 INSERT INTO t VALUES (2, "b", 20);
4420 INSERT INTO t VALUES (3, "c", 30);
4421 include/rpl_sync.inc
4422 connection server_1;
4423 UPDATE t SET c1=10 WHERE c2="a";
4424 UPDATE t SET c1=20 WHERE c1=2;
4425 UPDATE t SET c1=30 WHERE c3=30;
4426 UPDATE t SET c3=40 WHERE c1=30;
4427 include/rpl_sync.inc
4428 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4429 connection server_1;
4430 DELETE FROM t WHERE c2="a";
4431 DELETE FROM t WHERE c1=20;
4432 DELETE FROM t;
4433 include/rpl_sync.inc
4434 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4435 connection server_1;
4436 DROP TABLE t;
4437 include/rpl_sync.inc
4438 connection server_1;
4439 SET SQL_LOG_BIN=0;
4440 connection server_2;
4441 SET SQL_LOG_BIN=0;
4442 connection server_3;
4443 SET SQL_LOG_BIN=0;
4444 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
4445 ### will not break replication
4446 connection server_1;
4447 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4448 connection server_2;
4449 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4450 connection server_3;
4451 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4452 connection server_1;
4453 SET SQL_LOG_BIN=1;
4454 connection server_2;
4455 SET SQL_LOG_BIN=1;
4456 connection server_3;
4457 SET SQL_LOG_BIN=1;
4458 connection server_1;
4459 INSERT INTO t VALUES (1, "a", 10);
4460 INSERT INTO t VALUES (2, "b", 20);
4461 INSERT INTO t VALUES (3, "c", 30);
4462 include/rpl_sync.inc
4463 connection server_1;
4464 UPDATE t SET c1=10 WHERE c2="a";
4465 UPDATE t SET c1=20 WHERE c1=2;
4466 UPDATE t SET c1=30 WHERE c3=30;
4467 UPDATE t SET c3=40 WHERE c1=30;
4468 include/rpl_sync.inc
4469 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4470 connection server_1;
4471 DELETE FROM t WHERE c2="a";
4472 DELETE FROM t WHERE c1=20;
4473 DELETE FROM t;
4474 include/rpl_sync.inc
4475 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4476 connection server_1;
4477 DROP TABLE t;
4478 include/rpl_sync.inc
4479 connection server_1;
4480 SET SQL_LOG_BIN=0;
4481 connection server_2;
4482 SET SQL_LOG_BIN=0;
4483 connection server_3;
4484 SET SQL_LOG_BIN=0;
4485 ### Asserts that updates without blobs in the BI (PK exists int the table)
4486 ### will not break replication
4487 connection server_1;
4488 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4489 connection server_2;
4490 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4491 connection server_3;
4492 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4493 connection server_1;
4494 SET SQL_LOG_BIN=1;
4495 connection server_2;
4496 SET SQL_LOG_BIN=1;
4497 connection server_3;
4498 SET SQL_LOG_BIN=1;
4499 connection server_1;
4500 INSERT INTO t VALUES (1, "a", 10);
4501 INSERT INTO t VALUES (2, "b", 20);
4502 INSERT INTO t VALUES (3, "c", 30);
4503 include/rpl_sync.inc
4504 connection server_1;
4505 UPDATE t SET c1=10 WHERE c2="a";
4506 UPDATE t SET c1=20 WHERE c1=2;
4507 UPDATE t SET c1=30 WHERE c3=30;
4508 UPDATE t SET c3=40 WHERE c1=30;
4509 include/rpl_sync.inc
4510 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4511 connection server_1;
4512 DELETE FROM t WHERE c2="a";
4513 DELETE FROM t WHERE c1=20;
4514 DELETE FROM t;
4515 include/rpl_sync.inc
4516 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4517 connection server_1;
4518 DROP TABLE t;
4519 include/rpl_sync.inc
4520 connection server_1;
4521 SET SQL_LOG_BIN=0;
4522 connection server_2;
4523 SET SQL_LOG_BIN=0;
4524 connection server_3;
4525 SET SQL_LOG_BIN=0;
4526 ### Asserts that declaring a blob in a key does not break replication
4527 connection server_1;
4528 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4529 connection server_2;
4530 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4531 connection server_3;
4532 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4533 connection server_1;
4534 SET SQL_LOG_BIN=1;
4535 connection server_2;
4536 SET SQL_LOG_BIN=1;
4537 connection server_3;
4538 SET SQL_LOG_BIN=1;
4539 connection server_1;
4540 INSERT INTO t VALUES (1, "a", 10);
4541 INSERT INTO t VALUES (2, "b", 20);
4542 INSERT INTO t VALUES (3, "c", 30);
4543 include/rpl_sync.inc
4544 connection server_1;
4545 UPDATE t SET c1=10 WHERE c2="a";
4546 UPDATE t SET c1=20 WHERE c1=2;
4547 UPDATE t SET c1=30 WHERE c3=30;
4548 UPDATE t SET c3=40 WHERE c1=30;
4549 include/rpl_sync.inc
4550 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4551 connection server_1;
4552 DELETE FROM t WHERE c2="a";
4553 DELETE FROM t WHERE c1=20;
4554 DELETE FROM t;
4555 include/rpl_sync.inc
4556 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4557 connection server_1;
4558 DROP TABLE t;
4559 include/rpl_sync.inc
4560 connection server_1;
4561 SET SQL_LOG_BIN=0;
4562 connection server_2;
4563 SET SQL_LOG_BIN=0;
4564 connection server_3;
4565 SET SQL_LOG_BIN=0;
4566 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
4567 connection server_1;
4568 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4569 connection server_2;
4570 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4571 connection server_3;
4572 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4573 connection server_1;
4574 SET SQL_LOG_BIN=1;
4575 connection server_2;
4576 SET SQL_LOG_BIN=1;
4577 connection server_3;
4578 SET SQL_LOG_BIN=1;
4579 connection server_1;
4580 INSERT INTO t VALUES (1, "a", 10);
4581 INSERT INTO t VALUES (2, "b", 20);
4582 INSERT INTO t VALUES (3, "c", 30);
4583 include/rpl_sync.inc
4584 connection server_1;
4585 UPDATE t SET c1=10 WHERE c2="a";
4586 UPDATE t SET c1=20 WHERE c1=2;
4587 UPDATE t SET c1=30 WHERE c3=30;
4588 UPDATE t SET c3=40 WHERE c1=30;
4589 include/rpl_sync.inc
4590 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4591 connection server_1;
4592 DELETE FROM t WHERE c2="a";
4593 DELETE FROM t WHERE c1=20;
4594 DELETE FROM t;
4595 include/rpl_sync.inc
4596 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4597 connection server_1;
4598 DROP TABLE t;
4599 include/rpl_sync.inc
4600 connection server_1;
4601 SET SQL_LOG_BIN=0;
4602 connection server_2;
4603 SET SQL_LOG_BIN=0;
4604 connection server_3;
4605 SET SQL_LOG_BIN=0;
4606 ### Asserts that declaring a blob as part of a primary key does not break replication
4607 connection server_1;
4608 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4609 connection server_2;
4610 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4611 connection server_3;
4612 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4613 connection server_1;
4614 SET SQL_LOG_BIN=1;
4615 connection server_2;
4616 SET SQL_LOG_BIN=1;
4617 connection server_3;
4618 SET SQL_LOG_BIN=1;
4619 connection server_1;
4620 INSERT INTO t VALUES (1, "a", 10);
4621 INSERT INTO t VALUES (2, "b", 20);
4622 INSERT INTO t VALUES (3, "c", 30);
4623 include/rpl_sync.inc
4624 connection server_1;
4625 UPDATE t SET c1=10 WHERE c2="a";
4626 UPDATE t SET c1=20 WHERE c1=2;
4627 UPDATE t SET c1=30 WHERE c3=30;
4628 UPDATE t SET c3=40 WHERE c1=30;
4629 include/rpl_sync.inc
4630 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4631 connection server_1;
4632 DELETE FROM t WHERE c2="a";
4633 DELETE FROM t WHERE c1=20;
4634 DELETE FROM t;
4635 include/rpl_sync.inc
4636 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4637 connection server_1;
4638 DROP TABLE t;
4639 include/rpl_sync.inc
4640 CON: 'server_1', IMG: 'FULL_NODUP', RESTART SLAVE: 'N'
4641 connection server_1;
4642 SET SESSION binlog_row_image= 'FULL_NODUP';
4643 SET GLOBAL binlog_row_image= 'FULL_NODUP';
4644 FLUSH TABLES;
4645 SHOW VARIABLES LIKE 'binlog_row_image';
4646 Variable_name Value
4647 binlog_row_image FULL_NODUP
4648 CON: 'server_2', IMG: 'FULL_NODUP', RESTART SLAVE: 'Y'
4649 connection server_2;
4650 SET SESSION binlog_row_image= 'FULL_NODUP';
4651 SET GLOBAL binlog_row_image= 'FULL_NODUP';
4652 include/stop_slave.inc
4653 include/start_slave.inc
4654 FLUSH TABLES;
4655 SHOW VARIABLES LIKE 'binlog_row_image';
4656 Variable_name Value
4657 binlog_row_image FULL_NODUP
4658 CON: 'server_3', IMG: 'FULL_NODUP', RESTART SLAVE: 'Y'
4659 connection server_3;
4660 SET SESSION binlog_row_image= 'FULL_NODUP';
4661 SET GLOBAL binlog_row_image= 'FULL_NODUP';
4662 include/stop_slave.inc
4663 include/start_slave.inc
4664 FLUSH TABLES;
4665 SHOW VARIABLES LIKE 'binlog_row_image';
4666 Variable_name Value
4667 binlog_row_image FULL_NODUP
4668 connection server_1;
4669 ### engines: MyISAM, MyISAM, MyISAM
4670 connection server_1;
4671 connection server_1;
4672 SET SQL_LOG_BIN=0;
4673 connection server_2;
4674 SET SQL_LOG_BIN=0;
4675 connection server_3;
4676 SET SQL_LOG_BIN=0;
4677 ### Asserts that updates without blobs in the AI (they are not updated)
4678 ### will not break replication (check when there is no key in the table)
4679 connection server_1;
4680 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
4681 connection server_2;
4682 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
4683 connection server_3;
4684 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
4685 connection server_1;
4686 SET SQL_LOG_BIN=1;
4687 connection server_2;
4688 SET SQL_LOG_BIN=1;
4689 connection server_3;
4690 SET SQL_LOG_BIN=1;
4691 connection server_1;
4692 INSERT INTO t VALUES (1, "a", 10);
4693 INSERT INTO t VALUES (2, "b", 20);
4694 INSERT INTO t VALUES (3, "c", 30);
4695 include/rpl_sync.inc
4696 connection server_1;
4697 UPDATE t SET c1=10 WHERE c2="a";
4698 UPDATE t SET c1=20 WHERE c1=2;
4699 UPDATE t SET c1=30 WHERE c3=30;
4700 UPDATE t SET c3=40 WHERE c1=30;
4701 include/rpl_sync.inc
4702 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4703 connection server_1;
4704 DELETE FROM t WHERE c2="a";
4705 DELETE FROM t WHERE c1=20;
4706 DELETE FROM t;
4707 include/rpl_sync.inc
4708 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4709 connection server_1;
4710 DROP TABLE t;
4711 include/rpl_sync.inc
4712 connection server_1;
4713 SET SQL_LOG_BIN=0;
4714 connection server_2;
4715 SET SQL_LOG_BIN=0;
4716 connection server_3;
4717 SET SQL_LOG_BIN=0;
4718 ### Asserts that updates without blobs in the AI (they are not updated)
4719 ### will not break replication (check even if there is a key in the table)
4720 connection server_1;
4721 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
4722 connection server_2;
4723 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
4724 connection server_3;
4725 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
4726 connection server_1;
4727 SET SQL_LOG_BIN=1;
4728 connection server_2;
4729 SET SQL_LOG_BIN=1;
4730 connection server_3;
4731 SET SQL_LOG_BIN=1;
4732 connection server_1;
4733 INSERT INTO t VALUES (1, "a", 10);
4734 INSERT INTO t VALUES (2, "b", 20);
4735 INSERT INTO t VALUES (3, "c", 30);
4736 include/rpl_sync.inc
4737 connection server_1;
4738 UPDATE t SET c1=10 WHERE c2="a";
4739 UPDATE t SET c1=20 WHERE c1=2;
4740 UPDATE t SET c1=30 WHERE c3=30;
4741 UPDATE t SET c3=40 WHERE c1=30;
4742 include/rpl_sync.inc
4743 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4744 connection server_1;
4745 DELETE FROM t WHERE c2="a";
4746 DELETE FROM t WHERE c1=20;
4747 DELETE FROM t;
4748 include/rpl_sync.inc
4749 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4750 connection server_1;
4751 DROP TABLE t;
4752 include/rpl_sync.inc
4753 connection server_1;
4754 SET SQL_LOG_BIN=0;
4755 connection server_2;
4756 SET SQL_LOG_BIN=0;
4757 connection server_3;
4758 SET SQL_LOG_BIN=0;
4759 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
4760 ### will not break replication
4761 connection server_1;
4762 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
4763 connection server_2;
4764 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
4765 connection server_3;
4766 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
4767 connection server_1;
4768 SET SQL_LOG_BIN=1;
4769 connection server_2;
4770 SET SQL_LOG_BIN=1;
4771 connection server_3;
4772 SET SQL_LOG_BIN=1;
4773 connection server_1;
4774 INSERT INTO t VALUES (1, "a", 10);
4775 INSERT INTO t VALUES (2, "b", 20);
4776 INSERT INTO t VALUES (3, "c", 30);
4777 include/rpl_sync.inc
4778 connection server_1;
4779 UPDATE t SET c1=10 WHERE c2="a";
4780 UPDATE t SET c1=20 WHERE c1=2;
4781 UPDATE t SET c1=30 WHERE c3=30;
4782 UPDATE t SET c3=40 WHERE c1=30;
4783 include/rpl_sync.inc
4784 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4785 connection server_1;
4786 DELETE FROM t WHERE c2="a";
4787 DELETE FROM t WHERE c1=20;
4788 DELETE FROM t;
4789 include/rpl_sync.inc
4790 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4791 connection server_1;
4792 DROP TABLE t;
4793 include/rpl_sync.inc
4794 connection server_1;
4795 SET SQL_LOG_BIN=0;
4796 connection server_2;
4797 SET SQL_LOG_BIN=0;
4798 connection server_3;
4799 SET SQL_LOG_BIN=0;
4800 ### Asserts that updates without blobs in the BI (PK exists int the table)
4801 ### will not break replication
4802 connection server_1;
4803 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
4804 connection server_2;
4805 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
4806 connection server_3;
4807 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
4808 connection server_1;
4809 SET SQL_LOG_BIN=1;
4810 connection server_2;
4811 SET SQL_LOG_BIN=1;
4812 connection server_3;
4813 SET SQL_LOG_BIN=1;
4814 connection server_1;
4815 INSERT INTO t VALUES (1, "a", 10);
4816 INSERT INTO t VALUES (2, "b", 20);
4817 INSERT INTO t VALUES (3, "c", 30);
4818 include/rpl_sync.inc
4819 connection server_1;
4820 UPDATE t SET c1=10 WHERE c2="a";
4821 UPDATE t SET c1=20 WHERE c1=2;
4822 UPDATE t SET c1=30 WHERE c3=30;
4823 UPDATE t SET c3=40 WHERE c1=30;
4824 include/rpl_sync.inc
4825 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4826 connection server_1;
4827 DELETE FROM t WHERE c2="a";
4828 DELETE FROM t WHERE c1=20;
4829 DELETE FROM t;
4830 include/rpl_sync.inc
4831 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4832 connection server_1;
4833 DROP TABLE t;
4834 include/rpl_sync.inc
4835 connection server_1;
4836 SET SQL_LOG_BIN=0;
4837 connection server_2;
4838 SET SQL_LOG_BIN=0;
4839 connection server_3;
4840 SET SQL_LOG_BIN=0;
4841 ### Asserts that declaring a blob in a key does not break replication
4842 connection server_1;
4843 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
4844 connection server_2;
4845 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
4846 connection server_3;
4847 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
4848 connection server_1;
4849 SET SQL_LOG_BIN=1;
4850 connection server_2;
4851 SET SQL_LOG_BIN=1;
4852 connection server_3;
4853 SET SQL_LOG_BIN=1;
4854 connection server_1;
4855 INSERT INTO t VALUES (1, "a", 10);
4856 INSERT INTO t VALUES (2, "b", 20);
4857 INSERT INTO t VALUES (3, "c", 30);
4858 include/rpl_sync.inc
4859 connection server_1;
4860 UPDATE t SET c1=10 WHERE c2="a";
4861 UPDATE t SET c1=20 WHERE c1=2;
4862 UPDATE t SET c1=30 WHERE c3=30;
4863 UPDATE t SET c3=40 WHERE c1=30;
4864 include/rpl_sync.inc
4865 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4866 connection server_1;
4867 DELETE FROM t WHERE c2="a";
4868 DELETE FROM t WHERE c1=20;
4869 DELETE FROM t;
4870 include/rpl_sync.inc
4871 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4872 connection server_1;
4873 DROP TABLE t;
4874 include/rpl_sync.inc
4875 connection server_1;
4876 SET SQL_LOG_BIN=0;
4877 connection server_2;
4878 SET SQL_LOG_BIN=0;
4879 connection server_3;
4880 SET SQL_LOG_BIN=0;
4881 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
4882 connection server_1;
4883 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
4884 connection server_2;
4885 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
4886 connection server_3;
4887 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
4888 connection server_1;
4889 SET SQL_LOG_BIN=1;
4890 connection server_2;
4891 SET SQL_LOG_BIN=1;
4892 connection server_3;
4893 SET SQL_LOG_BIN=1;
4894 connection server_1;
4895 INSERT INTO t VALUES (1, "a", 10);
4896 INSERT INTO t VALUES (2, "b", 20);
4897 INSERT INTO t VALUES (3, "c", 30);
4898 include/rpl_sync.inc
4899 connection server_1;
4900 UPDATE t SET c1=10 WHERE c2="a";
4901 UPDATE t SET c1=20 WHERE c1=2;
4902 UPDATE t SET c1=30 WHERE c3=30;
4903 UPDATE t SET c3=40 WHERE c1=30;
4904 include/rpl_sync.inc
4905 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4906 connection server_1;
4907 DELETE FROM t WHERE c2="a";
4908 DELETE FROM t WHERE c1=20;
4909 DELETE FROM t;
4910 include/rpl_sync.inc
4911 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4912 connection server_1;
4913 DROP TABLE t;
4914 include/rpl_sync.inc
4915 connection server_1;
4916 SET SQL_LOG_BIN=0;
4917 connection server_2;
4918 SET SQL_LOG_BIN=0;
4919 connection server_3;
4920 SET SQL_LOG_BIN=0;
4921 ### Asserts that declaring a blob as part of a primary key does not break replication
4922 connection server_1;
4923 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4924 connection server_2;
4925 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4926 connection server_3;
4927 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4928 connection server_1;
4929 SET SQL_LOG_BIN=1;
4930 connection server_2;
4931 SET SQL_LOG_BIN=1;
4932 connection server_3;
4933 SET SQL_LOG_BIN=1;
4934 connection server_1;
4935 INSERT INTO t VALUES (1, "a", 10);
4936 INSERT INTO t VALUES (2, "b", 20);
4937 INSERT INTO t VALUES (3, "c", 30);
4938 include/rpl_sync.inc
4939 connection server_1;
4940 UPDATE t SET c1=10 WHERE c2="a";
4941 UPDATE t SET c1=20 WHERE c1=2;
4942 UPDATE t SET c1=30 WHERE c3=30;
4943 UPDATE t SET c3=40 WHERE c1=30;
4944 include/rpl_sync.inc
4945 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4946 connection server_1;
4947 DELETE FROM t WHERE c2="a";
4948 DELETE FROM t WHERE c1=20;
4949 DELETE FROM t;
4950 include/rpl_sync.inc
4951 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4952 connection server_1;
4953 DROP TABLE t;
4954 include/rpl_sync.inc
4955 ### engines: MyISAM, MyISAM, InnoDB
4956 connection server_1;
4957 connection server_1;
4958 SET SQL_LOG_BIN=0;
4959 connection server_2;
4960 SET SQL_LOG_BIN=0;
4961 connection server_3;
4962 SET SQL_LOG_BIN=0;
4963 ### Asserts that updates without blobs in the AI (they are not updated)
4964 ### will not break replication (check when there is no key in the table)
4965 connection server_1;
4966 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
4967 connection server_2;
4968 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
4969 connection server_3;
4970 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4971 connection server_1;
4972 SET SQL_LOG_BIN=1;
4973 connection server_2;
4974 SET SQL_LOG_BIN=1;
4975 connection server_3;
4976 SET SQL_LOG_BIN=1;
4977 connection server_1;
4978 INSERT INTO t VALUES (1, "a", 10);
4979 INSERT INTO t VALUES (2, "b", 20);
4980 INSERT INTO t VALUES (3, "c", 30);
4981 include/rpl_sync.inc
4982 connection server_1;
4983 UPDATE t SET c1=10 WHERE c2="a";
4984 UPDATE t SET c1=20 WHERE c1=2;
4985 UPDATE t SET c1=30 WHERE c3=30;
4986 UPDATE t SET c3=40 WHERE c1=30;
4987 include/rpl_sync.inc
4988 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4989 connection server_1;
4990 DELETE FROM t WHERE c2="a";
4991 DELETE FROM t WHERE c1=20;
4992 DELETE FROM t;
4993 include/rpl_sync.inc
4994 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4995 connection server_1;
4996 DROP TABLE t;
4997 include/rpl_sync.inc
4998 connection server_1;
4999 SET SQL_LOG_BIN=0;
5000 connection server_2;
5001 SET SQL_LOG_BIN=0;
5002 connection server_3;
5003 SET SQL_LOG_BIN=0;
5004 ### Asserts that updates without blobs in the AI (they are not updated)
5005 ### will not break replication (check even if there is a key in the table)
5006 connection server_1;
5007 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
5008 connection server_2;
5009 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
5010 connection server_3;
5011 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
5012 connection server_1;
5013 SET SQL_LOG_BIN=1;
5014 connection server_2;
5015 SET SQL_LOG_BIN=1;
5016 connection server_3;
5017 SET SQL_LOG_BIN=1;
5018 connection server_1;
5019 INSERT INTO t VALUES (1, "a", 10);
5020 INSERT INTO t VALUES (2, "b", 20);
5021 INSERT INTO t VALUES (3, "c", 30);
5022 include/rpl_sync.inc
5023 connection server_1;
5024 UPDATE t SET c1=10 WHERE c2="a";
5025 UPDATE t SET c1=20 WHERE c1=2;
5026 UPDATE t SET c1=30 WHERE c3=30;
5027 UPDATE t SET c3=40 WHERE c1=30;
5028 include/rpl_sync.inc
5029 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5030 connection server_1;
5031 DELETE FROM t WHERE c2="a";
5032 DELETE FROM t WHERE c1=20;
5033 DELETE FROM t;
5034 include/rpl_sync.inc
5035 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5036 connection server_1;
5037 DROP TABLE t;
5038 include/rpl_sync.inc
5039 connection server_1;
5040 SET SQL_LOG_BIN=0;
5041 connection server_2;
5042 SET SQL_LOG_BIN=0;
5043 connection server_3;
5044 SET SQL_LOG_BIN=0;
5045 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
5046 ### will not break replication
5047 connection server_1;
5048 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
5049 connection server_2;
5050 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
5051 connection server_3;
5052 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
5053 connection server_1;
5054 SET SQL_LOG_BIN=1;
5055 connection server_2;
5056 SET SQL_LOG_BIN=1;
5057 connection server_3;
5058 SET SQL_LOG_BIN=1;
5059 connection server_1;
5060 INSERT INTO t VALUES (1, "a", 10);
5061 INSERT INTO t VALUES (2, "b", 20);
5062 INSERT INTO t VALUES (3, "c", 30);
5063 include/rpl_sync.inc
5064 connection server_1;
5065 UPDATE t SET c1=10 WHERE c2="a";
5066 UPDATE t SET c1=20 WHERE c1=2;
5067 UPDATE t SET c1=30 WHERE c3=30;
5068 UPDATE t SET c3=40 WHERE c1=30;
5069 include/rpl_sync.inc
5070 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5071 connection server_1;
5072 DELETE FROM t WHERE c2="a";
5073 DELETE FROM t WHERE c1=20;
5074 DELETE FROM t;
5075 include/rpl_sync.inc
5076 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5077 connection server_1;
5078 DROP TABLE t;
5079 include/rpl_sync.inc
5080 connection server_1;
5081 SET SQL_LOG_BIN=0;
5082 connection server_2;
5083 SET SQL_LOG_BIN=0;
5084 connection server_3;
5085 SET SQL_LOG_BIN=0;
5086 ### Asserts that updates without blobs in the BI (PK exists int the table)
5087 ### will not break replication
5088 connection server_1;
5089 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
5090 connection server_2;
5091 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
5092 connection server_3;
5093 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
5094 connection server_1;
5095 SET SQL_LOG_BIN=1;
5096 connection server_2;
5097 SET SQL_LOG_BIN=1;
5098 connection server_3;
5099 SET SQL_LOG_BIN=1;
5100 connection server_1;
5101 INSERT INTO t VALUES (1, "a", 10);
5102 INSERT INTO t VALUES (2, "b", 20);
5103 INSERT INTO t VALUES (3, "c", 30);
5104 include/rpl_sync.inc
5105 connection server_1;
5106 UPDATE t SET c1=10 WHERE c2="a";
5107 UPDATE t SET c1=20 WHERE c1=2;
5108 UPDATE t SET c1=30 WHERE c3=30;
5109 UPDATE t SET c3=40 WHERE c1=30;
5110 include/rpl_sync.inc
5111 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5112 connection server_1;
5113 DELETE FROM t WHERE c2="a";
5114 DELETE FROM t WHERE c1=20;
5115 DELETE FROM t;
5116 include/rpl_sync.inc
5117 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5118 connection server_1;
5119 DROP TABLE t;
5120 include/rpl_sync.inc
5121 connection server_1;
5122 SET SQL_LOG_BIN=0;
5123 connection server_2;
5124 SET SQL_LOG_BIN=0;
5125 connection server_3;
5126 SET SQL_LOG_BIN=0;
5127 ### Asserts that declaring a blob in a key does not break replication
5128 connection server_1;
5129 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
5130 connection server_2;
5131 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
5132 connection server_3;
5133 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
5134 connection server_1;
5135 SET SQL_LOG_BIN=1;
5136 connection server_2;
5137 SET SQL_LOG_BIN=1;
5138 connection server_3;
5139 SET SQL_LOG_BIN=1;
5140 connection server_1;
5141 INSERT INTO t VALUES (1, "a", 10);
5142 INSERT INTO t VALUES (2, "b", 20);
5143 INSERT INTO t VALUES (3, "c", 30);
5144 include/rpl_sync.inc
5145 connection server_1;
5146 UPDATE t SET c1=10 WHERE c2="a";
5147 UPDATE t SET c1=20 WHERE c1=2;
5148 UPDATE t SET c1=30 WHERE c3=30;
5149 UPDATE t SET c3=40 WHERE c1=30;
5150 include/rpl_sync.inc
5151 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5152 connection server_1;
5153 DELETE FROM t WHERE c2="a";
5154 DELETE FROM t WHERE c1=20;
5155 DELETE FROM t;
5156 include/rpl_sync.inc
5157 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5158 connection server_1;
5159 DROP TABLE t;
5160 include/rpl_sync.inc
5161 connection server_1;
5162 SET SQL_LOG_BIN=0;
5163 connection server_2;
5164 SET SQL_LOG_BIN=0;
5165 connection server_3;
5166 SET SQL_LOG_BIN=0;
5167 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
5168 connection server_1;
5169 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
5170 connection server_2;
5171 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
5172 connection server_3;
5173 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
5174 connection server_1;
5175 SET SQL_LOG_BIN=1;
5176 connection server_2;
5177 SET SQL_LOG_BIN=1;
5178 connection server_3;
5179 SET SQL_LOG_BIN=1;
5180 connection server_1;
5181 INSERT INTO t VALUES (1, "a", 10);
5182 INSERT INTO t VALUES (2, "b", 20);
5183 INSERT INTO t VALUES (3, "c", 30);
5184 include/rpl_sync.inc
5185 connection server_1;
5186 UPDATE t SET c1=10 WHERE c2="a";
5187 UPDATE t SET c1=20 WHERE c1=2;
5188 UPDATE t SET c1=30 WHERE c3=30;
5189 UPDATE t SET c3=40 WHERE c1=30;
5190 include/rpl_sync.inc
5191 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5192 connection server_1;
5193 DELETE FROM t WHERE c2="a";
5194 DELETE FROM t WHERE c1=20;
5195 DELETE FROM t;
5196 include/rpl_sync.inc
5197 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5198 connection server_1;
5199 DROP TABLE t;
5200 include/rpl_sync.inc
5201 connection server_1;
5202 SET SQL_LOG_BIN=0;
5203 connection server_2;
5204 SET SQL_LOG_BIN=0;
5205 connection server_3;
5206 SET SQL_LOG_BIN=0;
5207 ### Asserts that declaring a blob as part of a primary key does not break replication
5208 connection server_1;
5209 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
5210 connection server_2;
5211 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
5212 connection server_3;
5213 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
5214 connection server_1;
5215 SET SQL_LOG_BIN=1;
5216 connection server_2;
5217 SET SQL_LOG_BIN=1;
5218 connection server_3;
5219 SET SQL_LOG_BIN=1;
5220 connection server_1;
5221 INSERT INTO t VALUES (1, "a", 10);
5222 INSERT INTO t VALUES (2, "b", 20);
5223 INSERT INTO t VALUES (3, "c", 30);
5224 include/rpl_sync.inc
5225 connection server_1;
5226 UPDATE t SET c1=10 WHERE c2="a";
5227 UPDATE t SET c1=20 WHERE c1=2;
5228 UPDATE t SET c1=30 WHERE c3=30;
5229 UPDATE t SET c3=40 WHERE c1=30;
5230 include/rpl_sync.inc
5231 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5232 connection server_1;
5233 DELETE FROM t WHERE c2="a";
5234 DELETE FROM t WHERE c1=20;
5235 DELETE FROM t;
5236 include/rpl_sync.inc
5237 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5238 connection server_1;
5239 DROP TABLE t;
5240 include/rpl_sync.inc
5241 ### engines: MyISAM, InnoDB, MyISAM
5242 connection server_1;
5243 connection server_1;
5244 SET SQL_LOG_BIN=0;
5245 connection server_2;
5246 SET SQL_LOG_BIN=0;
5247 connection server_3;
5248 SET SQL_LOG_BIN=0;
5249 ### Asserts that updates without blobs in the AI (they are not updated)
5250 ### will not break replication (check when there is no key in the table)
5251 connection server_1;
5252 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
5253 connection server_2;
5254 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
5255 connection server_3;
5256 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
5257 connection server_1;
5258 SET SQL_LOG_BIN=1;
5259 connection server_2;
5260 SET SQL_LOG_BIN=1;
5261 connection server_3;
5262 SET SQL_LOG_BIN=1;
5263 connection server_1;
5264 INSERT INTO t VALUES (1, "a", 10);
5265 INSERT INTO t VALUES (2, "b", 20);
5266 INSERT INTO t VALUES (3, "c", 30);
5267 include/rpl_sync.inc
5268 connection server_1;
5269 UPDATE t SET c1=10 WHERE c2="a";
5270 UPDATE t SET c1=20 WHERE c1=2;
5271 UPDATE t SET c1=30 WHERE c3=30;
5272 UPDATE t SET c3=40 WHERE c1=30;
5273 include/rpl_sync.inc
5274 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5275 connection server_1;
5276 DELETE FROM t WHERE c2="a";
5277 DELETE FROM t WHERE c1=20;
5278 DELETE FROM t;
5279 include/rpl_sync.inc
5280 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5281 connection server_1;
5282 DROP TABLE t;
5283 include/rpl_sync.inc
5284 connection server_1;
5285 SET SQL_LOG_BIN=0;
5286 connection server_2;
5287 SET SQL_LOG_BIN=0;
5288 connection server_3;
5289 SET SQL_LOG_BIN=0;
5290 ### Asserts that updates without blobs in the AI (they are not updated)
5291 ### will not break replication (check even if there is a key in the table)
5292 connection server_1;
5293 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
5294 connection server_2;
5295 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
5296 connection server_3;
5297 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
5298 connection server_1;
5299 SET SQL_LOG_BIN=1;
5300 connection server_2;
5301 SET SQL_LOG_BIN=1;
5302 connection server_3;
5303 SET SQL_LOG_BIN=1;
5304 connection server_1;
5305 INSERT INTO t VALUES (1, "a", 10);
5306 INSERT INTO t VALUES (2, "b", 20);
5307 INSERT INTO t VALUES (3, "c", 30);
5308 include/rpl_sync.inc
5309 connection server_1;
5310 UPDATE t SET c1=10 WHERE c2="a";
5311 UPDATE t SET c1=20 WHERE c1=2;
5312 UPDATE t SET c1=30 WHERE c3=30;
5313 UPDATE t SET c3=40 WHERE c1=30;
5314 include/rpl_sync.inc
5315 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5316 connection server_1;
5317 DELETE FROM t WHERE c2="a";
5318 DELETE FROM t WHERE c1=20;
5319 DELETE FROM t;
5320 include/rpl_sync.inc
5321 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5322 connection server_1;
5323 DROP TABLE t;
5324 include/rpl_sync.inc
5325 connection server_1;
5326 SET SQL_LOG_BIN=0;
5327 connection server_2;
5328 SET SQL_LOG_BIN=0;
5329 connection server_3;
5330 SET SQL_LOG_BIN=0;
5331 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
5332 ### will not break replication
5333 connection server_1;
5334 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
5335 connection server_2;
5336 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
5337 connection server_3;
5338 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
5339 connection server_1;
5340 SET SQL_LOG_BIN=1;
5341 connection server_2;
5342 SET SQL_LOG_BIN=1;
5343 connection server_3;
5344 SET SQL_LOG_BIN=1;
5345 connection server_1;
5346 INSERT INTO t VALUES (1, "a", 10);
5347 INSERT INTO t VALUES (2, "b", 20);
5348 INSERT INTO t VALUES (3, "c", 30);
5349 include/rpl_sync.inc
5350 connection server_1;
5351 UPDATE t SET c1=10 WHERE c2="a";
5352 UPDATE t SET c1=20 WHERE c1=2;
5353 UPDATE t SET c1=30 WHERE c3=30;
5354 UPDATE t SET c3=40 WHERE c1=30;
5355 include/rpl_sync.inc
5356 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5357 connection server_1;
5358 DELETE FROM t WHERE c2="a";
5359 DELETE FROM t WHERE c1=20;
5360 DELETE FROM t;
5361 include/rpl_sync.inc
5362 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5363 connection server_1;
5364 DROP TABLE t;
5365 include/rpl_sync.inc
5366 connection server_1;
5367 SET SQL_LOG_BIN=0;
5368 connection server_2;
5369 SET SQL_LOG_BIN=0;
5370 connection server_3;
5371 SET SQL_LOG_BIN=0;
5372 ### Asserts that updates without blobs in the BI (PK exists int the table)
5373 ### will not break replication
5374 connection server_1;
5375 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
5376 connection server_2;
5377 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
5378 connection server_3;
5379 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
5380 connection server_1;
5381 SET SQL_LOG_BIN=1;
5382 connection server_2;
5383 SET SQL_LOG_BIN=1;
5384 connection server_3;
5385 SET SQL_LOG_BIN=1;
5386 connection server_1;
5387 INSERT INTO t VALUES (1, "a", 10);
5388 INSERT INTO t VALUES (2, "b", 20);
5389 INSERT INTO t VALUES (3, "c", 30);
5390 include/rpl_sync.inc
5391 connection server_1;
5392 UPDATE t SET c1=10 WHERE c2="a";
5393 UPDATE t SET c1=20 WHERE c1=2;
5394 UPDATE t SET c1=30 WHERE c3=30;
5395 UPDATE t SET c3=40 WHERE c1=30;
5396 include/rpl_sync.inc
5397 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5398 connection server_1;
5399 DELETE FROM t WHERE c2="a";
5400 DELETE FROM t WHERE c1=20;
5401 DELETE FROM t;
5402 include/rpl_sync.inc
5403 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5404 connection server_1;
5405 DROP TABLE t;
5406 include/rpl_sync.inc
5407 connection server_1;
5408 SET SQL_LOG_BIN=0;
5409 connection server_2;
5410 SET SQL_LOG_BIN=0;
5411 connection server_3;
5412 SET SQL_LOG_BIN=0;
5413 ### Asserts that declaring a blob in a key does not break replication
5414 connection server_1;
5415 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
5416 connection server_2;
5417 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
5418 connection server_3;
5419 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
5420 connection server_1;
5421 SET SQL_LOG_BIN=1;
5422 connection server_2;
5423 SET SQL_LOG_BIN=1;
5424 connection server_3;
5425 SET SQL_LOG_BIN=1;
5426 connection server_1;
5427 INSERT INTO t VALUES (1, "a", 10);
5428 INSERT INTO t VALUES (2, "b", 20);
5429 INSERT INTO t VALUES (3, "c", 30);
5430 include/rpl_sync.inc
5431 connection server_1;
5432 UPDATE t SET c1=10 WHERE c2="a";
5433 UPDATE t SET c1=20 WHERE c1=2;
5434 UPDATE t SET c1=30 WHERE c3=30;
5435 UPDATE t SET c3=40 WHERE c1=30;
5436 include/rpl_sync.inc
5437 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5438 connection server_1;
5439 DELETE FROM t WHERE c2="a";
5440 DELETE FROM t WHERE c1=20;
5441 DELETE FROM t;
5442 include/rpl_sync.inc
5443 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5444 connection server_1;
5445 DROP TABLE t;
5446 include/rpl_sync.inc
5447 connection server_1;
5448 SET SQL_LOG_BIN=0;
5449 connection server_2;
5450 SET SQL_LOG_BIN=0;
5451 connection server_3;
5452 SET SQL_LOG_BIN=0;
5453 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
5454 connection server_1;
5455 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
5456 connection server_2;
5457 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
5458 connection server_3;
5459 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
5460 connection server_1;
5461 SET SQL_LOG_BIN=1;
5462 connection server_2;
5463 SET SQL_LOG_BIN=1;
5464 connection server_3;
5465 SET SQL_LOG_BIN=1;
5466 connection server_1;
5467 INSERT INTO t VALUES (1, "a", 10);
5468 INSERT INTO t VALUES (2, "b", 20);
5469 INSERT INTO t VALUES (3, "c", 30);
5470 include/rpl_sync.inc
5471 connection server_1;
5472 UPDATE t SET c1=10 WHERE c2="a";
5473 UPDATE t SET c1=20 WHERE c1=2;
5474 UPDATE t SET c1=30 WHERE c3=30;
5475 UPDATE t SET c3=40 WHERE c1=30;
5476 include/rpl_sync.inc
5477 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5478 connection server_1;
5479 DELETE FROM t WHERE c2="a";
5480 DELETE FROM t WHERE c1=20;
5481 DELETE FROM t;
5482 include/rpl_sync.inc
5483 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5484 connection server_1;
5485 DROP TABLE t;
5486 include/rpl_sync.inc
5487 connection server_1;
5488 SET SQL_LOG_BIN=0;
5489 connection server_2;
5490 SET SQL_LOG_BIN=0;
5491 connection server_3;
5492 SET SQL_LOG_BIN=0;
5493 ### Asserts that declaring a blob as part of a primary key does not break replication
5494 connection server_1;
5495 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
5496 connection server_2;
5497 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
5498 connection server_3;
5499 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
5500 connection server_1;
5501 SET SQL_LOG_BIN=1;
5502 connection server_2;
5503 SET SQL_LOG_BIN=1;
5504 connection server_3;
5505 SET SQL_LOG_BIN=1;
5506 connection server_1;
5507 INSERT INTO t VALUES (1, "a", 10);
5508 INSERT INTO t VALUES (2, "b", 20);
5509 INSERT INTO t VALUES (3, "c", 30);
5510 include/rpl_sync.inc
5511 connection server_1;
5512 UPDATE t SET c1=10 WHERE c2="a";
5513 UPDATE t SET c1=20 WHERE c1=2;
5514 UPDATE t SET c1=30 WHERE c3=30;
5515 UPDATE t SET c3=40 WHERE c1=30;
5516 include/rpl_sync.inc
5517 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5518 connection server_1;
5519 DELETE FROM t WHERE c2="a";
5520 DELETE FROM t WHERE c1=20;
5521 DELETE FROM t;
5522 include/rpl_sync.inc
5523 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5524 connection server_1;
5525 DROP TABLE t;
5526 include/rpl_sync.inc
5527 ### engines: MyISAM, InnoDB, InnoDB
5528 connection server_1;
5529 connection server_1;
5530 SET SQL_LOG_BIN=0;
5531 connection server_2;
5532 SET SQL_LOG_BIN=0;
5533 connection server_3;
5534 SET SQL_LOG_BIN=0;
5535 ### Asserts that updates without blobs in the AI (they are not updated)
5536 ### will not break replication (check when there is no key in the table)
5537 connection server_1;
5538 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
5539 connection server_2;
5540 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
5541 connection server_3;
5542 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
5543 connection server_1;
5544 SET SQL_LOG_BIN=1;
5545 connection server_2;
5546 SET SQL_LOG_BIN=1;
5547 connection server_3;
5548 SET SQL_LOG_BIN=1;
5549 connection server_1;
5550 INSERT INTO t VALUES (1, "a", 10);
5551 INSERT INTO t VALUES (2, "b", 20);
5552 INSERT INTO t VALUES (3, "c", 30);
5553 include/rpl_sync.inc
5554 connection server_1;
5555 UPDATE t SET c1=10 WHERE c2="a";
5556 UPDATE t SET c1=20 WHERE c1=2;
5557 UPDATE t SET c1=30 WHERE c3=30;
5558 UPDATE t SET c3=40 WHERE c1=30;
5559 include/rpl_sync.inc
5560 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5561 connection server_1;
5562 DELETE FROM t WHERE c2="a";
5563 DELETE FROM t WHERE c1=20;
5564 DELETE FROM t;
5565 include/rpl_sync.inc
5566 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5567 connection server_1;
5568 DROP TABLE t;
5569 include/rpl_sync.inc
5570 connection server_1;
5571 SET SQL_LOG_BIN=0;
5572 connection server_2;
5573 SET SQL_LOG_BIN=0;
5574 connection server_3;
5575 SET SQL_LOG_BIN=0;
5576 ### Asserts that updates without blobs in the AI (they are not updated)
5577 ### will not break replication (check even if there is a key in the table)
5578 connection server_1;
5579 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
5580 connection server_2;
5581 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
5582 connection server_3;
5583 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
5584 connection server_1;
5585 SET SQL_LOG_BIN=1;
5586 connection server_2;
5587 SET SQL_LOG_BIN=1;
5588 connection server_3;
5589 SET SQL_LOG_BIN=1;
5590 connection server_1;
5591 INSERT INTO t VALUES (1, "a", 10);
5592 INSERT INTO t VALUES (2, "b", 20);
5593 INSERT INTO t VALUES (3, "c", 30);
5594 include/rpl_sync.inc
5595 connection server_1;
5596 UPDATE t SET c1=10 WHERE c2="a";
5597 UPDATE t SET c1=20 WHERE c1=2;
5598 UPDATE t SET c1=30 WHERE c3=30;
5599 UPDATE t SET c3=40 WHERE c1=30;
5600 include/rpl_sync.inc
5601 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5602 connection server_1;
5603 DELETE FROM t WHERE c2="a";
5604 DELETE FROM t WHERE c1=20;
5605 DELETE FROM t;
5606 include/rpl_sync.inc
5607 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5608 connection server_1;
5609 DROP TABLE t;
5610 include/rpl_sync.inc
5611 connection server_1;
5612 SET SQL_LOG_BIN=0;
5613 connection server_2;
5614 SET SQL_LOG_BIN=0;
5615 connection server_3;
5616 SET SQL_LOG_BIN=0;
5617 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
5618 ### will not break replication
5619 connection server_1;
5620 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
5621 connection server_2;
5622 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
5623 connection server_3;
5624 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
5625 connection server_1;
5626 SET SQL_LOG_BIN=1;
5627 connection server_2;
5628 SET SQL_LOG_BIN=1;
5629 connection server_3;
5630 SET SQL_LOG_BIN=1;
5631 connection server_1;
5632 INSERT INTO t VALUES (1, "a", 10);
5633 INSERT INTO t VALUES (2, "b", 20);
5634 INSERT INTO t VALUES (3, "c", 30);
5635 include/rpl_sync.inc
5636 connection server_1;
5637 UPDATE t SET c1=10 WHERE c2="a";
5638 UPDATE t SET c1=20 WHERE c1=2;
5639 UPDATE t SET c1=30 WHERE c3=30;
5640 UPDATE t SET c3=40 WHERE c1=30;
5641 include/rpl_sync.inc
5642 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5643 connection server_1;
5644 DELETE FROM t WHERE c2="a";
5645 DELETE FROM t WHERE c1=20;
5646 DELETE FROM t;
5647 include/rpl_sync.inc
5648 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5649 connection server_1;
5650 DROP TABLE t;
5651 include/rpl_sync.inc
5652 connection server_1;
5653 SET SQL_LOG_BIN=0;
5654 connection server_2;
5655 SET SQL_LOG_BIN=0;
5656 connection server_3;
5657 SET SQL_LOG_BIN=0;
5658 ### Asserts that updates without blobs in the BI (PK exists int the table)
5659 ### will not break replication
5660 connection server_1;
5661 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
5662 connection server_2;
5663 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
5664 connection server_3;
5665 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
5666 connection server_1;
5667 SET SQL_LOG_BIN=1;
5668 connection server_2;
5669 SET SQL_LOG_BIN=1;
5670 connection server_3;
5671 SET SQL_LOG_BIN=1;
5672 connection server_1;
5673 INSERT INTO t VALUES (1, "a", 10);
5674 INSERT INTO t VALUES (2, "b", 20);
5675 INSERT INTO t VALUES (3, "c", 30);
5676 include/rpl_sync.inc
5677 connection server_1;
5678 UPDATE t SET c1=10 WHERE c2="a";
5679 UPDATE t SET c1=20 WHERE c1=2;
5680 UPDATE t SET c1=30 WHERE c3=30;
5681 UPDATE t SET c3=40 WHERE c1=30;
5682 include/rpl_sync.inc
5683 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5684 connection server_1;
5685 DELETE FROM t WHERE c2="a";
5686 DELETE FROM t WHERE c1=20;
5687 DELETE FROM t;
5688 include/rpl_sync.inc
5689 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5690 connection server_1;
5691 DROP TABLE t;
5692 include/rpl_sync.inc
5693 connection server_1;
5694 SET SQL_LOG_BIN=0;
5695 connection server_2;
5696 SET SQL_LOG_BIN=0;
5697 connection server_3;
5698 SET SQL_LOG_BIN=0;
5699 ### Asserts that declaring a blob in a key does not break replication
5700 connection server_1;
5701 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
5702 connection server_2;
5703 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
5704 connection server_3;
5705 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
5706 connection server_1;
5707 SET SQL_LOG_BIN=1;
5708 connection server_2;
5709 SET SQL_LOG_BIN=1;
5710 connection server_3;
5711 SET SQL_LOG_BIN=1;
5712 connection server_1;
5713 INSERT INTO t VALUES (1, "a", 10);
5714 INSERT INTO t VALUES (2, "b", 20);
5715 INSERT INTO t VALUES (3, "c", 30);
5716 include/rpl_sync.inc
5717 connection server_1;
5718 UPDATE t SET c1=10 WHERE c2="a";
5719 UPDATE t SET c1=20 WHERE c1=2;
5720 UPDATE t SET c1=30 WHERE c3=30;
5721 UPDATE t SET c3=40 WHERE c1=30;
5722 include/rpl_sync.inc
5723 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5724 connection server_1;
5725 DELETE FROM t WHERE c2="a";
5726 DELETE FROM t WHERE c1=20;
5727 DELETE FROM t;
5728 include/rpl_sync.inc
5729 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5730 connection server_1;
5731 DROP TABLE t;
5732 include/rpl_sync.inc
5733 connection server_1;
5734 SET SQL_LOG_BIN=0;
5735 connection server_2;
5736 SET SQL_LOG_BIN=0;
5737 connection server_3;
5738 SET SQL_LOG_BIN=0;
5739 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
5740 connection server_1;
5741 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
5742 connection server_2;
5743 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
5744 connection server_3;
5745 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
5746 connection server_1;
5747 SET SQL_LOG_BIN=1;
5748 connection server_2;
5749 SET SQL_LOG_BIN=1;
5750 connection server_3;
5751 SET SQL_LOG_BIN=1;
5752 connection server_1;
5753 INSERT INTO t VALUES (1, "a", 10);
5754 INSERT INTO t VALUES (2, "b", 20);
5755 INSERT INTO t VALUES (3, "c", 30);
5756 include/rpl_sync.inc
5757 connection server_1;
5758 UPDATE t SET c1=10 WHERE c2="a";
5759 UPDATE t SET c1=20 WHERE c1=2;
5760 UPDATE t SET c1=30 WHERE c3=30;
5761 UPDATE t SET c3=40 WHERE c1=30;
5762 include/rpl_sync.inc
5763 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5764 connection server_1;
5765 DELETE FROM t WHERE c2="a";
5766 DELETE FROM t WHERE c1=20;
5767 DELETE FROM t;
5768 include/rpl_sync.inc
5769 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5770 connection server_1;
5771 DROP TABLE t;
5772 include/rpl_sync.inc
5773 connection server_1;
5774 SET SQL_LOG_BIN=0;
5775 connection server_2;
5776 SET SQL_LOG_BIN=0;
5777 connection server_3;
5778 SET SQL_LOG_BIN=0;
5779 ### Asserts that declaring a blob as part of a primary key does not break replication
5780 connection server_1;
5781 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
5782 connection server_2;
5783 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
5784 connection server_3;
5785 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
5786 connection server_1;
5787 SET SQL_LOG_BIN=1;
5788 connection server_2;
5789 SET SQL_LOG_BIN=1;
5790 connection server_3;
5791 SET SQL_LOG_BIN=1;
5792 connection server_1;
5793 INSERT INTO t VALUES (1, "a", 10);
5794 INSERT INTO t VALUES (2, "b", 20);
5795 INSERT INTO t VALUES (3, "c", 30);
5796 include/rpl_sync.inc
5797 connection server_1;
5798 UPDATE t SET c1=10 WHERE c2="a";
5799 UPDATE t SET c1=20 WHERE c1=2;
5800 UPDATE t SET c1=30 WHERE c3=30;
5801 UPDATE t SET c3=40 WHERE c1=30;
5802 include/rpl_sync.inc
5803 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5804 connection server_1;
5805 DELETE FROM t WHERE c2="a";
5806 DELETE FROM t WHERE c1=20;
5807 DELETE FROM t;
5808 include/rpl_sync.inc
5809 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5810 connection server_1;
5811 DROP TABLE t;
5812 include/rpl_sync.inc
5813 ### engines: InnoDB, MyISAM, MyISAM
5814 connection server_1;
5815 connection server_1;
5816 SET SQL_LOG_BIN=0;
5817 connection server_2;
5818 SET SQL_LOG_BIN=0;
5819 connection server_3;
5820 SET SQL_LOG_BIN=0;
5821 ### Asserts that updates without blobs in the AI (they are not updated)
5822 ### will not break replication (check when there is no key in the table)
5823 connection server_1;
5824 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
5825 connection server_2;
5826 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
5827 connection server_3;
5828 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
5829 connection server_1;
5830 SET SQL_LOG_BIN=1;
5831 connection server_2;
5832 SET SQL_LOG_BIN=1;
5833 connection server_3;
5834 SET SQL_LOG_BIN=1;
5835 connection server_1;
5836 INSERT INTO t VALUES (1, "a", 10);
5837 INSERT INTO t VALUES (2, "b", 20);
5838 INSERT INTO t VALUES (3, "c", 30);
5839 include/rpl_sync.inc
5840 connection server_1;
5841 UPDATE t SET c1=10 WHERE c2="a";
5842 UPDATE t SET c1=20 WHERE c1=2;
5843 UPDATE t SET c1=30 WHERE c3=30;
5844 UPDATE t SET c3=40 WHERE c1=30;
5845 include/rpl_sync.inc
5846 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5847 connection server_1;
5848 DELETE FROM t WHERE c2="a";
5849 DELETE FROM t WHERE c1=20;
5850 DELETE FROM t;
5851 include/rpl_sync.inc
5852 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5853 connection server_1;
5854 DROP TABLE t;
5855 include/rpl_sync.inc
5856 connection server_1;
5857 SET SQL_LOG_BIN=0;
5858 connection server_2;
5859 SET SQL_LOG_BIN=0;
5860 connection server_3;
5861 SET SQL_LOG_BIN=0;
5862 ### Asserts that updates without blobs in the AI (they are not updated)
5863 ### will not break replication (check even if there is a key in the table)
5864 connection server_1;
5865 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
5866 connection server_2;
5867 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
5868 connection server_3;
5869 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
5870 connection server_1;
5871 SET SQL_LOG_BIN=1;
5872 connection server_2;
5873 SET SQL_LOG_BIN=1;
5874 connection server_3;
5875 SET SQL_LOG_BIN=1;
5876 connection server_1;
5877 INSERT INTO t VALUES (1, "a", 10);
5878 INSERT INTO t VALUES (2, "b", 20);
5879 INSERT INTO t VALUES (3, "c", 30);
5880 include/rpl_sync.inc
5881 connection server_1;
5882 UPDATE t SET c1=10 WHERE c2="a";
5883 UPDATE t SET c1=20 WHERE c1=2;
5884 UPDATE t SET c1=30 WHERE c3=30;
5885 UPDATE t SET c3=40 WHERE c1=30;
5886 include/rpl_sync.inc
5887 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5888 connection server_1;
5889 DELETE FROM t WHERE c2="a";
5890 DELETE FROM t WHERE c1=20;
5891 DELETE FROM t;
5892 include/rpl_sync.inc
5893 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5894 connection server_1;
5895 DROP TABLE t;
5896 include/rpl_sync.inc
5897 connection server_1;
5898 SET SQL_LOG_BIN=0;
5899 connection server_2;
5900 SET SQL_LOG_BIN=0;
5901 connection server_3;
5902 SET SQL_LOG_BIN=0;
5903 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
5904 ### will not break replication
5905 connection server_1;
5906 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
5907 connection server_2;
5908 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
5909 connection server_3;
5910 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
5911 connection server_1;
5912 SET SQL_LOG_BIN=1;
5913 connection server_2;
5914 SET SQL_LOG_BIN=1;
5915 connection server_3;
5916 SET SQL_LOG_BIN=1;
5917 connection server_1;
5918 INSERT INTO t VALUES (1, "a", 10);
5919 INSERT INTO t VALUES (2, "b", 20);
5920 INSERT INTO t VALUES (3, "c", 30);
5921 include/rpl_sync.inc
5922 connection server_1;
5923 UPDATE t SET c1=10 WHERE c2="a";
5924 UPDATE t SET c1=20 WHERE c1=2;
5925 UPDATE t SET c1=30 WHERE c3=30;
5926 UPDATE t SET c3=40 WHERE c1=30;
5927 include/rpl_sync.inc
5928 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5929 connection server_1;
5930 DELETE FROM t WHERE c2="a";
5931 DELETE FROM t WHERE c1=20;
5932 DELETE FROM t;
5933 include/rpl_sync.inc
5934 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5935 connection server_1;
5936 DROP TABLE t;
5937 include/rpl_sync.inc
5938 connection server_1;
5939 SET SQL_LOG_BIN=0;
5940 connection server_2;
5941 SET SQL_LOG_BIN=0;
5942 connection server_3;
5943 SET SQL_LOG_BIN=0;
5944 ### Asserts that updates without blobs in the BI (PK exists int the table)
5945 ### will not break replication
5946 connection server_1;
5947 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
5948 connection server_2;
5949 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
5950 connection server_3;
5951 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
5952 connection server_1;
5953 SET SQL_LOG_BIN=1;
5954 connection server_2;
5955 SET SQL_LOG_BIN=1;
5956 connection server_3;
5957 SET SQL_LOG_BIN=1;
5958 connection server_1;
5959 INSERT INTO t VALUES (1, "a", 10);
5960 INSERT INTO t VALUES (2, "b", 20);
5961 INSERT INTO t VALUES (3, "c", 30);
5962 include/rpl_sync.inc
5963 connection server_1;
5964 UPDATE t SET c1=10 WHERE c2="a";
5965 UPDATE t SET c1=20 WHERE c1=2;
5966 UPDATE t SET c1=30 WHERE c3=30;
5967 UPDATE t SET c3=40 WHERE c1=30;
5968 include/rpl_sync.inc
5969 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5970 connection server_1;
5971 DELETE FROM t WHERE c2="a";
5972 DELETE FROM t WHERE c1=20;
5973 DELETE FROM t;
5974 include/rpl_sync.inc
5975 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
5976 connection server_1;
5977 DROP TABLE t;
5978 include/rpl_sync.inc
5979 connection server_1;
5980 SET SQL_LOG_BIN=0;
5981 connection server_2;
5982 SET SQL_LOG_BIN=0;
5983 connection server_3;
5984 SET SQL_LOG_BIN=0;
5985 ### Asserts that declaring a blob in a key does not break replication
5986 connection server_1;
5987 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
5988 connection server_2;
5989 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
5990 connection server_3;
5991 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
5992 connection server_1;
5993 SET SQL_LOG_BIN=1;
5994 connection server_2;
5995 SET SQL_LOG_BIN=1;
5996 connection server_3;
5997 SET SQL_LOG_BIN=1;
5998 connection server_1;
5999 INSERT INTO t VALUES (1, "a", 10);
6000 INSERT INTO t VALUES (2, "b", 20);
6001 INSERT INTO t VALUES (3, "c", 30);
6002 include/rpl_sync.inc
6003 connection server_1;
6004 UPDATE t SET c1=10 WHERE c2="a";
6005 UPDATE t SET c1=20 WHERE c1=2;
6006 UPDATE t SET c1=30 WHERE c3=30;
6007 UPDATE t SET c3=40 WHERE c1=30;
6008 include/rpl_sync.inc
6009 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6010 connection server_1;
6011 DELETE FROM t WHERE c2="a";
6012 DELETE FROM t WHERE c1=20;
6013 DELETE FROM t;
6014 include/rpl_sync.inc
6015 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6016 connection server_1;
6017 DROP TABLE t;
6018 include/rpl_sync.inc
6019 connection server_1;
6020 SET SQL_LOG_BIN=0;
6021 connection server_2;
6022 SET SQL_LOG_BIN=0;
6023 connection server_3;
6024 SET SQL_LOG_BIN=0;
6025 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
6026 connection server_1;
6027 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
6028 connection server_2;
6029 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
6030 connection server_3;
6031 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
6032 connection server_1;
6033 SET SQL_LOG_BIN=1;
6034 connection server_2;
6035 SET SQL_LOG_BIN=1;
6036 connection server_3;
6037 SET SQL_LOG_BIN=1;
6038 connection server_1;
6039 INSERT INTO t VALUES (1, "a", 10);
6040 INSERT INTO t VALUES (2, "b", 20);
6041 INSERT INTO t VALUES (3, "c", 30);
6042 include/rpl_sync.inc
6043 connection server_1;
6044 UPDATE t SET c1=10 WHERE c2="a";
6045 UPDATE t SET c1=20 WHERE c1=2;
6046 UPDATE t SET c1=30 WHERE c3=30;
6047 UPDATE t SET c3=40 WHERE c1=30;
6048 include/rpl_sync.inc
6049 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6050 connection server_1;
6051 DELETE FROM t WHERE c2="a";
6052 DELETE FROM t WHERE c1=20;
6053 DELETE FROM t;
6054 include/rpl_sync.inc
6055 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6056 connection server_1;
6057 DROP TABLE t;
6058 include/rpl_sync.inc
6059 connection server_1;
6060 SET SQL_LOG_BIN=0;
6061 connection server_2;
6062 SET SQL_LOG_BIN=0;
6063 connection server_3;
6064 SET SQL_LOG_BIN=0;
6065 ### Asserts that declaring a blob as part of a primary key does not break replication
6066 connection server_1;
6067 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
6068 connection server_2;
6069 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
6070 connection server_3;
6071 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
6072 connection server_1;
6073 SET SQL_LOG_BIN=1;
6074 connection server_2;
6075 SET SQL_LOG_BIN=1;
6076 connection server_3;
6077 SET SQL_LOG_BIN=1;
6078 connection server_1;
6079 INSERT INTO t VALUES (1, "a", 10);
6080 INSERT INTO t VALUES (2, "b", 20);
6081 INSERT INTO t VALUES (3, "c", 30);
6082 include/rpl_sync.inc
6083 connection server_1;
6084 UPDATE t SET c1=10 WHERE c2="a";
6085 UPDATE t SET c1=20 WHERE c1=2;
6086 UPDATE t SET c1=30 WHERE c3=30;
6087 UPDATE t SET c3=40 WHERE c1=30;
6088 include/rpl_sync.inc
6089 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6090 connection server_1;
6091 DELETE FROM t WHERE c2="a";
6092 DELETE FROM t WHERE c1=20;
6093 DELETE FROM t;
6094 include/rpl_sync.inc
6095 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6096 connection server_1;
6097 DROP TABLE t;
6098 include/rpl_sync.inc
6099 ### engines: InnoDB, MyISAM, InnoDB
6100 connection server_1;
6101 connection server_1;
6102 SET SQL_LOG_BIN=0;
6103 connection server_2;
6104 SET SQL_LOG_BIN=0;
6105 connection server_3;
6106 SET SQL_LOG_BIN=0;
6107 ### Asserts that updates without blobs in the AI (they are not updated)
6108 ### will not break replication (check when there is no key in the table)
6109 connection server_1;
6110 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
6111 connection server_2;
6112 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
6113 connection server_3;
6114 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
6115 connection server_1;
6116 SET SQL_LOG_BIN=1;
6117 connection server_2;
6118 SET SQL_LOG_BIN=1;
6119 connection server_3;
6120 SET SQL_LOG_BIN=1;
6121 connection server_1;
6122 INSERT INTO t VALUES (1, "a", 10);
6123 INSERT INTO t VALUES (2, "b", 20);
6124 INSERT INTO t VALUES (3, "c", 30);
6125 include/rpl_sync.inc
6126 connection server_1;
6127 UPDATE t SET c1=10 WHERE c2="a";
6128 UPDATE t SET c1=20 WHERE c1=2;
6129 UPDATE t SET c1=30 WHERE c3=30;
6130 UPDATE t SET c3=40 WHERE c1=30;
6131 include/rpl_sync.inc
6132 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6133 connection server_1;
6134 DELETE FROM t WHERE c2="a";
6135 DELETE FROM t WHERE c1=20;
6136 DELETE FROM t;
6137 include/rpl_sync.inc
6138 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6139 connection server_1;
6140 DROP TABLE t;
6141 include/rpl_sync.inc
6142 connection server_1;
6143 SET SQL_LOG_BIN=0;
6144 connection server_2;
6145 SET SQL_LOG_BIN=0;
6146 connection server_3;
6147 SET SQL_LOG_BIN=0;
6148 ### Asserts that updates without blobs in the AI (they are not updated)
6149 ### will not break replication (check even if there is a key in the table)
6150 connection server_1;
6151 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
6152 connection server_2;
6153 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
6154 connection server_3;
6155 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
6156 connection server_1;
6157 SET SQL_LOG_BIN=1;
6158 connection server_2;
6159 SET SQL_LOG_BIN=1;
6160 connection server_3;
6161 SET SQL_LOG_BIN=1;
6162 connection server_1;
6163 INSERT INTO t VALUES (1, "a", 10);
6164 INSERT INTO t VALUES (2, "b", 20);
6165 INSERT INTO t VALUES (3, "c", 30);
6166 include/rpl_sync.inc
6167 connection server_1;
6168 UPDATE t SET c1=10 WHERE c2="a";
6169 UPDATE t SET c1=20 WHERE c1=2;
6170 UPDATE t SET c1=30 WHERE c3=30;
6171 UPDATE t SET c3=40 WHERE c1=30;
6172 include/rpl_sync.inc
6173 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6174 connection server_1;
6175 DELETE FROM t WHERE c2="a";
6176 DELETE FROM t WHERE c1=20;
6177 DELETE FROM t;
6178 include/rpl_sync.inc
6179 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6180 connection server_1;
6181 DROP TABLE t;
6182 include/rpl_sync.inc
6183 connection server_1;
6184 SET SQL_LOG_BIN=0;
6185 connection server_2;
6186 SET SQL_LOG_BIN=0;
6187 connection server_3;
6188 SET SQL_LOG_BIN=0;
6189 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
6190 ### will not break replication
6191 connection server_1;
6192 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
6193 connection server_2;
6194 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
6195 connection server_3;
6196 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
6197 connection server_1;
6198 SET SQL_LOG_BIN=1;
6199 connection server_2;
6200 SET SQL_LOG_BIN=1;
6201 connection server_3;
6202 SET SQL_LOG_BIN=1;
6203 connection server_1;
6204 INSERT INTO t VALUES (1, "a", 10);
6205 INSERT INTO t VALUES (2, "b", 20);
6206 INSERT INTO t VALUES (3, "c", 30);
6207 include/rpl_sync.inc
6208 connection server_1;
6209 UPDATE t SET c1=10 WHERE c2="a";
6210 UPDATE t SET c1=20 WHERE c1=2;
6211 UPDATE t SET c1=30 WHERE c3=30;
6212 UPDATE t SET c3=40 WHERE c1=30;
6213 include/rpl_sync.inc
6214 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6215 connection server_1;
6216 DELETE FROM t WHERE c2="a";
6217 DELETE FROM t WHERE c1=20;
6218 DELETE FROM t;
6219 include/rpl_sync.inc
6220 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6221 connection server_1;
6222 DROP TABLE t;
6223 include/rpl_sync.inc
6224 connection server_1;
6225 SET SQL_LOG_BIN=0;
6226 connection server_2;
6227 SET SQL_LOG_BIN=0;
6228 connection server_3;
6229 SET SQL_LOG_BIN=0;
6230 ### Asserts that updates without blobs in the BI (PK exists int the table)
6231 ### will not break replication
6232 connection server_1;
6233 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
6234 connection server_2;
6235 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
6236 connection server_3;
6237 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
6238 connection server_1;
6239 SET SQL_LOG_BIN=1;
6240 connection server_2;
6241 SET SQL_LOG_BIN=1;
6242 connection server_3;
6243 SET SQL_LOG_BIN=1;
6244 connection server_1;
6245 INSERT INTO t VALUES (1, "a", 10);
6246 INSERT INTO t VALUES (2, "b", 20);
6247 INSERT INTO t VALUES (3, "c", 30);
6248 include/rpl_sync.inc
6249 connection server_1;
6250 UPDATE t SET c1=10 WHERE c2="a";
6251 UPDATE t SET c1=20 WHERE c1=2;
6252 UPDATE t SET c1=30 WHERE c3=30;
6253 UPDATE t SET c3=40 WHERE c1=30;
6254 include/rpl_sync.inc
6255 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6256 connection server_1;
6257 DELETE FROM t WHERE c2="a";
6258 DELETE FROM t WHERE c1=20;
6259 DELETE FROM t;
6260 include/rpl_sync.inc
6261 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6262 connection server_1;
6263 DROP TABLE t;
6264 include/rpl_sync.inc
6265 connection server_1;
6266 SET SQL_LOG_BIN=0;
6267 connection server_2;
6268 SET SQL_LOG_BIN=0;
6269 connection server_3;
6270 SET SQL_LOG_BIN=0;
6271 ### Asserts that declaring a blob in a key does not break replication
6272 connection server_1;
6273 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
6274 connection server_2;
6275 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
6276 connection server_3;
6277 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
6278 connection server_1;
6279 SET SQL_LOG_BIN=1;
6280 connection server_2;
6281 SET SQL_LOG_BIN=1;
6282 connection server_3;
6283 SET SQL_LOG_BIN=1;
6284 connection server_1;
6285 INSERT INTO t VALUES (1, "a", 10);
6286 INSERT INTO t VALUES (2, "b", 20);
6287 INSERT INTO t VALUES (3, "c", 30);
6288 include/rpl_sync.inc
6289 connection server_1;
6290 UPDATE t SET c1=10 WHERE c2="a";
6291 UPDATE t SET c1=20 WHERE c1=2;
6292 UPDATE t SET c1=30 WHERE c3=30;
6293 UPDATE t SET c3=40 WHERE c1=30;
6294 include/rpl_sync.inc
6295 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6296 connection server_1;
6297 DELETE FROM t WHERE c2="a";
6298 DELETE FROM t WHERE c1=20;
6299 DELETE FROM t;
6300 include/rpl_sync.inc
6301 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6302 connection server_1;
6303 DROP TABLE t;
6304 include/rpl_sync.inc
6305 connection server_1;
6306 SET SQL_LOG_BIN=0;
6307 connection server_2;
6308 SET SQL_LOG_BIN=0;
6309 connection server_3;
6310 SET SQL_LOG_BIN=0;
6311 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
6312 connection server_1;
6313 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
6314 connection server_2;
6315 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
6316 connection server_3;
6317 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
6318 connection server_1;
6319 SET SQL_LOG_BIN=1;
6320 connection server_2;
6321 SET SQL_LOG_BIN=1;
6322 connection server_3;
6323 SET SQL_LOG_BIN=1;
6324 connection server_1;
6325 INSERT INTO t VALUES (1, "a", 10);
6326 INSERT INTO t VALUES (2, "b", 20);
6327 INSERT INTO t VALUES (3, "c", 30);
6328 include/rpl_sync.inc
6329 connection server_1;
6330 UPDATE t SET c1=10 WHERE c2="a";
6331 UPDATE t SET c1=20 WHERE c1=2;
6332 UPDATE t SET c1=30 WHERE c3=30;
6333 UPDATE t SET c3=40 WHERE c1=30;
6334 include/rpl_sync.inc
6335 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6336 connection server_1;
6337 DELETE FROM t WHERE c2="a";
6338 DELETE FROM t WHERE c1=20;
6339 DELETE FROM t;
6340 include/rpl_sync.inc
6341 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6342 connection server_1;
6343 DROP TABLE t;
6344 include/rpl_sync.inc
6345 connection server_1;
6346 SET SQL_LOG_BIN=0;
6347 connection server_2;
6348 SET SQL_LOG_BIN=0;
6349 connection server_3;
6350 SET SQL_LOG_BIN=0;
6351 ### Asserts that declaring a blob as part of a primary key does not break replication
6352 connection server_1;
6353 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
6354 connection server_2;
6355 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
6356 connection server_3;
6357 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
6358 connection server_1;
6359 SET SQL_LOG_BIN=1;
6360 connection server_2;
6361 SET SQL_LOG_BIN=1;
6362 connection server_3;
6363 SET SQL_LOG_BIN=1;
6364 connection server_1;
6365 INSERT INTO t VALUES (1, "a", 10);
6366 INSERT INTO t VALUES (2, "b", 20);
6367 INSERT INTO t VALUES (3, "c", 30);
6368 include/rpl_sync.inc
6369 connection server_1;
6370 UPDATE t SET c1=10 WHERE c2="a";
6371 UPDATE t SET c1=20 WHERE c1=2;
6372 UPDATE t SET c1=30 WHERE c3=30;
6373 UPDATE t SET c3=40 WHERE c1=30;
6374 include/rpl_sync.inc
6375 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6376 connection server_1;
6377 DELETE FROM t WHERE c2="a";
6378 DELETE FROM t WHERE c1=20;
6379 DELETE FROM t;
6380 include/rpl_sync.inc
6381 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6382 connection server_1;
6383 DROP TABLE t;
6384 include/rpl_sync.inc
6385 ### engines: InnoDB, InnoDB, MyISAM
6386 connection server_1;
6387 connection server_1;
6388 SET SQL_LOG_BIN=0;
6389 connection server_2;
6390 SET SQL_LOG_BIN=0;
6391 connection server_3;
6392 SET SQL_LOG_BIN=0;
6393 ### Asserts that updates without blobs in the AI (they are not updated)
6394 ### will not break replication (check when there is no key in the table)
6395 connection server_1;
6396 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
6397 connection server_2;
6398 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
6399 connection server_3;
6400 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
6401 connection server_1;
6402 SET SQL_LOG_BIN=1;
6403 connection server_2;
6404 SET SQL_LOG_BIN=1;
6405 connection server_3;
6406 SET SQL_LOG_BIN=1;
6407 connection server_1;
6408 INSERT INTO t VALUES (1, "a", 10);
6409 INSERT INTO t VALUES (2, "b", 20);
6410 INSERT INTO t VALUES (3, "c", 30);
6411 include/rpl_sync.inc
6412 connection server_1;
6413 UPDATE t SET c1=10 WHERE c2="a";
6414 UPDATE t SET c1=20 WHERE c1=2;
6415 UPDATE t SET c1=30 WHERE c3=30;
6416 UPDATE t SET c3=40 WHERE c1=30;
6417 include/rpl_sync.inc
6418 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6419 connection server_1;
6420 DELETE FROM t WHERE c2="a";
6421 DELETE FROM t WHERE c1=20;
6422 DELETE FROM t;
6423 include/rpl_sync.inc
6424 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6425 connection server_1;
6426 DROP TABLE t;
6427 include/rpl_sync.inc
6428 connection server_1;
6429 SET SQL_LOG_BIN=0;
6430 connection server_2;
6431 SET SQL_LOG_BIN=0;
6432 connection server_3;
6433 SET SQL_LOG_BIN=0;
6434 ### Asserts that updates without blobs in the AI (they are not updated)
6435 ### will not break replication (check even if there is a key in the table)
6436 connection server_1;
6437 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
6438 connection server_2;
6439 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
6440 connection server_3;
6441 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
6442 connection server_1;
6443 SET SQL_LOG_BIN=1;
6444 connection server_2;
6445 SET SQL_LOG_BIN=1;
6446 connection server_3;
6447 SET SQL_LOG_BIN=1;
6448 connection server_1;
6449 INSERT INTO t VALUES (1, "a", 10);
6450 INSERT INTO t VALUES (2, "b", 20);
6451 INSERT INTO t VALUES (3, "c", 30);
6452 include/rpl_sync.inc
6453 connection server_1;
6454 UPDATE t SET c1=10 WHERE c2="a";
6455 UPDATE t SET c1=20 WHERE c1=2;
6456 UPDATE t SET c1=30 WHERE c3=30;
6457 UPDATE t SET c3=40 WHERE c1=30;
6458 include/rpl_sync.inc
6459 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6460 connection server_1;
6461 DELETE FROM t WHERE c2="a";
6462 DELETE FROM t WHERE c1=20;
6463 DELETE FROM t;
6464 include/rpl_sync.inc
6465 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6466 connection server_1;
6467 DROP TABLE t;
6468 include/rpl_sync.inc
6469 connection server_1;
6470 SET SQL_LOG_BIN=0;
6471 connection server_2;
6472 SET SQL_LOG_BIN=0;
6473 connection server_3;
6474 SET SQL_LOG_BIN=0;
6475 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
6476 ### will not break replication
6477 connection server_1;
6478 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
6479 connection server_2;
6480 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
6481 connection server_3;
6482 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
6483 connection server_1;
6484 SET SQL_LOG_BIN=1;
6485 connection server_2;
6486 SET SQL_LOG_BIN=1;
6487 connection server_3;
6488 SET SQL_LOG_BIN=1;
6489 connection server_1;
6490 INSERT INTO t VALUES (1, "a", 10);
6491 INSERT INTO t VALUES (2, "b", 20);
6492 INSERT INTO t VALUES (3, "c", 30);
6493 include/rpl_sync.inc
6494 connection server_1;
6495 UPDATE t SET c1=10 WHERE c2="a";
6496 UPDATE t SET c1=20 WHERE c1=2;
6497 UPDATE t SET c1=30 WHERE c3=30;
6498 UPDATE t SET c3=40 WHERE c1=30;
6499 include/rpl_sync.inc
6500 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6501 connection server_1;
6502 DELETE FROM t WHERE c2="a";
6503 DELETE FROM t WHERE c1=20;
6504 DELETE FROM t;
6505 include/rpl_sync.inc
6506 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6507 connection server_1;
6508 DROP TABLE t;
6509 include/rpl_sync.inc
6510 connection server_1;
6511 SET SQL_LOG_BIN=0;
6512 connection server_2;
6513 SET SQL_LOG_BIN=0;
6514 connection server_3;
6515 SET SQL_LOG_BIN=0;
6516 ### Asserts that updates without blobs in the BI (PK exists int the table)
6517 ### will not break replication
6518 connection server_1;
6519 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
6520 connection server_2;
6521 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
6522 connection server_3;
6523 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
6524 connection server_1;
6525 SET SQL_LOG_BIN=1;
6526 connection server_2;
6527 SET SQL_LOG_BIN=1;
6528 connection server_3;
6529 SET SQL_LOG_BIN=1;
6530 connection server_1;
6531 INSERT INTO t VALUES (1, "a", 10);
6532 INSERT INTO t VALUES (2, "b", 20);
6533 INSERT INTO t VALUES (3, "c", 30);
6534 include/rpl_sync.inc
6535 connection server_1;
6536 UPDATE t SET c1=10 WHERE c2="a";
6537 UPDATE t SET c1=20 WHERE c1=2;
6538 UPDATE t SET c1=30 WHERE c3=30;
6539 UPDATE t SET c3=40 WHERE c1=30;
6540 include/rpl_sync.inc
6541 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6542 connection server_1;
6543 DELETE FROM t WHERE c2="a";
6544 DELETE FROM t WHERE c1=20;
6545 DELETE FROM t;
6546 include/rpl_sync.inc
6547 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6548 connection server_1;
6549 DROP TABLE t;
6550 include/rpl_sync.inc
6551 connection server_1;
6552 SET SQL_LOG_BIN=0;
6553 connection server_2;
6554 SET SQL_LOG_BIN=0;
6555 connection server_3;
6556 SET SQL_LOG_BIN=0;
6557 ### Asserts that declaring a blob in a key does not break replication
6558 connection server_1;
6559 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
6560 connection server_2;
6561 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
6562 connection server_3;
6563 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
6564 connection server_1;
6565 SET SQL_LOG_BIN=1;
6566 connection server_2;
6567 SET SQL_LOG_BIN=1;
6568 connection server_3;
6569 SET SQL_LOG_BIN=1;
6570 connection server_1;
6571 INSERT INTO t VALUES (1, "a", 10);
6572 INSERT INTO t VALUES (2, "b", 20);
6573 INSERT INTO t VALUES (3, "c", 30);
6574 include/rpl_sync.inc
6575 connection server_1;
6576 UPDATE t SET c1=10 WHERE c2="a";
6577 UPDATE t SET c1=20 WHERE c1=2;
6578 UPDATE t SET c1=30 WHERE c3=30;
6579 UPDATE t SET c3=40 WHERE c1=30;
6580 include/rpl_sync.inc
6581 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6582 connection server_1;
6583 DELETE FROM t WHERE c2="a";
6584 DELETE FROM t WHERE c1=20;
6585 DELETE FROM t;
6586 include/rpl_sync.inc
6587 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6588 connection server_1;
6589 DROP TABLE t;
6590 include/rpl_sync.inc
6591 connection server_1;
6592 SET SQL_LOG_BIN=0;
6593 connection server_2;
6594 SET SQL_LOG_BIN=0;
6595 connection server_3;
6596 SET SQL_LOG_BIN=0;
6597 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
6598 connection server_1;
6599 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
6600 connection server_2;
6601 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
6602 connection server_3;
6603 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
6604 connection server_1;
6605 SET SQL_LOG_BIN=1;
6606 connection server_2;
6607 SET SQL_LOG_BIN=1;
6608 connection server_3;
6609 SET SQL_LOG_BIN=1;
6610 connection server_1;
6611 INSERT INTO t VALUES (1, "a", 10);
6612 INSERT INTO t VALUES (2, "b", 20);
6613 INSERT INTO t VALUES (3, "c", 30);
6614 include/rpl_sync.inc
6615 connection server_1;
6616 UPDATE t SET c1=10 WHERE c2="a";
6617 UPDATE t SET c1=20 WHERE c1=2;
6618 UPDATE t SET c1=30 WHERE c3=30;
6619 UPDATE t SET c3=40 WHERE c1=30;
6620 include/rpl_sync.inc
6621 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6622 connection server_1;
6623 DELETE FROM t WHERE c2="a";
6624 DELETE FROM t WHERE c1=20;
6625 DELETE FROM t;
6626 include/rpl_sync.inc
6627 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6628 connection server_1;
6629 DROP TABLE t;
6630 include/rpl_sync.inc
6631 connection server_1;
6632 SET SQL_LOG_BIN=0;
6633 connection server_2;
6634 SET SQL_LOG_BIN=0;
6635 connection server_3;
6636 SET SQL_LOG_BIN=0;
6637 ### Asserts that declaring a blob as part of a primary key does not break replication
6638 connection server_1;
6639 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
6640 connection server_2;
6641 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
6642 connection server_3;
6643 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
6644 connection server_1;
6645 SET SQL_LOG_BIN=1;
6646 connection server_2;
6647 SET SQL_LOG_BIN=1;
6648 connection server_3;
6649 SET SQL_LOG_BIN=1;
6650 connection server_1;
6651 INSERT INTO t VALUES (1, "a", 10);
6652 INSERT INTO t VALUES (2, "b", 20);
6653 INSERT INTO t VALUES (3, "c", 30);
6654 include/rpl_sync.inc
6655 connection server_1;
6656 UPDATE t SET c1=10 WHERE c2="a";
6657 UPDATE t SET c1=20 WHERE c1=2;
6658 UPDATE t SET c1=30 WHERE c3=30;
6659 UPDATE t SET c3=40 WHERE c1=30;
6660 include/rpl_sync.inc
6661 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6662 connection server_1;
6663 DELETE FROM t WHERE c2="a";
6664 DELETE FROM t WHERE c1=20;
6665 DELETE FROM t;
6666 include/rpl_sync.inc
6667 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6668 connection server_1;
6669 DROP TABLE t;
6670 include/rpl_sync.inc
6671 ### engines: InnoDB, InnoDB, InnoDB
6672 connection server_1;
6673 connection server_1;
6674 SET SQL_LOG_BIN=0;
6675 connection server_2;
6676 SET SQL_LOG_BIN=0;
6677 connection server_3;
6678 SET SQL_LOG_BIN=0;
6679 ### Asserts that updates without blobs in the AI (they are not updated)
6680 ### will not break replication (check when there is no key in the table)
6681 connection server_1;
6682 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
6683 connection server_2;
6684 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
6685 connection server_3;
6686 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
6687 connection server_1;
6688 SET SQL_LOG_BIN=1;
6689 connection server_2;
6690 SET SQL_LOG_BIN=1;
6691 connection server_3;
6692 SET SQL_LOG_BIN=1;
6693 connection server_1;
6694 INSERT INTO t VALUES (1, "a", 10);
6695 INSERT INTO t VALUES (2, "b", 20);
6696 INSERT INTO t VALUES (3, "c", 30);
6697 include/rpl_sync.inc
6698 connection server_1;
6699 UPDATE t SET c1=10 WHERE c2="a";
6700 UPDATE t SET c1=20 WHERE c1=2;
6701 UPDATE t SET c1=30 WHERE c3=30;
6702 UPDATE t SET c3=40 WHERE c1=30;
6703 include/rpl_sync.inc
6704 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6705 connection server_1;
6706 DELETE FROM t WHERE c2="a";
6707 DELETE FROM t WHERE c1=20;
6708 DELETE FROM t;
6709 include/rpl_sync.inc
6710 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6711 connection server_1;
6712 DROP TABLE t;
6713 include/rpl_sync.inc
6714 connection server_1;
6715 SET SQL_LOG_BIN=0;
6716 connection server_2;
6717 SET SQL_LOG_BIN=0;
6718 connection server_3;
6719 SET SQL_LOG_BIN=0;
6720 ### Asserts that updates without blobs in the AI (they are not updated)
6721 ### will not break replication (check even if there is a key in the table)
6722 connection server_1;
6723 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
6724 connection server_2;
6725 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
6726 connection server_3;
6727 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
6728 connection server_1;
6729 SET SQL_LOG_BIN=1;
6730 connection server_2;
6731 SET SQL_LOG_BIN=1;
6732 connection server_3;
6733 SET SQL_LOG_BIN=1;
6734 connection server_1;
6735 INSERT INTO t VALUES (1, "a", 10);
6736 INSERT INTO t VALUES (2, "b", 20);
6737 INSERT INTO t VALUES (3, "c", 30);
6738 include/rpl_sync.inc
6739 connection server_1;
6740 UPDATE t SET c1=10 WHERE c2="a";
6741 UPDATE t SET c1=20 WHERE c1=2;
6742 UPDATE t SET c1=30 WHERE c3=30;
6743 UPDATE t SET c3=40 WHERE c1=30;
6744 include/rpl_sync.inc
6745 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6746 connection server_1;
6747 DELETE FROM t WHERE c2="a";
6748 DELETE FROM t WHERE c1=20;
6749 DELETE FROM t;
6750 include/rpl_sync.inc
6751 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6752 connection server_1;
6753 DROP TABLE t;
6754 include/rpl_sync.inc
6755 connection server_1;
6756 SET SQL_LOG_BIN=0;
6757 connection server_2;
6758 SET SQL_LOG_BIN=0;
6759 connection server_3;
6760 SET SQL_LOG_BIN=0;
6761 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
6762 ### will not break replication
6763 connection server_1;
6764 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
6765 connection server_2;
6766 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
6767 connection server_3;
6768 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
6769 connection server_1;
6770 SET SQL_LOG_BIN=1;
6771 connection server_2;
6772 SET SQL_LOG_BIN=1;
6773 connection server_3;
6774 SET SQL_LOG_BIN=1;
6775 connection server_1;
6776 INSERT INTO t VALUES (1, "a", 10);
6777 INSERT INTO t VALUES (2, "b", 20);
6778 INSERT INTO t VALUES (3, "c", 30);
6779 include/rpl_sync.inc
6780 connection server_1;
6781 UPDATE t SET c1=10 WHERE c2="a";
6782 UPDATE t SET c1=20 WHERE c1=2;
6783 UPDATE t SET c1=30 WHERE c3=30;
6784 UPDATE t SET c3=40 WHERE c1=30;
6785 include/rpl_sync.inc
6786 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6787 connection server_1;
6788 DELETE FROM t WHERE c2="a";
6789 DELETE FROM t WHERE c1=20;
6790 DELETE FROM t;
6791 include/rpl_sync.inc
6792 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6793 connection server_1;
6794 DROP TABLE t;
6795 include/rpl_sync.inc
6796 connection server_1;
6797 SET SQL_LOG_BIN=0;
6798 connection server_2;
6799 SET SQL_LOG_BIN=0;
6800 connection server_3;
6801 SET SQL_LOG_BIN=0;
6802 ### Asserts that updates without blobs in the BI (PK exists int the table)
6803 ### will not break replication
6804 connection server_1;
6805 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
6806 connection server_2;
6807 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
6808 connection server_3;
6809 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
6810 connection server_1;
6811 SET SQL_LOG_BIN=1;
6812 connection server_2;
6813 SET SQL_LOG_BIN=1;
6814 connection server_3;
6815 SET SQL_LOG_BIN=1;
6816 connection server_1;
6817 INSERT INTO t VALUES (1, "a", 10);
6818 INSERT INTO t VALUES (2, "b", 20);
6819 INSERT INTO t VALUES (3, "c", 30);
6820 include/rpl_sync.inc
6821 connection server_1;
6822 UPDATE t SET c1=10 WHERE c2="a";
6823 UPDATE t SET c1=20 WHERE c1=2;
6824 UPDATE t SET c1=30 WHERE c3=30;
6825 UPDATE t SET c3=40 WHERE c1=30;
6826 include/rpl_sync.inc
6827 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6828 connection server_1;
6829 DELETE FROM t WHERE c2="a";
6830 DELETE FROM t WHERE c1=20;
6831 DELETE FROM t;
6832 include/rpl_sync.inc
6833 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6834 connection server_1;
6835 DROP TABLE t;
6836 include/rpl_sync.inc
6837 connection server_1;
6838 SET SQL_LOG_BIN=0;
6839 connection server_2;
6840 SET SQL_LOG_BIN=0;
6841 connection server_3;
6842 SET SQL_LOG_BIN=0;
6843 ### Asserts that declaring a blob in a key does not break replication
6844 connection server_1;
6845 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
6846 connection server_2;
6847 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
6848 connection server_3;
6849 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
6850 connection server_1;
6851 SET SQL_LOG_BIN=1;
6852 connection server_2;
6853 SET SQL_LOG_BIN=1;
6854 connection server_3;
6855 SET SQL_LOG_BIN=1;
6856 connection server_1;
6857 INSERT INTO t VALUES (1, "a", 10);
6858 INSERT INTO t VALUES (2, "b", 20);
6859 INSERT INTO t VALUES (3, "c", 30);
6860 include/rpl_sync.inc
6861 connection server_1;
6862 UPDATE t SET c1=10 WHERE c2="a";
6863 UPDATE t SET c1=20 WHERE c1=2;
6864 UPDATE t SET c1=30 WHERE c3=30;
6865 UPDATE t SET c3=40 WHERE c1=30;
6866 include/rpl_sync.inc
6867 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6868 connection server_1;
6869 DELETE FROM t WHERE c2="a";
6870 DELETE FROM t WHERE c1=20;
6871 DELETE FROM t;
6872 include/rpl_sync.inc
6873 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6874 connection server_1;
6875 DROP TABLE t;
6876 include/rpl_sync.inc
6877 connection server_1;
6878 SET SQL_LOG_BIN=0;
6879 connection server_2;
6880 SET SQL_LOG_BIN=0;
6881 connection server_3;
6882 SET SQL_LOG_BIN=0;
6883 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
6884 connection server_1;
6885 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
6886 connection server_2;
6887 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
6888 connection server_3;
6889 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
6890 connection server_1;
6891 SET SQL_LOG_BIN=1;
6892 connection server_2;
6893 SET SQL_LOG_BIN=1;
6894 connection server_3;
6895 SET SQL_LOG_BIN=1;
6896 connection server_1;
6897 INSERT INTO t VALUES (1, "a", 10);
6898 INSERT INTO t VALUES (2, "b", 20);
6899 INSERT INTO t VALUES (3, "c", 30);
6900 include/rpl_sync.inc
6901 connection server_1;
6902 UPDATE t SET c1=10 WHERE c2="a";
6903 UPDATE t SET c1=20 WHERE c1=2;
6904 UPDATE t SET c1=30 WHERE c3=30;
6905 UPDATE t SET c3=40 WHERE c1=30;
6906 include/rpl_sync.inc
6907 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6908 connection server_1;
6909 DELETE FROM t WHERE c2="a";
6910 DELETE FROM t WHERE c1=20;
6911 DELETE FROM t;
6912 include/rpl_sync.inc
6913 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6914 connection server_1;
6915 DROP TABLE t;
6916 include/rpl_sync.inc
6917 connection server_1;
6918 SET SQL_LOG_BIN=0;
6919 connection server_2;
6920 SET SQL_LOG_BIN=0;
6921 connection server_3;
6922 SET SQL_LOG_BIN=0;
6923 ### Asserts that declaring a blob as part of a primary key does not break replication
6924 connection server_1;
6925 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
6926 connection server_2;
6927 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
6928 connection server_3;
6929 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
6930 connection server_1;
6931 SET SQL_LOG_BIN=1;
6932 connection server_2;
6933 SET SQL_LOG_BIN=1;
6934 connection server_3;
6935 SET SQL_LOG_BIN=1;
6936 connection server_1;
6937 INSERT INTO t VALUES (1, "a", 10);
6938 INSERT INTO t VALUES (2, "b", 20);
6939 INSERT INTO t VALUES (3, "c", 30);
6940 include/rpl_sync.inc
6941 connection server_1;
6942 UPDATE t SET c1=10 WHERE c2="a";
6943 UPDATE t SET c1=20 WHERE c1=2;
6944 UPDATE t SET c1=30 WHERE c3=30;
6945 UPDATE t SET c3=40 WHERE c1=30;
6946 include/rpl_sync.inc
6947 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6948 connection server_1;
6949 DELETE FROM t WHERE c2="a";
6950 DELETE FROM t WHERE c1=20;
6951 DELETE FROM t;
6952 include/rpl_sync.inc
6953 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
6954 connection server_1;
6955 DROP TABLE t;
6956 include/rpl_sync.inc
6957 CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
6958 connection server_1;
6959 SET SESSION binlog_row_image= 'FULL';
6960 SET GLOBAL binlog_row_image= 'FULL';
6961 FLUSH TABLES;
6962 SHOW VARIABLES LIKE 'binlog_row_image';
6963 Variable_name Value
6964 binlog_row_image FULL
6965 CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
6966 connection server_2;
6967 SET SESSION binlog_row_image= 'FULL';
6968 SET GLOBAL binlog_row_image= 'FULL';
6969 include/stop_slave.inc
6970 include/start_slave.inc
6971 FLUSH TABLES;
6972 SHOW VARIABLES LIKE 'binlog_row_image';
6973 Variable_name Value
6974 binlog_row_image FULL
6975 CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
6976 connection server_3;
6977 SET SESSION binlog_row_image= 'FULL';
6978 SET GLOBAL binlog_row_image= 'FULL';
6979 include/stop_slave.inc
6980 include/start_slave.inc
6981 FLUSH TABLES;
6982 SHOW VARIABLES LIKE 'binlog_row_image';
6983 Variable_name Value
6984 binlog_row_image FULL
6985 connection server_1;
6986 ### engines: MyISAM, MyISAM, MyISAM
6987 connection server_1;
6988 connection server_1;
6989 SET SQL_LOG_BIN=0;
6990 connection server_2;
6991 SET SQL_LOG_BIN=0;
6992 connection server_3;
6993 SET SQL_LOG_BIN=0;
6994 ### Asserts that updates without blobs in the AI (they are not updated)
6995 ### will not break replication (check when there is no key in the table)
6996 connection server_1;
6997 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
6998 connection server_2;
6999 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
7000 connection server_3;
7001 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
7002 connection server_1;
7003 SET SQL_LOG_BIN=1;
7004 connection server_2;
7005 SET SQL_LOG_BIN=1;
7006 connection server_3;
7007 SET SQL_LOG_BIN=1;
7008 connection server_1;
7009 INSERT INTO t VALUES (1, "a", 10);
7010 INSERT INTO t VALUES (2, "b", 20);
7011 INSERT INTO t VALUES (3, "c", 30);
7012 include/rpl_sync.inc
7013 connection server_1;
7014 UPDATE t SET c1=10 WHERE c2="a";
7015 UPDATE t SET c1=20 WHERE c1=2;
7016 UPDATE t SET c1=30 WHERE c3=30;
7017 UPDATE t SET c3=40 WHERE c1=30;
7018 include/rpl_sync.inc
7019 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7020 connection server_1;
7021 DELETE FROM t WHERE c2="a";
7022 DELETE FROM t WHERE c1=20;
7023 DELETE FROM t;
7024 include/rpl_sync.inc
7025 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7026 connection server_1;
7027 DROP TABLE t;
7028 include/rpl_sync.inc
7029 connection server_1;
7030 SET SQL_LOG_BIN=0;
7031 connection server_2;
7032 SET SQL_LOG_BIN=0;
7033 connection server_3;
7034 SET SQL_LOG_BIN=0;
7035 ### Asserts that updates without blobs in the AI (they are not updated)
7036 ### will not break replication (check even if there is a key in the table)
7037 connection server_1;
7038 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
7039 connection server_2;
7040 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
7041 connection server_3;
7042 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
7043 connection server_1;
7044 SET SQL_LOG_BIN=1;
7045 connection server_2;
7046 SET SQL_LOG_BIN=1;
7047 connection server_3;
7048 SET SQL_LOG_BIN=1;
7049 connection server_1;
7050 INSERT INTO t VALUES (1, "a", 10);
7051 INSERT INTO t VALUES (2, "b", 20);
7052 INSERT INTO t VALUES (3, "c", 30);
7053 include/rpl_sync.inc
7054 connection server_1;
7055 UPDATE t SET c1=10 WHERE c2="a";
7056 UPDATE t SET c1=20 WHERE c1=2;
7057 UPDATE t SET c1=30 WHERE c3=30;
7058 UPDATE t SET c3=40 WHERE c1=30;
7059 include/rpl_sync.inc
7060 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7061 connection server_1;
7062 DELETE FROM t WHERE c2="a";
7063 DELETE FROM t WHERE c1=20;
7064 DELETE FROM t;
7065 include/rpl_sync.inc
7066 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7067 connection server_1;
7068 DROP TABLE t;
7069 include/rpl_sync.inc
7070 connection server_1;
7071 SET SQL_LOG_BIN=0;
7072 connection server_2;
7073 SET SQL_LOG_BIN=0;
7074 connection server_3;
7075 SET SQL_LOG_BIN=0;
7076 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
7077 ### will not break replication
7078 connection server_1;
7079 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
7080 connection server_2;
7081 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
7082 connection server_3;
7083 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
7084 connection server_1;
7085 SET SQL_LOG_BIN=1;
7086 connection server_2;
7087 SET SQL_LOG_BIN=1;
7088 connection server_3;
7089 SET SQL_LOG_BIN=1;
7090 connection server_1;
7091 INSERT INTO t VALUES (1, "a", 10);
7092 INSERT INTO t VALUES (2, "b", 20);
7093 INSERT INTO t VALUES (3, "c", 30);
7094 include/rpl_sync.inc
7095 connection server_1;
7096 UPDATE t SET c1=10 WHERE c2="a";
7097 UPDATE t SET c1=20 WHERE c1=2;
7098 UPDATE t SET c1=30 WHERE c3=30;
7099 UPDATE t SET c3=40 WHERE c1=30;
7100 include/rpl_sync.inc
7101 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7102 connection server_1;
7103 DELETE FROM t WHERE c2="a";
7104 DELETE FROM t WHERE c1=20;
7105 DELETE FROM t;
7106 include/rpl_sync.inc
7107 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7108 connection server_1;
7109 DROP TABLE t;
7110 include/rpl_sync.inc
7111 connection server_1;
7112 SET SQL_LOG_BIN=0;
7113 connection server_2;
7114 SET SQL_LOG_BIN=0;
7115 connection server_3;
7116 SET SQL_LOG_BIN=0;
7117 ### Asserts that updates without blobs in the BI (PK exists int the table)
7118 ### will not break replication
7119 connection server_1;
7120 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
7121 connection server_2;
7122 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
7123 connection server_3;
7124 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
7125 connection server_1;
7126 SET SQL_LOG_BIN=1;
7127 connection server_2;
7128 SET SQL_LOG_BIN=1;
7129 connection server_3;
7130 SET SQL_LOG_BIN=1;
7131 connection server_1;
7132 INSERT INTO t VALUES (1, "a", 10);
7133 INSERT INTO t VALUES (2, "b", 20);
7134 INSERT INTO t VALUES (3, "c", 30);
7135 include/rpl_sync.inc
7136 connection server_1;
7137 UPDATE t SET c1=10 WHERE c2="a";
7138 UPDATE t SET c1=20 WHERE c1=2;
7139 UPDATE t SET c1=30 WHERE c3=30;
7140 UPDATE t SET c3=40 WHERE c1=30;
7141 include/rpl_sync.inc
7142 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7143 connection server_1;
7144 DELETE FROM t WHERE c2="a";
7145 DELETE FROM t WHERE c1=20;
7146 DELETE FROM t;
7147 include/rpl_sync.inc
7148 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7149 connection server_1;
7150 DROP TABLE t;
7151 include/rpl_sync.inc
7152 connection server_1;
7153 SET SQL_LOG_BIN=0;
7154 connection server_2;
7155 SET SQL_LOG_BIN=0;
7156 connection server_3;
7157 SET SQL_LOG_BIN=0;
7158 ### Asserts that declaring a blob in a key does not break replication
7159 connection server_1;
7160 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
7161 connection server_2;
7162 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
7163 connection server_3;
7164 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
7165 connection server_1;
7166 SET SQL_LOG_BIN=1;
7167 connection server_2;
7168 SET SQL_LOG_BIN=1;
7169 connection server_3;
7170 SET SQL_LOG_BIN=1;
7171 connection server_1;
7172 INSERT INTO t VALUES (1, "a", 10);
7173 INSERT INTO t VALUES (2, "b", 20);
7174 INSERT INTO t VALUES (3, "c", 30);
7175 include/rpl_sync.inc
7176 connection server_1;
7177 UPDATE t SET c1=10 WHERE c2="a";
7178 UPDATE t SET c1=20 WHERE c1=2;
7179 UPDATE t SET c1=30 WHERE c3=30;
7180 UPDATE t SET c3=40 WHERE c1=30;
7181 include/rpl_sync.inc
7182 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7183 connection server_1;
7184 DELETE FROM t WHERE c2="a";
7185 DELETE FROM t WHERE c1=20;
7186 DELETE FROM t;
7187 include/rpl_sync.inc
7188 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7189 connection server_1;
7190 DROP TABLE t;
7191 include/rpl_sync.inc
7192 connection server_1;
7193 SET SQL_LOG_BIN=0;
7194 connection server_2;
7195 SET SQL_LOG_BIN=0;
7196 connection server_3;
7197 SET SQL_LOG_BIN=0;
7198 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
7199 connection server_1;
7200 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
7201 connection server_2;
7202 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
7203 connection server_3;
7204 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
7205 connection server_1;
7206 SET SQL_LOG_BIN=1;
7207 connection server_2;
7208 SET SQL_LOG_BIN=1;
7209 connection server_3;
7210 SET SQL_LOG_BIN=1;
7211 connection server_1;
7212 INSERT INTO t VALUES (1, "a", 10);
7213 INSERT INTO t VALUES (2, "b", 20);
7214 INSERT INTO t VALUES (3, "c", 30);
7215 include/rpl_sync.inc
7216 connection server_1;
7217 UPDATE t SET c1=10 WHERE c2="a";
7218 UPDATE t SET c1=20 WHERE c1=2;
7219 UPDATE t SET c1=30 WHERE c3=30;
7220 UPDATE t SET c3=40 WHERE c1=30;
7221 include/rpl_sync.inc
7222 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7223 connection server_1;
7224 DELETE FROM t WHERE c2="a";
7225 DELETE FROM t WHERE c1=20;
7226 DELETE FROM t;
7227 include/rpl_sync.inc
7228 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7229 connection server_1;
7230 DROP TABLE t;
7231 include/rpl_sync.inc
7232 connection server_1;
7233 SET SQL_LOG_BIN=0;
7234 connection server_2;
7235 SET SQL_LOG_BIN=0;
7236 connection server_3;
7237 SET SQL_LOG_BIN=0;
7238 ### Asserts that declaring a blob as part of a primary key does not break replication
7239 connection server_1;
7240 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
7241 connection server_2;
7242 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
7243 connection server_3;
7244 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
7245 connection server_1;
7246 SET SQL_LOG_BIN=1;
7247 connection server_2;
7248 SET SQL_LOG_BIN=1;
7249 connection server_3;
7250 SET SQL_LOG_BIN=1;
7251 connection server_1;
7252 INSERT INTO t VALUES (1, "a", 10);
7253 INSERT INTO t VALUES (2, "b", 20);
7254 INSERT INTO t VALUES (3, "c", 30);
7255 include/rpl_sync.inc
7256 connection server_1;
7257 UPDATE t SET c1=10 WHERE c2="a";
7258 UPDATE t SET c1=20 WHERE c1=2;
7259 UPDATE t SET c1=30 WHERE c3=30;
7260 UPDATE t SET c3=40 WHERE c1=30;
7261 include/rpl_sync.inc
7262 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7263 connection server_1;
7264 DELETE FROM t WHERE c2="a";
7265 DELETE FROM t WHERE c1=20;
7266 DELETE FROM t;
7267 include/rpl_sync.inc
7268 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7269 connection server_1;
7270 DROP TABLE t;
7271 include/rpl_sync.inc
7272 ### engines: MyISAM, MyISAM, InnoDB
7273 connection server_1;
7274 connection server_1;
7275 SET SQL_LOG_BIN=0;
7276 connection server_2;
7277 SET SQL_LOG_BIN=0;
7278 connection server_3;
7279 SET SQL_LOG_BIN=0;
7280 ### Asserts that updates without blobs in the AI (they are not updated)
7281 ### will not break replication (check when there is no key in the table)
7282 connection server_1;
7283 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
7284 connection server_2;
7285 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
7286 connection server_3;
7287 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
7288 connection server_1;
7289 SET SQL_LOG_BIN=1;
7290 connection server_2;
7291 SET SQL_LOG_BIN=1;
7292 connection server_3;
7293 SET SQL_LOG_BIN=1;
7294 connection server_1;
7295 INSERT INTO t VALUES (1, "a", 10);
7296 INSERT INTO t VALUES (2, "b", 20);
7297 INSERT INTO t VALUES (3, "c", 30);
7298 include/rpl_sync.inc
7299 connection server_1;
7300 UPDATE t SET c1=10 WHERE c2="a";
7301 UPDATE t SET c1=20 WHERE c1=2;
7302 UPDATE t SET c1=30 WHERE c3=30;
7303 UPDATE t SET c3=40 WHERE c1=30;
7304 include/rpl_sync.inc
7305 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7306 connection server_1;
7307 DELETE FROM t WHERE c2="a";
7308 DELETE FROM t WHERE c1=20;
7309 DELETE FROM t;
7310 include/rpl_sync.inc
7311 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7312 connection server_1;
7313 DROP TABLE t;
7314 include/rpl_sync.inc
7315 connection server_1;
7316 SET SQL_LOG_BIN=0;
7317 connection server_2;
7318 SET SQL_LOG_BIN=0;
7319 connection server_3;
7320 SET SQL_LOG_BIN=0;
7321 ### Asserts that updates without blobs in the AI (they are not updated)
7322 ### will not break replication (check even if there is a key in the table)
7323 connection server_1;
7324 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
7325 connection server_2;
7326 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
7327 connection server_3;
7328 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
7329 connection server_1;
7330 SET SQL_LOG_BIN=1;
7331 connection server_2;
7332 SET SQL_LOG_BIN=1;
7333 connection server_3;
7334 SET SQL_LOG_BIN=1;
7335 connection server_1;
7336 INSERT INTO t VALUES (1, "a", 10);
7337 INSERT INTO t VALUES (2, "b", 20);
7338 INSERT INTO t VALUES (3, "c", 30);
7339 include/rpl_sync.inc
7340 connection server_1;
7341 UPDATE t SET c1=10 WHERE c2="a";
7342 UPDATE t SET c1=20 WHERE c1=2;
7343 UPDATE t SET c1=30 WHERE c3=30;
7344 UPDATE t SET c3=40 WHERE c1=30;
7345 include/rpl_sync.inc
7346 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7347 connection server_1;
7348 DELETE FROM t WHERE c2="a";
7349 DELETE FROM t WHERE c1=20;
7350 DELETE FROM t;
7351 include/rpl_sync.inc
7352 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7353 connection server_1;
7354 DROP TABLE t;
7355 include/rpl_sync.inc
7356 connection server_1;
7357 SET SQL_LOG_BIN=0;
7358 connection server_2;
7359 SET SQL_LOG_BIN=0;
7360 connection server_3;
7361 SET SQL_LOG_BIN=0;
7362 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
7363 ### will not break replication
7364 connection server_1;
7365 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
7366 connection server_2;
7367 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
7368 connection server_3;
7369 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
7370 connection server_1;
7371 SET SQL_LOG_BIN=1;
7372 connection server_2;
7373 SET SQL_LOG_BIN=1;
7374 connection server_3;
7375 SET SQL_LOG_BIN=1;
7376 connection server_1;
7377 INSERT INTO t VALUES (1, "a", 10);
7378 INSERT INTO t VALUES (2, "b", 20);
7379 INSERT INTO t VALUES (3, "c", 30);
7380 include/rpl_sync.inc
7381 connection server_1;
7382 UPDATE t SET c1=10 WHERE c2="a";
7383 UPDATE t SET c1=20 WHERE c1=2;
7384 UPDATE t SET c1=30 WHERE c3=30;
7385 UPDATE t SET c3=40 WHERE c1=30;
7386 include/rpl_sync.inc
7387 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7388 connection server_1;
7389 DELETE FROM t WHERE c2="a";
7390 DELETE FROM t WHERE c1=20;
7391 DELETE FROM t;
7392 include/rpl_sync.inc
7393 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7394 connection server_1;
7395 DROP TABLE t;
7396 include/rpl_sync.inc
7397 connection server_1;
7398 SET SQL_LOG_BIN=0;
7399 connection server_2;
7400 SET SQL_LOG_BIN=0;
7401 connection server_3;
7402 SET SQL_LOG_BIN=0;
7403 ### Asserts that updates without blobs in the BI (PK exists int the table)
7404 ### will not break replication
7405 connection server_1;
7406 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
7407 connection server_2;
7408 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
7409 connection server_3;
7410 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
7411 connection server_1;
7412 SET SQL_LOG_BIN=1;
7413 connection server_2;
7414 SET SQL_LOG_BIN=1;
7415 connection server_3;
7416 SET SQL_LOG_BIN=1;
7417 connection server_1;
7418 INSERT INTO t VALUES (1, "a", 10);
7419 INSERT INTO t VALUES (2, "b", 20);
7420 INSERT INTO t VALUES (3, "c", 30);
7421 include/rpl_sync.inc
7422 connection server_1;
7423 UPDATE t SET c1=10 WHERE c2="a";
7424 UPDATE t SET c1=20 WHERE c1=2;
7425 UPDATE t SET c1=30 WHERE c3=30;
7426 UPDATE t SET c3=40 WHERE c1=30;
7427 include/rpl_sync.inc
7428 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7429 connection server_1;
7430 DELETE FROM t WHERE c2="a";
7431 DELETE FROM t WHERE c1=20;
7432 DELETE FROM t;
7433 include/rpl_sync.inc
7434 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7435 connection server_1;
7436 DROP TABLE t;
7437 include/rpl_sync.inc
7438 connection server_1;
7439 SET SQL_LOG_BIN=0;
7440 connection server_2;
7441 SET SQL_LOG_BIN=0;
7442 connection server_3;
7443 SET SQL_LOG_BIN=0;
7444 ### Asserts that declaring a blob in a key does not break replication
7445 connection server_1;
7446 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
7447 connection server_2;
7448 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
7449 connection server_3;
7450 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
7451 connection server_1;
7452 SET SQL_LOG_BIN=1;
7453 connection server_2;
7454 SET SQL_LOG_BIN=1;
7455 connection server_3;
7456 SET SQL_LOG_BIN=1;
7457 connection server_1;
7458 INSERT INTO t VALUES (1, "a", 10);
7459 INSERT INTO t VALUES (2, "b", 20);
7460 INSERT INTO t VALUES (3, "c", 30);
7461 include/rpl_sync.inc
7462 connection server_1;
7463 UPDATE t SET c1=10 WHERE c2="a";
7464 UPDATE t SET c1=20 WHERE c1=2;
7465 UPDATE t SET c1=30 WHERE c3=30;
7466 UPDATE t SET c3=40 WHERE c1=30;
7467 include/rpl_sync.inc
7468 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7469 connection server_1;
7470 DELETE FROM t WHERE c2="a";
7471 DELETE FROM t WHERE c1=20;
7472 DELETE FROM t;
7473 include/rpl_sync.inc
7474 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7475 connection server_1;
7476 DROP TABLE t;
7477 include/rpl_sync.inc
7478 connection server_1;
7479 SET SQL_LOG_BIN=0;
7480 connection server_2;
7481 SET SQL_LOG_BIN=0;
7482 connection server_3;
7483 SET SQL_LOG_BIN=0;
7484 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
7485 connection server_1;
7486 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
7487 connection server_2;
7488 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
7489 connection server_3;
7490 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
7491 connection server_1;
7492 SET SQL_LOG_BIN=1;
7493 connection server_2;
7494 SET SQL_LOG_BIN=1;
7495 connection server_3;
7496 SET SQL_LOG_BIN=1;
7497 connection server_1;
7498 INSERT INTO t VALUES (1, "a", 10);
7499 INSERT INTO t VALUES (2, "b", 20);
7500 INSERT INTO t VALUES (3, "c", 30);
7501 include/rpl_sync.inc
7502 connection server_1;
7503 UPDATE t SET c1=10 WHERE c2="a";
7504 UPDATE t SET c1=20 WHERE c1=2;
7505 UPDATE t SET c1=30 WHERE c3=30;
7506 UPDATE t SET c3=40 WHERE c1=30;
7507 include/rpl_sync.inc
7508 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7509 connection server_1;
7510 DELETE FROM t WHERE c2="a";
7511 DELETE FROM t WHERE c1=20;
7512 DELETE FROM t;
7513 include/rpl_sync.inc
7514 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7515 connection server_1;
7516 DROP TABLE t;
7517 include/rpl_sync.inc
7518 connection server_1;
7519 SET SQL_LOG_BIN=0;
7520 connection server_2;
7521 SET SQL_LOG_BIN=0;
7522 connection server_3;
7523 SET SQL_LOG_BIN=0;
7524 ### Asserts that declaring a blob as part of a primary key does not break replication
7525 connection server_1;
7526 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
7527 connection server_2;
7528 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
7529 connection server_3;
7530 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
7531 connection server_1;
7532 SET SQL_LOG_BIN=1;
7533 connection server_2;
7534 SET SQL_LOG_BIN=1;
7535 connection server_3;
7536 SET SQL_LOG_BIN=1;
7537 connection server_1;
7538 INSERT INTO t VALUES (1, "a", 10);
7539 INSERT INTO t VALUES (2, "b", 20);
7540 INSERT INTO t VALUES (3, "c", 30);
7541 include/rpl_sync.inc
7542 connection server_1;
7543 UPDATE t SET c1=10 WHERE c2="a";
7544 UPDATE t SET c1=20 WHERE c1=2;
7545 UPDATE t SET c1=30 WHERE c3=30;
7546 UPDATE t SET c3=40 WHERE c1=30;
7547 include/rpl_sync.inc
7548 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7549 connection server_1;
7550 DELETE FROM t WHERE c2="a";
7551 DELETE FROM t WHERE c1=20;
7552 DELETE FROM t;
7553 include/rpl_sync.inc
7554 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7555 connection server_1;
7556 DROP TABLE t;
7557 include/rpl_sync.inc
7558 ### engines: MyISAM, InnoDB, MyISAM
7559 connection server_1;
7560 connection server_1;
7561 SET SQL_LOG_BIN=0;
7562 connection server_2;
7563 SET SQL_LOG_BIN=0;
7564 connection server_3;
7565 SET SQL_LOG_BIN=0;
7566 ### Asserts that updates without blobs in the AI (they are not updated)
7567 ### will not break replication (check when there is no key in the table)
7568 connection server_1;
7569 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
7570 connection server_2;
7571 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
7572 connection server_3;
7573 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
7574 connection server_1;
7575 SET SQL_LOG_BIN=1;
7576 connection server_2;
7577 SET SQL_LOG_BIN=1;
7578 connection server_3;
7579 SET SQL_LOG_BIN=1;
7580 connection server_1;
7581 INSERT INTO t VALUES (1, "a", 10);
7582 INSERT INTO t VALUES (2, "b", 20);
7583 INSERT INTO t VALUES (3, "c", 30);
7584 include/rpl_sync.inc
7585 connection server_1;
7586 UPDATE t SET c1=10 WHERE c2="a";
7587 UPDATE t SET c1=20 WHERE c1=2;
7588 UPDATE t SET c1=30 WHERE c3=30;
7589 UPDATE t SET c3=40 WHERE c1=30;
7590 include/rpl_sync.inc
7591 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7592 connection server_1;
7593 DELETE FROM t WHERE c2="a";
7594 DELETE FROM t WHERE c1=20;
7595 DELETE FROM t;
7596 include/rpl_sync.inc
7597 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7598 connection server_1;
7599 DROP TABLE t;
7600 include/rpl_sync.inc
7601 connection server_1;
7602 SET SQL_LOG_BIN=0;
7603 connection server_2;
7604 SET SQL_LOG_BIN=0;
7605 connection server_3;
7606 SET SQL_LOG_BIN=0;
7607 ### Asserts that updates without blobs in the AI (they are not updated)
7608 ### will not break replication (check even if there is a key in the table)
7609 connection server_1;
7610 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
7611 connection server_2;
7612 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
7613 connection server_3;
7614 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
7615 connection server_1;
7616 SET SQL_LOG_BIN=1;
7617 connection server_2;
7618 SET SQL_LOG_BIN=1;
7619 connection server_3;
7620 SET SQL_LOG_BIN=1;
7621 connection server_1;
7622 INSERT INTO t VALUES (1, "a", 10);
7623 INSERT INTO t VALUES (2, "b", 20);
7624 INSERT INTO t VALUES (3, "c", 30);
7625 include/rpl_sync.inc
7626 connection server_1;
7627 UPDATE t SET c1=10 WHERE c2="a";
7628 UPDATE t SET c1=20 WHERE c1=2;
7629 UPDATE t SET c1=30 WHERE c3=30;
7630 UPDATE t SET c3=40 WHERE c1=30;
7631 include/rpl_sync.inc
7632 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7633 connection server_1;
7634 DELETE FROM t WHERE c2="a";
7635 DELETE FROM t WHERE c1=20;
7636 DELETE FROM t;
7637 include/rpl_sync.inc
7638 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7639 connection server_1;
7640 DROP TABLE t;
7641 include/rpl_sync.inc
7642 connection server_1;
7643 SET SQL_LOG_BIN=0;
7644 connection server_2;
7645 SET SQL_LOG_BIN=0;
7646 connection server_3;
7647 SET SQL_LOG_BIN=0;
7648 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
7649 ### will not break replication
7650 connection server_1;
7651 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
7652 connection server_2;
7653 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
7654 connection server_3;
7655 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
7656 connection server_1;
7657 SET SQL_LOG_BIN=1;
7658 connection server_2;
7659 SET SQL_LOG_BIN=1;
7660 connection server_3;
7661 SET SQL_LOG_BIN=1;
7662 connection server_1;
7663 INSERT INTO t VALUES (1, "a", 10);
7664 INSERT INTO t VALUES (2, "b", 20);
7665 INSERT INTO t VALUES (3, "c", 30);
7666 include/rpl_sync.inc
7667 connection server_1;
7668 UPDATE t SET c1=10 WHERE c2="a";
7669 UPDATE t SET c1=20 WHERE c1=2;
7670 UPDATE t SET c1=30 WHERE c3=30;
7671 UPDATE t SET c3=40 WHERE c1=30;
7672 include/rpl_sync.inc
7673 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7674 connection server_1;
7675 DELETE FROM t WHERE c2="a";
7676 DELETE FROM t WHERE c1=20;
7677 DELETE FROM t;
7678 include/rpl_sync.inc
7679 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7680 connection server_1;
7681 DROP TABLE t;
7682 include/rpl_sync.inc
7683 connection server_1;
7684 SET SQL_LOG_BIN=0;
7685 connection server_2;
7686 SET SQL_LOG_BIN=0;
7687 connection server_3;
7688 SET SQL_LOG_BIN=0;
7689 ### Asserts that updates without blobs in the BI (PK exists int the table)
7690 ### will not break replication
7691 connection server_1;
7692 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
7693 connection server_2;
7694 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
7695 connection server_3;
7696 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
7697 connection server_1;
7698 SET SQL_LOG_BIN=1;
7699 connection server_2;
7700 SET SQL_LOG_BIN=1;
7701 connection server_3;
7702 SET SQL_LOG_BIN=1;
7703 connection server_1;
7704 INSERT INTO t VALUES (1, "a", 10);
7705 INSERT INTO t VALUES (2, "b", 20);
7706 INSERT INTO t VALUES (3, "c", 30);
7707 include/rpl_sync.inc
7708 connection server_1;
7709 UPDATE t SET c1=10 WHERE c2="a";
7710 UPDATE t SET c1=20 WHERE c1=2;
7711 UPDATE t SET c1=30 WHERE c3=30;
7712 UPDATE t SET c3=40 WHERE c1=30;
7713 include/rpl_sync.inc
7714 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7715 connection server_1;
7716 DELETE FROM t WHERE c2="a";
7717 DELETE FROM t WHERE c1=20;
7718 DELETE FROM t;
7719 include/rpl_sync.inc
7720 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7721 connection server_1;
7722 DROP TABLE t;
7723 include/rpl_sync.inc
7724 connection server_1;
7725 SET SQL_LOG_BIN=0;
7726 connection server_2;
7727 SET SQL_LOG_BIN=0;
7728 connection server_3;
7729 SET SQL_LOG_BIN=0;
7730 ### Asserts that declaring a blob in a key does not break replication
7731 connection server_1;
7732 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
7733 connection server_2;
7734 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
7735 connection server_3;
7736 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
7737 connection server_1;
7738 SET SQL_LOG_BIN=1;
7739 connection server_2;
7740 SET SQL_LOG_BIN=1;
7741 connection server_3;
7742 SET SQL_LOG_BIN=1;
7743 connection server_1;
7744 INSERT INTO t VALUES (1, "a", 10);
7745 INSERT INTO t VALUES (2, "b", 20);
7746 INSERT INTO t VALUES (3, "c", 30);
7747 include/rpl_sync.inc
7748 connection server_1;
7749 UPDATE t SET c1=10 WHERE c2="a";
7750 UPDATE t SET c1=20 WHERE c1=2;
7751 UPDATE t SET c1=30 WHERE c3=30;
7752 UPDATE t SET c3=40 WHERE c1=30;
7753 include/rpl_sync.inc
7754 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7755 connection server_1;
7756 DELETE FROM t WHERE c2="a";
7757 DELETE FROM t WHERE c1=20;
7758 DELETE FROM t;
7759 include/rpl_sync.inc
7760 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7761 connection server_1;
7762 DROP TABLE t;
7763 include/rpl_sync.inc
7764 connection server_1;
7765 SET SQL_LOG_BIN=0;
7766 connection server_2;
7767 SET SQL_LOG_BIN=0;
7768 connection server_3;
7769 SET SQL_LOG_BIN=0;
7770 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
7771 connection server_1;
7772 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
7773 connection server_2;
7774 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
7775 connection server_3;
7776 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
7777 connection server_1;
7778 SET SQL_LOG_BIN=1;
7779 connection server_2;
7780 SET SQL_LOG_BIN=1;
7781 connection server_3;
7782 SET SQL_LOG_BIN=1;
7783 connection server_1;
7784 INSERT INTO t VALUES (1, "a", 10);
7785 INSERT INTO t VALUES (2, "b", 20);
7786 INSERT INTO t VALUES (3, "c", 30);
7787 include/rpl_sync.inc
7788 connection server_1;
7789 UPDATE t SET c1=10 WHERE c2="a";
7790 UPDATE t SET c1=20 WHERE c1=2;
7791 UPDATE t SET c1=30 WHERE c3=30;
7792 UPDATE t SET c3=40 WHERE c1=30;
7793 include/rpl_sync.inc
7794 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7795 connection server_1;
7796 DELETE FROM t WHERE c2="a";
7797 DELETE FROM t WHERE c1=20;
7798 DELETE FROM t;
7799 include/rpl_sync.inc
7800 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7801 connection server_1;
7802 DROP TABLE t;
7803 include/rpl_sync.inc
7804 connection server_1;
7805 SET SQL_LOG_BIN=0;
7806 connection server_2;
7807 SET SQL_LOG_BIN=0;
7808 connection server_3;
7809 SET SQL_LOG_BIN=0;
7810 ### Asserts that declaring a blob as part of a primary key does not break replication
7811 connection server_1;
7812 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
7813 connection server_2;
7814 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
7815 connection server_3;
7816 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
7817 connection server_1;
7818 SET SQL_LOG_BIN=1;
7819 connection server_2;
7820 SET SQL_LOG_BIN=1;
7821 connection server_3;
7822 SET SQL_LOG_BIN=1;
7823 connection server_1;
7824 INSERT INTO t VALUES (1, "a", 10);
7825 INSERT INTO t VALUES (2, "b", 20);
7826 INSERT INTO t VALUES (3, "c", 30);
7827 include/rpl_sync.inc
7828 connection server_1;
7829 UPDATE t SET c1=10 WHERE c2="a";
7830 UPDATE t SET c1=20 WHERE c1=2;
7831 UPDATE t SET c1=30 WHERE c3=30;
7832 UPDATE t SET c3=40 WHERE c1=30;
7833 include/rpl_sync.inc
7834 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7835 connection server_1;
7836 DELETE FROM t WHERE c2="a";
7837 DELETE FROM t WHERE c1=20;
7838 DELETE FROM t;
7839 include/rpl_sync.inc
7840 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7841 connection server_1;
7842 DROP TABLE t;
7843 include/rpl_sync.inc
7844 ### engines: MyISAM, InnoDB, InnoDB
7845 connection server_1;
7846 connection server_1;
7847 SET SQL_LOG_BIN=0;
7848 connection server_2;
7849 SET SQL_LOG_BIN=0;
7850 connection server_3;
7851 SET SQL_LOG_BIN=0;
7852 ### Asserts that updates without blobs in the AI (they are not updated)
7853 ### will not break replication (check when there is no key in the table)
7854 connection server_1;
7855 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
7856 connection server_2;
7857 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
7858 connection server_3;
7859 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
7860 connection server_1;
7861 SET SQL_LOG_BIN=1;
7862 connection server_2;
7863 SET SQL_LOG_BIN=1;
7864 connection server_3;
7865 SET SQL_LOG_BIN=1;
7866 connection server_1;
7867 INSERT INTO t VALUES (1, "a", 10);
7868 INSERT INTO t VALUES (2, "b", 20);
7869 INSERT INTO t VALUES (3, "c", 30);
7870 include/rpl_sync.inc
7871 connection server_1;
7872 UPDATE t SET c1=10 WHERE c2="a";
7873 UPDATE t SET c1=20 WHERE c1=2;
7874 UPDATE t SET c1=30 WHERE c3=30;
7875 UPDATE t SET c3=40 WHERE c1=30;
7876 include/rpl_sync.inc
7877 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7878 connection server_1;
7879 DELETE FROM t WHERE c2="a";
7880 DELETE FROM t WHERE c1=20;
7881 DELETE FROM t;
7882 include/rpl_sync.inc
7883 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7884 connection server_1;
7885 DROP TABLE t;
7886 include/rpl_sync.inc
7887 connection server_1;
7888 SET SQL_LOG_BIN=0;
7889 connection server_2;
7890 SET SQL_LOG_BIN=0;
7891 connection server_3;
7892 SET SQL_LOG_BIN=0;
7893 ### Asserts that updates without blobs in the AI (they are not updated)
7894 ### will not break replication (check even if there is a key in the table)
7895 connection server_1;
7896 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
7897 connection server_2;
7898 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
7899 connection server_3;
7900 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
7901 connection server_1;
7902 SET SQL_LOG_BIN=1;
7903 connection server_2;
7904 SET SQL_LOG_BIN=1;
7905 connection server_3;
7906 SET SQL_LOG_BIN=1;
7907 connection server_1;
7908 INSERT INTO t VALUES (1, "a", 10);
7909 INSERT INTO t VALUES (2, "b", 20);
7910 INSERT INTO t VALUES (3, "c", 30);
7911 include/rpl_sync.inc
7912 connection server_1;
7913 UPDATE t SET c1=10 WHERE c2="a";
7914 UPDATE t SET c1=20 WHERE c1=2;
7915 UPDATE t SET c1=30 WHERE c3=30;
7916 UPDATE t SET c3=40 WHERE c1=30;
7917 include/rpl_sync.inc
7918 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7919 connection server_1;
7920 DELETE FROM t WHERE c2="a";
7921 DELETE FROM t WHERE c1=20;
7922 DELETE FROM t;
7923 include/rpl_sync.inc
7924 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7925 connection server_1;
7926 DROP TABLE t;
7927 include/rpl_sync.inc
7928 connection server_1;
7929 SET SQL_LOG_BIN=0;
7930 connection server_2;
7931 SET SQL_LOG_BIN=0;
7932 connection server_3;
7933 SET SQL_LOG_BIN=0;
7934 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
7935 ### will not break replication
7936 connection server_1;
7937 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
7938 connection server_2;
7939 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
7940 connection server_3;
7941 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
7942 connection server_1;
7943 SET SQL_LOG_BIN=1;
7944 connection server_2;
7945 SET SQL_LOG_BIN=1;
7946 connection server_3;
7947 SET SQL_LOG_BIN=1;
7948 connection server_1;
7949 INSERT INTO t VALUES (1, "a", 10);
7950 INSERT INTO t VALUES (2, "b", 20);
7951 INSERT INTO t VALUES (3, "c", 30);
7952 include/rpl_sync.inc
7953 connection server_1;
7954 UPDATE t SET c1=10 WHERE c2="a";
7955 UPDATE t SET c1=20 WHERE c1=2;
7956 UPDATE t SET c1=30 WHERE c3=30;
7957 UPDATE t SET c3=40 WHERE c1=30;
7958 include/rpl_sync.inc
7959 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7960 connection server_1;
7961 DELETE FROM t WHERE c2="a";
7962 DELETE FROM t WHERE c1=20;
7963 DELETE FROM t;
7964 include/rpl_sync.inc
7965 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
7966 connection server_1;
7967 DROP TABLE t;
7968 include/rpl_sync.inc
7969 connection server_1;
7970 SET SQL_LOG_BIN=0;
7971 connection server_2;
7972 SET SQL_LOG_BIN=0;
7973 connection server_3;
7974 SET SQL_LOG_BIN=0;
7975 ### Asserts that updates without blobs in the BI (PK exists int the table)
7976 ### will not break replication
7977 connection server_1;
7978 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
7979 connection server_2;
7980 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
7981 connection server_3;
7982 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
7983 connection server_1;
7984 SET SQL_LOG_BIN=1;
7985 connection server_2;
7986 SET SQL_LOG_BIN=1;
7987 connection server_3;
7988 SET SQL_LOG_BIN=1;
7989 connection server_1;
7990 INSERT INTO t VALUES (1, "a", 10);
7991 INSERT INTO t VALUES (2, "b", 20);
7992 INSERT INTO t VALUES (3, "c", 30);
7993 include/rpl_sync.inc
7994 connection server_1;
7995 UPDATE t SET c1=10 WHERE c2="a";
7996 UPDATE t SET c1=20 WHERE c1=2;
7997 UPDATE t SET c1=30 WHERE c3=30;
7998 UPDATE t SET c3=40 WHERE c1=30;
7999 include/rpl_sync.inc
8000 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8001 connection server_1;
8002 DELETE FROM t WHERE c2="a";
8003 DELETE FROM t WHERE c1=20;
8004 DELETE FROM t;
8005 include/rpl_sync.inc
8006 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8007 connection server_1;
8008 DROP TABLE t;
8009 include/rpl_sync.inc
8010 connection server_1;
8011 SET SQL_LOG_BIN=0;
8012 connection server_2;
8013 SET SQL_LOG_BIN=0;
8014 connection server_3;
8015 SET SQL_LOG_BIN=0;
8016 ### Asserts that declaring a blob in a key does not break replication
8017 connection server_1;
8018 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
8019 connection server_2;
8020 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
8021 connection server_3;
8022 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
8023 connection server_1;
8024 SET SQL_LOG_BIN=1;
8025 connection server_2;
8026 SET SQL_LOG_BIN=1;
8027 connection server_3;
8028 SET SQL_LOG_BIN=1;
8029 connection server_1;
8030 INSERT INTO t VALUES (1, "a", 10);
8031 INSERT INTO t VALUES (2, "b", 20);
8032 INSERT INTO t VALUES (3, "c", 30);
8033 include/rpl_sync.inc
8034 connection server_1;
8035 UPDATE t SET c1=10 WHERE c2="a";
8036 UPDATE t SET c1=20 WHERE c1=2;
8037 UPDATE t SET c1=30 WHERE c3=30;
8038 UPDATE t SET c3=40 WHERE c1=30;
8039 include/rpl_sync.inc
8040 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8041 connection server_1;
8042 DELETE FROM t WHERE c2="a";
8043 DELETE FROM t WHERE c1=20;
8044 DELETE FROM t;
8045 include/rpl_sync.inc
8046 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8047 connection server_1;
8048 DROP TABLE t;
8049 include/rpl_sync.inc
8050 connection server_1;
8051 SET SQL_LOG_BIN=0;
8052 connection server_2;
8053 SET SQL_LOG_BIN=0;
8054 connection server_3;
8055 SET SQL_LOG_BIN=0;
8056 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
8057 connection server_1;
8058 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
8059 connection server_2;
8060 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
8061 connection server_3;
8062 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
8063 connection server_1;
8064 SET SQL_LOG_BIN=1;
8065 connection server_2;
8066 SET SQL_LOG_BIN=1;
8067 connection server_3;
8068 SET SQL_LOG_BIN=1;
8069 connection server_1;
8070 INSERT INTO t VALUES (1, "a", 10);
8071 INSERT INTO t VALUES (2, "b", 20);
8072 INSERT INTO t VALUES (3, "c", 30);
8073 include/rpl_sync.inc
8074 connection server_1;
8075 UPDATE t SET c1=10 WHERE c2="a";
8076 UPDATE t SET c1=20 WHERE c1=2;
8077 UPDATE t SET c1=30 WHERE c3=30;
8078 UPDATE t SET c3=40 WHERE c1=30;
8079 include/rpl_sync.inc
8080 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8081 connection server_1;
8082 DELETE FROM t WHERE c2="a";
8083 DELETE FROM t WHERE c1=20;
8084 DELETE FROM t;
8085 include/rpl_sync.inc
8086 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8087 connection server_1;
8088 DROP TABLE t;
8089 include/rpl_sync.inc
8090 connection server_1;
8091 SET SQL_LOG_BIN=0;
8092 connection server_2;
8093 SET SQL_LOG_BIN=0;
8094 connection server_3;
8095 SET SQL_LOG_BIN=0;
8096 ### Asserts that declaring a blob as part of a primary key does not break replication
8097 connection server_1;
8098 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
8099 connection server_2;
8100 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
8101 connection server_3;
8102 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
8103 connection server_1;
8104 SET SQL_LOG_BIN=1;
8105 connection server_2;
8106 SET SQL_LOG_BIN=1;
8107 connection server_3;
8108 SET SQL_LOG_BIN=1;
8109 connection server_1;
8110 INSERT INTO t VALUES (1, "a", 10);
8111 INSERT INTO t VALUES (2, "b", 20);
8112 INSERT INTO t VALUES (3, "c", 30);
8113 include/rpl_sync.inc
8114 connection server_1;
8115 UPDATE t SET c1=10 WHERE c2="a";
8116 UPDATE t SET c1=20 WHERE c1=2;
8117 UPDATE t SET c1=30 WHERE c3=30;
8118 UPDATE t SET c3=40 WHERE c1=30;
8119 include/rpl_sync.inc
8120 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8121 connection server_1;
8122 DELETE FROM t WHERE c2="a";
8123 DELETE FROM t WHERE c1=20;
8124 DELETE FROM t;
8125 include/rpl_sync.inc
8126 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8127 connection server_1;
8128 DROP TABLE t;
8129 include/rpl_sync.inc
8130 ### engines: InnoDB, MyISAM, MyISAM
8131 connection server_1;
8132 connection server_1;
8133 SET SQL_LOG_BIN=0;
8134 connection server_2;
8135 SET SQL_LOG_BIN=0;
8136 connection server_3;
8137 SET SQL_LOG_BIN=0;
8138 ### Asserts that updates without blobs in the AI (they are not updated)
8139 ### will not break replication (check when there is no key in the table)
8140 connection server_1;
8141 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
8142 connection server_2;
8143 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
8144 connection server_3;
8145 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
8146 connection server_1;
8147 SET SQL_LOG_BIN=1;
8148 connection server_2;
8149 SET SQL_LOG_BIN=1;
8150 connection server_3;
8151 SET SQL_LOG_BIN=1;
8152 connection server_1;
8153 INSERT INTO t VALUES (1, "a", 10);
8154 INSERT INTO t VALUES (2, "b", 20);
8155 INSERT INTO t VALUES (3, "c", 30);
8156 include/rpl_sync.inc
8157 connection server_1;
8158 UPDATE t SET c1=10 WHERE c2="a";
8159 UPDATE t SET c1=20 WHERE c1=2;
8160 UPDATE t SET c1=30 WHERE c3=30;
8161 UPDATE t SET c3=40 WHERE c1=30;
8162 include/rpl_sync.inc
8163 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8164 connection server_1;
8165 DELETE FROM t WHERE c2="a";
8166 DELETE FROM t WHERE c1=20;
8167 DELETE FROM t;
8168 include/rpl_sync.inc
8169 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8170 connection server_1;
8171 DROP TABLE t;
8172 include/rpl_sync.inc
8173 connection server_1;
8174 SET SQL_LOG_BIN=0;
8175 connection server_2;
8176 SET SQL_LOG_BIN=0;
8177 connection server_3;
8178 SET SQL_LOG_BIN=0;
8179 ### Asserts that updates without blobs in the AI (they are not updated)
8180 ### will not break replication (check even if there is a key in the table)
8181 connection server_1;
8182 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
8183 connection server_2;
8184 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
8185 connection server_3;
8186 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
8187 connection server_1;
8188 SET SQL_LOG_BIN=1;
8189 connection server_2;
8190 SET SQL_LOG_BIN=1;
8191 connection server_3;
8192 SET SQL_LOG_BIN=1;
8193 connection server_1;
8194 INSERT INTO t VALUES (1, "a", 10);
8195 INSERT INTO t VALUES (2, "b", 20);
8196 INSERT INTO t VALUES (3, "c", 30);
8197 include/rpl_sync.inc
8198 connection server_1;
8199 UPDATE t SET c1=10 WHERE c2="a";
8200 UPDATE t SET c1=20 WHERE c1=2;
8201 UPDATE t SET c1=30 WHERE c3=30;
8202 UPDATE t SET c3=40 WHERE c1=30;
8203 include/rpl_sync.inc
8204 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8205 connection server_1;
8206 DELETE FROM t WHERE c2="a";
8207 DELETE FROM t WHERE c1=20;
8208 DELETE FROM t;
8209 include/rpl_sync.inc
8210 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8211 connection server_1;
8212 DROP TABLE t;
8213 include/rpl_sync.inc
8214 connection server_1;
8215 SET SQL_LOG_BIN=0;
8216 connection server_2;
8217 SET SQL_LOG_BIN=0;
8218 connection server_3;
8219 SET SQL_LOG_BIN=0;
8220 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
8221 ### will not break replication
8222 connection server_1;
8223 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
8224 connection server_2;
8225 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
8226 connection server_3;
8227 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
8228 connection server_1;
8229 SET SQL_LOG_BIN=1;
8230 connection server_2;
8231 SET SQL_LOG_BIN=1;
8232 connection server_3;
8233 SET SQL_LOG_BIN=1;
8234 connection server_1;
8235 INSERT INTO t VALUES (1, "a", 10);
8236 INSERT INTO t VALUES (2, "b", 20);
8237 INSERT INTO t VALUES (3, "c", 30);
8238 include/rpl_sync.inc
8239 connection server_1;
8240 UPDATE t SET c1=10 WHERE c2="a";
8241 UPDATE t SET c1=20 WHERE c1=2;
8242 UPDATE t SET c1=30 WHERE c3=30;
8243 UPDATE t SET c3=40 WHERE c1=30;
8244 include/rpl_sync.inc
8245 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8246 connection server_1;
8247 DELETE FROM t WHERE c2="a";
8248 DELETE FROM t WHERE c1=20;
8249 DELETE FROM t;
8250 include/rpl_sync.inc
8251 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8252 connection server_1;
8253 DROP TABLE t;
8254 include/rpl_sync.inc
8255 connection server_1;
8256 SET SQL_LOG_BIN=0;
8257 connection server_2;
8258 SET SQL_LOG_BIN=0;
8259 connection server_3;
8260 SET SQL_LOG_BIN=0;
8261 ### Asserts that updates without blobs in the BI (PK exists int the table)
8262 ### will not break replication
8263 connection server_1;
8264 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
8265 connection server_2;
8266 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
8267 connection server_3;
8268 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
8269 connection server_1;
8270 SET SQL_LOG_BIN=1;
8271 connection server_2;
8272 SET SQL_LOG_BIN=1;
8273 connection server_3;
8274 SET SQL_LOG_BIN=1;
8275 connection server_1;
8276 INSERT INTO t VALUES (1, "a", 10);
8277 INSERT INTO t VALUES (2, "b", 20);
8278 INSERT INTO t VALUES (3, "c", 30);
8279 include/rpl_sync.inc
8280 connection server_1;
8281 UPDATE t SET c1=10 WHERE c2="a";
8282 UPDATE t SET c1=20 WHERE c1=2;
8283 UPDATE t SET c1=30 WHERE c3=30;
8284 UPDATE t SET c3=40 WHERE c1=30;
8285 include/rpl_sync.inc
8286 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8287 connection server_1;
8288 DELETE FROM t WHERE c2="a";
8289 DELETE FROM t WHERE c1=20;
8290 DELETE FROM t;
8291 include/rpl_sync.inc
8292 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8293 connection server_1;
8294 DROP TABLE t;
8295 include/rpl_sync.inc
8296 connection server_1;
8297 SET SQL_LOG_BIN=0;
8298 connection server_2;
8299 SET SQL_LOG_BIN=0;
8300 connection server_3;
8301 SET SQL_LOG_BIN=0;
8302 ### Asserts that declaring a blob in a key does not break replication
8303 connection server_1;
8304 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
8305 connection server_2;
8306 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
8307 connection server_3;
8308 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
8309 connection server_1;
8310 SET SQL_LOG_BIN=1;
8311 connection server_2;
8312 SET SQL_LOG_BIN=1;
8313 connection server_3;
8314 SET SQL_LOG_BIN=1;
8315 connection server_1;
8316 INSERT INTO t VALUES (1, "a", 10);
8317 INSERT INTO t VALUES (2, "b", 20);
8318 INSERT INTO t VALUES (3, "c", 30);
8319 include/rpl_sync.inc
8320 connection server_1;
8321 UPDATE t SET c1=10 WHERE c2="a";
8322 UPDATE t SET c1=20 WHERE c1=2;
8323 UPDATE t SET c1=30 WHERE c3=30;
8324 UPDATE t SET c3=40 WHERE c1=30;
8325 include/rpl_sync.inc
8326 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8327 connection server_1;
8328 DELETE FROM t WHERE c2="a";
8329 DELETE FROM t WHERE c1=20;
8330 DELETE FROM t;
8331 include/rpl_sync.inc
8332 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8333 connection server_1;
8334 DROP TABLE t;
8335 include/rpl_sync.inc
8336 connection server_1;
8337 SET SQL_LOG_BIN=0;
8338 connection server_2;
8339 SET SQL_LOG_BIN=0;
8340 connection server_3;
8341 SET SQL_LOG_BIN=0;
8342 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
8343 connection server_1;
8344 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
8345 connection server_2;
8346 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
8347 connection server_3;
8348 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
8349 connection server_1;
8350 SET SQL_LOG_BIN=1;
8351 connection server_2;
8352 SET SQL_LOG_BIN=1;
8353 connection server_3;
8354 SET SQL_LOG_BIN=1;
8355 connection server_1;
8356 INSERT INTO t VALUES (1, "a", 10);
8357 INSERT INTO t VALUES (2, "b", 20);
8358 INSERT INTO t VALUES (3, "c", 30);
8359 include/rpl_sync.inc
8360 connection server_1;
8361 UPDATE t SET c1=10 WHERE c2="a";
8362 UPDATE t SET c1=20 WHERE c1=2;
8363 UPDATE t SET c1=30 WHERE c3=30;
8364 UPDATE t SET c3=40 WHERE c1=30;
8365 include/rpl_sync.inc
8366 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8367 connection server_1;
8368 DELETE FROM t WHERE c2="a";
8369 DELETE FROM t WHERE c1=20;
8370 DELETE FROM t;
8371 include/rpl_sync.inc
8372 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8373 connection server_1;
8374 DROP TABLE t;
8375 include/rpl_sync.inc
8376 connection server_1;
8377 SET SQL_LOG_BIN=0;
8378 connection server_2;
8379 SET SQL_LOG_BIN=0;
8380 connection server_3;
8381 SET SQL_LOG_BIN=0;
8382 ### Asserts that declaring a blob as part of a primary key does not break replication
8383 connection server_1;
8384 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
8385 connection server_2;
8386 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
8387 connection server_3;
8388 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
8389 connection server_1;
8390 SET SQL_LOG_BIN=1;
8391 connection server_2;
8392 SET SQL_LOG_BIN=1;
8393 connection server_3;
8394 SET SQL_LOG_BIN=1;
8395 connection server_1;
8396 INSERT INTO t VALUES (1, "a", 10);
8397 INSERT INTO t VALUES (2, "b", 20);
8398 INSERT INTO t VALUES (3, "c", 30);
8399 include/rpl_sync.inc
8400 connection server_1;
8401 UPDATE t SET c1=10 WHERE c2="a";
8402 UPDATE t SET c1=20 WHERE c1=2;
8403 UPDATE t SET c1=30 WHERE c3=30;
8404 UPDATE t SET c3=40 WHERE c1=30;
8405 include/rpl_sync.inc
8406 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8407 connection server_1;
8408 DELETE FROM t WHERE c2="a";
8409 DELETE FROM t WHERE c1=20;
8410 DELETE FROM t;
8411 include/rpl_sync.inc
8412 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8413 connection server_1;
8414 DROP TABLE t;
8415 include/rpl_sync.inc
8416 ### engines: InnoDB, MyISAM, InnoDB
8417 connection server_1;
8418 connection server_1;
8419 SET SQL_LOG_BIN=0;
8420 connection server_2;
8421 SET SQL_LOG_BIN=0;
8422 connection server_3;
8423 SET SQL_LOG_BIN=0;
8424 ### Asserts that updates without blobs in the AI (they are not updated)
8425 ### will not break replication (check when there is no key in the table)
8426 connection server_1;
8427 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
8428 connection server_2;
8429 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
8430 connection server_3;
8431 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
8432 connection server_1;
8433 SET SQL_LOG_BIN=1;
8434 connection server_2;
8435 SET SQL_LOG_BIN=1;
8436 connection server_3;
8437 SET SQL_LOG_BIN=1;
8438 connection server_1;
8439 INSERT INTO t VALUES (1, "a", 10);
8440 INSERT INTO t VALUES (2, "b", 20);
8441 INSERT INTO t VALUES (3, "c", 30);
8442 include/rpl_sync.inc
8443 connection server_1;
8444 UPDATE t SET c1=10 WHERE c2="a";
8445 UPDATE t SET c1=20 WHERE c1=2;
8446 UPDATE t SET c1=30 WHERE c3=30;
8447 UPDATE t SET c3=40 WHERE c1=30;
8448 include/rpl_sync.inc
8449 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8450 connection server_1;
8451 DELETE FROM t WHERE c2="a";
8452 DELETE FROM t WHERE c1=20;
8453 DELETE FROM t;
8454 include/rpl_sync.inc
8455 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8456 connection server_1;
8457 DROP TABLE t;
8458 include/rpl_sync.inc
8459 connection server_1;
8460 SET SQL_LOG_BIN=0;
8461 connection server_2;
8462 SET SQL_LOG_BIN=0;
8463 connection server_3;
8464 SET SQL_LOG_BIN=0;
8465 ### Asserts that updates without blobs in the AI (they are not updated)
8466 ### will not break replication (check even if there is a key in the table)
8467 connection server_1;
8468 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
8469 connection server_2;
8470 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
8471 connection server_3;
8472 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
8473 connection server_1;
8474 SET SQL_LOG_BIN=1;
8475 connection server_2;
8476 SET SQL_LOG_BIN=1;
8477 connection server_3;
8478 SET SQL_LOG_BIN=1;
8479 connection server_1;
8480 INSERT INTO t VALUES (1, "a", 10);
8481 INSERT INTO t VALUES (2, "b", 20);
8482 INSERT INTO t VALUES (3, "c", 30);
8483 include/rpl_sync.inc
8484 connection server_1;
8485 UPDATE t SET c1=10 WHERE c2="a";
8486 UPDATE t SET c1=20 WHERE c1=2;
8487 UPDATE t SET c1=30 WHERE c3=30;
8488 UPDATE t SET c3=40 WHERE c1=30;
8489 include/rpl_sync.inc
8490 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8491 connection server_1;
8492 DELETE FROM t WHERE c2="a";
8493 DELETE FROM t WHERE c1=20;
8494 DELETE FROM t;
8495 include/rpl_sync.inc
8496 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8497 connection server_1;
8498 DROP TABLE t;
8499 include/rpl_sync.inc
8500 connection server_1;
8501 SET SQL_LOG_BIN=0;
8502 connection server_2;
8503 SET SQL_LOG_BIN=0;
8504 connection server_3;
8505 SET SQL_LOG_BIN=0;
8506 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
8507 ### will not break replication
8508 connection server_1;
8509 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
8510 connection server_2;
8511 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
8512 connection server_3;
8513 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
8514 connection server_1;
8515 SET SQL_LOG_BIN=1;
8516 connection server_2;
8517 SET SQL_LOG_BIN=1;
8518 connection server_3;
8519 SET SQL_LOG_BIN=1;
8520 connection server_1;
8521 INSERT INTO t VALUES (1, "a", 10);
8522 INSERT INTO t VALUES (2, "b", 20);
8523 INSERT INTO t VALUES (3, "c", 30);
8524 include/rpl_sync.inc
8525 connection server_1;
8526 UPDATE t SET c1=10 WHERE c2="a";
8527 UPDATE t SET c1=20 WHERE c1=2;
8528 UPDATE t SET c1=30 WHERE c3=30;
8529 UPDATE t SET c3=40 WHERE c1=30;
8530 include/rpl_sync.inc
8531 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8532 connection server_1;
8533 DELETE FROM t WHERE c2="a";
8534 DELETE FROM t WHERE c1=20;
8535 DELETE FROM t;
8536 include/rpl_sync.inc
8537 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8538 connection server_1;
8539 DROP TABLE t;
8540 include/rpl_sync.inc
8541 connection server_1;
8542 SET SQL_LOG_BIN=0;
8543 connection server_2;
8544 SET SQL_LOG_BIN=0;
8545 connection server_3;
8546 SET SQL_LOG_BIN=0;
8547 ### Asserts that updates without blobs in the BI (PK exists int the table)
8548 ### will not break replication
8549 connection server_1;
8550 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
8551 connection server_2;
8552 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
8553 connection server_3;
8554 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
8555 connection server_1;
8556 SET SQL_LOG_BIN=1;
8557 connection server_2;
8558 SET SQL_LOG_BIN=1;
8559 connection server_3;
8560 SET SQL_LOG_BIN=1;
8561 connection server_1;
8562 INSERT INTO t VALUES (1, "a", 10);
8563 INSERT INTO t VALUES (2, "b", 20);
8564 INSERT INTO t VALUES (3, "c", 30);
8565 include/rpl_sync.inc
8566 connection server_1;
8567 UPDATE t SET c1=10 WHERE c2="a";
8568 UPDATE t SET c1=20 WHERE c1=2;
8569 UPDATE t SET c1=30 WHERE c3=30;
8570 UPDATE t SET c3=40 WHERE c1=30;
8571 include/rpl_sync.inc
8572 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8573 connection server_1;
8574 DELETE FROM t WHERE c2="a";
8575 DELETE FROM t WHERE c1=20;
8576 DELETE FROM t;
8577 include/rpl_sync.inc
8578 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8579 connection server_1;
8580 DROP TABLE t;
8581 include/rpl_sync.inc
8582 connection server_1;
8583 SET SQL_LOG_BIN=0;
8584 connection server_2;
8585 SET SQL_LOG_BIN=0;
8586 connection server_3;
8587 SET SQL_LOG_BIN=0;
8588 ### Asserts that declaring a blob in a key does not break replication
8589 connection server_1;
8590 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
8591 connection server_2;
8592 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
8593 connection server_3;
8594 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
8595 connection server_1;
8596 SET SQL_LOG_BIN=1;
8597 connection server_2;
8598 SET SQL_LOG_BIN=1;
8599 connection server_3;
8600 SET SQL_LOG_BIN=1;
8601 connection server_1;
8602 INSERT INTO t VALUES (1, "a", 10);
8603 INSERT INTO t VALUES (2, "b", 20);
8604 INSERT INTO t VALUES (3, "c", 30);
8605 include/rpl_sync.inc
8606 connection server_1;
8607 UPDATE t SET c1=10 WHERE c2="a";
8608 UPDATE t SET c1=20 WHERE c1=2;
8609 UPDATE t SET c1=30 WHERE c3=30;
8610 UPDATE t SET c3=40 WHERE c1=30;
8611 include/rpl_sync.inc
8612 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8613 connection server_1;
8614 DELETE FROM t WHERE c2="a";
8615 DELETE FROM t WHERE c1=20;
8616 DELETE FROM t;
8617 include/rpl_sync.inc
8618 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8619 connection server_1;
8620 DROP TABLE t;
8621 include/rpl_sync.inc
8622 connection server_1;
8623 SET SQL_LOG_BIN=0;
8624 connection server_2;
8625 SET SQL_LOG_BIN=0;
8626 connection server_3;
8627 SET SQL_LOG_BIN=0;
8628 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
8629 connection server_1;
8630 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
8631 connection server_2;
8632 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
8633 connection server_3;
8634 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
8635 connection server_1;
8636 SET SQL_LOG_BIN=1;
8637 connection server_2;
8638 SET SQL_LOG_BIN=1;
8639 connection server_3;
8640 SET SQL_LOG_BIN=1;
8641 connection server_1;
8642 INSERT INTO t VALUES (1, "a", 10);
8643 INSERT INTO t VALUES (2, "b", 20);
8644 INSERT INTO t VALUES (3, "c", 30);
8645 include/rpl_sync.inc
8646 connection server_1;
8647 UPDATE t SET c1=10 WHERE c2="a";
8648 UPDATE t SET c1=20 WHERE c1=2;
8649 UPDATE t SET c1=30 WHERE c3=30;
8650 UPDATE t SET c3=40 WHERE c1=30;
8651 include/rpl_sync.inc
8652 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8653 connection server_1;
8654 DELETE FROM t WHERE c2="a";
8655 DELETE FROM t WHERE c1=20;
8656 DELETE FROM t;
8657 include/rpl_sync.inc
8658 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8659 connection server_1;
8660 DROP TABLE t;
8661 include/rpl_sync.inc
8662 connection server_1;
8663 SET SQL_LOG_BIN=0;
8664 connection server_2;
8665 SET SQL_LOG_BIN=0;
8666 connection server_3;
8667 SET SQL_LOG_BIN=0;
8668 ### Asserts that declaring a blob as part of a primary key does not break replication
8669 connection server_1;
8670 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
8671 connection server_2;
8672 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
8673 connection server_3;
8674 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
8675 connection server_1;
8676 SET SQL_LOG_BIN=1;
8677 connection server_2;
8678 SET SQL_LOG_BIN=1;
8679 connection server_3;
8680 SET SQL_LOG_BIN=1;
8681 connection server_1;
8682 INSERT INTO t VALUES (1, "a", 10);
8683 INSERT INTO t VALUES (2, "b", 20);
8684 INSERT INTO t VALUES (3, "c", 30);
8685 include/rpl_sync.inc
8686 connection server_1;
8687 UPDATE t SET c1=10 WHERE c2="a";
8688 UPDATE t SET c1=20 WHERE c1=2;
8689 UPDATE t SET c1=30 WHERE c3=30;
8690 UPDATE t SET c3=40 WHERE c1=30;
8691 include/rpl_sync.inc
8692 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8693 connection server_1;
8694 DELETE FROM t WHERE c2="a";
8695 DELETE FROM t WHERE c1=20;
8696 DELETE FROM t;
8697 include/rpl_sync.inc
8698 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8699 connection server_1;
8700 DROP TABLE t;
8701 include/rpl_sync.inc
8702 ### engines: InnoDB, InnoDB, MyISAM
8703 connection server_1;
8704 connection server_1;
8705 SET SQL_LOG_BIN=0;
8706 connection server_2;
8707 SET SQL_LOG_BIN=0;
8708 connection server_3;
8709 SET SQL_LOG_BIN=0;
8710 ### Asserts that updates without blobs in the AI (they are not updated)
8711 ### will not break replication (check when there is no key in the table)
8712 connection server_1;
8713 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
8714 connection server_2;
8715 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
8716 connection server_3;
8717 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
8718 connection server_1;
8719 SET SQL_LOG_BIN=1;
8720 connection server_2;
8721 SET SQL_LOG_BIN=1;
8722 connection server_3;
8723 SET SQL_LOG_BIN=1;
8724 connection server_1;
8725 INSERT INTO t VALUES (1, "a", 10);
8726 INSERT INTO t VALUES (2, "b", 20);
8727 INSERT INTO t VALUES (3, "c", 30);
8728 include/rpl_sync.inc
8729 connection server_1;
8730 UPDATE t SET c1=10 WHERE c2="a";
8731 UPDATE t SET c1=20 WHERE c1=2;
8732 UPDATE t SET c1=30 WHERE c3=30;
8733 UPDATE t SET c3=40 WHERE c1=30;
8734 include/rpl_sync.inc
8735 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8736 connection server_1;
8737 DELETE FROM t WHERE c2="a";
8738 DELETE FROM t WHERE c1=20;
8739 DELETE FROM t;
8740 include/rpl_sync.inc
8741 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8742 connection server_1;
8743 DROP TABLE t;
8744 include/rpl_sync.inc
8745 connection server_1;
8746 SET SQL_LOG_BIN=0;
8747 connection server_2;
8748 SET SQL_LOG_BIN=0;
8749 connection server_3;
8750 SET SQL_LOG_BIN=0;
8751 ### Asserts that updates without blobs in the AI (they are not updated)
8752 ### will not break replication (check even if there is a key in the table)
8753 connection server_1;
8754 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
8755 connection server_2;
8756 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
8757 connection server_3;
8758 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
8759 connection server_1;
8760 SET SQL_LOG_BIN=1;
8761 connection server_2;
8762 SET SQL_LOG_BIN=1;
8763 connection server_3;
8764 SET SQL_LOG_BIN=1;
8765 connection server_1;
8766 INSERT INTO t VALUES (1, "a", 10);
8767 INSERT INTO t VALUES (2, "b", 20);
8768 INSERT INTO t VALUES (3, "c", 30);
8769 include/rpl_sync.inc
8770 connection server_1;
8771 UPDATE t SET c1=10 WHERE c2="a";
8772 UPDATE t SET c1=20 WHERE c1=2;
8773 UPDATE t SET c1=30 WHERE c3=30;
8774 UPDATE t SET c3=40 WHERE c1=30;
8775 include/rpl_sync.inc
8776 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8777 connection server_1;
8778 DELETE FROM t WHERE c2="a";
8779 DELETE FROM t WHERE c1=20;
8780 DELETE FROM t;
8781 include/rpl_sync.inc
8782 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8783 connection server_1;
8784 DROP TABLE t;
8785 include/rpl_sync.inc
8786 connection server_1;
8787 SET SQL_LOG_BIN=0;
8788 connection server_2;
8789 SET SQL_LOG_BIN=0;
8790 connection server_3;
8791 SET SQL_LOG_BIN=0;
8792 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
8793 ### will not break replication
8794 connection server_1;
8795 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
8796 connection server_2;
8797 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
8798 connection server_3;
8799 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
8800 connection server_1;
8801 SET SQL_LOG_BIN=1;
8802 connection server_2;
8803 SET SQL_LOG_BIN=1;
8804 connection server_3;
8805 SET SQL_LOG_BIN=1;
8806 connection server_1;
8807 INSERT INTO t VALUES (1, "a", 10);
8808 INSERT INTO t VALUES (2, "b", 20);
8809 INSERT INTO t VALUES (3, "c", 30);
8810 include/rpl_sync.inc
8811 connection server_1;
8812 UPDATE t SET c1=10 WHERE c2="a";
8813 UPDATE t SET c1=20 WHERE c1=2;
8814 UPDATE t SET c1=30 WHERE c3=30;
8815 UPDATE t SET c3=40 WHERE c1=30;
8816 include/rpl_sync.inc
8817 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8818 connection server_1;
8819 DELETE FROM t WHERE c2="a";
8820 DELETE FROM t WHERE c1=20;
8821 DELETE FROM t;
8822 include/rpl_sync.inc
8823 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8824 connection server_1;
8825 DROP TABLE t;
8826 include/rpl_sync.inc
8827 connection server_1;
8828 SET SQL_LOG_BIN=0;
8829 connection server_2;
8830 SET SQL_LOG_BIN=0;
8831 connection server_3;
8832 SET SQL_LOG_BIN=0;
8833 ### Asserts that updates without blobs in the BI (PK exists int the table)
8834 ### will not break replication
8835 connection server_1;
8836 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
8837 connection server_2;
8838 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
8839 connection server_3;
8840 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
8841 connection server_1;
8842 SET SQL_LOG_BIN=1;
8843 connection server_2;
8844 SET SQL_LOG_BIN=1;
8845 connection server_3;
8846 SET SQL_LOG_BIN=1;
8847 connection server_1;
8848 INSERT INTO t VALUES (1, "a", 10);
8849 INSERT INTO t VALUES (2, "b", 20);
8850 INSERT INTO t VALUES (3, "c", 30);
8851 include/rpl_sync.inc
8852 connection server_1;
8853 UPDATE t SET c1=10 WHERE c2="a";
8854 UPDATE t SET c1=20 WHERE c1=2;
8855 UPDATE t SET c1=30 WHERE c3=30;
8856 UPDATE t SET c3=40 WHERE c1=30;
8857 include/rpl_sync.inc
8858 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8859 connection server_1;
8860 DELETE FROM t WHERE c2="a";
8861 DELETE FROM t WHERE c1=20;
8862 DELETE FROM t;
8863 include/rpl_sync.inc
8864 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8865 connection server_1;
8866 DROP TABLE t;
8867 include/rpl_sync.inc
8868 connection server_1;
8869 SET SQL_LOG_BIN=0;
8870 connection server_2;
8871 SET SQL_LOG_BIN=0;
8872 connection server_3;
8873 SET SQL_LOG_BIN=0;
8874 ### Asserts that declaring a blob in a key does not break replication
8875 connection server_1;
8876 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
8877 connection server_2;
8878 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
8879 connection server_3;
8880 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
8881 connection server_1;
8882 SET SQL_LOG_BIN=1;
8883 connection server_2;
8884 SET SQL_LOG_BIN=1;
8885 connection server_3;
8886 SET SQL_LOG_BIN=1;
8887 connection server_1;
8888 INSERT INTO t VALUES (1, "a", 10);
8889 INSERT INTO t VALUES (2, "b", 20);
8890 INSERT INTO t VALUES (3, "c", 30);
8891 include/rpl_sync.inc
8892 connection server_1;
8893 UPDATE t SET c1=10 WHERE c2="a";
8894 UPDATE t SET c1=20 WHERE c1=2;
8895 UPDATE t SET c1=30 WHERE c3=30;
8896 UPDATE t SET c3=40 WHERE c1=30;
8897 include/rpl_sync.inc
8898 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8899 connection server_1;
8900 DELETE FROM t WHERE c2="a";
8901 DELETE FROM t WHERE c1=20;
8902 DELETE FROM t;
8903 include/rpl_sync.inc
8904 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8905 connection server_1;
8906 DROP TABLE t;
8907 include/rpl_sync.inc
8908 connection server_1;
8909 SET SQL_LOG_BIN=0;
8910 connection server_2;
8911 SET SQL_LOG_BIN=0;
8912 connection server_3;
8913 SET SQL_LOG_BIN=0;
8914 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
8915 connection server_1;
8916 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
8917 connection server_2;
8918 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
8919 connection server_3;
8920 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
8921 connection server_1;
8922 SET SQL_LOG_BIN=1;
8923 connection server_2;
8924 SET SQL_LOG_BIN=1;
8925 connection server_3;
8926 SET SQL_LOG_BIN=1;
8927 connection server_1;
8928 INSERT INTO t VALUES (1, "a", 10);
8929 INSERT INTO t VALUES (2, "b", 20);
8930 INSERT INTO t VALUES (3, "c", 30);
8931 include/rpl_sync.inc
8932 connection server_1;
8933 UPDATE t SET c1=10 WHERE c2="a";
8934 UPDATE t SET c1=20 WHERE c1=2;
8935 UPDATE t SET c1=30 WHERE c3=30;
8936 UPDATE t SET c3=40 WHERE c1=30;
8937 include/rpl_sync.inc
8938 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8939 connection server_1;
8940 DELETE FROM t WHERE c2="a";
8941 DELETE FROM t WHERE c1=20;
8942 DELETE FROM t;
8943 include/rpl_sync.inc
8944 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8945 connection server_1;
8946 DROP TABLE t;
8947 include/rpl_sync.inc
8948 connection server_1;
8949 SET SQL_LOG_BIN=0;
8950 connection server_2;
8951 SET SQL_LOG_BIN=0;
8952 connection server_3;
8953 SET SQL_LOG_BIN=0;
8954 ### Asserts that declaring a blob as part of a primary key does not break replication
8955 connection server_1;
8956 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
8957 connection server_2;
8958 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
8959 connection server_3;
8960 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
8961 connection server_1;
8962 SET SQL_LOG_BIN=1;
8963 connection server_2;
8964 SET SQL_LOG_BIN=1;
8965 connection server_3;
8966 SET SQL_LOG_BIN=1;
8967 connection server_1;
8968 INSERT INTO t VALUES (1, "a", 10);
8969 INSERT INTO t VALUES (2, "b", 20);
8970 INSERT INTO t VALUES (3, "c", 30);
8971 include/rpl_sync.inc
8972 connection server_1;
8973 UPDATE t SET c1=10 WHERE c2="a";
8974 UPDATE t SET c1=20 WHERE c1=2;
8975 UPDATE t SET c1=30 WHERE c3=30;
8976 UPDATE t SET c3=40 WHERE c1=30;
8977 include/rpl_sync.inc
8978 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8979 connection server_1;
8980 DELETE FROM t WHERE c2="a";
8981 DELETE FROM t WHERE c1=20;
8982 DELETE FROM t;
8983 include/rpl_sync.inc
8984 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
8985 connection server_1;
8986 DROP TABLE t;
8987 include/rpl_sync.inc
8988 ### engines: InnoDB, InnoDB, InnoDB
8989 connection server_1;
8990 connection server_1;
8991 SET SQL_LOG_BIN=0;
8992 connection server_2;
8993 SET SQL_LOG_BIN=0;
8994 connection server_3;
8995 SET SQL_LOG_BIN=0;
8996 ### Asserts that updates without blobs in the AI (they are not updated)
8997 ### will not break replication (check when there is no key in the table)
8998 connection server_1;
8999 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
9000 connection server_2;
9001 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
9002 connection server_3;
9003 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
9004 connection server_1;
9005 SET SQL_LOG_BIN=1;
9006 connection server_2;
9007 SET SQL_LOG_BIN=1;
9008 connection server_3;
9009 SET SQL_LOG_BIN=1;
9010 connection server_1;
9011 INSERT INTO t VALUES (1, "a", 10);
9012 INSERT INTO t VALUES (2, "b", 20);
9013 INSERT INTO t VALUES (3, "c", 30);
9014 include/rpl_sync.inc
9015 connection server_1;
9016 UPDATE t SET c1=10 WHERE c2="a";
9017 UPDATE t SET c1=20 WHERE c1=2;
9018 UPDATE t SET c1=30 WHERE c3=30;
9019 UPDATE t SET c3=40 WHERE c1=30;
9020 include/rpl_sync.inc
9021 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9022 connection server_1;
9023 DELETE FROM t WHERE c2="a";
9024 DELETE FROM t WHERE c1=20;
9025 DELETE FROM t;
9026 include/rpl_sync.inc
9027 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9028 connection server_1;
9029 DROP TABLE t;
9030 include/rpl_sync.inc
9031 connection server_1;
9032 SET SQL_LOG_BIN=0;
9033 connection server_2;
9034 SET SQL_LOG_BIN=0;
9035 connection server_3;
9036 SET SQL_LOG_BIN=0;
9037 ### Asserts that updates without blobs in the AI (they are not updated)
9038 ### will not break replication (check even if there is a key in the table)
9039 connection server_1;
9040 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
9041 connection server_2;
9042 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
9043 connection server_3;
9044 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
9045 connection server_1;
9046 SET SQL_LOG_BIN=1;
9047 connection server_2;
9048 SET SQL_LOG_BIN=1;
9049 connection server_3;
9050 SET SQL_LOG_BIN=1;
9051 connection server_1;
9052 INSERT INTO t VALUES (1, "a", 10);
9053 INSERT INTO t VALUES (2, "b", 20);
9054 INSERT INTO t VALUES (3, "c", 30);
9055 include/rpl_sync.inc
9056 connection server_1;
9057 UPDATE t SET c1=10 WHERE c2="a";
9058 UPDATE t SET c1=20 WHERE c1=2;
9059 UPDATE t SET c1=30 WHERE c3=30;
9060 UPDATE t SET c3=40 WHERE c1=30;
9061 include/rpl_sync.inc
9062 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9063 connection server_1;
9064 DELETE FROM t WHERE c2="a";
9065 DELETE FROM t WHERE c1=20;
9066 DELETE FROM t;
9067 include/rpl_sync.inc
9068 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9069 connection server_1;
9070 DROP TABLE t;
9071 include/rpl_sync.inc
9072 connection server_1;
9073 SET SQL_LOG_BIN=0;
9074 connection server_2;
9075 SET SQL_LOG_BIN=0;
9076 connection server_3;
9077 SET SQL_LOG_BIN=0;
9078 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
9079 ### will not break replication
9080 connection server_1;
9081 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
9082 connection server_2;
9083 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
9084 connection server_3;
9085 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
9086 connection server_1;
9087 SET SQL_LOG_BIN=1;
9088 connection server_2;
9089 SET SQL_LOG_BIN=1;
9090 connection server_3;
9091 SET SQL_LOG_BIN=1;
9092 connection server_1;
9093 INSERT INTO t VALUES (1, "a", 10);
9094 INSERT INTO t VALUES (2, "b", 20);
9095 INSERT INTO t VALUES (3, "c", 30);
9096 include/rpl_sync.inc
9097 connection server_1;
9098 UPDATE t SET c1=10 WHERE c2="a";
9099 UPDATE t SET c1=20 WHERE c1=2;
9100 UPDATE t SET c1=30 WHERE c3=30;
9101 UPDATE t SET c3=40 WHERE c1=30;
9102 include/rpl_sync.inc
9103 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9104 connection server_1;
9105 DELETE FROM t WHERE c2="a";
9106 DELETE FROM t WHERE c1=20;
9107 DELETE FROM t;
9108 include/rpl_sync.inc
9109 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9110 connection server_1;
9111 DROP TABLE t;
9112 include/rpl_sync.inc
9113 connection server_1;
9114 SET SQL_LOG_BIN=0;
9115 connection server_2;
9116 SET SQL_LOG_BIN=0;
9117 connection server_3;
9118 SET SQL_LOG_BIN=0;
9119 ### Asserts that updates without blobs in the BI (PK exists int the table)
9120 ### will not break replication
9121 connection server_1;
9122 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
9123 connection server_2;
9124 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
9125 connection server_3;
9126 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
9127 connection server_1;
9128 SET SQL_LOG_BIN=1;
9129 connection server_2;
9130 SET SQL_LOG_BIN=1;
9131 connection server_3;
9132 SET SQL_LOG_BIN=1;
9133 connection server_1;
9134 INSERT INTO t VALUES (1, "a", 10);
9135 INSERT INTO t VALUES (2, "b", 20);
9136 INSERT INTO t VALUES (3, "c", 30);
9137 include/rpl_sync.inc
9138 connection server_1;
9139 UPDATE t SET c1=10 WHERE c2="a";
9140 UPDATE t SET c1=20 WHERE c1=2;
9141 UPDATE t SET c1=30 WHERE c3=30;
9142 UPDATE t SET c3=40 WHERE c1=30;
9143 include/rpl_sync.inc
9144 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9145 connection server_1;
9146 DELETE FROM t WHERE c2="a";
9147 DELETE FROM t WHERE c1=20;
9148 DELETE FROM t;
9149 include/rpl_sync.inc
9150 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9151 connection server_1;
9152 DROP TABLE t;
9153 include/rpl_sync.inc
9154 connection server_1;
9155 SET SQL_LOG_BIN=0;
9156 connection server_2;
9157 SET SQL_LOG_BIN=0;
9158 connection server_3;
9159 SET SQL_LOG_BIN=0;
9160 ### Asserts that declaring a blob in a key does not break replication
9161 connection server_1;
9162 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
9163 connection server_2;
9164 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
9165 connection server_3;
9166 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
9167 connection server_1;
9168 SET SQL_LOG_BIN=1;
9169 connection server_2;
9170 SET SQL_LOG_BIN=1;
9171 connection server_3;
9172 SET SQL_LOG_BIN=1;
9173 connection server_1;
9174 INSERT INTO t VALUES (1, "a", 10);
9175 INSERT INTO t VALUES (2, "b", 20);
9176 INSERT INTO t VALUES (3, "c", 30);
9177 include/rpl_sync.inc
9178 connection server_1;
9179 UPDATE t SET c1=10 WHERE c2="a";
9180 UPDATE t SET c1=20 WHERE c1=2;
9181 UPDATE t SET c1=30 WHERE c3=30;
9182 UPDATE t SET c3=40 WHERE c1=30;
9183 include/rpl_sync.inc
9184 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9185 connection server_1;
9186 DELETE FROM t WHERE c2="a";
9187 DELETE FROM t WHERE c1=20;
9188 DELETE FROM t;
9189 include/rpl_sync.inc
9190 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9191 connection server_1;
9192 DROP TABLE t;
9193 include/rpl_sync.inc
9194 connection server_1;
9195 SET SQL_LOG_BIN=0;
9196 connection server_2;
9197 SET SQL_LOG_BIN=0;
9198 connection server_3;
9199 SET SQL_LOG_BIN=0;
9200 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
9201 connection server_1;
9202 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
9203 connection server_2;
9204 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
9205 connection server_3;
9206 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
9207 connection server_1;
9208 SET SQL_LOG_BIN=1;
9209 connection server_2;
9210 SET SQL_LOG_BIN=1;
9211 connection server_3;
9212 SET SQL_LOG_BIN=1;
9213 connection server_1;
9214 INSERT INTO t VALUES (1, "a", 10);
9215 INSERT INTO t VALUES (2, "b", 20);
9216 INSERT INTO t VALUES (3, "c", 30);
9217 include/rpl_sync.inc
9218 connection server_1;
9219 UPDATE t SET c1=10 WHERE c2="a";
9220 UPDATE t SET c1=20 WHERE c1=2;
9221 UPDATE t SET c1=30 WHERE c3=30;
9222 UPDATE t SET c3=40 WHERE c1=30;
9223 include/rpl_sync.inc
9224 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9225 connection server_1;
9226 DELETE FROM t WHERE c2="a";
9227 DELETE FROM t WHERE c1=20;
9228 DELETE FROM t;
9229 include/rpl_sync.inc
9230 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9231 connection server_1;
9232 DROP TABLE t;
9233 include/rpl_sync.inc
9234 connection server_1;
9235 SET SQL_LOG_BIN=0;
9236 connection server_2;
9237 SET SQL_LOG_BIN=0;
9238 connection server_3;
9239 SET SQL_LOG_BIN=0;
9240 ### Asserts that declaring a blob as part of a primary key does not break replication
9241 connection server_1;
9242 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
9243 connection server_2;
9244 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
9245 connection server_3;
9246 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
9247 connection server_1;
9248 SET SQL_LOG_BIN=1;
9249 connection server_2;
9250 SET SQL_LOG_BIN=1;
9251 connection server_3;
9252 SET SQL_LOG_BIN=1;
9253 connection server_1;
9254 INSERT INTO t VALUES (1, "a", 10);
9255 INSERT INTO t VALUES (2, "b", 20);
9256 INSERT INTO t VALUES (3, "c", 30);
9257 include/rpl_sync.inc
9258 connection server_1;
9259 UPDATE t SET c1=10 WHERE c2="a";
9260 UPDATE t SET c1=20 WHERE c1=2;
9261 UPDATE t SET c1=30 WHERE c3=30;
9262 UPDATE t SET c3=40 WHERE c1=30;
9263 include/rpl_sync.inc
9264 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9265 connection server_1;
9266 DELETE FROM t WHERE c2="a";
9267 DELETE FROM t WHERE c1=20;
9268 DELETE FROM t;
9269 include/rpl_sync.inc
9270 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
9271 connection server_1;
9272 DROP TABLE t;
9273 include/rpl_sync.inc
9274 include/rpl_end.inc