Debian Codegraph @

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

raw
1 include/rpl_init.inc [topology=1->2->3]
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 Warnings:
6 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
7 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
8 CON: 'server_1', IMG: 'NOBLOB', RESTART SLAVE: 'N'
9 SET SESSION binlog_row_image= 'NOBLOB';
10 SET GLOBAL binlog_row_image= 'NOBLOB';
11 FLUSH TABLES;
12 SHOW VARIABLES LIKE 'binlog_row_image';
13 Variable_name Value
14 binlog_row_image NOBLOB
15 CON: 'server_2', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
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 SET SESSION binlog_row_image= 'NOBLOB';
26 SET GLOBAL binlog_row_image= 'NOBLOB';
27 include/stop_slave.inc
28 include/start_slave.inc
29 FLUSH TABLES;
30 SHOW VARIABLES LIKE 'binlog_row_image';
31 Variable_name Value
32 binlog_row_image NOBLOB
33 ### engines: MyISAM, MyISAM, MyISAM
34 SET SQL_LOG_BIN=0;
35 SET SQL_LOG_BIN=0;
36 SET SQL_LOG_BIN=0;
37 ### Asserts that updates without blobs in the AI (they are not updated)
38 ### will not break replication (check when there is no key in the table)
39 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
40 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
41 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
42 SET SQL_LOG_BIN=1;
43 SET SQL_LOG_BIN=1;
44 SET SQL_LOG_BIN=1;
45 INSERT INTO t VALUES (1, "a", 10);
46 INSERT INTO t VALUES (2, "b", 20);
47 INSERT INTO t VALUES (3, "c", 30);
48 include/rpl_sync.inc
49 UPDATE t SET c1=10 WHERE c2="a";
50 UPDATE t SET c1=20 WHERE c1=2;
51 UPDATE t SET c1=30 WHERE c3=30;
52 UPDATE t SET c3=40 WHERE c1=30;
53 include/rpl_sync.inc
54 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
55 DELETE FROM t WHERE c2="a";
56 DELETE FROM t WHERE c1=20;
57 DELETE FROM t;
58 include/rpl_sync.inc
59 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
60 DROP TABLE t;
61 include/rpl_sync.inc
62 SET SQL_LOG_BIN=0;
63 SET SQL_LOG_BIN=0;
64 SET SQL_LOG_BIN=0;
65 ### Asserts that updates without blobs in the AI (they are not updated)
66 ### will not break replication (check even if there is a key in the table)
67 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
68 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
69 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
70 SET SQL_LOG_BIN=1;
71 SET SQL_LOG_BIN=1;
72 SET SQL_LOG_BIN=1;
73 INSERT INTO t VALUES (1, "a", 10);
74 INSERT INTO t VALUES (2, "b", 20);
75 INSERT INTO t VALUES (3, "c", 30);
76 include/rpl_sync.inc
77 UPDATE t SET c1=10 WHERE c2="a";
78 UPDATE t SET c1=20 WHERE c1=2;
79 UPDATE t SET c1=30 WHERE c3=30;
80 UPDATE t SET c3=40 WHERE c1=30;
81 include/rpl_sync.inc
82 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
83 DELETE FROM t WHERE c2="a";
84 DELETE FROM t WHERE c1=20;
85 DELETE FROM t;
86 include/rpl_sync.inc
87 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
88 DROP TABLE t;
89 include/rpl_sync.inc
90 SET SQL_LOG_BIN=0;
91 SET SQL_LOG_BIN=0;
92 SET SQL_LOG_BIN=0;
93 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
94 ### will not break replication
95 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
96 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
97 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
98 SET SQL_LOG_BIN=1;
99 SET SQL_LOG_BIN=1;
100 SET SQL_LOG_BIN=1;
101 INSERT INTO t VALUES (1, "a", 10);
102 INSERT INTO t VALUES (2, "b", 20);
103 INSERT INTO t VALUES (3, "c", 30);
104 include/rpl_sync.inc
105 UPDATE t SET c1=10 WHERE c2="a";
106 UPDATE t SET c1=20 WHERE c1=2;
107 UPDATE t SET c1=30 WHERE c3=30;
108 UPDATE t SET c3=40 WHERE c1=30;
109 include/rpl_sync.inc
110 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
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 DROP TABLE t;
117 include/rpl_sync.inc
118 SET SQL_LOG_BIN=0;
119 SET SQL_LOG_BIN=0;
120 SET SQL_LOG_BIN=0;
121 ### Asserts that updates without blobs in the BI (PK exists int the table)
122 ### will not break replication
123 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
124 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
125 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
126 SET SQL_LOG_BIN=1;
127 SET SQL_LOG_BIN=1;
128 SET SQL_LOG_BIN=1;
129 INSERT INTO t VALUES (1, "a", 10);
130 INSERT INTO t VALUES (2, "b", 20);
131 INSERT INTO t VALUES (3, "c", 30);
132 include/rpl_sync.inc
133 UPDATE t SET c1=10 WHERE c2="a";
134 UPDATE t SET c1=20 WHERE c1=2;
135 UPDATE t SET c1=30 WHERE c3=30;
136 UPDATE t SET c3=40 WHERE c1=30;
137 include/rpl_sync.inc
138 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
139 DELETE FROM t WHERE c2="a";
140 DELETE FROM t WHERE c1=20;
141 DELETE FROM t;
142 include/rpl_sync.inc
143 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
144 DROP TABLE t;
145 include/rpl_sync.inc
146 SET SQL_LOG_BIN=0;
147 SET SQL_LOG_BIN=0;
148 SET SQL_LOG_BIN=0;
149 ### Asserts that declaring a blob in a key does not break replication
150 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
151 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
152 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
153 SET SQL_LOG_BIN=1;
154 SET SQL_LOG_BIN=1;
155 SET SQL_LOG_BIN=1;
156 INSERT INTO t VALUES (1, "a", 10);
157 INSERT INTO t VALUES (2, "b", 20);
158 INSERT INTO t VALUES (3, "c", 30);
159 include/rpl_sync.inc
160 UPDATE t SET c1=10 WHERE c2="a";
161 UPDATE t SET c1=20 WHERE c1=2;
162 UPDATE t SET c1=30 WHERE c3=30;
163 UPDATE t SET c3=40 WHERE c1=30;
164 include/rpl_sync.inc
165 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
166 DELETE FROM t WHERE c2="a";
167 DELETE FROM t WHERE c1=20;
168 DELETE FROM t;
169 include/rpl_sync.inc
170 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
171 DROP TABLE t;
172 include/rpl_sync.inc
173 SET SQL_LOG_BIN=0;
174 SET SQL_LOG_BIN=0;
175 SET SQL_LOG_BIN=0;
176 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
177 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
178 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
179 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
180 SET SQL_LOG_BIN=1;
181 SET SQL_LOG_BIN=1;
182 SET SQL_LOG_BIN=1;
183 INSERT INTO t VALUES (1, "a", 10);
184 INSERT INTO t VALUES (2, "b", 20);
185 INSERT INTO t VALUES (3, "c", 30);
186 include/rpl_sync.inc
187 UPDATE t SET c1=10 WHERE c2="a";
188 UPDATE t SET c1=20 WHERE c1=2;
189 UPDATE t SET c1=30 WHERE c3=30;
190 UPDATE t SET c3=40 WHERE c1=30;
191 include/rpl_sync.inc
192 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
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 DROP TABLE t;
199 include/rpl_sync.inc
200 SET SQL_LOG_BIN=0;
201 SET SQL_LOG_BIN=0;
202 SET SQL_LOG_BIN=0;
203 ### Asserts that declaring a blob as part of a primary key does not break replication
204 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
205 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
206 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
207 SET SQL_LOG_BIN=1;
208 SET SQL_LOG_BIN=1;
209 SET SQL_LOG_BIN=1;
210 INSERT INTO t VALUES (1, "a", 10);
211 INSERT INTO t VALUES (2, "b", 20);
212 INSERT INTO t VALUES (3, "c", 30);
213 include/rpl_sync.inc
214 UPDATE t SET c1=10 WHERE c2="a";
215 UPDATE t SET c1=20 WHERE c1=2;
216 UPDATE t SET c1=30 WHERE c3=30;
217 UPDATE t SET c3=40 WHERE c1=30;
218 include/rpl_sync.inc
219 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
220 DELETE FROM t WHERE c2="a";
221 DELETE FROM t WHERE c1=20;
222 DELETE FROM t;
223 include/rpl_sync.inc
224 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
225 DROP TABLE t;
226 include/rpl_sync.inc
227 ### engines: MyISAM, MyISAM, InnoDB
228 SET SQL_LOG_BIN=0;
229 SET SQL_LOG_BIN=0;
230 SET SQL_LOG_BIN=0;
231 ### Asserts that updates without blobs in the AI (they are not updated)
232 ### will not break replication (check when there is no key in the table)
233 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
234 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
235 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
236 SET SQL_LOG_BIN=1;
237 SET SQL_LOG_BIN=1;
238 SET SQL_LOG_BIN=1;
239 INSERT INTO t VALUES (1, "a", 10);
240 INSERT INTO t VALUES (2, "b", 20);
241 INSERT INTO t VALUES (3, "c", 30);
242 include/rpl_sync.inc
243 UPDATE t SET c1=10 WHERE c2="a";
244 UPDATE t SET c1=20 WHERE c1=2;
245 UPDATE t SET c1=30 WHERE c3=30;
246 UPDATE t SET c3=40 WHERE c1=30;
247 include/rpl_sync.inc
248 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
249 DELETE FROM t WHERE c2="a";
250 DELETE FROM t WHERE c1=20;
251 DELETE FROM t;
252 include/rpl_sync.inc
253 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
254 DROP TABLE t;
255 include/rpl_sync.inc
256 SET SQL_LOG_BIN=0;
257 SET SQL_LOG_BIN=0;
258 SET SQL_LOG_BIN=0;
259 ### Asserts that updates without blobs in the AI (they are not updated)
260 ### will not break replication (check even if there is a key in the table)
261 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
262 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
263 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
264 SET SQL_LOG_BIN=1;
265 SET SQL_LOG_BIN=1;
266 SET SQL_LOG_BIN=1;
267 INSERT INTO t VALUES (1, "a", 10);
268 INSERT INTO t VALUES (2, "b", 20);
269 INSERT INTO t VALUES (3, "c", 30);
270 include/rpl_sync.inc
271 UPDATE t SET c1=10 WHERE c2="a";
272 UPDATE t SET c1=20 WHERE c1=2;
273 UPDATE t SET c1=30 WHERE c3=30;
274 UPDATE t SET c3=40 WHERE c1=30;
275 include/rpl_sync.inc
276 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
277 DELETE FROM t WHERE c2="a";
278 DELETE FROM t WHERE c1=20;
279 DELETE FROM t;
280 include/rpl_sync.inc
281 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
282 DROP TABLE t;
283 include/rpl_sync.inc
284 SET SQL_LOG_BIN=0;
285 SET SQL_LOG_BIN=0;
286 SET SQL_LOG_BIN=0;
287 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
288 ### will not break replication
289 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
290 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
291 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
292 SET SQL_LOG_BIN=1;
293 SET SQL_LOG_BIN=1;
294 SET SQL_LOG_BIN=1;
295 INSERT INTO t VALUES (1, "a", 10);
296 INSERT INTO t VALUES (2, "b", 20);
297 INSERT INTO t VALUES (3, "c", 30);
298 include/rpl_sync.inc
299 UPDATE t SET c1=10 WHERE c2="a";
300 UPDATE t SET c1=20 WHERE c1=2;
301 UPDATE t SET c1=30 WHERE c3=30;
302 UPDATE t SET c3=40 WHERE c1=30;
303 include/rpl_sync.inc
304 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
305 DELETE FROM t WHERE c2="a";
306 DELETE FROM t WHERE c1=20;
307 DELETE FROM t;
308 include/rpl_sync.inc
309 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
310 DROP TABLE t;
311 include/rpl_sync.inc
312 SET SQL_LOG_BIN=0;
313 SET SQL_LOG_BIN=0;
314 SET SQL_LOG_BIN=0;
315 ### Asserts that updates without blobs in the BI (PK exists int the table)
316 ### will not break replication
317 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
318 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
319 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
320 SET SQL_LOG_BIN=1;
321 SET SQL_LOG_BIN=1;
322 SET SQL_LOG_BIN=1;
323 INSERT INTO t VALUES (1, "a", 10);
324 INSERT INTO t VALUES (2, "b", 20);
325 INSERT INTO t VALUES (3, "c", 30);
326 include/rpl_sync.inc
327 UPDATE t SET c1=10 WHERE c2="a";
328 UPDATE t SET c1=20 WHERE c1=2;
329 UPDATE t SET c1=30 WHERE c3=30;
330 UPDATE t SET c3=40 WHERE c1=30;
331 include/rpl_sync.inc
332 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
333 DELETE FROM t WHERE c2="a";
334 DELETE FROM t WHERE c1=20;
335 DELETE FROM t;
336 include/rpl_sync.inc
337 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
338 DROP TABLE t;
339 include/rpl_sync.inc
340 SET SQL_LOG_BIN=0;
341 SET SQL_LOG_BIN=0;
342 SET SQL_LOG_BIN=0;
343 ### Asserts that declaring a blob in a key does not break replication
344 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
345 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
346 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
347 SET SQL_LOG_BIN=1;
348 SET SQL_LOG_BIN=1;
349 SET SQL_LOG_BIN=1;
350 INSERT INTO t VALUES (1, "a", 10);
351 INSERT INTO t VALUES (2, "b", 20);
352 INSERT INTO t VALUES (3, "c", 30);
353 include/rpl_sync.inc
354 UPDATE t SET c1=10 WHERE c2="a";
355 UPDATE t SET c1=20 WHERE c1=2;
356 UPDATE t SET c1=30 WHERE c3=30;
357 UPDATE t SET c3=40 WHERE c1=30;
358 include/rpl_sync.inc
359 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
360 DELETE FROM t WHERE c2="a";
361 DELETE FROM t WHERE c1=20;
362 DELETE FROM t;
363 include/rpl_sync.inc
364 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
365 DROP TABLE t;
366 include/rpl_sync.inc
367 SET SQL_LOG_BIN=0;
368 SET SQL_LOG_BIN=0;
369 SET SQL_LOG_BIN=0;
370 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
371 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
372 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
373 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
374 SET SQL_LOG_BIN=1;
375 SET SQL_LOG_BIN=1;
376 SET SQL_LOG_BIN=1;
377 INSERT INTO t VALUES (1, "a", 10);
378 INSERT INTO t VALUES (2, "b", 20);
379 INSERT INTO t VALUES (3, "c", 30);
380 include/rpl_sync.inc
381 UPDATE t SET c1=10 WHERE c2="a";
382 UPDATE t SET c1=20 WHERE c1=2;
383 UPDATE t SET c1=30 WHERE c3=30;
384 UPDATE t SET c3=40 WHERE c1=30;
385 include/rpl_sync.inc
386 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
387 DELETE FROM t WHERE c2="a";
388 DELETE FROM t WHERE c1=20;
389 DELETE FROM t;
390 include/rpl_sync.inc
391 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
392 DROP TABLE t;
393 include/rpl_sync.inc
394 SET SQL_LOG_BIN=0;
395 SET SQL_LOG_BIN=0;
396 SET SQL_LOG_BIN=0;
397 ### Asserts that declaring a blob as part of a primary key does not break replication
398 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
399 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
400 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
401 SET SQL_LOG_BIN=1;
402 SET SQL_LOG_BIN=1;
403 SET SQL_LOG_BIN=1;
404 INSERT INTO t VALUES (1, "a", 10);
405 INSERT INTO t VALUES (2, "b", 20);
406 INSERT INTO t VALUES (3, "c", 30);
407 include/rpl_sync.inc
408 UPDATE t SET c1=10 WHERE c2="a";
409 UPDATE t SET c1=20 WHERE c1=2;
410 UPDATE t SET c1=30 WHERE c3=30;
411 UPDATE t SET c3=40 WHERE c1=30;
412 include/rpl_sync.inc
413 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
414 DELETE FROM t WHERE c2="a";
415 DELETE FROM t WHERE c1=20;
416 DELETE FROM t;
417 include/rpl_sync.inc
418 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
419 DROP TABLE t;
420 include/rpl_sync.inc
421 ### engines: MyISAM, InnoDB, MyISAM
422 SET SQL_LOG_BIN=0;
423 SET SQL_LOG_BIN=0;
424 SET SQL_LOG_BIN=0;
425 ### Asserts that updates without blobs in the AI (they are not updated)
426 ### will not break replication (check when there is no key in the table)
427 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
428 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
429 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
430 SET SQL_LOG_BIN=1;
431 SET SQL_LOG_BIN=1;
432 SET SQL_LOG_BIN=1;
433 INSERT INTO t VALUES (1, "a", 10);
434 INSERT INTO t VALUES (2, "b", 20);
435 INSERT INTO t VALUES (3, "c", 30);
436 include/rpl_sync.inc
437 UPDATE t SET c1=10 WHERE c2="a";
438 UPDATE t SET c1=20 WHERE c1=2;
439 UPDATE t SET c1=30 WHERE c3=30;
440 UPDATE t SET c3=40 WHERE c1=30;
441 include/rpl_sync.inc
442 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
443 DELETE FROM t WHERE c2="a";
444 DELETE FROM t WHERE c1=20;
445 DELETE FROM t;
446 include/rpl_sync.inc
447 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
448 DROP TABLE t;
449 include/rpl_sync.inc
450 SET SQL_LOG_BIN=0;
451 SET SQL_LOG_BIN=0;
452 SET SQL_LOG_BIN=0;
453 ### Asserts that updates without blobs in the AI (they are not updated)
454 ### will not break replication (check even if there is a key in the table)
455 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
456 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
457 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
458 SET SQL_LOG_BIN=1;
459 SET SQL_LOG_BIN=1;
460 SET SQL_LOG_BIN=1;
461 INSERT INTO t VALUES (1, "a", 10);
462 INSERT INTO t VALUES (2, "b", 20);
463 INSERT INTO t VALUES (3, "c", 30);
464 include/rpl_sync.inc
465 UPDATE t SET c1=10 WHERE c2="a";
466 UPDATE t SET c1=20 WHERE c1=2;
467 UPDATE t SET c1=30 WHERE c3=30;
468 UPDATE t SET c3=40 WHERE c1=30;
469 include/rpl_sync.inc
470 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
471 DELETE FROM t WHERE c2="a";
472 DELETE FROM t WHERE c1=20;
473 DELETE FROM t;
474 include/rpl_sync.inc
475 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
476 DROP TABLE t;
477 include/rpl_sync.inc
478 SET SQL_LOG_BIN=0;
479 SET SQL_LOG_BIN=0;
480 SET SQL_LOG_BIN=0;
481 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
482 ### will not break replication
483 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
484 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
485 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
486 SET SQL_LOG_BIN=1;
487 SET SQL_LOG_BIN=1;
488 SET SQL_LOG_BIN=1;
489 INSERT INTO t VALUES (1, "a", 10);
490 INSERT INTO t VALUES (2, "b", 20);
491 INSERT INTO t VALUES (3, "c", 30);
492 include/rpl_sync.inc
493 UPDATE t SET c1=10 WHERE c2="a";
494 UPDATE t SET c1=20 WHERE c1=2;
495 UPDATE t SET c1=30 WHERE c3=30;
496 UPDATE t SET c3=40 WHERE c1=30;
497 include/rpl_sync.inc
498 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
499 DELETE FROM t WHERE c2="a";
500 DELETE FROM t WHERE c1=20;
501 DELETE FROM t;
502 include/rpl_sync.inc
503 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
504 DROP TABLE t;
505 include/rpl_sync.inc
506 SET SQL_LOG_BIN=0;
507 SET SQL_LOG_BIN=0;
508 SET SQL_LOG_BIN=0;
509 ### Asserts that updates without blobs in the BI (PK exists int the table)
510 ### will not break replication
511 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
512 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
513 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
514 SET SQL_LOG_BIN=1;
515 SET SQL_LOG_BIN=1;
516 SET SQL_LOG_BIN=1;
517 INSERT INTO t VALUES (1, "a", 10);
518 INSERT INTO t VALUES (2, "b", 20);
519 INSERT INTO t VALUES (3, "c", 30);
520 include/rpl_sync.inc
521 UPDATE t SET c1=10 WHERE c2="a";
522 UPDATE t SET c1=20 WHERE c1=2;
523 UPDATE t SET c1=30 WHERE c3=30;
524 UPDATE t SET c3=40 WHERE c1=30;
525 include/rpl_sync.inc
526 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
527 DELETE FROM t WHERE c2="a";
528 DELETE FROM t WHERE c1=20;
529 DELETE FROM t;
530 include/rpl_sync.inc
531 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
532 DROP TABLE t;
533 include/rpl_sync.inc
534 SET SQL_LOG_BIN=0;
535 SET SQL_LOG_BIN=0;
536 SET SQL_LOG_BIN=0;
537 ### Asserts that declaring a blob in a key does not break replication
538 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
539 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
540 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
541 SET SQL_LOG_BIN=1;
542 SET SQL_LOG_BIN=1;
543 SET SQL_LOG_BIN=1;
544 INSERT INTO t VALUES (1, "a", 10);
545 INSERT INTO t VALUES (2, "b", 20);
546 INSERT INTO t VALUES (3, "c", 30);
547 include/rpl_sync.inc
548 UPDATE t SET c1=10 WHERE c2="a";
549 UPDATE t SET c1=20 WHERE c1=2;
550 UPDATE t SET c1=30 WHERE c3=30;
551 UPDATE t SET c3=40 WHERE c1=30;
552 include/rpl_sync.inc
553 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
554 DELETE FROM t WHERE c2="a";
555 DELETE FROM t WHERE c1=20;
556 DELETE FROM t;
557 include/rpl_sync.inc
558 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
559 DROP TABLE t;
560 include/rpl_sync.inc
561 SET SQL_LOG_BIN=0;
562 SET SQL_LOG_BIN=0;
563 SET SQL_LOG_BIN=0;
564 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
565 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
566 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
567 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
568 SET SQL_LOG_BIN=1;
569 SET SQL_LOG_BIN=1;
570 SET SQL_LOG_BIN=1;
571 INSERT INTO t VALUES (1, "a", 10);
572 INSERT INTO t VALUES (2, "b", 20);
573 INSERT INTO t VALUES (3, "c", 30);
574 include/rpl_sync.inc
575 UPDATE t SET c1=10 WHERE c2="a";
576 UPDATE t SET c1=20 WHERE c1=2;
577 UPDATE t SET c1=30 WHERE c3=30;
578 UPDATE t SET c3=40 WHERE c1=30;
579 include/rpl_sync.inc
580 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
581 DELETE FROM t WHERE c2="a";
582 DELETE FROM t WHERE c1=20;
583 DELETE FROM t;
584 include/rpl_sync.inc
585 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
586 DROP TABLE t;
587 include/rpl_sync.inc
588 SET SQL_LOG_BIN=0;
589 SET SQL_LOG_BIN=0;
590 SET SQL_LOG_BIN=0;
591 ### Asserts that declaring a blob as part of a primary key does not break replication
592 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
593 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
594 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
595 SET SQL_LOG_BIN=1;
596 SET SQL_LOG_BIN=1;
597 SET SQL_LOG_BIN=1;
598 INSERT INTO t VALUES (1, "a", 10);
599 INSERT INTO t VALUES (2, "b", 20);
600 INSERT INTO t VALUES (3, "c", 30);
601 include/rpl_sync.inc
602 UPDATE t SET c1=10 WHERE c2="a";
603 UPDATE t SET c1=20 WHERE c1=2;
604 UPDATE t SET c1=30 WHERE c3=30;
605 UPDATE t SET c3=40 WHERE c1=30;
606 include/rpl_sync.inc
607 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
608 DELETE FROM t WHERE c2="a";
609 DELETE FROM t WHERE c1=20;
610 DELETE FROM t;
611 include/rpl_sync.inc
612 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
613 DROP TABLE t;
614 include/rpl_sync.inc
615 ### engines: MyISAM, InnoDB, InnoDB
616 SET SQL_LOG_BIN=0;
617 SET SQL_LOG_BIN=0;
618 SET SQL_LOG_BIN=0;
619 ### Asserts that updates without blobs in the AI (they are not updated)
620 ### will not break replication (check when there is no key in the table)
621 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
622 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
623 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
624 SET SQL_LOG_BIN=1;
625 SET SQL_LOG_BIN=1;
626 SET SQL_LOG_BIN=1;
627 INSERT INTO t VALUES (1, "a", 10);
628 INSERT INTO t VALUES (2, "b", 20);
629 INSERT INTO t VALUES (3, "c", 30);
630 include/rpl_sync.inc
631 UPDATE t SET c1=10 WHERE c2="a";
632 UPDATE t SET c1=20 WHERE c1=2;
633 UPDATE t SET c1=30 WHERE c3=30;
634 UPDATE t SET c3=40 WHERE c1=30;
635 include/rpl_sync.inc
636 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
637 DELETE FROM t WHERE c2="a";
638 DELETE FROM t WHERE c1=20;
639 DELETE FROM t;
640 include/rpl_sync.inc
641 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
642 DROP TABLE t;
643 include/rpl_sync.inc
644 SET SQL_LOG_BIN=0;
645 SET SQL_LOG_BIN=0;
646 SET SQL_LOG_BIN=0;
647 ### Asserts that updates without blobs in the AI (they are not updated)
648 ### will not break replication (check even if there is a key in the table)
649 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
650 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
651 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
652 SET SQL_LOG_BIN=1;
653 SET SQL_LOG_BIN=1;
654 SET SQL_LOG_BIN=1;
655 INSERT INTO t VALUES (1, "a", 10);
656 INSERT INTO t VALUES (2, "b", 20);
657 INSERT INTO t VALUES (3, "c", 30);
658 include/rpl_sync.inc
659 UPDATE t SET c1=10 WHERE c2="a";
660 UPDATE t SET c1=20 WHERE c1=2;
661 UPDATE t SET c1=30 WHERE c3=30;
662 UPDATE t SET c3=40 WHERE c1=30;
663 include/rpl_sync.inc
664 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
665 DELETE FROM t WHERE c2="a";
666 DELETE FROM t WHERE c1=20;
667 DELETE FROM t;
668 include/rpl_sync.inc
669 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
670 DROP TABLE t;
671 include/rpl_sync.inc
672 SET SQL_LOG_BIN=0;
673 SET SQL_LOG_BIN=0;
674 SET SQL_LOG_BIN=0;
675 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
676 ### will not break replication
677 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
678 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
679 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
680 SET SQL_LOG_BIN=1;
681 SET SQL_LOG_BIN=1;
682 SET SQL_LOG_BIN=1;
683 INSERT INTO t VALUES (1, "a", 10);
684 INSERT INTO t VALUES (2, "b", 20);
685 INSERT INTO t VALUES (3, "c", 30);
686 include/rpl_sync.inc
687 UPDATE t SET c1=10 WHERE c2="a";
688 UPDATE t SET c1=20 WHERE c1=2;
689 UPDATE t SET c1=30 WHERE c3=30;
690 UPDATE t SET c3=40 WHERE c1=30;
691 include/rpl_sync.inc
692 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
693 DELETE FROM t WHERE c2="a";
694 DELETE FROM t WHERE c1=20;
695 DELETE FROM t;
696 include/rpl_sync.inc
697 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
698 DROP TABLE t;
699 include/rpl_sync.inc
700 SET SQL_LOG_BIN=0;
701 SET SQL_LOG_BIN=0;
702 SET SQL_LOG_BIN=0;
703 ### Asserts that updates without blobs in the BI (PK exists int the table)
704 ### will not break replication
705 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
706 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
707 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
708 SET SQL_LOG_BIN=1;
709 SET SQL_LOG_BIN=1;
710 SET SQL_LOG_BIN=1;
711 INSERT INTO t VALUES (1, "a", 10);
712 INSERT INTO t VALUES (2, "b", 20);
713 INSERT INTO t VALUES (3, "c", 30);
714 include/rpl_sync.inc
715 UPDATE t SET c1=10 WHERE c2="a";
716 UPDATE t SET c1=20 WHERE c1=2;
717 UPDATE t SET c1=30 WHERE c3=30;
718 UPDATE t SET c3=40 WHERE c1=30;
719 include/rpl_sync.inc
720 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
721 DELETE FROM t WHERE c2="a";
722 DELETE FROM t WHERE c1=20;
723 DELETE FROM t;
724 include/rpl_sync.inc
725 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
726 DROP TABLE t;
727 include/rpl_sync.inc
728 SET SQL_LOG_BIN=0;
729 SET SQL_LOG_BIN=0;
730 SET SQL_LOG_BIN=0;
731 ### Asserts that declaring a blob in a key does not break replication
732 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
733 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
734 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
735 SET SQL_LOG_BIN=1;
736 SET SQL_LOG_BIN=1;
737 SET SQL_LOG_BIN=1;
738 INSERT INTO t VALUES (1, "a", 10);
739 INSERT INTO t VALUES (2, "b", 20);
740 INSERT INTO t VALUES (3, "c", 30);
741 include/rpl_sync.inc
742 UPDATE t SET c1=10 WHERE c2="a";
743 UPDATE t SET c1=20 WHERE c1=2;
744 UPDATE t SET c1=30 WHERE c3=30;
745 UPDATE t SET c3=40 WHERE c1=30;
746 include/rpl_sync.inc
747 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
748 DELETE FROM t WHERE c2="a";
749 DELETE FROM t WHERE c1=20;
750 DELETE FROM t;
751 include/rpl_sync.inc
752 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
753 DROP TABLE t;
754 include/rpl_sync.inc
755 SET SQL_LOG_BIN=0;
756 SET SQL_LOG_BIN=0;
757 SET SQL_LOG_BIN=0;
758 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
759 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
760 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
761 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
762 SET SQL_LOG_BIN=1;
763 SET SQL_LOG_BIN=1;
764 SET SQL_LOG_BIN=1;
765 INSERT INTO t VALUES (1, "a", 10);
766 INSERT INTO t VALUES (2, "b", 20);
767 INSERT INTO t VALUES (3, "c", 30);
768 include/rpl_sync.inc
769 UPDATE t SET c1=10 WHERE c2="a";
770 UPDATE t SET c1=20 WHERE c1=2;
771 UPDATE t SET c1=30 WHERE c3=30;
772 UPDATE t SET c3=40 WHERE c1=30;
773 include/rpl_sync.inc
774 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
775 DELETE FROM t WHERE c2="a";
776 DELETE FROM t WHERE c1=20;
777 DELETE FROM t;
778 include/rpl_sync.inc
779 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
780 DROP TABLE t;
781 include/rpl_sync.inc
782 SET SQL_LOG_BIN=0;
783 SET SQL_LOG_BIN=0;
784 SET SQL_LOG_BIN=0;
785 ### Asserts that declaring a blob as part of a primary key does not break replication
786 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
787 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
788 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
789 SET SQL_LOG_BIN=1;
790 SET SQL_LOG_BIN=1;
791 SET SQL_LOG_BIN=1;
792 INSERT INTO t VALUES (1, "a", 10);
793 INSERT INTO t VALUES (2, "b", 20);
794 INSERT INTO t VALUES (3, "c", 30);
795 include/rpl_sync.inc
796 UPDATE t SET c1=10 WHERE c2="a";
797 UPDATE t SET c1=20 WHERE c1=2;
798 UPDATE t SET c1=30 WHERE c3=30;
799 UPDATE t SET c3=40 WHERE c1=30;
800 include/rpl_sync.inc
801 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
802 DELETE FROM t WHERE c2="a";
803 DELETE FROM t WHERE c1=20;
804 DELETE FROM t;
805 include/rpl_sync.inc
806 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
807 DROP TABLE t;
808 include/rpl_sync.inc
809 ### engines: InnoDB, MyISAM, MyISAM
810 SET SQL_LOG_BIN=0;
811 SET SQL_LOG_BIN=0;
812 SET SQL_LOG_BIN=0;
813 ### Asserts that updates without blobs in the AI (they are not updated)
814 ### will not break replication (check when there is no key in the table)
815 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
816 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
817 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
818 SET SQL_LOG_BIN=1;
819 SET SQL_LOG_BIN=1;
820 SET SQL_LOG_BIN=1;
821 INSERT INTO t VALUES (1, "a", 10);
822 INSERT INTO t VALUES (2, "b", 20);
823 INSERT INTO t VALUES (3, "c", 30);
824 include/rpl_sync.inc
825 UPDATE t SET c1=10 WHERE c2="a";
826 UPDATE t SET c1=20 WHERE c1=2;
827 UPDATE t SET c1=30 WHERE c3=30;
828 UPDATE t SET c3=40 WHERE c1=30;
829 include/rpl_sync.inc
830 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
831 DELETE FROM t WHERE c2="a";
832 DELETE FROM t WHERE c1=20;
833 DELETE FROM t;
834 include/rpl_sync.inc
835 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
836 DROP TABLE t;
837 include/rpl_sync.inc
838 SET SQL_LOG_BIN=0;
839 SET SQL_LOG_BIN=0;
840 SET SQL_LOG_BIN=0;
841 ### Asserts that updates without blobs in the AI (they are not updated)
842 ### will not break replication (check even if there is a key in the table)
843 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
844 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
845 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
846 SET SQL_LOG_BIN=1;
847 SET SQL_LOG_BIN=1;
848 SET SQL_LOG_BIN=1;
849 INSERT INTO t VALUES (1, "a", 10);
850 INSERT INTO t VALUES (2, "b", 20);
851 INSERT INTO t VALUES (3, "c", 30);
852 include/rpl_sync.inc
853 UPDATE t SET c1=10 WHERE c2="a";
854 UPDATE t SET c1=20 WHERE c1=2;
855 UPDATE t SET c1=30 WHERE c3=30;
856 UPDATE t SET c3=40 WHERE c1=30;
857 include/rpl_sync.inc
858 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
859 DELETE FROM t WHERE c2="a";
860 DELETE FROM t WHERE c1=20;
861 DELETE FROM t;
862 include/rpl_sync.inc
863 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
864 DROP TABLE t;
865 include/rpl_sync.inc
866 SET SQL_LOG_BIN=0;
867 SET SQL_LOG_BIN=0;
868 SET SQL_LOG_BIN=0;
869 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
870 ### will not break replication
871 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
872 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
873 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
874 SET SQL_LOG_BIN=1;
875 SET SQL_LOG_BIN=1;
876 SET SQL_LOG_BIN=1;
877 INSERT INTO t VALUES (1, "a", 10);
878 INSERT INTO t VALUES (2, "b", 20);
879 INSERT INTO t VALUES (3, "c", 30);
880 include/rpl_sync.inc
881 UPDATE t SET c1=10 WHERE c2="a";
882 UPDATE t SET c1=20 WHERE c1=2;
883 UPDATE t SET c1=30 WHERE c3=30;
884 UPDATE t SET c3=40 WHERE c1=30;
885 include/rpl_sync.inc
886 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
887 DELETE FROM t WHERE c2="a";
888 DELETE FROM t WHERE c1=20;
889 DELETE FROM t;
890 include/rpl_sync.inc
891 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
892 DROP TABLE t;
893 include/rpl_sync.inc
894 SET SQL_LOG_BIN=0;
895 SET SQL_LOG_BIN=0;
896 SET SQL_LOG_BIN=0;
897 ### Asserts that updates without blobs in the BI (PK exists int the table)
898 ### will not break replication
899 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
900 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
901 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
902 SET SQL_LOG_BIN=1;
903 SET SQL_LOG_BIN=1;
904 SET SQL_LOG_BIN=1;
905 INSERT INTO t VALUES (1, "a", 10);
906 INSERT INTO t VALUES (2, "b", 20);
907 INSERT INTO t VALUES (3, "c", 30);
908 include/rpl_sync.inc
909 UPDATE t SET c1=10 WHERE c2="a";
910 UPDATE t SET c1=20 WHERE c1=2;
911 UPDATE t SET c1=30 WHERE c3=30;
912 UPDATE t SET c3=40 WHERE c1=30;
913 include/rpl_sync.inc
914 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
915 DELETE FROM t WHERE c2="a";
916 DELETE FROM t WHERE c1=20;
917 DELETE FROM t;
918 include/rpl_sync.inc
919 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
920 DROP TABLE t;
921 include/rpl_sync.inc
922 SET SQL_LOG_BIN=0;
923 SET SQL_LOG_BIN=0;
924 SET SQL_LOG_BIN=0;
925 ### Asserts that declaring a blob in a key does not break replication
926 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
927 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
928 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
929 SET SQL_LOG_BIN=1;
930 SET SQL_LOG_BIN=1;
931 SET SQL_LOG_BIN=1;
932 INSERT INTO t VALUES (1, "a", 10);
933 INSERT INTO t VALUES (2, "b", 20);
934 INSERT INTO t VALUES (3, "c", 30);
935 include/rpl_sync.inc
936 UPDATE t SET c1=10 WHERE c2="a";
937 UPDATE t SET c1=20 WHERE c1=2;
938 UPDATE t SET c1=30 WHERE c3=30;
939 UPDATE t SET c3=40 WHERE c1=30;
940 include/rpl_sync.inc
941 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
942 DELETE FROM t WHERE c2="a";
943 DELETE FROM t WHERE c1=20;
944 DELETE FROM t;
945 include/rpl_sync.inc
946 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
947 DROP TABLE t;
948 include/rpl_sync.inc
949 SET SQL_LOG_BIN=0;
950 SET SQL_LOG_BIN=0;
951 SET SQL_LOG_BIN=0;
952 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
953 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
954 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
955 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
956 SET SQL_LOG_BIN=1;
957 SET SQL_LOG_BIN=1;
958 SET SQL_LOG_BIN=1;
959 INSERT INTO t VALUES (1, "a", 10);
960 INSERT INTO t VALUES (2, "b", 20);
961 INSERT INTO t VALUES (3, "c", 30);
962 include/rpl_sync.inc
963 UPDATE t SET c1=10 WHERE c2="a";
964 UPDATE t SET c1=20 WHERE c1=2;
965 UPDATE t SET c1=30 WHERE c3=30;
966 UPDATE t SET c3=40 WHERE c1=30;
967 include/rpl_sync.inc
968 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
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 DROP TABLE t;
975 include/rpl_sync.inc
976 SET SQL_LOG_BIN=0;
977 SET SQL_LOG_BIN=0;
978 SET SQL_LOG_BIN=0;
979 ### Asserts that declaring a blob as part of a primary key does not break replication
980 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
981 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
982 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
983 SET SQL_LOG_BIN=1;
984 SET SQL_LOG_BIN=1;
985 SET SQL_LOG_BIN=1;
986 INSERT INTO t VALUES (1, "a", 10);
987 INSERT INTO t VALUES (2, "b", 20);
988 INSERT INTO t VALUES (3, "c", 30);
989 include/rpl_sync.inc
990 UPDATE t SET c1=10 WHERE c2="a";
991 UPDATE t SET c1=20 WHERE c1=2;
992 UPDATE t SET c1=30 WHERE c3=30;
993 UPDATE t SET c3=40 WHERE c1=30;
994 include/rpl_sync.inc
995 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
996 DELETE FROM t WHERE c2="a";
997 DELETE FROM t WHERE c1=20;
998 DELETE FROM t;
999 include/rpl_sync.inc
1000 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1001 DROP TABLE t;
1002 include/rpl_sync.inc
1003 ### engines: InnoDB, MyISAM, InnoDB
1004 SET SQL_LOG_BIN=0;
1005 SET SQL_LOG_BIN=0;
1006 SET SQL_LOG_BIN=0;
1007 ### Asserts that updates without blobs in the AI (they are not updated)
1008 ### will not break replication (check when there is no key in the table)
1009 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1010 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1011 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1012 SET SQL_LOG_BIN=1;
1013 SET SQL_LOG_BIN=1;
1014 SET SQL_LOG_BIN=1;
1015 INSERT INTO t VALUES (1, "a", 10);
1016 INSERT INTO t VALUES (2, "b", 20);
1017 INSERT INTO t VALUES (3, "c", 30);
1018 include/rpl_sync.inc
1019 UPDATE t SET c1=10 WHERE c2="a";
1020 UPDATE t SET c1=20 WHERE c1=2;
1021 UPDATE t SET c1=30 WHERE c3=30;
1022 UPDATE t SET c3=40 WHERE c1=30;
1023 include/rpl_sync.inc
1024 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1025 DELETE FROM t WHERE c2="a";
1026 DELETE FROM t WHERE c1=20;
1027 DELETE FROM t;
1028 include/rpl_sync.inc
1029 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1030 DROP TABLE t;
1031 include/rpl_sync.inc
1032 SET SQL_LOG_BIN=0;
1033 SET SQL_LOG_BIN=0;
1034 SET SQL_LOG_BIN=0;
1035 ### Asserts that updates without blobs in the AI (they are not updated)
1036 ### will not break replication (check even if there is a key in the table)
1037 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1038 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1039 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1040 SET SQL_LOG_BIN=1;
1041 SET SQL_LOG_BIN=1;
1042 SET SQL_LOG_BIN=1;
1043 INSERT INTO t VALUES (1, "a", 10);
1044 INSERT INTO t VALUES (2, "b", 20);
1045 INSERT INTO t VALUES (3, "c", 30);
1046 include/rpl_sync.inc
1047 UPDATE t SET c1=10 WHERE c2="a";
1048 UPDATE t SET c1=20 WHERE c1=2;
1049 UPDATE t SET c1=30 WHERE c3=30;
1050 UPDATE t SET c3=40 WHERE c1=30;
1051 include/rpl_sync.inc
1052 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1053 DELETE FROM t WHERE c2="a";
1054 DELETE FROM t WHERE c1=20;
1055 DELETE FROM t;
1056 include/rpl_sync.inc
1057 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1058 DROP TABLE t;
1059 include/rpl_sync.inc
1060 SET SQL_LOG_BIN=0;
1061 SET SQL_LOG_BIN=0;
1062 SET SQL_LOG_BIN=0;
1063 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
1064 ### will not break replication
1065 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1066 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1067 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1068 SET SQL_LOG_BIN=1;
1069 SET SQL_LOG_BIN=1;
1070 SET SQL_LOG_BIN=1;
1071 INSERT INTO t VALUES (1, "a", 10);
1072 INSERT INTO t VALUES (2, "b", 20);
1073 INSERT INTO t VALUES (3, "c", 30);
1074 include/rpl_sync.inc
1075 UPDATE t SET c1=10 WHERE c2="a";
1076 UPDATE t SET c1=20 WHERE c1=2;
1077 UPDATE t SET c1=30 WHERE c3=30;
1078 UPDATE t SET c3=40 WHERE c1=30;
1079 include/rpl_sync.inc
1080 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1081 DELETE FROM t WHERE c2="a";
1082 DELETE FROM t WHERE c1=20;
1083 DELETE FROM t;
1084 include/rpl_sync.inc
1085 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1086 DROP TABLE t;
1087 include/rpl_sync.inc
1088 SET SQL_LOG_BIN=0;
1089 SET SQL_LOG_BIN=0;
1090 SET SQL_LOG_BIN=0;
1091 ### Asserts that updates without blobs in the BI (PK exists int the table)
1092 ### will not break replication
1093 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1094 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1095 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1096 SET SQL_LOG_BIN=1;
1097 SET SQL_LOG_BIN=1;
1098 SET SQL_LOG_BIN=1;
1099 INSERT INTO t VALUES (1, "a", 10);
1100 INSERT INTO t VALUES (2, "b", 20);
1101 INSERT INTO t VALUES (3, "c", 30);
1102 include/rpl_sync.inc
1103 UPDATE t SET c1=10 WHERE c2="a";
1104 UPDATE t SET c1=20 WHERE c1=2;
1105 UPDATE t SET c1=30 WHERE c3=30;
1106 UPDATE t SET c3=40 WHERE c1=30;
1107 include/rpl_sync.inc
1108 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1109 DELETE FROM t WHERE c2="a";
1110 DELETE FROM t WHERE c1=20;
1111 DELETE FROM t;
1112 include/rpl_sync.inc
1113 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1114 DROP TABLE t;
1115 include/rpl_sync.inc
1116 SET SQL_LOG_BIN=0;
1117 SET SQL_LOG_BIN=0;
1118 SET SQL_LOG_BIN=0;
1119 ### Asserts that declaring a blob in a key does not break replication
1120 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1121 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1122 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1123 SET SQL_LOG_BIN=1;
1124 SET SQL_LOG_BIN=1;
1125 SET SQL_LOG_BIN=1;
1126 INSERT INTO t VALUES (1, "a", 10);
1127 INSERT INTO t VALUES (2, "b", 20);
1128 INSERT INTO t VALUES (3, "c", 30);
1129 include/rpl_sync.inc
1130 UPDATE t SET c1=10 WHERE c2="a";
1131 UPDATE t SET c1=20 WHERE c1=2;
1132 UPDATE t SET c1=30 WHERE c3=30;
1133 UPDATE t SET c3=40 WHERE c1=30;
1134 include/rpl_sync.inc
1135 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1136 DELETE FROM t WHERE c2="a";
1137 DELETE FROM t WHERE c1=20;
1138 DELETE FROM t;
1139 include/rpl_sync.inc
1140 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1141 DROP TABLE t;
1142 include/rpl_sync.inc
1143 SET SQL_LOG_BIN=0;
1144 SET SQL_LOG_BIN=0;
1145 SET SQL_LOG_BIN=0;
1146 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1147 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1148 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1149 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1150 SET SQL_LOG_BIN=1;
1151 SET SQL_LOG_BIN=1;
1152 SET SQL_LOG_BIN=1;
1153 INSERT INTO t VALUES (1, "a", 10);
1154 INSERT INTO t VALUES (2, "b", 20);
1155 INSERT INTO t VALUES (3, "c", 30);
1156 include/rpl_sync.inc
1157 UPDATE t SET c1=10 WHERE c2="a";
1158 UPDATE t SET c1=20 WHERE c1=2;
1159 UPDATE t SET c1=30 WHERE c3=30;
1160 UPDATE t SET c3=40 WHERE c1=30;
1161 include/rpl_sync.inc
1162 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1163 DELETE FROM t WHERE c2="a";
1164 DELETE FROM t WHERE c1=20;
1165 DELETE FROM t;
1166 include/rpl_sync.inc
1167 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1168 DROP TABLE t;
1169 include/rpl_sync.inc
1170 SET SQL_LOG_BIN=0;
1171 SET SQL_LOG_BIN=0;
1172 SET SQL_LOG_BIN=0;
1173 ### Asserts that declaring a blob as part of a primary key does not break replication
1174 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1175 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1176 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1177 SET SQL_LOG_BIN=1;
1178 SET SQL_LOG_BIN=1;
1179 SET SQL_LOG_BIN=1;
1180 INSERT INTO t VALUES (1, "a", 10);
1181 INSERT INTO t VALUES (2, "b", 20);
1182 INSERT INTO t VALUES (3, "c", 30);
1183 include/rpl_sync.inc
1184 UPDATE t SET c1=10 WHERE c2="a";
1185 UPDATE t SET c1=20 WHERE c1=2;
1186 UPDATE t SET c1=30 WHERE c3=30;
1187 UPDATE t SET c3=40 WHERE c1=30;
1188 include/rpl_sync.inc
1189 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1190 DELETE FROM t WHERE c2="a";
1191 DELETE FROM t WHERE c1=20;
1192 DELETE FROM t;
1193 include/rpl_sync.inc
1194 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1195 DROP TABLE t;
1196 include/rpl_sync.inc
1197 ### engines: InnoDB, InnoDB, MyISAM
1198 SET SQL_LOG_BIN=0;
1199 SET SQL_LOG_BIN=0;
1200 SET SQL_LOG_BIN=0;
1201 ### Asserts that updates without blobs in the AI (they are not updated)
1202 ### will not break replication (check when there is no key in the table)
1203 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1204 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1205 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1206 SET SQL_LOG_BIN=1;
1207 SET SQL_LOG_BIN=1;
1208 SET SQL_LOG_BIN=1;
1209 INSERT INTO t VALUES (1, "a", 10);
1210 INSERT INTO t VALUES (2, "b", 20);
1211 INSERT INTO t VALUES (3, "c", 30);
1212 include/rpl_sync.inc
1213 UPDATE t SET c1=10 WHERE c2="a";
1214 UPDATE t SET c1=20 WHERE c1=2;
1215 UPDATE t SET c1=30 WHERE c3=30;
1216 UPDATE t SET c3=40 WHERE c1=30;
1217 include/rpl_sync.inc
1218 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1219 DELETE FROM t WHERE c2="a";
1220 DELETE FROM t WHERE c1=20;
1221 DELETE FROM t;
1222 include/rpl_sync.inc
1223 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1224 DROP TABLE t;
1225 include/rpl_sync.inc
1226 SET SQL_LOG_BIN=0;
1227 SET SQL_LOG_BIN=0;
1228 SET SQL_LOG_BIN=0;
1229 ### Asserts that updates without blobs in the AI (they are not updated)
1230 ### will not break replication (check even if there is a key in the table)
1231 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1232 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1233 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1234 SET SQL_LOG_BIN=1;
1235 SET SQL_LOG_BIN=1;
1236 SET SQL_LOG_BIN=1;
1237 INSERT INTO t VALUES (1, "a", 10);
1238 INSERT INTO t VALUES (2, "b", 20);
1239 INSERT INTO t VALUES (3, "c", 30);
1240 include/rpl_sync.inc
1241 UPDATE t SET c1=10 WHERE c2="a";
1242 UPDATE t SET c1=20 WHERE c1=2;
1243 UPDATE t SET c1=30 WHERE c3=30;
1244 UPDATE t SET c3=40 WHERE c1=30;
1245 include/rpl_sync.inc
1246 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1247 DELETE FROM t WHERE c2="a";
1248 DELETE FROM t WHERE c1=20;
1249 DELETE FROM t;
1250 include/rpl_sync.inc
1251 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1252 DROP TABLE t;
1253 include/rpl_sync.inc
1254 SET SQL_LOG_BIN=0;
1255 SET SQL_LOG_BIN=0;
1256 SET SQL_LOG_BIN=0;
1257 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
1258 ### will not break replication
1259 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1260 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1261 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1262 SET SQL_LOG_BIN=1;
1263 SET SQL_LOG_BIN=1;
1264 SET SQL_LOG_BIN=1;
1265 INSERT INTO t VALUES (1, "a", 10);
1266 INSERT INTO t VALUES (2, "b", 20);
1267 INSERT INTO t VALUES (3, "c", 30);
1268 include/rpl_sync.inc
1269 UPDATE t SET c1=10 WHERE c2="a";
1270 UPDATE t SET c1=20 WHERE c1=2;
1271 UPDATE t SET c1=30 WHERE c3=30;
1272 UPDATE t SET c3=40 WHERE c1=30;
1273 include/rpl_sync.inc
1274 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1275 DELETE FROM t WHERE c2="a";
1276 DELETE FROM t WHERE c1=20;
1277 DELETE FROM t;
1278 include/rpl_sync.inc
1279 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1280 DROP TABLE t;
1281 include/rpl_sync.inc
1282 SET SQL_LOG_BIN=0;
1283 SET SQL_LOG_BIN=0;
1284 SET SQL_LOG_BIN=0;
1285 ### Asserts that updates without blobs in the BI (PK exists int the table)
1286 ### will not break replication
1287 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1288 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1289 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1290 SET SQL_LOG_BIN=1;
1291 SET SQL_LOG_BIN=1;
1292 SET SQL_LOG_BIN=1;
1293 INSERT INTO t VALUES (1, "a", 10);
1294 INSERT INTO t VALUES (2, "b", 20);
1295 INSERT INTO t VALUES (3, "c", 30);
1296 include/rpl_sync.inc
1297 UPDATE t SET c1=10 WHERE c2="a";
1298 UPDATE t SET c1=20 WHERE c1=2;
1299 UPDATE t SET c1=30 WHERE c3=30;
1300 UPDATE t SET c3=40 WHERE c1=30;
1301 include/rpl_sync.inc
1302 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1303 DELETE FROM t WHERE c2="a";
1304 DELETE FROM t WHERE c1=20;
1305 DELETE FROM t;
1306 include/rpl_sync.inc
1307 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1308 DROP TABLE t;
1309 include/rpl_sync.inc
1310 SET SQL_LOG_BIN=0;
1311 SET SQL_LOG_BIN=0;
1312 SET SQL_LOG_BIN=0;
1313 ### Asserts that declaring a blob in a key does not break replication
1314 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1315 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1316 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1317 SET SQL_LOG_BIN=1;
1318 SET SQL_LOG_BIN=1;
1319 SET SQL_LOG_BIN=1;
1320 INSERT INTO t VALUES (1, "a", 10);
1321 INSERT INTO t VALUES (2, "b", 20);
1322 INSERT INTO t VALUES (3, "c", 30);
1323 include/rpl_sync.inc
1324 UPDATE t SET c1=10 WHERE c2="a";
1325 UPDATE t SET c1=20 WHERE c1=2;
1326 UPDATE t SET c1=30 WHERE c3=30;
1327 UPDATE t SET c3=40 WHERE c1=30;
1328 include/rpl_sync.inc
1329 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1330 DELETE FROM t WHERE c2="a";
1331 DELETE FROM t WHERE c1=20;
1332 DELETE FROM t;
1333 include/rpl_sync.inc
1334 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1335 DROP TABLE t;
1336 include/rpl_sync.inc
1337 SET SQL_LOG_BIN=0;
1338 SET SQL_LOG_BIN=0;
1339 SET SQL_LOG_BIN=0;
1340 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1341 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1342 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1343 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1344 SET SQL_LOG_BIN=1;
1345 SET SQL_LOG_BIN=1;
1346 SET SQL_LOG_BIN=1;
1347 INSERT INTO t VALUES (1, "a", 10);
1348 INSERT INTO t VALUES (2, "b", 20);
1349 INSERT INTO t VALUES (3, "c", 30);
1350 include/rpl_sync.inc
1351 UPDATE t SET c1=10 WHERE c2="a";
1352 UPDATE t SET c1=20 WHERE c1=2;
1353 UPDATE t SET c1=30 WHERE c3=30;
1354 UPDATE t SET c3=40 WHERE c1=30;
1355 include/rpl_sync.inc
1356 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1357 DELETE FROM t WHERE c2="a";
1358 DELETE FROM t WHERE c1=20;
1359 DELETE FROM t;
1360 include/rpl_sync.inc
1361 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1362 DROP TABLE t;
1363 include/rpl_sync.inc
1364 SET SQL_LOG_BIN=0;
1365 SET SQL_LOG_BIN=0;
1366 SET SQL_LOG_BIN=0;
1367 ### Asserts that declaring a blob as part of a primary key does not break replication
1368 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1369 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1370 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1371 SET SQL_LOG_BIN=1;
1372 SET SQL_LOG_BIN=1;
1373 SET SQL_LOG_BIN=1;
1374 INSERT INTO t VALUES (1, "a", 10);
1375 INSERT INTO t VALUES (2, "b", 20);
1376 INSERT INTO t VALUES (3, "c", 30);
1377 include/rpl_sync.inc
1378 UPDATE t SET c1=10 WHERE c2="a";
1379 UPDATE t SET c1=20 WHERE c1=2;
1380 UPDATE t SET c1=30 WHERE c3=30;
1381 UPDATE t SET c3=40 WHERE c1=30;
1382 include/rpl_sync.inc
1383 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1384 DELETE FROM t WHERE c2="a";
1385 DELETE FROM t WHERE c1=20;
1386 DELETE FROM t;
1387 include/rpl_sync.inc
1388 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1389 DROP TABLE t;
1390 include/rpl_sync.inc
1391 ### engines: InnoDB, InnoDB, InnoDB
1392 SET SQL_LOG_BIN=0;
1393 SET SQL_LOG_BIN=0;
1394 SET SQL_LOG_BIN=0;
1395 ### Asserts that updates without blobs in the AI (they are not updated)
1396 ### will not break replication (check when there is no key in the table)
1397 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1398 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1399 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1400 SET SQL_LOG_BIN=1;
1401 SET SQL_LOG_BIN=1;
1402 SET SQL_LOG_BIN=1;
1403 INSERT INTO t VALUES (1, "a", 10);
1404 INSERT INTO t VALUES (2, "b", 20);
1405 INSERT INTO t VALUES (3, "c", 30);
1406 include/rpl_sync.inc
1407 UPDATE t SET c1=10 WHERE c2="a";
1408 UPDATE t SET c1=20 WHERE c1=2;
1409 UPDATE t SET c1=30 WHERE c3=30;
1410 UPDATE t SET c3=40 WHERE c1=30;
1411 include/rpl_sync.inc
1412 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1413 DELETE FROM t WHERE c2="a";
1414 DELETE FROM t WHERE c1=20;
1415 DELETE FROM t;
1416 include/rpl_sync.inc
1417 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1418 DROP TABLE t;
1419 include/rpl_sync.inc
1420 SET SQL_LOG_BIN=0;
1421 SET SQL_LOG_BIN=0;
1422 SET SQL_LOG_BIN=0;
1423 ### Asserts that updates without blobs in the AI (they are not updated)
1424 ### will not break replication (check even if there is a key in the table)
1425 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1426 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1427 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1428 SET SQL_LOG_BIN=1;
1429 SET SQL_LOG_BIN=1;
1430 SET SQL_LOG_BIN=1;
1431 INSERT INTO t VALUES (1, "a", 10);
1432 INSERT INTO t VALUES (2, "b", 20);
1433 INSERT INTO t VALUES (3, "c", 30);
1434 include/rpl_sync.inc
1435 UPDATE t SET c1=10 WHERE c2="a";
1436 UPDATE t SET c1=20 WHERE c1=2;
1437 UPDATE t SET c1=30 WHERE c3=30;
1438 UPDATE t SET c3=40 WHERE c1=30;
1439 include/rpl_sync.inc
1440 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1441 DELETE FROM t WHERE c2="a";
1442 DELETE FROM t WHERE c1=20;
1443 DELETE FROM t;
1444 include/rpl_sync.inc
1445 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1446 DROP TABLE t;
1447 include/rpl_sync.inc
1448 SET SQL_LOG_BIN=0;
1449 SET SQL_LOG_BIN=0;
1450 SET SQL_LOG_BIN=0;
1451 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
1452 ### will not break replication
1453 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1454 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1455 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1456 SET SQL_LOG_BIN=1;
1457 SET SQL_LOG_BIN=1;
1458 SET SQL_LOG_BIN=1;
1459 INSERT INTO t VALUES (1, "a", 10);
1460 INSERT INTO t VALUES (2, "b", 20);
1461 INSERT INTO t VALUES (3, "c", 30);
1462 include/rpl_sync.inc
1463 UPDATE t SET c1=10 WHERE c2="a";
1464 UPDATE t SET c1=20 WHERE c1=2;
1465 UPDATE t SET c1=30 WHERE c3=30;
1466 UPDATE t SET c3=40 WHERE c1=30;
1467 include/rpl_sync.inc
1468 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1469 DELETE FROM t WHERE c2="a";
1470 DELETE FROM t WHERE c1=20;
1471 DELETE FROM t;
1472 include/rpl_sync.inc
1473 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1474 DROP TABLE t;
1475 include/rpl_sync.inc
1476 SET SQL_LOG_BIN=0;
1477 SET SQL_LOG_BIN=0;
1478 SET SQL_LOG_BIN=0;
1479 ### Asserts that updates without blobs in the BI (PK exists int the table)
1480 ### will not break replication
1481 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1482 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1483 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1484 SET SQL_LOG_BIN=1;
1485 SET SQL_LOG_BIN=1;
1486 SET SQL_LOG_BIN=1;
1487 INSERT INTO t VALUES (1, "a", 10);
1488 INSERT INTO t VALUES (2, "b", 20);
1489 INSERT INTO t VALUES (3, "c", 30);
1490 include/rpl_sync.inc
1491 UPDATE t SET c1=10 WHERE c2="a";
1492 UPDATE t SET c1=20 WHERE c1=2;
1493 UPDATE t SET c1=30 WHERE c3=30;
1494 UPDATE t SET c3=40 WHERE c1=30;
1495 include/rpl_sync.inc
1496 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1497 DELETE FROM t WHERE c2="a";
1498 DELETE FROM t WHERE c1=20;
1499 DELETE FROM t;
1500 include/rpl_sync.inc
1501 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1502 DROP TABLE t;
1503 include/rpl_sync.inc
1504 SET SQL_LOG_BIN=0;
1505 SET SQL_LOG_BIN=0;
1506 SET SQL_LOG_BIN=0;
1507 ### Asserts that declaring a blob in a key does not break replication
1508 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1509 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1510 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1511 SET SQL_LOG_BIN=1;
1512 SET SQL_LOG_BIN=1;
1513 SET SQL_LOG_BIN=1;
1514 INSERT INTO t VALUES (1, "a", 10);
1515 INSERT INTO t VALUES (2, "b", 20);
1516 INSERT INTO t VALUES (3, "c", 30);
1517 include/rpl_sync.inc
1518 UPDATE t SET c1=10 WHERE c2="a";
1519 UPDATE t SET c1=20 WHERE c1=2;
1520 UPDATE t SET c1=30 WHERE c3=30;
1521 UPDATE t SET c3=40 WHERE c1=30;
1522 include/rpl_sync.inc
1523 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1524 DELETE FROM t WHERE c2="a";
1525 DELETE FROM t WHERE c1=20;
1526 DELETE FROM t;
1527 include/rpl_sync.inc
1528 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1529 DROP TABLE t;
1530 include/rpl_sync.inc
1531 SET SQL_LOG_BIN=0;
1532 SET SQL_LOG_BIN=0;
1533 SET SQL_LOG_BIN=0;
1534 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1535 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1536 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1537 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1538 SET SQL_LOG_BIN=1;
1539 SET SQL_LOG_BIN=1;
1540 SET SQL_LOG_BIN=1;
1541 INSERT INTO t VALUES (1, "a", 10);
1542 INSERT INTO t VALUES (2, "b", 20);
1543 INSERT INTO t VALUES (3, "c", 30);
1544 include/rpl_sync.inc
1545 UPDATE t SET c1=10 WHERE c2="a";
1546 UPDATE t SET c1=20 WHERE c1=2;
1547 UPDATE t SET c1=30 WHERE c3=30;
1548 UPDATE t SET c3=40 WHERE c1=30;
1549 include/rpl_sync.inc
1550 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1551 DELETE FROM t WHERE c2="a";
1552 DELETE FROM t WHERE c1=20;
1553 DELETE FROM t;
1554 include/rpl_sync.inc
1555 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1556 DROP TABLE t;
1557 include/rpl_sync.inc
1558 SET SQL_LOG_BIN=0;
1559 SET SQL_LOG_BIN=0;
1560 SET SQL_LOG_BIN=0;
1561 ### Asserts that declaring a blob as part of a primary key does not break replication
1562 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1563 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1564 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1565 SET SQL_LOG_BIN=1;
1566 SET SQL_LOG_BIN=1;
1567 SET SQL_LOG_BIN=1;
1568 INSERT INTO t VALUES (1, "a", 10);
1569 INSERT INTO t VALUES (2, "b", 20);
1570 INSERT INTO t VALUES (3, "c", 30);
1571 include/rpl_sync.inc
1572 UPDATE t SET c1=10 WHERE c2="a";
1573 UPDATE t SET c1=20 WHERE c1=2;
1574 UPDATE t SET c1=30 WHERE c3=30;
1575 UPDATE t SET c3=40 WHERE c1=30;
1576 include/rpl_sync.inc
1577 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1578 DELETE FROM t WHERE c2="a";
1579 DELETE FROM t WHERE c1=20;
1580 DELETE FROM t;
1581 include/rpl_sync.inc
1582 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1583 DROP TABLE t;
1584 include/rpl_sync.inc
1585 CON: 'server_1', IMG: 'MINIMAL', RESTART SLAVE: 'N'
1586 SET SESSION binlog_row_image= 'MINIMAL';
1587 SET GLOBAL binlog_row_image= 'MINIMAL';
1588 FLUSH TABLES;
1589 SHOW VARIABLES LIKE 'binlog_row_image';
1590 Variable_name Value
1591 binlog_row_image MINIMAL
1592 CON: 'server_2', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
1593 SET SESSION binlog_row_image= 'MINIMAL';
1594 SET GLOBAL binlog_row_image= 'MINIMAL';
1595 include/stop_slave.inc
1596 include/start_slave.inc
1597 FLUSH TABLES;
1598 SHOW VARIABLES LIKE 'binlog_row_image';
1599 Variable_name Value
1600 binlog_row_image MINIMAL
1601 CON: 'server_3', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
1602 SET SESSION binlog_row_image= 'MINIMAL';
1603 SET GLOBAL binlog_row_image= 'MINIMAL';
1604 include/stop_slave.inc
1605 include/start_slave.inc
1606 FLUSH TABLES;
1607 SHOW VARIABLES LIKE 'binlog_row_image';
1608 Variable_name Value
1609 binlog_row_image MINIMAL
1610 ### engines: MyISAM, MyISAM, MyISAM
1611 SET SQL_LOG_BIN=0;
1612 SET SQL_LOG_BIN=0;
1613 SET SQL_LOG_BIN=0;
1614 ### Asserts that updates without blobs in the AI (they are not updated)
1615 ### will not break replication (check when there is no key in the table)
1616 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1617 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1618 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1619 SET SQL_LOG_BIN=1;
1620 SET SQL_LOG_BIN=1;
1621 SET SQL_LOG_BIN=1;
1622 INSERT INTO t VALUES (1, "a", 10);
1623 INSERT INTO t VALUES (2, "b", 20);
1624 INSERT INTO t VALUES (3, "c", 30);
1625 include/rpl_sync.inc
1626 UPDATE t SET c1=10 WHERE c2="a";
1627 UPDATE t SET c1=20 WHERE c1=2;
1628 UPDATE t SET c1=30 WHERE c3=30;
1629 UPDATE t SET c3=40 WHERE c1=30;
1630 include/rpl_sync.inc
1631 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1632 DELETE FROM t WHERE c2="a";
1633 DELETE FROM t WHERE c1=20;
1634 DELETE FROM t;
1635 include/rpl_sync.inc
1636 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1637 DROP TABLE t;
1638 include/rpl_sync.inc
1639 SET SQL_LOG_BIN=0;
1640 SET SQL_LOG_BIN=0;
1641 SET SQL_LOG_BIN=0;
1642 ### Asserts that updates without blobs in the AI (they are not updated)
1643 ### will not break replication (check even if there is a key in the table)
1644 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1645 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1646 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1647 SET SQL_LOG_BIN=1;
1648 SET SQL_LOG_BIN=1;
1649 SET SQL_LOG_BIN=1;
1650 INSERT INTO t VALUES (1, "a", 10);
1651 INSERT INTO t VALUES (2, "b", 20);
1652 INSERT INTO t VALUES (3, "c", 30);
1653 include/rpl_sync.inc
1654 UPDATE t SET c1=10 WHERE c2="a";
1655 UPDATE t SET c1=20 WHERE c1=2;
1656 UPDATE t SET c1=30 WHERE c3=30;
1657 UPDATE t SET c3=40 WHERE c1=30;
1658 include/rpl_sync.inc
1659 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1660 DELETE FROM t WHERE c2="a";
1661 DELETE FROM t WHERE c1=20;
1662 DELETE FROM t;
1663 include/rpl_sync.inc
1664 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1665 DROP TABLE t;
1666 include/rpl_sync.inc
1667 SET SQL_LOG_BIN=0;
1668 SET SQL_LOG_BIN=0;
1669 SET SQL_LOG_BIN=0;
1670 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
1671 ### will not break replication
1672 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1673 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1674 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1675 SET SQL_LOG_BIN=1;
1676 SET SQL_LOG_BIN=1;
1677 SET SQL_LOG_BIN=1;
1678 INSERT INTO t VALUES (1, "a", 10);
1679 INSERT INTO t VALUES (2, "b", 20);
1680 INSERT INTO t VALUES (3, "c", 30);
1681 include/rpl_sync.inc
1682 UPDATE t SET c1=10 WHERE c2="a";
1683 UPDATE t SET c1=20 WHERE c1=2;
1684 UPDATE t SET c1=30 WHERE c3=30;
1685 UPDATE t SET c3=40 WHERE c1=30;
1686 include/rpl_sync.inc
1687 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1688 DELETE FROM t WHERE c2="a";
1689 DELETE FROM t WHERE c1=20;
1690 DELETE FROM t;
1691 include/rpl_sync.inc
1692 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1693 DROP TABLE t;
1694 include/rpl_sync.inc
1695 SET SQL_LOG_BIN=0;
1696 SET SQL_LOG_BIN=0;
1697 SET SQL_LOG_BIN=0;
1698 ### Asserts that updates without blobs in the BI (PK exists int the table)
1699 ### will not break replication
1700 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1701 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1702 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1703 SET SQL_LOG_BIN=1;
1704 SET SQL_LOG_BIN=1;
1705 SET SQL_LOG_BIN=1;
1706 INSERT INTO t VALUES (1, "a", 10);
1707 INSERT INTO t VALUES (2, "b", 20);
1708 INSERT INTO t VALUES (3, "c", 30);
1709 include/rpl_sync.inc
1710 UPDATE t SET c1=10 WHERE c2="a";
1711 UPDATE t SET c1=20 WHERE c1=2;
1712 UPDATE t SET c1=30 WHERE c3=30;
1713 UPDATE t SET c3=40 WHERE c1=30;
1714 include/rpl_sync.inc
1715 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1716 DELETE FROM t WHERE c2="a";
1717 DELETE FROM t WHERE c1=20;
1718 DELETE FROM t;
1719 include/rpl_sync.inc
1720 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1721 DROP TABLE t;
1722 include/rpl_sync.inc
1723 SET SQL_LOG_BIN=0;
1724 SET SQL_LOG_BIN=0;
1725 SET SQL_LOG_BIN=0;
1726 ### Asserts that declaring a blob in a key does not break replication
1727 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1728 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1729 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1730 SET SQL_LOG_BIN=1;
1731 SET SQL_LOG_BIN=1;
1732 SET SQL_LOG_BIN=1;
1733 INSERT INTO t VALUES (1, "a", 10);
1734 INSERT INTO t VALUES (2, "b", 20);
1735 INSERT INTO t VALUES (3, "c", 30);
1736 include/rpl_sync.inc
1737 UPDATE t SET c1=10 WHERE c2="a";
1738 UPDATE t SET c1=20 WHERE c1=2;
1739 UPDATE t SET c1=30 WHERE c3=30;
1740 UPDATE t SET c3=40 WHERE c1=30;
1741 include/rpl_sync.inc
1742 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
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 DROP TABLE t;
1749 include/rpl_sync.inc
1750 SET SQL_LOG_BIN=0;
1751 SET SQL_LOG_BIN=0;
1752 SET SQL_LOG_BIN=0;
1753 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1754 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1755 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1756 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1757 SET SQL_LOG_BIN=1;
1758 SET SQL_LOG_BIN=1;
1759 SET SQL_LOG_BIN=1;
1760 INSERT INTO t VALUES (1, "a", 10);
1761 INSERT INTO t VALUES (2, "b", 20);
1762 INSERT INTO t VALUES (3, "c", 30);
1763 include/rpl_sync.inc
1764 UPDATE t SET c1=10 WHERE c2="a";
1765 UPDATE t SET c1=20 WHERE c1=2;
1766 UPDATE t SET c1=30 WHERE c3=30;
1767 UPDATE t SET c3=40 WHERE c1=30;
1768 include/rpl_sync.inc
1769 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1770 DELETE FROM t WHERE c2="a";
1771 DELETE FROM t WHERE c1=20;
1772 DELETE FROM t;
1773 include/rpl_sync.inc
1774 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1775 DROP TABLE t;
1776 include/rpl_sync.inc
1777 SET SQL_LOG_BIN=0;
1778 SET SQL_LOG_BIN=0;
1779 SET SQL_LOG_BIN=0;
1780 ### Asserts that declaring a blob as part of a primary key does not break replication
1781 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1782 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1783 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1784 SET SQL_LOG_BIN=1;
1785 SET SQL_LOG_BIN=1;
1786 SET SQL_LOG_BIN=1;
1787 INSERT INTO t VALUES (1, "a", 10);
1788 INSERT INTO t VALUES (2, "b", 20);
1789 INSERT INTO t VALUES (3, "c", 30);
1790 include/rpl_sync.inc
1791 UPDATE t SET c1=10 WHERE c2="a";
1792 UPDATE t SET c1=20 WHERE c1=2;
1793 UPDATE t SET c1=30 WHERE c3=30;
1794 UPDATE t SET c3=40 WHERE c1=30;
1795 include/rpl_sync.inc
1796 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1797 DELETE FROM t WHERE c2="a";
1798 DELETE FROM t WHERE c1=20;
1799 DELETE FROM t;
1800 include/rpl_sync.inc
1801 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1802 DROP TABLE t;
1803 include/rpl_sync.inc
1804 ### engines: MyISAM, MyISAM, InnoDB
1805 SET SQL_LOG_BIN=0;
1806 SET SQL_LOG_BIN=0;
1807 SET SQL_LOG_BIN=0;
1808 ### Asserts that updates without blobs in the AI (they are not updated)
1809 ### will not break replication (check when there is no key in the table)
1810 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1811 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
1812 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
1813 SET SQL_LOG_BIN=1;
1814 SET SQL_LOG_BIN=1;
1815 SET SQL_LOG_BIN=1;
1816 INSERT INTO t VALUES (1, "a", 10);
1817 INSERT INTO t VALUES (2, "b", 20);
1818 INSERT INTO t VALUES (3, "c", 30);
1819 include/rpl_sync.inc
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 DELETE FROM t WHERE c2="a";
1827 DELETE FROM t WHERE c1=20;
1828 DELETE FROM t;
1829 include/rpl_sync.inc
1830 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1831 DROP TABLE t;
1832 include/rpl_sync.inc
1833 SET SQL_LOG_BIN=0;
1834 SET SQL_LOG_BIN=0;
1835 SET SQL_LOG_BIN=0;
1836 ### Asserts that updates without blobs in the AI (they are not updated)
1837 ### will not break replication (check even if there is a key in the table)
1838 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1839 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
1840 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
1841 SET SQL_LOG_BIN=1;
1842 SET SQL_LOG_BIN=1;
1843 SET SQL_LOG_BIN=1;
1844 INSERT INTO t VALUES (1, "a", 10);
1845 INSERT INTO t VALUES (2, "b", 20);
1846 INSERT INTO t VALUES (3, "c", 30);
1847 include/rpl_sync.inc
1848 UPDATE t SET c1=10 WHERE c2="a";
1849 UPDATE t SET c1=20 WHERE c1=2;
1850 UPDATE t SET c1=30 WHERE c3=30;
1851 UPDATE t SET c3=40 WHERE c1=30;
1852 include/rpl_sync.inc
1853 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1854 DELETE FROM t WHERE c2="a";
1855 DELETE FROM t WHERE c1=20;
1856 DELETE FROM t;
1857 include/rpl_sync.inc
1858 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1859 DROP TABLE t;
1860 include/rpl_sync.inc
1861 SET SQL_LOG_BIN=0;
1862 SET SQL_LOG_BIN=0;
1863 SET SQL_LOG_BIN=0;
1864 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
1865 ### will not break replication
1866 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1867 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
1868 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
1869 SET SQL_LOG_BIN=1;
1870 SET SQL_LOG_BIN=1;
1871 SET SQL_LOG_BIN=1;
1872 INSERT INTO t VALUES (1, "a", 10);
1873 INSERT INTO t VALUES (2, "b", 20);
1874 INSERT INTO t VALUES (3, "c", 30);
1875 include/rpl_sync.inc
1876 UPDATE t SET c1=10 WHERE c2="a";
1877 UPDATE t SET c1=20 WHERE c1=2;
1878 UPDATE t SET c1=30 WHERE c3=30;
1879 UPDATE t SET c3=40 WHERE c1=30;
1880 include/rpl_sync.inc
1881 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1882 DELETE FROM t WHERE c2="a";
1883 DELETE FROM t WHERE c1=20;
1884 DELETE FROM t;
1885 include/rpl_sync.inc
1886 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1887 DROP TABLE t;
1888 include/rpl_sync.inc
1889 SET SQL_LOG_BIN=0;
1890 SET SQL_LOG_BIN=0;
1891 SET SQL_LOG_BIN=0;
1892 ### Asserts that updates without blobs in the BI (PK exists int the table)
1893 ### will not break replication
1894 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1895 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
1896 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
1897 SET SQL_LOG_BIN=1;
1898 SET SQL_LOG_BIN=1;
1899 SET SQL_LOG_BIN=1;
1900 INSERT INTO t VALUES (1, "a", 10);
1901 INSERT INTO t VALUES (2, "b", 20);
1902 INSERT INTO t VALUES (3, "c", 30);
1903 include/rpl_sync.inc
1904 UPDATE t SET c1=10 WHERE c2="a";
1905 UPDATE t SET c1=20 WHERE c1=2;
1906 UPDATE t SET c1=30 WHERE c3=30;
1907 UPDATE t SET c3=40 WHERE c1=30;
1908 include/rpl_sync.inc
1909 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1910 DELETE FROM t WHERE c2="a";
1911 DELETE FROM t WHERE c1=20;
1912 DELETE FROM t;
1913 include/rpl_sync.inc
1914 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1915 DROP TABLE t;
1916 include/rpl_sync.inc
1917 SET SQL_LOG_BIN=0;
1918 SET SQL_LOG_BIN=0;
1919 SET SQL_LOG_BIN=0;
1920 ### Asserts that declaring a blob in a key does not break replication
1921 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1922 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
1923 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
1924 SET SQL_LOG_BIN=1;
1925 SET SQL_LOG_BIN=1;
1926 SET SQL_LOG_BIN=1;
1927 INSERT INTO t VALUES (1, "a", 10);
1928 INSERT INTO t VALUES (2, "b", 20);
1929 INSERT INTO t VALUES (3, "c", 30);
1930 include/rpl_sync.inc
1931 UPDATE t SET c1=10 WHERE c2="a";
1932 UPDATE t SET c1=20 WHERE c1=2;
1933 UPDATE t SET c1=30 WHERE c3=30;
1934 UPDATE t SET c3=40 WHERE c1=30;
1935 include/rpl_sync.inc
1936 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1937 DELETE FROM t WHERE c2="a";
1938 DELETE FROM t WHERE c1=20;
1939 DELETE FROM t;
1940 include/rpl_sync.inc
1941 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1942 DROP TABLE t;
1943 include/rpl_sync.inc
1944 SET SQL_LOG_BIN=0;
1945 SET SQL_LOG_BIN=0;
1946 SET SQL_LOG_BIN=0;
1947 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
1948 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1949 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
1950 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
1951 SET SQL_LOG_BIN=1;
1952 SET SQL_LOG_BIN=1;
1953 SET SQL_LOG_BIN=1;
1954 INSERT INTO t VALUES (1, "a", 10);
1955 INSERT INTO t VALUES (2, "b", 20);
1956 INSERT INTO t VALUES (3, "c", 30);
1957 include/rpl_sync.inc
1958 UPDATE t SET c1=10 WHERE c2="a";
1959 UPDATE t SET c1=20 WHERE c1=2;
1960 UPDATE t SET c1=30 WHERE c3=30;
1961 UPDATE t SET c3=40 WHERE c1=30;
1962 include/rpl_sync.inc
1963 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1964 DELETE FROM t WHERE c2="a";
1965 DELETE FROM t WHERE c1=20;
1966 DELETE FROM t;
1967 include/rpl_sync.inc
1968 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1969 DROP TABLE t;
1970 include/rpl_sync.inc
1971 SET SQL_LOG_BIN=0;
1972 SET SQL_LOG_BIN=0;
1973 SET SQL_LOG_BIN=0;
1974 ### Asserts that declaring a blob as part of a primary key does not break replication
1975 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1976 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
1977 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
1978 SET SQL_LOG_BIN=1;
1979 SET SQL_LOG_BIN=1;
1980 SET SQL_LOG_BIN=1;
1981 INSERT INTO t VALUES (1, "a", 10);
1982 INSERT INTO t VALUES (2, "b", 20);
1983 INSERT INTO t VALUES (3, "c", 30);
1984 include/rpl_sync.inc
1985 UPDATE t SET c1=10 WHERE c2="a";
1986 UPDATE t SET c1=20 WHERE c1=2;
1987 UPDATE t SET c1=30 WHERE c3=30;
1988 UPDATE t SET c3=40 WHERE c1=30;
1989 include/rpl_sync.inc
1990 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1991 DELETE FROM t WHERE c2="a";
1992 DELETE FROM t WHERE c1=20;
1993 DELETE FROM t;
1994 include/rpl_sync.inc
1995 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
1996 DROP TABLE t;
1997 include/rpl_sync.inc
1998 ### engines: MyISAM, InnoDB, MyISAM
1999 SET SQL_LOG_BIN=0;
2000 SET SQL_LOG_BIN=0;
2001 SET SQL_LOG_BIN=0;
2002 ### Asserts that updates without blobs in the AI (they are not updated)
2003 ### will not break replication (check when there is no key in the table)
2004 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2005 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2006 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2007 SET SQL_LOG_BIN=1;
2008 SET SQL_LOG_BIN=1;
2009 SET SQL_LOG_BIN=1;
2010 INSERT INTO t VALUES (1, "a", 10);
2011 INSERT INTO t VALUES (2, "b", 20);
2012 INSERT INTO t VALUES (3, "c", 30);
2013 include/rpl_sync.inc
2014 UPDATE t SET c1=10 WHERE c2="a";
2015 UPDATE t SET c1=20 WHERE c1=2;
2016 UPDATE t SET c1=30 WHERE c3=30;
2017 UPDATE t SET c3=40 WHERE c1=30;
2018 include/rpl_sync.inc
2019 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2020 DELETE FROM t WHERE c2="a";
2021 DELETE FROM t WHERE c1=20;
2022 DELETE FROM t;
2023 include/rpl_sync.inc
2024 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2025 DROP TABLE t;
2026 include/rpl_sync.inc
2027 SET SQL_LOG_BIN=0;
2028 SET SQL_LOG_BIN=0;
2029 SET SQL_LOG_BIN=0;
2030 ### Asserts that updates without blobs in the AI (they are not updated)
2031 ### will not break replication (check even if there is a key in the table)
2032 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2033 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2034 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2035 SET SQL_LOG_BIN=1;
2036 SET SQL_LOG_BIN=1;
2037 SET SQL_LOG_BIN=1;
2038 INSERT INTO t VALUES (1, "a", 10);
2039 INSERT INTO t VALUES (2, "b", 20);
2040 INSERT INTO t VALUES (3, "c", 30);
2041 include/rpl_sync.inc
2042 UPDATE t SET c1=10 WHERE c2="a";
2043 UPDATE t SET c1=20 WHERE c1=2;
2044 UPDATE t SET c1=30 WHERE c3=30;
2045 UPDATE t SET c3=40 WHERE c1=30;
2046 include/rpl_sync.inc
2047 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2048 DELETE FROM t WHERE c2="a";
2049 DELETE FROM t WHERE c1=20;
2050 DELETE FROM t;
2051 include/rpl_sync.inc
2052 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2053 DROP TABLE t;
2054 include/rpl_sync.inc
2055 SET SQL_LOG_BIN=0;
2056 SET SQL_LOG_BIN=0;
2057 SET SQL_LOG_BIN=0;
2058 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
2059 ### will not break replication
2060 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2061 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2062 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2063 SET SQL_LOG_BIN=1;
2064 SET SQL_LOG_BIN=1;
2065 SET SQL_LOG_BIN=1;
2066 INSERT INTO t VALUES (1, "a", 10);
2067 INSERT INTO t VALUES (2, "b", 20);
2068 INSERT INTO t VALUES (3, "c", 30);
2069 include/rpl_sync.inc
2070 UPDATE t SET c1=10 WHERE c2="a";
2071 UPDATE t SET c1=20 WHERE c1=2;
2072 UPDATE t SET c1=30 WHERE c3=30;
2073 UPDATE t SET c3=40 WHERE c1=30;
2074 include/rpl_sync.inc
2075 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2076 DELETE FROM t WHERE c2="a";
2077 DELETE FROM t WHERE c1=20;
2078 DELETE FROM t;
2079 include/rpl_sync.inc
2080 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2081 DROP TABLE t;
2082 include/rpl_sync.inc
2083 SET SQL_LOG_BIN=0;
2084 SET SQL_LOG_BIN=0;
2085 SET SQL_LOG_BIN=0;
2086 ### Asserts that updates without blobs in the BI (PK exists int the table)
2087 ### will not break replication
2088 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2089 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2090 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2091 SET SQL_LOG_BIN=1;
2092 SET SQL_LOG_BIN=1;
2093 SET SQL_LOG_BIN=1;
2094 INSERT INTO t VALUES (1, "a", 10);
2095 INSERT INTO t VALUES (2, "b", 20);
2096 INSERT INTO t VALUES (3, "c", 30);
2097 include/rpl_sync.inc
2098 UPDATE t SET c1=10 WHERE c2="a";
2099 UPDATE t SET c1=20 WHERE c1=2;
2100 UPDATE t SET c1=30 WHERE c3=30;
2101 UPDATE t SET c3=40 WHERE c1=30;
2102 include/rpl_sync.inc
2103 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2104 DELETE FROM t WHERE c2="a";
2105 DELETE FROM t WHERE c1=20;
2106 DELETE FROM t;
2107 include/rpl_sync.inc
2108 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2109 DROP TABLE t;
2110 include/rpl_sync.inc
2111 SET SQL_LOG_BIN=0;
2112 SET SQL_LOG_BIN=0;
2113 SET SQL_LOG_BIN=0;
2114 ### Asserts that declaring a blob in a key does not break replication
2115 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2116 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2117 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2118 SET SQL_LOG_BIN=1;
2119 SET SQL_LOG_BIN=1;
2120 SET SQL_LOG_BIN=1;
2121 INSERT INTO t VALUES (1, "a", 10);
2122 INSERT INTO t VALUES (2, "b", 20);
2123 INSERT INTO t VALUES (3, "c", 30);
2124 include/rpl_sync.inc
2125 UPDATE t SET c1=10 WHERE c2="a";
2126 UPDATE t SET c1=20 WHERE c1=2;
2127 UPDATE t SET c1=30 WHERE c3=30;
2128 UPDATE t SET c3=40 WHERE c1=30;
2129 include/rpl_sync.inc
2130 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2131 DELETE FROM t WHERE c2="a";
2132 DELETE FROM t WHERE c1=20;
2133 DELETE FROM t;
2134 include/rpl_sync.inc
2135 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2136 DROP TABLE t;
2137 include/rpl_sync.inc
2138 SET SQL_LOG_BIN=0;
2139 SET SQL_LOG_BIN=0;
2140 SET SQL_LOG_BIN=0;
2141 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
2142 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2143 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2144 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2145 SET SQL_LOG_BIN=1;
2146 SET SQL_LOG_BIN=1;
2147 SET SQL_LOG_BIN=1;
2148 INSERT INTO t VALUES (1, "a", 10);
2149 INSERT INTO t VALUES (2, "b", 20);
2150 INSERT INTO t VALUES (3, "c", 30);
2151 include/rpl_sync.inc
2152 UPDATE t SET c1=10 WHERE c2="a";
2153 UPDATE t SET c1=20 WHERE c1=2;
2154 UPDATE t SET c1=30 WHERE c3=30;
2155 UPDATE t SET c3=40 WHERE c1=30;
2156 include/rpl_sync.inc
2157 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2158 DELETE FROM t WHERE c2="a";
2159 DELETE FROM t WHERE c1=20;
2160 DELETE FROM t;
2161 include/rpl_sync.inc
2162 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2163 DROP TABLE t;
2164 include/rpl_sync.inc
2165 SET SQL_LOG_BIN=0;
2166 SET SQL_LOG_BIN=0;
2167 SET SQL_LOG_BIN=0;
2168 ### Asserts that declaring a blob as part of a primary key does not break replication
2169 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2170 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2171 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2172 SET SQL_LOG_BIN=1;
2173 SET SQL_LOG_BIN=1;
2174 SET SQL_LOG_BIN=1;
2175 INSERT INTO t VALUES (1, "a", 10);
2176 INSERT INTO t VALUES (2, "b", 20);
2177 INSERT INTO t VALUES (3, "c", 30);
2178 include/rpl_sync.inc
2179 UPDATE t SET c1=10 WHERE c2="a";
2180 UPDATE t SET c1=20 WHERE c1=2;
2181 UPDATE t SET c1=30 WHERE c3=30;
2182 UPDATE t SET c3=40 WHERE c1=30;
2183 include/rpl_sync.inc
2184 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2185 DELETE FROM t WHERE c2="a";
2186 DELETE FROM t WHERE c1=20;
2187 DELETE FROM t;
2188 include/rpl_sync.inc
2189 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2190 DROP TABLE t;
2191 include/rpl_sync.inc
2192 ### engines: MyISAM, InnoDB, InnoDB
2193 SET SQL_LOG_BIN=0;
2194 SET SQL_LOG_BIN=0;
2195 SET SQL_LOG_BIN=0;
2196 ### Asserts that updates without blobs in the AI (they are not updated)
2197 ### will not break replication (check when there is no key in the table)
2198 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2199 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2200 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2201 SET SQL_LOG_BIN=1;
2202 SET SQL_LOG_BIN=1;
2203 SET SQL_LOG_BIN=1;
2204 INSERT INTO t VALUES (1, "a", 10);
2205 INSERT INTO t VALUES (2, "b", 20);
2206 INSERT INTO t VALUES (3, "c", 30);
2207 include/rpl_sync.inc
2208 UPDATE t SET c1=10 WHERE c2="a";
2209 UPDATE t SET c1=20 WHERE c1=2;
2210 UPDATE t SET c1=30 WHERE c3=30;
2211 UPDATE t SET c3=40 WHERE c1=30;
2212 include/rpl_sync.inc
2213 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2214 DELETE FROM t WHERE c2="a";
2215 DELETE FROM t WHERE c1=20;
2216 DELETE FROM t;
2217 include/rpl_sync.inc
2218 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2219 DROP TABLE t;
2220 include/rpl_sync.inc
2221 SET SQL_LOG_BIN=0;
2222 SET SQL_LOG_BIN=0;
2223 SET SQL_LOG_BIN=0;
2224 ### Asserts that updates without blobs in the AI (they are not updated)
2225 ### will not break replication (check even if there is a key in the table)
2226 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2227 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2228 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2229 SET SQL_LOG_BIN=1;
2230 SET SQL_LOG_BIN=1;
2231 SET SQL_LOG_BIN=1;
2232 INSERT INTO t VALUES (1, "a", 10);
2233 INSERT INTO t VALUES (2, "b", 20);
2234 INSERT INTO t VALUES (3, "c", 30);
2235 include/rpl_sync.inc
2236 UPDATE t SET c1=10 WHERE c2="a";
2237 UPDATE t SET c1=20 WHERE c1=2;
2238 UPDATE t SET c1=30 WHERE c3=30;
2239 UPDATE t SET c3=40 WHERE c1=30;
2240 include/rpl_sync.inc
2241 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2242 DELETE FROM t WHERE c2="a";
2243 DELETE FROM t WHERE c1=20;
2244 DELETE FROM t;
2245 include/rpl_sync.inc
2246 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2247 DROP TABLE t;
2248 include/rpl_sync.inc
2249 SET SQL_LOG_BIN=0;
2250 SET SQL_LOG_BIN=0;
2251 SET SQL_LOG_BIN=0;
2252 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
2253 ### will not break replication
2254 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2255 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2256 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2257 SET SQL_LOG_BIN=1;
2258 SET SQL_LOG_BIN=1;
2259 SET SQL_LOG_BIN=1;
2260 INSERT INTO t VALUES (1, "a", 10);
2261 INSERT INTO t VALUES (2, "b", 20);
2262 INSERT INTO t VALUES (3, "c", 30);
2263 include/rpl_sync.inc
2264 UPDATE t SET c1=10 WHERE c2="a";
2265 UPDATE t SET c1=20 WHERE c1=2;
2266 UPDATE t SET c1=30 WHERE c3=30;
2267 UPDATE t SET c3=40 WHERE c1=30;
2268 include/rpl_sync.inc
2269 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2270 DELETE FROM t WHERE c2="a";
2271 DELETE FROM t WHERE c1=20;
2272 DELETE FROM t;
2273 include/rpl_sync.inc
2274 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2275 DROP TABLE t;
2276 include/rpl_sync.inc
2277 SET SQL_LOG_BIN=0;
2278 SET SQL_LOG_BIN=0;
2279 SET SQL_LOG_BIN=0;
2280 ### Asserts that updates without blobs in the BI (PK exists int the table)
2281 ### will not break replication
2282 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2283 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2284 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2285 SET SQL_LOG_BIN=1;
2286 SET SQL_LOG_BIN=1;
2287 SET SQL_LOG_BIN=1;
2288 INSERT INTO t VALUES (1, "a", 10);
2289 INSERT INTO t VALUES (2, "b", 20);
2290 INSERT INTO t VALUES (3, "c", 30);
2291 include/rpl_sync.inc
2292 UPDATE t SET c1=10 WHERE c2="a";
2293 UPDATE t SET c1=20 WHERE c1=2;
2294 UPDATE t SET c1=30 WHERE c3=30;
2295 UPDATE t SET c3=40 WHERE c1=30;
2296 include/rpl_sync.inc
2297 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2298 DELETE FROM t WHERE c2="a";
2299 DELETE FROM t WHERE c1=20;
2300 DELETE FROM t;
2301 include/rpl_sync.inc
2302 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2303 DROP TABLE t;
2304 include/rpl_sync.inc
2305 SET SQL_LOG_BIN=0;
2306 SET SQL_LOG_BIN=0;
2307 SET SQL_LOG_BIN=0;
2308 ### Asserts that declaring a blob in a key does not break replication
2309 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2310 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2311 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2312 SET SQL_LOG_BIN=1;
2313 SET SQL_LOG_BIN=1;
2314 SET SQL_LOG_BIN=1;
2315 INSERT INTO t VALUES (1, "a", 10);
2316 INSERT INTO t VALUES (2, "b", 20);
2317 INSERT INTO t VALUES (3, "c", 30);
2318 include/rpl_sync.inc
2319 UPDATE t SET c1=10 WHERE c2="a";
2320 UPDATE t SET c1=20 WHERE c1=2;
2321 UPDATE t SET c1=30 WHERE c3=30;
2322 UPDATE t SET c3=40 WHERE c1=30;
2323 include/rpl_sync.inc
2324 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2325 DELETE FROM t WHERE c2="a";
2326 DELETE FROM t WHERE c1=20;
2327 DELETE FROM t;
2328 include/rpl_sync.inc
2329 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2330 DROP TABLE t;
2331 include/rpl_sync.inc
2332 SET SQL_LOG_BIN=0;
2333 SET SQL_LOG_BIN=0;
2334 SET SQL_LOG_BIN=0;
2335 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
2336 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2337 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2338 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2339 SET SQL_LOG_BIN=1;
2340 SET SQL_LOG_BIN=1;
2341 SET SQL_LOG_BIN=1;
2342 INSERT INTO t VALUES (1, "a", 10);
2343 INSERT INTO t VALUES (2, "b", 20);
2344 INSERT INTO t VALUES (3, "c", 30);
2345 include/rpl_sync.inc
2346 UPDATE t SET c1=10 WHERE c2="a";
2347 UPDATE t SET c1=20 WHERE c1=2;
2348 UPDATE t SET c1=30 WHERE c3=30;
2349 UPDATE t SET c3=40 WHERE c1=30;
2350 include/rpl_sync.inc
2351 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2352 DELETE FROM t WHERE c2="a";
2353 DELETE FROM t WHERE c1=20;
2354 DELETE FROM t;
2355 include/rpl_sync.inc
2356 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2357 DROP TABLE t;
2358 include/rpl_sync.inc
2359 SET SQL_LOG_BIN=0;
2360 SET SQL_LOG_BIN=0;
2361 SET SQL_LOG_BIN=0;
2362 ### Asserts that declaring a blob as part of a primary key does not break replication
2363 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2364 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2365 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2366 SET SQL_LOG_BIN=1;
2367 SET SQL_LOG_BIN=1;
2368 SET SQL_LOG_BIN=1;
2369 INSERT INTO t VALUES (1, "a", 10);
2370 INSERT INTO t VALUES (2, "b", 20);
2371 INSERT INTO t VALUES (3, "c", 30);
2372 include/rpl_sync.inc
2373 UPDATE t SET c1=10 WHERE c2="a";
2374 UPDATE t SET c1=20 WHERE c1=2;
2375 UPDATE t SET c1=30 WHERE c3=30;
2376 UPDATE t SET c3=40 WHERE c1=30;
2377 include/rpl_sync.inc
2378 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2379 DELETE FROM t WHERE c2="a";
2380 DELETE FROM t WHERE c1=20;
2381 DELETE FROM t;
2382 include/rpl_sync.inc
2383 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2384 DROP TABLE t;
2385 include/rpl_sync.inc
2386 ### engines: InnoDB, MyISAM, MyISAM
2387 SET SQL_LOG_BIN=0;
2388 SET SQL_LOG_BIN=0;
2389 SET SQL_LOG_BIN=0;
2390 ### Asserts that updates without blobs in the AI (they are not updated)
2391 ### will not break replication (check when there is no key in the table)
2392 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2393 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2394 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2395 SET SQL_LOG_BIN=1;
2396 SET SQL_LOG_BIN=1;
2397 SET SQL_LOG_BIN=1;
2398 INSERT INTO t VALUES (1, "a", 10);
2399 INSERT INTO t VALUES (2, "b", 20);
2400 INSERT INTO t VALUES (3, "c", 30);
2401 include/rpl_sync.inc
2402 UPDATE t SET c1=10 WHERE c2="a";
2403 UPDATE t SET c1=20 WHERE c1=2;
2404 UPDATE t SET c1=30 WHERE c3=30;
2405 UPDATE t SET c3=40 WHERE c1=30;
2406 include/rpl_sync.inc
2407 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2408 DELETE FROM t WHERE c2="a";
2409 DELETE FROM t WHERE c1=20;
2410 DELETE FROM t;
2411 include/rpl_sync.inc
2412 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2413 DROP TABLE t;
2414 include/rpl_sync.inc
2415 SET SQL_LOG_BIN=0;
2416 SET SQL_LOG_BIN=0;
2417 SET SQL_LOG_BIN=0;
2418 ### Asserts that updates without blobs in the AI (they are not updated)
2419 ### will not break replication (check even if there is a key in the table)
2420 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2421 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2422 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2423 SET SQL_LOG_BIN=1;
2424 SET SQL_LOG_BIN=1;
2425 SET SQL_LOG_BIN=1;
2426 INSERT INTO t VALUES (1, "a", 10);
2427 INSERT INTO t VALUES (2, "b", 20);
2428 INSERT INTO t VALUES (3, "c", 30);
2429 include/rpl_sync.inc
2430 UPDATE t SET c1=10 WHERE c2="a";
2431 UPDATE t SET c1=20 WHERE c1=2;
2432 UPDATE t SET c1=30 WHERE c3=30;
2433 UPDATE t SET c3=40 WHERE c1=30;
2434 include/rpl_sync.inc
2435 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2436 DELETE FROM t WHERE c2="a";
2437 DELETE FROM t WHERE c1=20;
2438 DELETE FROM t;
2439 include/rpl_sync.inc
2440 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2441 DROP TABLE t;
2442 include/rpl_sync.inc
2443 SET SQL_LOG_BIN=0;
2444 SET SQL_LOG_BIN=0;
2445 SET SQL_LOG_BIN=0;
2446 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
2447 ### will not break replication
2448 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2449 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2450 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2451 SET SQL_LOG_BIN=1;
2452 SET SQL_LOG_BIN=1;
2453 SET SQL_LOG_BIN=1;
2454 INSERT INTO t VALUES (1, "a", 10);
2455 INSERT INTO t VALUES (2, "b", 20);
2456 INSERT INTO t VALUES (3, "c", 30);
2457 include/rpl_sync.inc
2458 UPDATE t SET c1=10 WHERE c2="a";
2459 UPDATE t SET c1=20 WHERE c1=2;
2460 UPDATE t SET c1=30 WHERE c3=30;
2461 UPDATE t SET c3=40 WHERE c1=30;
2462 include/rpl_sync.inc
2463 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2464 DELETE FROM t WHERE c2="a";
2465 DELETE FROM t WHERE c1=20;
2466 DELETE FROM t;
2467 include/rpl_sync.inc
2468 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2469 DROP TABLE t;
2470 include/rpl_sync.inc
2471 SET SQL_LOG_BIN=0;
2472 SET SQL_LOG_BIN=0;
2473 SET SQL_LOG_BIN=0;
2474 ### Asserts that updates without blobs in the BI (PK exists int the table)
2475 ### will not break replication
2476 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2477 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2478 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2479 SET SQL_LOG_BIN=1;
2480 SET SQL_LOG_BIN=1;
2481 SET SQL_LOG_BIN=1;
2482 INSERT INTO t VALUES (1, "a", 10);
2483 INSERT INTO t VALUES (2, "b", 20);
2484 INSERT INTO t VALUES (3, "c", 30);
2485 include/rpl_sync.inc
2486 UPDATE t SET c1=10 WHERE c2="a";
2487 UPDATE t SET c1=20 WHERE c1=2;
2488 UPDATE t SET c1=30 WHERE c3=30;
2489 UPDATE t SET c3=40 WHERE c1=30;
2490 include/rpl_sync.inc
2491 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2492 DELETE FROM t WHERE c2="a";
2493 DELETE FROM t WHERE c1=20;
2494 DELETE FROM t;
2495 include/rpl_sync.inc
2496 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2497 DROP TABLE t;
2498 include/rpl_sync.inc
2499 SET SQL_LOG_BIN=0;
2500 SET SQL_LOG_BIN=0;
2501 SET SQL_LOG_BIN=0;
2502 ### Asserts that declaring a blob in a key does not break replication
2503 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2504 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2505 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2506 SET SQL_LOG_BIN=1;
2507 SET SQL_LOG_BIN=1;
2508 SET SQL_LOG_BIN=1;
2509 INSERT INTO t VALUES (1, "a", 10);
2510 INSERT INTO t VALUES (2, "b", 20);
2511 INSERT INTO t VALUES (3, "c", 30);
2512 include/rpl_sync.inc
2513 UPDATE t SET c1=10 WHERE c2="a";
2514 UPDATE t SET c1=20 WHERE c1=2;
2515 UPDATE t SET c1=30 WHERE c3=30;
2516 UPDATE t SET c3=40 WHERE c1=30;
2517 include/rpl_sync.inc
2518 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2519 DELETE FROM t WHERE c2="a";
2520 DELETE FROM t WHERE c1=20;
2521 DELETE FROM t;
2522 include/rpl_sync.inc
2523 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2524 DROP TABLE t;
2525 include/rpl_sync.inc
2526 SET SQL_LOG_BIN=0;
2527 SET SQL_LOG_BIN=0;
2528 SET SQL_LOG_BIN=0;
2529 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
2530 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2531 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2532 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2533 SET SQL_LOG_BIN=1;
2534 SET SQL_LOG_BIN=1;
2535 SET SQL_LOG_BIN=1;
2536 INSERT INTO t VALUES (1, "a", 10);
2537 INSERT INTO t VALUES (2, "b", 20);
2538 INSERT INTO t VALUES (3, "c", 30);
2539 include/rpl_sync.inc
2540 UPDATE t SET c1=10 WHERE c2="a";
2541 UPDATE t SET c1=20 WHERE c1=2;
2542 UPDATE t SET c1=30 WHERE c3=30;
2543 UPDATE t SET c3=40 WHERE c1=30;
2544 include/rpl_sync.inc
2545 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2546 DELETE FROM t WHERE c2="a";
2547 DELETE FROM t WHERE c1=20;
2548 DELETE FROM t;
2549 include/rpl_sync.inc
2550 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2551 DROP TABLE t;
2552 include/rpl_sync.inc
2553 SET SQL_LOG_BIN=0;
2554 SET SQL_LOG_BIN=0;
2555 SET SQL_LOG_BIN=0;
2556 ### Asserts that declaring a blob as part of a primary key does not break replication
2557 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2558 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2559 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2560 SET SQL_LOG_BIN=1;
2561 SET SQL_LOG_BIN=1;
2562 SET SQL_LOG_BIN=1;
2563 INSERT INTO t VALUES (1, "a", 10);
2564 INSERT INTO t VALUES (2, "b", 20);
2565 INSERT INTO t VALUES (3, "c", 30);
2566 include/rpl_sync.inc
2567 UPDATE t SET c1=10 WHERE c2="a";
2568 UPDATE t SET c1=20 WHERE c1=2;
2569 UPDATE t SET c1=30 WHERE c3=30;
2570 UPDATE t SET c3=40 WHERE c1=30;
2571 include/rpl_sync.inc
2572 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2573 DELETE FROM t WHERE c2="a";
2574 DELETE FROM t WHERE c1=20;
2575 DELETE FROM t;
2576 include/rpl_sync.inc
2577 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2578 DROP TABLE t;
2579 include/rpl_sync.inc
2580 ### engines: InnoDB, MyISAM, InnoDB
2581 SET SQL_LOG_BIN=0;
2582 SET SQL_LOG_BIN=0;
2583 SET SQL_LOG_BIN=0;
2584 ### Asserts that updates without blobs in the AI (they are not updated)
2585 ### will not break replication (check when there is no key in the table)
2586 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2587 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2588 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2589 SET SQL_LOG_BIN=1;
2590 SET SQL_LOG_BIN=1;
2591 SET SQL_LOG_BIN=1;
2592 INSERT INTO t VALUES (1, "a", 10);
2593 INSERT INTO t VALUES (2, "b", 20);
2594 INSERT INTO t VALUES (3, "c", 30);
2595 include/rpl_sync.inc
2596 UPDATE t SET c1=10 WHERE c2="a";
2597 UPDATE t SET c1=20 WHERE c1=2;
2598 UPDATE t SET c1=30 WHERE c3=30;
2599 UPDATE t SET c3=40 WHERE c1=30;
2600 include/rpl_sync.inc
2601 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2602 DELETE FROM t WHERE c2="a";
2603 DELETE FROM t WHERE c1=20;
2604 DELETE FROM t;
2605 include/rpl_sync.inc
2606 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2607 DROP TABLE t;
2608 include/rpl_sync.inc
2609 SET SQL_LOG_BIN=0;
2610 SET SQL_LOG_BIN=0;
2611 SET SQL_LOG_BIN=0;
2612 ### Asserts that updates without blobs in the AI (they are not updated)
2613 ### will not break replication (check even if there is a key in the table)
2614 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2615 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2616 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2617 SET SQL_LOG_BIN=1;
2618 SET SQL_LOG_BIN=1;
2619 SET SQL_LOG_BIN=1;
2620 INSERT INTO t VALUES (1, "a", 10);
2621 INSERT INTO t VALUES (2, "b", 20);
2622 INSERT INTO t VALUES (3, "c", 30);
2623 include/rpl_sync.inc
2624 UPDATE t SET c1=10 WHERE c2="a";
2625 UPDATE t SET c1=20 WHERE c1=2;
2626 UPDATE t SET c1=30 WHERE c3=30;
2627 UPDATE t SET c3=40 WHERE c1=30;
2628 include/rpl_sync.inc
2629 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
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 DROP TABLE t;
2636 include/rpl_sync.inc
2637 SET SQL_LOG_BIN=0;
2638 SET SQL_LOG_BIN=0;
2639 SET SQL_LOG_BIN=0;
2640 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
2641 ### will not break replication
2642 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2643 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2644 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2645 SET SQL_LOG_BIN=1;
2646 SET SQL_LOG_BIN=1;
2647 SET SQL_LOG_BIN=1;
2648 INSERT INTO t VALUES (1, "a", 10);
2649 INSERT INTO t VALUES (2, "b", 20);
2650 INSERT INTO t VALUES (3, "c", 30);
2651 include/rpl_sync.inc
2652 UPDATE t SET c1=10 WHERE c2="a";
2653 UPDATE t SET c1=20 WHERE c1=2;
2654 UPDATE t SET c1=30 WHERE c3=30;
2655 UPDATE t SET c3=40 WHERE c1=30;
2656 include/rpl_sync.inc
2657 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2658 DELETE FROM t WHERE c2="a";
2659 DELETE FROM t WHERE c1=20;
2660 DELETE FROM t;
2661 include/rpl_sync.inc
2662 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2663 DROP TABLE t;
2664 include/rpl_sync.inc
2665 SET SQL_LOG_BIN=0;
2666 SET SQL_LOG_BIN=0;
2667 SET SQL_LOG_BIN=0;
2668 ### Asserts that updates without blobs in the BI (PK exists int the table)
2669 ### will not break replication
2670 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2671 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2672 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2673 SET SQL_LOG_BIN=1;
2674 SET SQL_LOG_BIN=1;
2675 SET SQL_LOG_BIN=1;
2676 INSERT INTO t VALUES (1, "a", 10);
2677 INSERT INTO t VALUES (2, "b", 20);
2678 INSERT INTO t VALUES (3, "c", 30);
2679 include/rpl_sync.inc
2680 UPDATE t SET c1=10 WHERE c2="a";
2681 UPDATE t SET c1=20 WHERE c1=2;
2682 UPDATE t SET c1=30 WHERE c3=30;
2683 UPDATE t SET c3=40 WHERE c1=30;
2684 include/rpl_sync.inc
2685 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2686 DELETE FROM t WHERE c2="a";
2687 DELETE FROM t WHERE c1=20;
2688 DELETE FROM t;
2689 include/rpl_sync.inc
2690 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2691 DROP TABLE t;
2692 include/rpl_sync.inc
2693 SET SQL_LOG_BIN=0;
2694 SET SQL_LOG_BIN=0;
2695 SET SQL_LOG_BIN=0;
2696 ### Asserts that declaring a blob in a key does not break replication
2697 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2698 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2699 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2700 SET SQL_LOG_BIN=1;
2701 SET SQL_LOG_BIN=1;
2702 SET SQL_LOG_BIN=1;
2703 INSERT INTO t VALUES (1, "a", 10);
2704 INSERT INTO t VALUES (2, "b", 20);
2705 INSERT INTO t VALUES (3, "c", 30);
2706 include/rpl_sync.inc
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 DELETE FROM t WHERE c2="a";
2714 DELETE FROM t WHERE c1=20;
2715 DELETE FROM t;
2716 include/rpl_sync.inc
2717 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2718 DROP TABLE t;
2719 include/rpl_sync.inc
2720 SET SQL_LOG_BIN=0;
2721 SET SQL_LOG_BIN=0;
2722 SET SQL_LOG_BIN=0;
2723 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
2724 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2725 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2726 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2727 SET SQL_LOG_BIN=1;
2728 SET SQL_LOG_BIN=1;
2729 SET SQL_LOG_BIN=1;
2730 INSERT INTO t VALUES (1, "a", 10);
2731 INSERT INTO t VALUES (2, "b", 20);
2732 INSERT INTO t VALUES (3, "c", 30);
2733 include/rpl_sync.inc
2734 UPDATE t SET c1=10 WHERE c2="a";
2735 UPDATE t SET c1=20 WHERE c1=2;
2736 UPDATE t SET c1=30 WHERE c3=30;
2737 UPDATE t SET c3=40 WHERE c1=30;
2738 include/rpl_sync.inc
2739 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2740 DELETE FROM t WHERE c2="a";
2741 DELETE FROM t WHERE c1=20;
2742 DELETE FROM t;
2743 include/rpl_sync.inc
2744 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2745 DROP TABLE t;
2746 include/rpl_sync.inc
2747 SET SQL_LOG_BIN=0;
2748 SET SQL_LOG_BIN=0;
2749 SET SQL_LOG_BIN=0;
2750 ### Asserts that declaring a blob as part of a primary key does not break replication
2751 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2752 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2753 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2754 SET SQL_LOG_BIN=1;
2755 SET SQL_LOG_BIN=1;
2756 SET SQL_LOG_BIN=1;
2757 INSERT INTO t VALUES (1, "a", 10);
2758 INSERT INTO t VALUES (2, "b", 20);
2759 INSERT INTO t VALUES (3, "c", 30);
2760 include/rpl_sync.inc
2761 UPDATE t SET c1=10 WHERE c2="a";
2762 UPDATE t SET c1=20 WHERE c1=2;
2763 UPDATE t SET c1=30 WHERE c3=30;
2764 UPDATE t SET c3=40 WHERE c1=30;
2765 include/rpl_sync.inc
2766 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2767 DELETE FROM t WHERE c2="a";
2768 DELETE FROM t WHERE c1=20;
2769 DELETE FROM t;
2770 include/rpl_sync.inc
2771 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2772 DROP TABLE t;
2773 include/rpl_sync.inc
2774 ### engines: InnoDB, InnoDB, MyISAM
2775 SET SQL_LOG_BIN=0;
2776 SET SQL_LOG_BIN=0;
2777 SET SQL_LOG_BIN=0;
2778 ### Asserts that updates without blobs in the AI (they are not updated)
2779 ### will not break replication (check when there is no key in the table)
2780 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2781 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2782 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
2783 SET SQL_LOG_BIN=1;
2784 SET SQL_LOG_BIN=1;
2785 SET SQL_LOG_BIN=1;
2786 INSERT INTO t VALUES (1, "a", 10);
2787 INSERT INTO t VALUES (2, "b", 20);
2788 INSERT INTO t VALUES (3, "c", 30);
2789 include/rpl_sync.inc
2790 UPDATE t SET c1=10 WHERE c2="a";
2791 UPDATE t SET c1=20 WHERE c1=2;
2792 UPDATE t SET c1=30 WHERE c3=30;
2793 UPDATE t SET c3=40 WHERE c1=30;
2794 include/rpl_sync.inc
2795 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
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 DROP TABLE t;
2802 include/rpl_sync.inc
2803 SET SQL_LOG_BIN=0;
2804 SET SQL_LOG_BIN=0;
2805 SET SQL_LOG_BIN=0;
2806 ### Asserts that updates without blobs in the AI (they are not updated)
2807 ### will not break replication (check even if there is a key in the table)
2808 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2809 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
2810 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
2811 SET SQL_LOG_BIN=1;
2812 SET SQL_LOG_BIN=1;
2813 SET SQL_LOG_BIN=1;
2814 INSERT INTO t VALUES (1, "a", 10);
2815 INSERT INTO t VALUES (2, "b", 20);
2816 INSERT INTO t VALUES (3, "c", 30);
2817 include/rpl_sync.inc
2818 UPDATE t SET c1=10 WHERE c2="a";
2819 UPDATE t SET c1=20 WHERE c1=2;
2820 UPDATE t SET c1=30 WHERE c3=30;
2821 UPDATE t SET c3=40 WHERE c1=30;
2822 include/rpl_sync.inc
2823 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2824 DELETE FROM t WHERE c2="a";
2825 DELETE FROM t WHERE c1=20;
2826 DELETE FROM t;
2827 include/rpl_sync.inc
2828 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2829 DROP TABLE t;
2830 include/rpl_sync.inc
2831 SET SQL_LOG_BIN=0;
2832 SET SQL_LOG_BIN=0;
2833 SET SQL_LOG_BIN=0;
2834 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
2835 ### will not break replication
2836 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2837 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
2838 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
2839 SET SQL_LOG_BIN=1;
2840 SET SQL_LOG_BIN=1;
2841 SET SQL_LOG_BIN=1;
2842 INSERT INTO t VALUES (1, "a", 10);
2843 INSERT INTO t VALUES (2, "b", 20);
2844 INSERT INTO t VALUES (3, "c", 30);
2845 include/rpl_sync.inc
2846 UPDATE t SET c1=10 WHERE c2="a";
2847 UPDATE t SET c1=20 WHERE c1=2;
2848 UPDATE t SET c1=30 WHERE c3=30;
2849 UPDATE t SET c3=40 WHERE c1=30;
2850 include/rpl_sync.inc
2851 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2852 DELETE FROM t WHERE c2="a";
2853 DELETE FROM t WHERE c1=20;
2854 DELETE FROM t;
2855 include/rpl_sync.inc
2856 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2857 DROP TABLE t;
2858 include/rpl_sync.inc
2859 SET SQL_LOG_BIN=0;
2860 SET SQL_LOG_BIN=0;
2861 SET SQL_LOG_BIN=0;
2862 ### Asserts that updates without blobs in the BI (PK exists int the table)
2863 ### will not break replication
2864 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2865 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
2866 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
2867 SET SQL_LOG_BIN=1;
2868 SET SQL_LOG_BIN=1;
2869 SET SQL_LOG_BIN=1;
2870 INSERT INTO t VALUES (1, "a", 10);
2871 INSERT INTO t VALUES (2, "b", 20);
2872 INSERT INTO t VALUES (3, "c", 30);
2873 include/rpl_sync.inc
2874 UPDATE t SET c1=10 WHERE c2="a";
2875 UPDATE t SET c1=20 WHERE c1=2;
2876 UPDATE t SET c1=30 WHERE c3=30;
2877 UPDATE t SET c3=40 WHERE c1=30;
2878 include/rpl_sync.inc
2879 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2880 DELETE FROM t WHERE c2="a";
2881 DELETE FROM t WHERE c1=20;
2882 DELETE FROM t;
2883 include/rpl_sync.inc
2884 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2885 DROP TABLE t;
2886 include/rpl_sync.inc
2887 SET SQL_LOG_BIN=0;
2888 SET SQL_LOG_BIN=0;
2889 SET SQL_LOG_BIN=0;
2890 ### Asserts that declaring a blob in a key does not break replication
2891 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2892 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
2893 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
2894 SET SQL_LOG_BIN=1;
2895 SET SQL_LOG_BIN=1;
2896 SET SQL_LOG_BIN=1;
2897 INSERT INTO t VALUES (1, "a", 10);
2898 INSERT INTO t VALUES (2, "b", 20);
2899 INSERT INTO t VALUES (3, "c", 30);
2900 include/rpl_sync.inc
2901 UPDATE t SET c1=10 WHERE c2="a";
2902 UPDATE t SET c1=20 WHERE c1=2;
2903 UPDATE t SET c1=30 WHERE c3=30;
2904 UPDATE t SET c3=40 WHERE c1=30;
2905 include/rpl_sync.inc
2906 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2907 DELETE FROM t WHERE c2="a";
2908 DELETE FROM t WHERE c1=20;
2909 DELETE FROM t;
2910 include/rpl_sync.inc
2911 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2912 DROP TABLE t;
2913 include/rpl_sync.inc
2914 SET SQL_LOG_BIN=0;
2915 SET SQL_LOG_BIN=0;
2916 SET SQL_LOG_BIN=0;
2917 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
2918 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2919 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
2920 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
2921 SET SQL_LOG_BIN=1;
2922 SET SQL_LOG_BIN=1;
2923 SET SQL_LOG_BIN=1;
2924 INSERT INTO t VALUES (1, "a", 10);
2925 INSERT INTO t VALUES (2, "b", 20);
2926 INSERT INTO t VALUES (3, "c", 30);
2927 include/rpl_sync.inc
2928 UPDATE t SET c1=10 WHERE c2="a";
2929 UPDATE t SET c1=20 WHERE c1=2;
2930 UPDATE t SET c1=30 WHERE c3=30;
2931 UPDATE t SET c3=40 WHERE c1=30;
2932 include/rpl_sync.inc
2933 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2934 DELETE FROM t WHERE c2="a";
2935 DELETE FROM t WHERE c1=20;
2936 DELETE FROM t;
2937 include/rpl_sync.inc
2938 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2939 DROP TABLE t;
2940 include/rpl_sync.inc
2941 SET SQL_LOG_BIN=0;
2942 SET SQL_LOG_BIN=0;
2943 SET SQL_LOG_BIN=0;
2944 ### Asserts that declaring a blob as part of a primary key does not break replication
2945 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2946 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
2947 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
2948 SET SQL_LOG_BIN=1;
2949 SET SQL_LOG_BIN=1;
2950 SET SQL_LOG_BIN=1;
2951 INSERT INTO t VALUES (1, "a", 10);
2952 INSERT INTO t VALUES (2, "b", 20);
2953 INSERT INTO t VALUES (3, "c", 30);
2954 include/rpl_sync.inc
2955 UPDATE t SET c1=10 WHERE c2="a";
2956 UPDATE t SET c1=20 WHERE c1=2;
2957 UPDATE t SET c1=30 WHERE c3=30;
2958 UPDATE t SET c3=40 WHERE c1=30;
2959 include/rpl_sync.inc
2960 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2961 DELETE FROM t WHERE c2="a";
2962 DELETE FROM t WHERE c1=20;
2963 DELETE FROM t;
2964 include/rpl_sync.inc
2965 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2966 DROP TABLE t;
2967 include/rpl_sync.inc
2968 ### engines: InnoDB, InnoDB, InnoDB
2969 SET SQL_LOG_BIN=0;
2970 SET SQL_LOG_BIN=0;
2971 SET SQL_LOG_BIN=0;
2972 ### Asserts that updates without blobs in the AI (they are not updated)
2973 ### will not break replication (check when there is no key in the table)
2974 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2975 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2976 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
2977 SET SQL_LOG_BIN=1;
2978 SET SQL_LOG_BIN=1;
2979 SET SQL_LOG_BIN=1;
2980 INSERT INTO t VALUES (1, "a", 10);
2981 INSERT INTO t VALUES (2, "b", 20);
2982 INSERT INTO t VALUES (3, "c", 30);
2983 include/rpl_sync.inc
2984 UPDATE t SET c1=10 WHERE c2="a";
2985 UPDATE t SET c1=20 WHERE c1=2;
2986 UPDATE t SET c1=30 WHERE c3=30;
2987 UPDATE t SET c3=40 WHERE c1=30;
2988 include/rpl_sync.inc
2989 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2990 DELETE FROM t WHERE c2="a";
2991 DELETE FROM t WHERE c1=20;
2992 DELETE FROM t;
2993 include/rpl_sync.inc
2994 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
2995 DROP TABLE t;
2996 include/rpl_sync.inc
2997 SET SQL_LOG_BIN=0;
2998 SET SQL_LOG_BIN=0;
2999 SET SQL_LOG_BIN=0;
3000 ### Asserts that updates without blobs in the AI (they are not updated)
3001 ### will not break replication (check even if there is a key in the table)
3002 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3003 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3004 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3005 SET SQL_LOG_BIN=1;
3006 SET SQL_LOG_BIN=1;
3007 SET SQL_LOG_BIN=1;
3008 INSERT INTO t VALUES (1, "a", 10);
3009 INSERT INTO t VALUES (2, "b", 20);
3010 INSERT INTO t VALUES (3, "c", 30);
3011 include/rpl_sync.inc
3012 UPDATE t SET c1=10 WHERE c2="a";
3013 UPDATE t SET c1=20 WHERE c1=2;
3014 UPDATE t SET c1=30 WHERE c3=30;
3015 UPDATE t SET c3=40 WHERE c1=30;
3016 include/rpl_sync.inc
3017 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3018 DELETE FROM t WHERE c2="a";
3019 DELETE FROM t WHERE c1=20;
3020 DELETE FROM t;
3021 include/rpl_sync.inc
3022 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3023 DROP TABLE t;
3024 include/rpl_sync.inc
3025 SET SQL_LOG_BIN=0;
3026 SET SQL_LOG_BIN=0;
3027 SET SQL_LOG_BIN=0;
3028 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3029 ### will not break replication
3030 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3031 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3032 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3033 SET SQL_LOG_BIN=1;
3034 SET SQL_LOG_BIN=1;
3035 SET SQL_LOG_BIN=1;
3036 INSERT INTO t VALUES (1, "a", 10);
3037 INSERT INTO t VALUES (2, "b", 20);
3038 INSERT INTO t VALUES (3, "c", 30);
3039 include/rpl_sync.inc
3040 UPDATE t SET c1=10 WHERE c2="a";
3041 UPDATE t SET c1=20 WHERE c1=2;
3042 UPDATE t SET c1=30 WHERE c3=30;
3043 UPDATE t SET c3=40 WHERE c1=30;
3044 include/rpl_sync.inc
3045 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3046 DELETE FROM t WHERE c2="a";
3047 DELETE FROM t WHERE c1=20;
3048 DELETE FROM t;
3049 include/rpl_sync.inc
3050 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3051 DROP TABLE t;
3052 include/rpl_sync.inc
3053 SET SQL_LOG_BIN=0;
3054 SET SQL_LOG_BIN=0;
3055 SET SQL_LOG_BIN=0;
3056 ### Asserts that updates without blobs in the BI (PK exists int the table)
3057 ### will not break replication
3058 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3059 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3060 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3061 SET SQL_LOG_BIN=1;
3062 SET SQL_LOG_BIN=1;
3063 SET SQL_LOG_BIN=1;
3064 INSERT INTO t VALUES (1, "a", 10);
3065 INSERT INTO t VALUES (2, "b", 20);
3066 INSERT INTO t VALUES (3, "c", 30);
3067 include/rpl_sync.inc
3068 UPDATE t SET c1=10 WHERE c2="a";
3069 UPDATE t SET c1=20 WHERE c1=2;
3070 UPDATE t SET c1=30 WHERE c3=30;
3071 UPDATE t SET c3=40 WHERE c1=30;
3072 include/rpl_sync.inc
3073 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3074 DELETE FROM t WHERE c2="a";
3075 DELETE FROM t WHERE c1=20;
3076 DELETE FROM t;
3077 include/rpl_sync.inc
3078 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3079 DROP TABLE t;
3080 include/rpl_sync.inc
3081 SET SQL_LOG_BIN=0;
3082 SET SQL_LOG_BIN=0;
3083 SET SQL_LOG_BIN=0;
3084 ### Asserts that declaring a blob in a key does not break replication
3085 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3086 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3087 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3088 SET SQL_LOG_BIN=1;
3089 SET SQL_LOG_BIN=1;
3090 SET SQL_LOG_BIN=1;
3091 INSERT INTO t VALUES (1, "a", 10);
3092 INSERT INTO t VALUES (2, "b", 20);
3093 INSERT INTO t VALUES (3, "c", 30);
3094 include/rpl_sync.inc
3095 UPDATE t SET c1=10 WHERE c2="a";
3096 UPDATE t SET c1=20 WHERE c1=2;
3097 UPDATE t SET c1=30 WHERE c3=30;
3098 UPDATE t SET c3=40 WHERE c1=30;
3099 include/rpl_sync.inc
3100 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3101 DELETE FROM t WHERE c2="a";
3102 DELETE FROM t WHERE c1=20;
3103 DELETE FROM t;
3104 include/rpl_sync.inc
3105 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3106 DROP TABLE t;
3107 include/rpl_sync.inc
3108 SET SQL_LOG_BIN=0;
3109 SET SQL_LOG_BIN=0;
3110 SET SQL_LOG_BIN=0;
3111 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3112 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3113 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3114 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3115 SET SQL_LOG_BIN=1;
3116 SET SQL_LOG_BIN=1;
3117 SET SQL_LOG_BIN=1;
3118 INSERT INTO t VALUES (1, "a", 10);
3119 INSERT INTO t VALUES (2, "b", 20);
3120 INSERT INTO t VALUES (3, "c", 30);
3121 include/rpl_sync.inc
3122 UPDATE t SET c1=10 WHERE c2="a";
3123 UPDATE t SET c1=20 WHERE c1=2;
3124 UPDATE t SET c1=30 WHERE c3=30;
3125 UPDATE t SET c3=40 WHERE c1=30;
3126 include/rpl_sync.inc
3127 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3128 DELETE FROM t WHERE c2="a";
3129 DELETE FROM t WHERE c1=20;
3130 DELETE FROM t;
3131 include/rpl_sync.inc
3132 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3133 DROP TABLE t;
3134 include/rpl_sync.inc
3135 SET SQL_LOG_BIN=0;
3136 SET SQL_LOG_BIN=0;
3137 SET SQL_LOG_BIN=0;
3138 ### Asserts that declaring a blob as part of a primary key does not break replication
3139 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3140 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3141 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3142 SET SQL_LOG_BIN=1;
3143 SET SQL_LOG_BIN=1;
3144 SET SQL_LOG_BIN=1;
3145 INSERT INTO t VALUES (1, "a", 10);
3146 INSERT INTO t VALUES (2, "b", 20);
3147 INSERT INTO t VALUES (3, "c", 30);
3148 include/rpl_sync.inc
3149 UPDATE t SET c1=10 WHERE c2="a";
3150 UPDATE t SET c1=20 WHERE c1=2;
3151 UPDATE t SET c1=30 WHERE c3=30;
3152 UPDATE t SET c3=40 WHERE c1=30;
3153 include/rpl_sync.inc
3154 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3155 DELETE FROM t WHERE c2="a";
3156 DELETE FROM t WHERE c1=20;
3157 DELETE FROM t;
3158 include/rpl_sync.inc
3159 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3160 DROP TABLE t;
3161 include/rpl_sync.inc
3162 CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
3163 SET SESSION binlog_row_image= 'FULL';
3164 SET GLOBAL binlog_row_image= 'FULL';
3165 FLUSH TABLES;
3166 SHOW VARIABLES LIKE 'binlog_row_image';
3167 Variable_name Value
3168 binlog_row_image FULL
3169 CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
3170 SET SESSION binlog_row_image= 'FULL';
3171 SET GLOBAL binlog_row_image= 'FULL';
3172 include/stop_slave.inc
3173 include/start_slave.inc
3174 FLUSH TABLES;
3175 SHOW VARIABLES LIKE 'binlog_row_image';
3176 Variable_name Value
3177 binlog_row_image FULL
3178 CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
3179 SET SESSION binlog_row_image= 'FULL';
3180 SET GLOBAL binlog_row_image= 'FULL';
3181 include/stop_slave.inc
3182 include/start_slave.inc
3183 FLUSH TABLES;
3184 SHOW VARIABLES LIKE 'binlog_row_image';
3185 Variable_name Value
3186 binlog_row_image FULL
3187 ### engines: MyISAM, MyISAM, MyISAM
3188 SET SQL_LOG_BIN=0;
3189 SET SQL_LOG_BIN=0;
3190 SET SQL_LOG_BIN=0;
3191 ### Asserts that updates without blobs in the AI (they are not updated)
3192 ### will not break replication (check when there is no key in the table)
3193 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3194 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3195 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3196 SET SQL_LOG_BIN=1;
3197 SET SQL_LOG_BIN=1;
3198 SET SQL_LOG_BIN=1;
3199 INSERT INTO t VALUES (1, "a", 10);
3200 INSERT INTO t VALUES (2, "b", 20);
3201 INSERT INTO t VALUES (3, "c", 30);
3202 include/rpl_sync.inc
3203 UPDATE t SET c1=10 WHERE c2="a";
3204 UPDATE t SET c1=20 WHERE c1=2;
3205 UPDATE t SET c1=30 WHERE c3=30;
3206 UPDATE t SET c3=40 WHERE c1=30;
3207 include/rpl_sync.inc
3208 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3209 DELETE FROM t WHERE c2="a";
3210 DELETE FROM t WHERE c1=20;
3211 DELETE FROM t;
3212 include/rpl_sync.inc
3213 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3214 DROP TABLE t;
3215 include/rpl_sync.inc
3216 SET SQL_LOG_BIN=0;
3217 SET SQL_LOG_BIN=0;
3218 SET SQL_LOG_BIN=0;
3219 ### Asserts that updates without blobs in the AI (they are not updated)
3220 ### will not break replication (check even if there is a key in the table)
3221 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3222 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3223 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3224 SET SQL_LOG_BIN=1;
3225 SET SQL_LOG_BIN=1;
3226 SET SQL_LOG_BIN=1;
3227 INSERT INTO t VALUES (1, "a", 10);
3228 INSERT INTO t VALUES (2, "b", 20);
3229 INSERT INTO t VALUES (3, "c", 30);
3230 include/rpl_sync.inc
3231 UPDATE t SET c1=10 WHERE c2="a";
3232 UPDATE t SET c1=20 WHERE c1=2;
3233 UPDATE t SET c1=30 WHERE c3=30;
3234 UPDATE t SET c3=40 WHERE c1=30;
3235 include/rpl_sync.inc
3236 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3237 DELETE FROM t WHERE c2="a";
3238 DELETE FROM t WHERE c1=20;
3239 DELETE FROM t;
3240 include/rpl_sync.inc
3241 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3242 DROP TABLE t;
3243 include/rpl_sync.inc
3244 SET SQL_LOG_BIN=0;
3245 SET SQL_LOG_BIN=0;
3246 SET SQL_LOG_BIN=0;
3247 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3248 ### will not break replication
3249 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3250 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3251 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3252 SET SQL_LOG_BIN=1;
3253 SET SQL_LOG_BIN=1;
3254 SET SQL_LOG_BIN=1;
3255 INSERT INTO t VALUES (1, "a", 10);
3256 INSERT INTO t VALUES (2, "b", 20);
3257 INSERT INTO t VALUES (3, "c", 30);
3258 include/rpl_sync.inc
3259 UPDATE t SET c1=10 WHERE c2="a";
3260 UPDATE t SET c1=20 WHERE c1=2;
3261 UPDATE t SET c1=30 WHERE c3=30;
3262 UPDATE t SET c3=40 WHERE c1=30;
3263 include/rpl_sync.inc
3264 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3265 DELETE FROM t WHERE c2="a";
3266 DELETE FROM t WHERE c1=20;
3267 DELETE FROM t;
3268 include/rpl_sync.inc
3269 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3270 DROP TABLE t;
3271 include/rpl_sync.inc
3272 SET SQL_LOG_BIN=0;
3273 SET SQL_LOG_BIN=0;
3274 SET SQL_LOG_BIN=0;
3275 ### Asserts that updates without blobs in the BI (PK exists int the table)
3276 ### will not break replication
3277 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3278 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3279 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3280 SET SQL_LOG_BIN=1;
3281 SET SQL_LOG_BIN=1;
3282 SET SQL_LOG_BIN=1;
3283 INSERT INTO t VALUES (1, "a", 10);
3284 INSERT INTO t VALUES (2, "b", 20);
3285 INSERT INTO t VALUES (3, "c", 30);
3286 include/rpl_sync.inc
3287 UPDATE t SET c1=10 WHERE c2="a";
3288 UPDATE t SET c1=20 WHERE c1=2;
3289 UPDATE t SET c1=30 WHERE c3=30;
3290 UPDATE t SET c3=40 WHERE c1=30;
3291 include/rpl_sync.inc
3292 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3293 DELETE FROM t WHERE c2="a";
3294 DELETE FROM t WHERE c1=20;
3295 DELETE FROM t;
3296 include/rpl_sync.inc
3297 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3298 DROP TABLE t;
3299 include/rpl_sync.inc
3300 SET SQL_LOG_BIN=0;
3301 SET SQL_LOG_BIN=0;
3302 SET SQL_LOG_BIN=0;
3303 ### Asserts that declaring a blob in a key does not break replication
3304 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3305 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3306 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3307 SET SQL_LOG_BIN=1;
3308 SET SQL_LOG_BIN=1;
3309 SET SQL_LOG_BIN=1;
3310 INSERT INTO t VALUES (1, "a", 10);
3311 INSERT INTO t VALUES (2, "b", 20);
3312 INSERT INTO t VALUES (3, "c", 30);
3313 include/rpl_sync.inc
3314 UPDATE t SET c1=10 WHERE c2="a";
3315 UPDATE t SET c1=20 WHERE c1=2;
3316 UPDATE t SET c1=30 WHERE c3=30;
3317 UPDATE t SET c3=40 WHERE c1=30;
3318 include/rpl_sync.inc
3319 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3320 DELETE FROM t WHERE c2="a";
3321 DELETE FROM t WHERE c1=20;
3322 DELETE FROM t;
3323 include/rpl_sync.inc
3324 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3325 DROP TABLE t;
3326 include/rpl_sync.inc
3327 SET SQL_LOG_BIN=0;
3328 SET SQL_LOG_BIN=0;
3329 SET SQL_LOG_BIN=0;
3330 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3331 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3332 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3333 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3334 SET SQL_LOG_BIN=1;
3335 SET SQL_LOG_BIN=1;
3336 SET SQL_LOG_BIN=1;
3337 INSERT INTO t VALUES (1, "a", 10);
3338 INSERT INTO t VALUES (2, "b", 20);
3339 INSERT INTO t VALUES (3, "c", 30);
3340 include/rpl_sync.inc
3341 UPDATE t SET c1=10 WHERE c2="a";
3342 UPDATE t SET c1=20 WHERE c1=2;
3343 UPDATE t SET c1=30 WHERE c3=30;
3344 UPDATE t SET c3=40 WHERE c1=30;
3345 include/rpl_sync.inc
3346 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3347 DELETE FROM t WHERE c2="a";
3348 DELETE FROM t WHERE c1=20;
3349 DELETE FROM t;
3350 include/rpl_sync.inc
3351 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3352 DROP TABLE t;
3353 include/rpl_sync.inc
3354 SET SQL_LOG_BIN=0;
3355 SET SQL_LOG_BIN=0;
3356 SET SQL_LOG_BIN=0;
3357 ### Asserts that declaring a blob as part of a primary key does not break replication
3358 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3359 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3360 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3361 SET SQL_LOG_BIN=1;
3362 SET SQL_LOG_BIN=1;
3363 SET SQL_LOG_BIN=1;
3364 INSERT INTO t VALUES (1, "a", 10);
3365 INSERT INTO t VALUES (2, "b", 20);
3366 INSERT INTO t VALUES (3, "c", 30);
3367 include/rpl_sync.inc
3368 UPDATE t SET c1=10 WHERE c2="a";
3369 UPDATE t SET c1=20 WHERE c1=2;
3370 UPDATE t SET c1=30 WHERE c3=30;
3371 UPDATE t SET c3=40 WHERE c1=30;
3372 include/rpl_sync.inc
3373 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3374 DELETE FROM t WHERE c2="a";
3375 DELETE FROM t WHERE c1=20;
3376 DELETE FROM t;
3377 include/rpl_sync.inc
3378 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3379 DROP TABLE t;
3380 include/rpl_sync.inc
3381 ### engines: MyISAM, MyISAM, InnoDB
3382 SET SQL_LOG_BIN=0;
3383 SET SQL_LOG_BIN=0;
3384 SET SQL_LOG_BIN=0;
3385 ### Asserts that updates without blobs in the AI (they are not updated)
3386 ### will not break replication (check when there is no key in the table)
3387 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3388 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3389 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3390 SET SQL_LOG_BIN=1;
3391 SET SQL_LOG_BIN=1;
3392 SET SQL_LOG_BIN=1;
3393 INSERT INTO t VALUES (1, "a", 10);
3394 INSERT INTO t VALUES (2, "b", 20);
3395 INSERT INTO t VALUES (3, "c", 30);
3396 include/rpl_sync.inc
3397 UPDATE t SET c1=10 WHERE c2="a";
3398 UPDATE t SET c1=20 WHERE c1=2;
3399 UPDATE t SET c1=30 WHERE c3=30;
3400 UPDATE t SET c3=40 WHERE c1=30;
3401 include/rpl_sync.inc
3402 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3403 DELETE FROM t WHERE c2="a";
3404 DELETE FROM t WHERE c1=20;
3405 DELETE FROM t;
3406 include/rpl_sync.inc
3407 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3408 DROP TABLE t;
3409 include/rpl_sync.inc
3410 SET SQL_LOG_BIN=0;
3411 SET SQL_LOG_BIN=0;
3412 SET SQL_LOG_BIN=0;
3413 ### Asserts that updates without blobs in the AI (they are not updated)
3414 ### will not break replication (check even if there is a key in the table)
3415 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3416 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3417 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3418 SET SQL_LOG_BIN=1;
3419 SET SQL_LOG_BIN=1;
3420 SET SQL_LOG_BIN=1;
3421 INSERT INTO t VALUES (1, "a", 10);
3422 INSERT INTO t VALUES (2, "b", 20);
3423 INSERT INTO t VALUES (3, "c", 30);
3424 include/rpl_sync.inc
3425 UPDATE t SET c1=10 WHERE c2="a";
3426 UPDATE t SET c1=20 WHERE c1=2;
3427 UPDATE t SET c1=30 WHERE c3=30;
3428 UPDATE t SET c3=40 WHERE c1=30;
3429 include/rpl_sync.inc
3430 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3431 DELETE FROM t WHERE c2="a";
3432 DELETE FROM t WHERE c1=20;
3433 DELETE FROM t;
3434 include/rpl_sync.inc
3435 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3436 DROP TABLE t;
3437 include/rpl_sync.inc
3438 SET SQL_LOG_BIN=0;
3439 SET SQL_LOG_BIN=0;
3440 SET SQL_LOG_BIN=0;
3441 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3442 ### will not break replication
3443 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3444 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3445 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3446 SET SQL_LOG_BIN=1;
3447 SET SQL_LOG_BIN=1;
3448 SET SQL_LOG_BIN=1;
3449 INSERT INTO t VALUES (1, "a", 10);
3450 INSERT INTO t VALUES (2, "b", 20);
3451 INSERT INTO t VALUES (3, "c", 30);
3452 include/rpl_sync.inc
3453 UPDATE t SET c1=10 WHERE c2="a";
3454 UPDATE t SET c1=20 WHERE c1=2;
3455 UPDATE t SET c1=30 WHERE c3=30;
3456 UPDATE t SET c3=40 WHERE c1=30;
3457 include/rpl_sync.inc
3458 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3459 DELETE FROM t WHERE c2="a";
3460 DELETE FROM t WHERE c1=20;
3461 DELETE FROM t;
3462 include/rpl_sync.inc
3463 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3464 DROP TABLE t;
3465 include/rpl_sync.inc
3466 SET SQL_LOG_BIN=0;
3467 SET SQL_LOG_BIN=0;
3468 SET SQL_LOG_BIN=0;
3469 ### Asserts that updates without blobs in the BI (PK exists int the table)
3470 ### will not break replication
3471 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3472 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3473 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3474 SET SQL_LOG_BIN=1;
3475 SET SQL_LOG_BIN=1;
3476 SET SQL_LOG_BIN=1;
3477 INSERT INTO t VALUES (1, "a", 10);
3478 INSERT INTO t VALUES (2, "b", 20);
3479 INSERT INTO t VALUES (3, "c", 30);
3480 include/rpl_sync.inc
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 DELETE FROM t WHERE c2="a";
3488 DELETE FROM t WHERE c1=20;
3489 DELETE FROM t;
3490 include/rpl_sync.inc
3491 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3492 DROP TABLE t;
3493 include/rpl_sync.inc
3494 SET SQL_LOG_BIN=0;
3495 SET SQL_LOG_BIN=0;
3496 SET SQL_LOG_BIN=0;
3497 ### Asserts that declaring a blob in a key does not break replication
3498 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3499 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3500 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3501 SET SQL_LOG_BIN=1;
3502 SET SQL_LOG_BIN=1;
3503 SET SQL_LOG_BIN=1;
3504 INSERT INTO t VALUES (1, "a", 10);
3505 INSERT INTO t VALUES (2, "b", 20);
3506 INSERT INTO t VALUES (3, "c", 30);
3507 include/rpl_sync.inc
3508 UPDATE t SET c1=10 WHERE c2="a";
3509 UPDATE t SET c1=20 WHERE c1=2;
3510 UPDATE t SET c1=30 WHERE c3=30;
3511 UPDATE t SET c3=40 WHERE c1=30;
3512 include/rpl_sync.inc
3513 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3514 DELETE FROM t WHERE c2="a";
3515 DELETE FROM t WHERE c1=20;
3516 DELETE FROM t;
3517 include/rpl_sync.inc
3518 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3519 DROP TABLE t;
3520 include/rpl_sync.inc
3521 SET SQL_LOG_BIN=0;
3522 SET SQL_LOG_BIN=0;
3523 SET SQL_LOG_BIN=0;
3524 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3525 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3526 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3527 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3528 SET SQL_LOG_BIN=1;
3529 SET SQL_LOG_BIN=1;
3530 SET SQL_LOG_BIN=1;
3531 INSERT INTO t VALUES (1, "a", 10);
3532 INSERT INTO t VALUES (2, "b", 20);
3533 INSERT INTO t VALUES (3, "c", 30);
3534 include/rpl_sync.inc
3535 UPDATE t SET c1=10 WHERE c2="a";
3536 UPDATE t SET c1=20 WHERE c1=2;
3537 UPDATE t SET c1=30 WHERE c3=30;
3538 UPDATE t SET c3=40 WHERE c1=30;
3539 include/rpl_sync.inc
3540 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3541 DELETE FROM t WHERE c2="a";
3542 DELETE FROM t WHERE c1=20;
3543 DELETE FROM t;
3544 include/rpl_sync.inc
3545 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3546 DROP TABLE t;
3547 include/rpl_sync.inc
3548 SET SQL_LOG_BIN=0;
3549 SET SQL_LOG_BIN=0;
3550 SET SQL_LOG_BIN=0;
3551 ### Asserts that declaring a blob as part of a primary key does not break replication
3552 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3553 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3554 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3555 SET SQL_LOG_BIN=1;
3556 SET SQL_LOG_BIN=1;
3557 SET SQL_LOG_BIN=1;
3558 INSERT INTO t VALUES (1, "a", 10);
3559 INSERT INTO t VALUES (2, "b", 20);
3560 INSERT INTO t VALUES (3, "c", 30);
3561 include/rpl_sync.inc
3562 UPDATE t SET c1=10 WHERE c2="a";
3563 UPDATE t SET c1=20 WHERE c1=2;
3564 UPDATE t SET c1=30 WHERE c3=30;
3565 UPDATE t SET c3=40 WHERE c1=30;
3566 include/rpl_sync.inc
3567 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3568 DELETE FROM t WHERE c2="a";
3569 DELETE FROM t WHERE c1=20;
3570 DELETE FROM t;
3571 include/rpl_sync.inc
3572 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3573 DROP TABLE t;
3574 include/rpl_sync.inc
3575 ### engines: MyISAM, InnoDB, MyISAM
3576 SET SQL_LOG_BIN=0;
3577 SET SQL_LOG_BIN=0;
3578 SET SQL_LOG_BIN=0;
3579 ### Asserts that updates without blobs in the AI (they are not updated)
3580 ### will not break replication (check when there is no key in the table)
3581 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3582 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3583 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3584 SET SQL_LOG_BIN=1;
3585 SET SQL_LOG_BIN=1;
3586 SET SQL_LOG_BIN=1;
3587 INSERT INTO t VALUES (1, "a", 10);
3588 INSERT INTO t VALUES (2, "b", 20);
3589 INSERT INTO t VALUES (3, "c", 30);
3590 include/rpl_sync.inc
3591 UPDATE t SET c1=10 WHERE c2="a";
3592 UPDATE t SET c1=20 WHERE c1=2;
3593 UPDATE t SET c1=30 WHERE c3=30;
3594 UPDATE t SET c3=40 WHERE c1=30;
3595 include/rpl_sync.inc
3596 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3597 DELETE FROM t WHERE c2="a";
3598 DELETE FROM t WHERE c1=20;
3599 DELETE FROM t;
3600 include/rpl_sync.inc
3601 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3602 DROP TABLE t;
3603 include/rpl_sync.inc
3604 SET SQL_LOG_BIN=0;
3605 SET SQL_LOG_BIN=0;
3606 SET SQL_LOG_BIN=0;
3607 ### Asserts that updates without blobs in the AI (they are not updated)
3608 ### will not break replication (check even if there is a key in the table)
3609 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3610 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3611 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3612 SET SQL_LOG_BIN=1;
3613 SET SQL_LOG_BIN=1;
3614 SET SQL_LOG_BIN=1;
3615 INSERT INTO t VALUES (1, "a", 10);
3616 INSERT INTO t VALUES (2, "b", 20);
3617 INSERT INTO t VALUES (3, "c", 30);
3618 include/rpl_sync.inc
3619 UPDATE t SET c1=10 WHERE c2="a";
3620 UPDATE t SET c1=20 WHERE c1=2;
3621 UPDATE t SET c1=30 WHERE c3=30;
3622 UPDATE t SET c3=40 WHERE c1=30;
3623 include/rpl_sync.inc
3624 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3625 DELETE FROM t WHERE c2="a";
3626 DELETE FROM t WHERE c1=20;
3627 DELETE FROM t;
3628 include/rpl_sync.inc
3629 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3630 DROP TABLE t;
3631 include/rpl_sync.inc
3632 SET SQL_LOG_BIN=0;
3633 SET SQL_LOG_BIN=0;
3634 SET SQL_LOG_BIN=0;
3635 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3636 ### will not break replication
3637 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3638 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3639 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3640 SET SQL_LOG_BIN=1;
3641 SET SQL_LOG_BIN=1;
3642 SET SQL_LOG_BIN=1;
3643 INSERT INTO t VALUES (1, "a", 10);
3644 INSERT INTO t VALUES (2, "b", 20);
3645 INSERT INTO t VALUES (3, "c", 30);
3646 include/rpl_sync.inc
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 DELETE FROM t WHERE c2="a";
3654 DELETE FROM t WHERE c1=20;
3655 DELETE FROM t;
3656 include/rpl_sync.inc
3657 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3658 DROP TABLE t;
3659 include/rpl_sync.inc
3660 SET SQL_LOG_BIN=0;
3661 SET SQL_LOG_BIN=0;
3662 SET SQL_LOG_BIN=0;
3663 ### Asserts that updates without blobs in the BI (PK exists int the table)
3664 ### will not break replication
3665 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3666 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3667 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3668 SET SQL_LOG_BIN=1;
3669 SET SQL_LOG_BIN=1;
3670 SET SQL_LOG_BIN=1;
3671 INSERT INTO t VALUES (1, "a", 10);
3672 INSERT INTO t VALUES (2, "b", 20);
3673 INSERT INTO t VALUES (3, "c", 30);
3674 include/rpl_sync.inc
3675 UPDATE t SET c1=10 WHERE c2="a";
3676 UPDATE t SET c1=20 WHERE c1=2;
3677 UPDATE t SET c1=30 WHERE c3=30;
3678 UPDATE t SET c3=40 WHERE c1=30;
3679 include/rpl_sync.inc
3680 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3681 DELETE FROM t WHERE c2="a";
3682 DELETE FROM t WHERE c1=20;
3683 DELETE FROM t;
3684 include/rpl_sync.inc
3685 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3686 DROP TABLE t;
3687 include/rpl_sync.inc
3688 SET SQL_LOG_BIN=0;
3689 SET SQL_LOG_BIN=0;
3690 SET SQL_LOG_BIN=0;
3691 ### Asserts that declaring a blob in a key does not break replication
3692 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3693 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3694 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3695 SET SQL_LOG_BIN=1;
3696 SET SQL_LOG_BIN=1;
3697 SET SQL_LOG_BIN=1;
3698 INSERT INTO t VALUES (1, "a", 10);
3699 INSERT INTO t VALUES (2, "b", 20);
3700 INSERT INTO t VALUES (3, "c", 30);
3701 include/rpl_sync.inc
3702 UPDATE t SET c1=10 WHERE c2="a";
3703 UPDATE t SET c1=20 WHERE c1=2;
3704 UPDATE t SET c1=30 WHERE c3=30;
3705 UPDATE t SET c3=40 WHERE c1=30;
3706 include/rpl_sync.inc
3707 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3708 DELETE FROM t WHERE c2="a";
3709 DELETE FROM t WHERE c1=20;
3710 DELETE FROM t;
3711 include/rpl_sync.inc
3712 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3713 DROP TABLE t;
3714 include/rpl_sync.inc
3715 SET SQL_LOG_BIN=0;
3716 SET SQL_LOG_BIN=0;
3717 SET SQL_LOG_BIN=0;
3718 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3719 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3720 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3721 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3722 SET SQL_LOG_BIN=1;
3723 SET SQL_LOG_BIN=1;
3724 SET SQL_LOG_BIN=1;
3725 INSERT INTO t VALUES (1, "a", 10);
3726 INSERT INTO t VALUES (2, "b", 20);
3727 INSERT INTO t VALUES (3, "c", 30);
3728 include/rpl_sync.inc
3729 UPDATE t SET c1=10 WHERE c2="a";
3730 UPDATE t SET c1=20 WHERE c1=2;
3731 UPDATE t SET c1=30 WHERE c3=30;
3732 UPDATE t SET c3=40 WHERE c1=30;
3733 include/rpl_sync.inc
3734 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3735 DELETE FROM t WHERE c2="a";
3736 DELETE FROM t WHERE c1=20;
3737 DELETE FROM t;
3738 include/rpl_sync.inc
3739 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3740 DROP TABLE t;
3741 include/rpl_sync.inc
3742 SET SQL_LOG_BIN=0;
3743 SET SQL_LOG_BIN=0;
3744 SET SQL_LOG_BIN=0;
3745 ### Asserts that declaring a blob as part of a primary key does not break replication
3746 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3747 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3748 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3749 SET SQL_LOG_BIN=1;
3750 SET SQL_LOG_BIN=1;
3751 SET SQL_LOG_BIN=1;
3752 INSERT INTO t VALUES (1, "a", 10);
3753 INSERT INTO t VALUES (2, "b", 20);
3754 INSERT INTO t VALUES (3, "c", 30);
3755 include/rpl_sync.inc
3756 UPDATE t SET c1=10 WHERE c2="a";
3757 UPDATE t SET c1=20 WHERE c1=2;
3758 UPDATE t SET c1=30 WHERE c3=30;
3759 UPDATE t SET c3=40 WHERE c1=30;
3760 include/rpl_sync.inc
3761 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3762 DELETE FROM t WHERE c2="a";
3763 DELETE FROM t WHERE c1=20;
3764 DELETE FROM t;
3765 include/rpl_sync.inc
3766 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3767 DROP TABLE t;
3768 include/rpl_sync.inc
3769 ### engines: MyISAM, InnoDB, InnoDB
3770 SET SQL_LOG_BIN=0;
3771 SET SQL_LOG_BIN=0;
3772 SET SQL_LOG_BIN=0;
3773 ### Asserts that updates without blobs in the AI (they are not updated)
3774 ### will not break replication (check when there is no key in the table)
3775 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3776 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3777 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3778 SET SQL_LOG_BIN=1;
3779 SET SQL_LOG_BIN=1;
3780 SET SQL_LOG_BIN=1;
3781 INSERT INTO t VALUES (1, "a", 10);
3782 INSERT INTO t VALUES (2, "b", 20);
3783 INSERT INTO t VALUES (3, "c", 30);
3784 include/rpl_sync.inc
3785 UPDATE t SET c1=10 WHERE c2="a";
3786 UPDATE t SET c1=20 WHERE c1=2;
3787 UPDATE t SET c1=30 WHERE c3=30;
3788 UPDATE t SET c3=40 WHERE c1=30;
3789 include/rpl_sync.inc
3790 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3791 DELETE FROM t WHERE c2="a";
3792 DELETE FROM t WHERE c1=20;
3793 DELETE FROM t;
3794 include/rpl_sync.inc
3795 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3796 DROP TABLE t;
3797 include/rpl_sync.inc
3798 SET SQL_LOG_BIN=0;
3799 SET SQL_LOG_BIN=0;
3800 SET SQL_LOG_BIN=0;
3801 ### Asserts that updates without blobs in the AI (they are not updated)
3802 ### will not break replication (check even if there is a key in the table)
3803 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3804 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3805 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3806 SET SQL_LOG_BIN=1;
3807 SET SQL_LOG_BIN=1;
3808 SET SQL_LOG_BIN=1;
3809 INSERT INTO t VALUES (1, "a", 10);
3810 INSERT INTO t VALUES (2, "b", 20);
3811 INSERT INTO t VALUES (3, "c", 30);
3812 include/rpl_sync.inc
3813 UPDATE t SET c1=10 WHERE c2="a";
3814 UPDATE t SET c1=20 WHERE c1=2;
3815 UPDATE t SET c1=30 WHERE c3=30;
3816 UPDATE t SET c3=40 WHERE c1=30;
3817 include/rpl_sync.inc
3818 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3819 DELETE FROM t WHERE c2="a";
3820 DELETE FROM t WHERE c1=20;
3821 DELETE FROM t;
3822 include/rpl_sync.inc
3823 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3824 DROP TABLE t;
3825 include/rpl_sync.inc
3826 SET SQL_LOG_BIN=0;
3827 SET SQL_LOG_BIN=0;
3828 SET SQL_LOG_BIN=0;
3829 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
3830 ### will not break replication
3831 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
3832 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3833 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
3834 SET SQL_LOG_BIN=1;
3835 SET SQL_LOG_BIN=1;
3836 SET SQL_LOG_BIN=1;
3837 INSERT INTO t VALUES (1, "a", 10);
3838 INSERT INTO t VALUES (2, "b", 20);
3839 INSERT INTO t VALUES (3, "c", 30);
3840 include/rpl_sync.inc
3841 UPDATE t SET c1=10 WHERE c2="a";
3842 UPDATE t SET c1=20 WHERE c1=2;
3843 UPDATE t SET c1=30 WHERE c3=30;
3844 UPDATE t SET c3=40 WHERE c1=30;
3845 include/rpl_sync.inc
3846 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3847 DELETE FROM t WHERE c2="a";
3848 DELETE FROM t WHERE c1=20;
3849 DELETE FROM t;
3850 include/rpl_sync.inc
3851 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3852 DROP TABLE t;
3853 include/rpl_sync.inc
3854 SET SQL_LOG_BIN=0;
3855 SET SQL_LOG_BIN=0;
3856 SET SQL_LOG_BIN=0;
3857 ### Asserts that updates without blobs in the BI (PK exists int the table)
3858 ### will not break replication
3859 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
3860 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3861 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
3862 SET SQL_LOG_BIN=1;
3863 SET SQL_LOG_BIN=1;
3864 SET SQL_LOG_BIN=1;
3865 INSERT INTO t VALUES (1, "a", 10);
3866 INSERT INTO t VALUES (2, "b", 20);
3867 INSERT INTO t VALUES (3, "c", 30);
3868 include/rpl_sync.inc
3869 UPDATE t SET c1=10 WHERE c2="a";
3870 UPDATE t SET c1=20 WHERE c1=2;
3871 UPDATE t SET c1=30 WHERE c3=30;
3872 UPDATE t SET c3=40 WHERE c1=30;
3873 include/rpl_sync.inc
3874 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3875 DELETE FROM t WHERE c2="a";
3876 DELETE FROM t WHERE c1=20;
3877 DELETE FROM t;
3878 include/rpl_sync.inc
3879 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3880 DROP TABLE t;
3881 include/rpl_sync.inc
3882 SET SQL_LOG_BIN=0;
3883 SET SQL_LOG_BIN=0;
3884 SET SQL_LOG_BIN=0;
3885 ### Asserts that declaring a blob in a key does not break replication
3886 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
3887 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3888 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
3889 SET SQL_LOG_BIN=1;
3890 SET SQL_LOG_BIN=1;
3891 SET SQL_LOG_BIN=1;
3892 INSERT INTO t VALUES (1, "a", 10);
3893 INSERT INTO t VALUES (2, "b", 20);
3894 INSERT INTO t VALUES (3, "c", 30);
3895 include/rpl_sync.inc
3896 UPDATE t SET c1=10 WHERE c2="a";
3897 UPDATE t SET c1=20 WHERE c1=2;
3898 UPDATE t SET c1=30 WHERE c3=30;
3899 UPDATE t SET c3=40 WHERE c1=30;
3900 include/rpl_sync.inc
3901 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3902 DELETE FROM t WHERE c2="a";
3903 DELETE FROM t WHERE c1=20;
3904 DELETE FROM t;
3905 include/rpl_sync.inc
3906 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3907 DROP TABLE t;
3908 include/rpl_sync.inc
3909 SET SQL_LOG_BIN=0;
3910 SET SQL_LOG_BIN=0;
3911 SET SQL_LOG_BIN=0;
3912 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
3913 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
3914 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3915 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
3916 SET SQL_LOG_BIN=1;
3917 SET SQL_LOG_BIN=1;
3918 SET SQL_LOG_BIN=1;
3919 INSERT INTO t VALUES (1, "a", 10);
3920 INSERT INTO t VALUES (2, "b", 20);
3921 INSERT INTO t VALUES (3, "c", 30);
3922 include/rpl_sync.inc
3923 UPDATE t SET c1=10 WHERE c2="a";
3924 UPDATE t SET c1=20 WHERE c1=2;
3925 UPDATE t SET c1=30 WHERE c3=30;
3926 UPDATE t SET c3=40 WHERE c1=30;
3927 include/rpl_sync.inc
3928 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3929 DELETE FROM t WHERE c2="a";
3930 DELETE FROM t WHERE c1=20;
3931 DELETE FROM t;
3932 include/rpl_sync.inc
3933 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3934 DROP TABLE t;
3935 include/rpl_sync.inc
3936 SET SQL_LOG_BIN=0;
3937 SET SQL_LOG_BIN=0;
3938 SET SQL_LOG_BIN=0;
3939 ### Asserts that declaring a blob as part of a primary key does not break replication
3940 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
3941 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3942 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
3943 SET SQL_LOG_BIN=1;
3944 SET SQL_LOG_BIN=1;
3945 SET SQL_LOG_BIN=1;
3946 INSERT INTO t VALUES (1, "a", 10);
3947 INSERT INTO t VALUES (2, "b", 20);
3948 INSERT INTO t VALUES (3, "c", 30);
3949 include/rpl_sync.inc
3950 UPDATE t SET c1=10 WHERE c2="a";
3951 UPDATE t SET c1=20 WHERE c1=2;
3952 UPDATE t SET c1=30 WHERE c3=30;
3953 UPDATE t SET c3=40 WHERE c1=30;
3954 include/rpl_sync.inc
3955 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3956 DELETE FROM t WHERE c2="a";
3957 DELETE FROM t WHERE c1=20;
3958 DELETE FROM t;
3959 include/rpl_sync.inc
3960 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3961 DROP TABLE t;
3962 include/rpl_sync.inc
3963 ### engines: InnoDB, MyISAM, MyISAM
3964 SET SQL_LOG_BIN=0;
3965 SET SQL_LOG_BIN=0;
3966 SET SQL_LOG_BIN=0;
3967 ### Asserts that updates without blobs in the AI (they are not updated)
3968 ### will not break replication (check when there is no key in the table)
3969 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
3970 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3971 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
3972 SET SQL_LOG_BIN=1;
3973 SET SQL_LOG_BIN=1;
3974 SET SQL_LOG_BIN=1;
3975 INSERT INTO t VALUES (1, "a", 10);
3976 INSERT INTO t VALUES (2, "b", 20);
3977 INSERT INTO t VALUES (3, "c", 30);
3978 include/rpl_sync.inc
3979 UPDATE t SET c1=10 WHERE c2="a";
3980 UPDATE t SET c1=20 WHERE c1=2;
3981 UPDATE t SET c1=30 WHERE c3=30;
3982 UPDATE t SET c3=40 WHERE c1=30;
3983 include/rpl_sync.inc
3984 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3985 DELETE FROM t WHERE c2="a";
3986 DELETE FROM t WHERE c1=20;
3987 DELETE FROM t;
3988 include/rpl_sync.inc
3989 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
3990 DROP TABLE t;
3991 include/rpl_sync.inc
3992 SET SQL_LOG_BIN=0;
3993 SET SQL_LOG_BIN=0;
3994 SET SQL_LOG_BIN=0;
3995 ### Asserts that updates without blobs in the AI (they are not updated)
3996 ### will not break replication (check even if there is a key in the table)
3997 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
3998 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
3999 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
4000 SET SQL_LOG_BIN=1;
4001 SET SQL_LOG_BIN=1;
4002 SET SQL_LOG_BIN=1;
4003 INSERT INTO t VALUES (1, "a", 10);
4004 INSERT INTO t VALUES (2, "b", 20);
4005 INSERT INTO t VALUES (3, "c", 30);
4006 include/rpl_sync.inc
4007 UPDATE t SET c1=10 WHERE c2="a";
4008 UPDATE t SET c1=20 WHERE c1=2;
4009 UPDATE t SET c1=30 WHERE c3=30;
4010 UPDATE t SET c3=40 WHERE c1=30;
4011 include/rpl_sync.inc
4012 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4013 DELETE FROM t WHERE c2="a";
4014 DELETE FROM t WHERE c1=20;
4015 DELETE FROM t;
4016 include/rpl_sync.inc
4017 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4018 DROP TABLE t;
4019 include/rpl_sync.inc
4020 SET SQL_LOG_BIN=0;
4021 SET SQL_LOG_BIN=0;
4022 SET SQL_LOG_BIN=0;
4023 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
4024 ### will not break replication
4025 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4026 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
4027 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
4028 SET SQL_LOG_BIN=1;
4029 SET SQL_LOG_BIN=1;
4030 SET SQL_LOG_BIN=1;
4031 INSERT INTO t VALUES (1, "a", 10);
4032 INSERT INTO t VALUES (2, "b", 20);
4033 INSERT INTO t VALUES (3, "c", 30);
4034 include/rpl_sync.inc
4035 UPDATE t SET c1=10 WHERE c2="a";
4036 UPDATE t SET c1=20 WHERE c1=2;
4037 UPDATE t SET c1=30 WHERE c3=30;
4038 UPDATE t SET c3=40 WHERE c1=30;
4039 include/rpl_sync.inc
4040 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4041 DELETE FROM t WHERE c2="a";
4042 DELETE FROM t WHERE c1=20;
4043 DELETE FROM t;
4044 include/rpl_sync.inc
4045 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4046 DROP TABLE t;
4047 include/rpl_sync.inc
4048 SET SQL_LOG_BIN=0;
4049 SET SQL_LOG_BIN=0;
4050 SET SQL_LOG_BIN=0;
4051 ### Asserts that updates without blobs in the BI (PK exists int the table)
4052 ### will not break replication
4053 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4054 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
4055 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
4056 SET SQL_LOG_BIN=1;
4057 SET SQL_LOG_BIN=1;
4058 SET SQL_LOG_BIN=1;
4059 INSERT INTO t VALUES (1, "a", 10);
4060 INSERT INTO t VALUES (2, "b", 20);
4061 INSERT INTO t VALUES (3, "c", 30);
4062 include/rpl_sync.inc
4063 UPDATE t SET c1=10 WHERE c2="a";
4064 UPDATE t SET c1=20 WHERE c1=2;
4065 UPDATE t SET c1=30 WHERE c3=30;
4066 UPDATE t SET c3=40 WHERE c1=30;
4067 include/rpl_sync.inc
4068 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4069 DELETE FROM t WHERE c2="a";
4070 DELETE FROM t WHERE c1=20;
4071 DELETE FROM t;
4072 include/rpl_sync.inc
4073 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4074 DROP TABLE t;
4075 include/rpl_sync.inc
4076 SET SQL_LOG_BIN=0;
4077 SET SQL_LOG_BIN=0;
4078 SET SQL_LOG_BIN=0;
4079 ### Asserts that declaring a blob in a key does not break replication
4080 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4081 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
4082 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
4083 SET SQL_LOG_BIN=1;
4084 SET SQL_LOG_BIN=1;
4085 SET SQL_LOG_BIN=1;
4086 INSERT INTO t VALUES (1, "a", 10);
4087 INSERT INTO t VALUES (2, "b", 20);
4088 INSERT INTO t VALUES (3, "c", 30);
4089 include/rpl_sync.inc
4090 UPDATE t SET c1=10 WHERE c2="a";
4091 UPDATE t SET c1=20 WHERE c1=2;
4092 UPDATE t SET c1=30 WHERE c3=30;
4093 UPDATE t SET c3=40 WHERE c1=30;
4094 include/rpl_sync.inc
4095 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4096 DELETE FROM t WHERE c2="a";
4097 DELETE FROM t WHERE c1=20;
4098 DELETE FROM t;
4099 include/rpl_sync.inc
4100 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4101 DROP TABLE t;
4102 include/rpl_sync.inc
4103 SET SQL_LOG_BIN=0;
4104 SET SQL_LOG_BIN=0;
4105 SET SQL_LOG_BIN=0;
4106 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
4107 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4108 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
4109 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
4110 SET SQL_LOG_BIN=1;
4111 SET SQL_LOG_BIN=1;
4112 SET SQL_LOG_BIN=1;
4113 INSERT INTO t VALUES (1, "a", 10);
4114 INSERT INTO t VALUES (2, "b", 20);
4115 INSERT INTO t VALUES (3, "c", 30);
4116 include/rpl_sync.inc
4117 UPDATE t SET c1=10 WHERE c2="a";
4118 UPDATE t SET c1=20 WHERE c1=2;
4119 UPDATE t SET c1=30 WHERE c3=30;
4120 UPDATE t SET c3=40 WHERE c1=30;
4121 include/rpl_sync.inc
4122 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4123 DELETE FROM t WHERE c2="a";
4124 DELETE FROM t WHERE c1=20;
4125 DELETE FROM t;
4126 include/rpl_sync.inc
4127 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4128 DROP TABLE t;
4129 include/rpl_sync.inc
4130 SET SQL_LOG_BIN=0;
4131 SET SQL_LOG_BIN=0;
4132 SET SQL_LOG_BIN=0;
4133 ### Asserts that declaring a blob as part of a primary key does not break replication
4134 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4135 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4136 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4137 SET SQL_LOG_BIN=1;
4138 SET SQL_LOG_BIN=1;
4139 SET SQL_LOG_BIN=1;
4140 INSERT INTO t VALUES (1, "a", 10);
4141 INSERT INTO t VALUES (2, "b", 20);
4142 INSERT INTO t VALUES (3, "c", 30);
4143 include/rpl_sync.inc
4144 UPDATE t SET c1=10 WHERE c2="a";
4145 UPDATE t SET c1=20 WHERE c1=2;
4146 UPDATE t SET c1=30 WHERE c3=30;
4147 UPDATE t SET c3=40 WHERE c1=30;
4148 include/rpl_sync.inc
4149 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4150 DELETE FROM t WHERE c2="a";
4151 DELETE FROM t WHERE c1=20;
4152 DELETE FROM t;
4153 include/rpl_sync.inc
4154 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4155 DROP TABLE t;
4156 include/rpl_sync.inc
4157 ### engines: InnoDB, MyISAM, InnoDB
4158 SET SQL_LOG_BIN=0;
4159 SET SQL_LOG_BIN=0;
4160 SET SQL_LOG_BIN=0;
4161 ### Asserts that updates without blobs in the AI (they are not updated)
4162 ### will not break replication (check when there is no key in the table)
4163 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4164 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
4165 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4166 SET SQL_LOG_BIN=1;
4167 SET SQL_LOG_BIN=1;
4168 SET SQL_LOG_BIN=1;
4169 INSERT INTO t VALUES (1, "a", 10);
4170 INSERT INTO t VALUES (2, "b", 20);
4171 INSERT INTO t VALUES (3, "c", 30);
4172 include/rpl_sync.inc
4173 UPDATE t SET c1=10 WHERE c2="a";
4174 UPDATE t SET c1=20 WHERE c1=2;
4175 UPDATE t SET c1=30 WHERE c3=30;
4176 UPDATE t SET c3=40 WHERE c1=30;
4177 include/rpl_sync.inc
4178 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4179 DELETE FROM t WHERE c2="a";
4180 DELETE FROM t WHERE c1=20;
4181 DELETE FROM t;
4182 include/rpl_sync.inc
4183 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4184 DROP TABLE t;
4185 include/rpl_sync.inc
4186 SET SQL_LOG_BIN=0;
4187 SET SQL_LOG_BIN=0;
4188 SET SQL_LOG_BIN=0;
4189 ### Asserts that updates without blobs in the AI (they are not updated)
4190 ### will not break replication (check even if there is a key in the table)
4191 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4192 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
4193 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4194 SET SQL_LOG_BIN=1;
4195 SET SQL_LOG_BIN=1;
4196 SET SQL_LOG_BIN=1;
4197 INSERT INTO t VALUES (1, "a", 10);
4198 INSERT INTO t VALUES (2, "b", 20);
4199 INSERT INTO t VALUES (3, "c", 30);
4200 include/rpl_sync.inc
4201 UPDATE t SET c1=10 WHERE c2="a";
4202 UPDATE t SET c1=20 WHERE c1=2;
4203 UPDATE t SET c1=30 WHERE c3=30;
4204 UPDATE t SET c3=40 WHERE c1=30;
4205 include/rpl_sync.inc
4206 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4207 DELETE FROM t WHERE c2="a";
4208 DELETE FROM t WHERE c1=20;
4209 DELETE FROM t;
4210 include/rpl_sync.inc
4211 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4212 DROP TABLE t;
4213 include/rpl_sync.inc
4214 SET SQL_LOG_BIN=0;
4215 SET SQL_LOG_BIN=0;
4216 SET SQL_LOG_BIN=0;
4217 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
4218 ### will not break replication
4219 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4220 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
4221 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4222 SET SQL_LOG_BIN=1;
4223 SET SQL_LOG_BIN=1;
4224 SET SQL_LOG_BIN=1;
4225 INSERT INTO t VALUES (1, "a", 10);
4226 INSERT INTO t VALUES (2, "b", 20);
4227 INSERT INTO t VALUES (3, "c", 30);
4228 include/rpl_sync.inc
4229 UPDATE t SET c1=10 WHERE c2="a";
4230 UPDATE t SET c1=20 WHERE c1=2;
4231 UPDATE t SET c1=30 WHERE c3=30;
4232 UPDATE t SET c3=40 WHERE c1=30;
4233 include/rpl_sync.inc
4234 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4235 DELETE FROM t WHERE c2="a";
4236 DELETE FROM t WHERE c1=20;
4237 DELETE FROM t;
4238 include/rpl_sync.inc
4239 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4240 DROP TABLE t;
4241 include/rpl_sync.inc
4242 SET SQL_LOG_BIN=0;
4243 SET SQL_LOG_BIN=0;
4244 SET SQL_LOG_BIN=0;
4245 ### Asserts that updates without blobs in the BI (PK exists int the table)
4246 ### will not break replication
4247 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4248 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
4249 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4250 SET SQL_LOG_BIN=1;
4251 SET SQL_LOG_BIN=1;
4252 SET SQL_LOG_BIN=1;
4253 INSERT INTO t VALUES (1, "a", 10);
4254 INSERT INTO t VALUES (2, "b", 20);
4255 INSERT INTO t VALUES (3, "c", 30);
4256 include/rpl_sync.inc
4257 UPDATE t SET c1=10 WHERE c2="a";
4258 UPDATE t SET c1=20 WHERE c1=2;
4259 UPDATE t SET c1=30 WHERE c3=30;
4260 UPDATE t SET c3=40 WHERE c1=30;
4261 include/rpl_sync.inc
4262 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4263 DELETE FROM t WHERE c2="a";
4264 DELETE FROM t WHERE c1=20;
4265 DELETE FROM t;
4266 include/rpl_sync.inc
4267 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4268 DROP TABLE t;
4269 include/rpl_sync.inc
4270 SET SQL_LOG_BIN=0;
4271 SET SQL_LOG_BIN=0;
4272 SET SQL_LOG_BIN=0;
4273 ### Asserts that declaring a blob in a key does not break replication
4274 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4275 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
4276 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4277 SET SQL_LOG_BIN=1;
4278 SET SQL_LOG_BIN=1;
4279 SET SQL_LOG_BIN=1;
4280 INSERT INTO t VALUES (1, "a", 10);
4281 INSERT INTO t VALUES (2, "b", 20);
4282 INSERT INTO t VALUES (3, "c", 30);
4283 include/rpl_sync.inc
4284 UPDATE t SET c1=10 WHERE c2="a";
4285 UPDATE t SET c1=20 WHERE c1=2;
4286 UPDATE t SET c1=30 WHERE c3=30;
4287 UPDATE t SET c3=40 WHERE c1=30;
4288 include/rpl_sync.inc
4289 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4290 DELETE FROM t WHERE c2="a";
4291 DELETE FROM t WHERE c1=20;
4292 DELETE FROM t;
4293 include/rpl_sync.inc
4294 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4295 DROP TABLE t;
4296 include/rpl_sync.inc
4297 SET SQL_LOG_BIN=0;
4298 SET SQL_LOG_BIN=0;
4299 SET SQL_LOG_BIN=0;
4300 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
4301 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4302 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
4303 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4304 SET SQL_LOG_BIN=1;
4305 SET SQL_LOG_BIN=1;
4306 SET SQL_LOG_BIN=1;
4307 INSERT INTO t VALUES (1, "a", 10);
4308 INSERT INTO t VALUES (2, "b", 20);
4309 INSERT INTO t VALUES (3, "c", 30);
4310 include/rpl_sync.inc
4311 UPDATE t SET c1=10 WHERE c2="a";
4312 UPDATE t SET c1=20 WHERE c1=2;
4313 UPDATE t SET c1=30 WHERE c3=30;
4314 UPDATE t SET c3=40 WHERE c1=30;
4315 include/rpl_sync.inc
4316 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4317 DELETE FROM t WHERE c2="a";
4318 DELETE FROM t WHERE c1=20;
4319 DELETE FROM t;
4320 include/rpl_sync.inc
4321 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4322 DROP TABLE t;
4323 include/rpl_sync.inc
4324 SET SQL_LOG_BIN=0;
4325 SET SQL_LOG_BIN=0;
4326 SET SQL_LOG_BIN=0;
4327 ### Asserts that declaring a blob as part of a primary key does not break replication
4328 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4329 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4330 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4331 SET SQL_LOG_BIN=1;
4332 SET SQL_LOG_BIN=1;
4333 SET SQL_LOG_BIN=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 UPDATE t SET c1=10 WHERE c2="a";
4339 UPDATE t SET c1=20 WHERE c1=2;
4340 UPDATE t SET c1=30 WHERE c3=30;
4341 UPDATE t SET c3=40 WHERE c1=30;
4342 include/rpl_sync.inc
4343 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4344 DELETE FROM t WHERE c2="a";
4345 DELETE FROM t WHERE c1=20;
4346 DELETE FROM t;
4347 include/rpl_sync.inc
4348 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4349 DROP TABLE t;
4350 include/rpl_sync.inc
4351 ### engines: InnoDB, InnoDB, MyISAM
4352 SET SQL_LOG_BIN=0;
4353 SET SQL_LOG_BIN=0;
4354 SET SQL_LOG_BIN=0;
4355 ### Asserts that updates without blobs in the AI (they are not updated)
4356 ### will not break replication (check when there is no key in the table)
4357 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4358 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4359 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
4360 SET SQL_LOG_BIN=1;
4361 SET SQL_LOG_BIN=1;
4362 SET SQL_LOG_BIN=1;
4363 INSERT INTO t VALUES (1, "a", 10);
4364 INSERT INTO t VALUES (2, "b", 20);
4365 INSERT INTO t VALUES (3, "c", 30);
4366 include/rpl_sync.inc
4367 UPDATE t SET c1=10 WHERE c2="a";
4368 UPDATE t SET c1=20 WHERE c1=2;
4369 UPDATE t SET c1=30 WHERE c3=30;
4370 UPDATE t SET c3=40 WHERE c1=30;
4371 include/rpl_sync.inc
4372 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4373 DELETE FROM t WHERE c2="a";
4374 DELETE FROM t WHERE c1=20;
4375 DELETE FROM t;
4376 include/rpl_sync.inc
4377 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4378 DROP TABLE t;
4379 include/rpl_sync.inc
4380 SET SQL_LOG_BIN=0;
4381 SET SQL_LOG_BIN=0;
4382 SET SQL_LOG_BIN=0;
4383 ### Asserts that updates without blobs in the AI (they are not updated)
4384 ### will not break replication (check even if there is a key in the table)
4385 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4386 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4387 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
4388 SET SQL_LOG_BIN=1;
4389 SET SQL_LOG_BIN=1;
4390 SET SQL_LOG_BIN=1;
4391 INSERT INTO t VALUES (1, "a", 10);
4392 INSERT INTO t VALUES (2, "b", 20);
4393 INSERT INTO t VALUES (3, "c", 30);
4394 include/rpl_sync.inc
4395 UPDATE t SET c1=10 WHERE c2="a";
4396 UPDATE t SET c1=20 WHERE c1=2;
4397 UPDATE t SET c1=30 WHERE c3=30;
4398 UPDATE t SET c3=40 WHERE c1=30;
4399 include/rpl_sync.inc
4400 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4401 DELETE FROM t WHERE c2="a";
4402 DELETE FROM t WHERE c1=20;
4403 DELETE FROM t;
4404 include/rpl_sync.inc
4405 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4406 DROP TABLE t;
4407 include/rpl_sync.inc
4408 SET SQL_LOG_BIN=0;
4409 SET SQL_LOG_BIN=0;
4410 SET SQL_LOG_BIN=0;
4411 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
4412 ### will not break replication
4413 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4414 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4415 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
4416 SET SQL_LOG_BIN=1;
4417 SET SQL_LOG_BIN=1;
4418 SET SQL_LOG_BIN=1;
4419 INSERT INTO t VALUES (1, "a", 10);
4420 INSERT INTO t VALUES (2, "b", 20);
4421 INSERT INTO t VALUES (3, "c", 30);
4422 include/rpl_sync.inc
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 DELETE FROM t WHERE c2="a";
4430 DELETE FROM t WHERE c1=20;
4431 DELETE FROM t;
4432 include/rpl_sync.inc
4433 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4434 DROP TABLE t;
4435 include/rpl_sync.inc
4436 SET SQL_LOG_BIN=0;
4437 SET SQL_LOG_BIN=0;
4438 SET SQL_LOG_BIN=0;
4439 ### Asserts that updates without blobs in the BI (PK exists int the table)
4440 ### will not break replication
4441 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4442 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4443 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
4444 SET SQL_LOG_BIN=1;
4445 SET SQL_LOG_BIN=1;
4446 SET SQL_LOG_BIN=1;
4447 INSERT INTO t VALUES (1, "a", 10);
4448 INSERT INTO t VALUES (2, "b", 20);
4449 INSERT INTO t VALUES (3, "c", 30);
4450 include/rpl_sync.inc
4451 UPDATE t SET c1=10 WHERE c2="a";
4452 UPDATE t SET c1=20 WHERE c1=2;
4453 UPDATE t SET c1=30 WHERE c3=30;
4454 UPDATE t SET c3=40 WHERE c1=30;
4455 include/rpl_sync.inc
4456 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4457 DELETE FROM t WHERE c2="a";
4458 DELETE FROM t WHERE c1=20;
4459 DELETE FROM t;
4460 include/rpl_sync.inc
4461 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4462 DROP TABLE t;
4463 include/rpl_sync.inc
4464 SET SQL_LOG_BIN=0;
4465 SET SQL_LOG_BIN=0;
4466 SET SQL_LOG_BIN=0;
4467 ### Asserts that declaring a blob in a key does not break replication
4468 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4469 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4470 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
4471 SET SQL_LOG_BIN=1;
4472 SET SQL_LOG_BIN=1;
4473 SET SQL_LOG_BIN=1;
4474 INSERT INTO t VALUES (1, "a", 10);
4475 INSERT INTO t VALUES (2, "b", 20);
4476 INSERT INTO t VALUES (3, "c", 30);
4477 include/rpl_sync.inc
4478 UPDATE t SET c1=10 WHERE c2="a";
4479 UPDATE t SET c1=20 WHERE c1=2;
4480 UPDATE t SET c1=30 WHERE c3=30;
4481 UPDATE t SET c3=40 WHERE c1=30;
4482 include/rpl_sync.inc
4483 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4484 DELETE FROM t WHERE c2="a";
4485 DELETE FROM t WHERE c1=20;
4486 DELETE FROM t;
4487 include/rpl_sync.inc
4488 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4489 DROP TABLE t;
4490 include/rpl_sync.inc
4491 SET SQL_LOG_BIN=0;
4492 SET SQL_LOG_BIN=0;
4493 SET SQL_LOG_BIN=0;
4494 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
4495 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4496 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4497 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
4498 SET SQL_LOG_BIN=1;
4499 SET SQL_LOG_BIN=1;
4500 SET SQL_LOG_BIN=1;
4501 INSERT INTO t VALUES (1, "a", 10);
4502 INSERT INTO t VALUES (2, "b", 20);
4503 INSERT INTO t VALUES (3, "c", 30);
4504 include/rpl_sync.inc
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 DELETE FROM t WHERE c2="a";
4512 DELETE FROM t WHERE c1=20;
4513 DELETE FROM t;
4514 include/rpl_sync.inc
4515 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4516 DROP TABLE t;
4517 include/rpl_sync.inc
4518 SET SQL_LOG_BIN=0;
4519 SET SQL_LOG_BIN=0;
4520 SET SQL_LOG_BIN=0;
4521 ### Asserts that declaring a blob as part of a primary key does not break replication
4522 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4523 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4524 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
4525 SET SQL_LOG_BIN=1;
4526 SET SQL_LOG_BIN=1;
4527 SET SQL_LOG_BIN=1;
4528 INSERT INTO t VALUES (1, "a", 10);
4529 INSERT INTO t VALUES (2, "b", 20);
4530 INSERT INTO t VALUES (3, "c", 30);
4531 include/rpl_sync.inc
4532 UPDATE t SET c1=10 WHERE c2="a";
4533 UPDATE t SET c1=20 WHERE c1=2;
4534 UPDATE t SET c1=30 WHERE c3=30;
4535 UPDATE t SET c3=40 WHERE c1=30;
4536 include/rpl_sync.inc
4537 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4538 DELETE FROM t WHERE c2="a";
4539 DELETE FROM t WHERE c1=20;
4540 DELETE FROM t;
4541 include/rpl_sync.inc
4542 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4543 DROP TABLE t;
4544 include/rpl_sync.inc
4545 ### engines: InnoDB, InnoDB, InnoDB
4546 SET SQL_LOG_BIN=0;
4547 SET SQL_LOG_BIN=0;
4548 SET SQL_LOG_BIN=0;
4549 ### Asserts that updates without blobs in the AI (they are not updated)
4550 ### will not break replication (check when there is no key in the table)
4551 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4552 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4553 CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
4554 SET SQL_LOG_BIN=1;
4555 SET SQL_LOG_BIN=1;
4556 SET SQL_LOG_BIN=1;
4557 INSERT INTO t VALUES (1, "a", 10);
4558 INSERT INTO t VALUES (2, "b", 20);
4559 INSERT INTO t VALUES (3, "c", 30);
4560 include/rpl_sync.inc
4561 UPDATE t SET c1=10 WHERE c2="a";
4562 UPDATE t SET c1=20 WHERE c1=2;
4563 UPDATE t SET c1=30 WHERE c3=30;
4564 UPDATE t SET c3=40 WHERE c1=30;
4565 include/rpl_sync.inc
4566 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4567 DELETE FROM t WHERE c2="a";
4568 DELETE FROM t WHERE c1=20;
4569 DELETE FROM t;
4570 include/rpl_sync.inc
4571 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4572 DROP TABLE t;
4573 include/rpl_sync.inc
4574 SET SQL_LOG_BIN=0;
4575 SET SQL_LOG_BIN=0;
4576 SET SQL_LOG_BIN=0;
4577 ### Asserts that updates without blobs in the AI (they are not updated)
4578 ### will not break replication (check even if there is a key in the table)
4579 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4580 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4581 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
4582 SET SQL_LOG_BIN=1;
4583 SET SQL_LOG_BIN=1;
4584 SET SQL_LOG_BIN=1;
4585 INSERT INTO t VALUES (1, "a", 10);
4586 INSERT INTO t VALUES (2, "b", 20);
4587 INSERT INTO t VALUES (3, "c", 30);
4588 include/rpl_sync.inc
4589 UPDATE t SET c1=10 WHERE c2="a";
4590 UPDATE t SET c1=20 WHERE c1=2;
4591 UPDATE t SET c1=30 WHERE c3=30;
4592 UPDATE t SET c3=40 WHERE c1=30;
4593 include/rpl_sync.inc
4594 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4595 DELETE FROM t WHERE c2="a";
4596 DELETE FROM t WHERE c1=20;
4597 DELETE FROM t;
4598 include/rpl_sync.inc
4599 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4600 DROP TABLE t;
4601 include/rpl_sync.inc
4602 SET SQL_LOG_BIN=0;
4603 SET SQL_LOG_BIN=0;
4604 SET SQL_LOG_BIN=0;
4605 ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
4606 ### will not break replication
4607 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4608 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4609 CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
4610 SET SQL_LOG_BIN=1;
4611 SET SQL_LOG_BIN=1;
4612 SET SQL_LOG_BIN=1;
4613 INSERT INTO t VALUES (1, "a", 10);
4614 INSERT INTO t VALUES (2, "b", 20);
4615 INSERT INTO t VALUES (3, "c", 30);
4616 include/rpl_sync.inc
4617 UPDATE t SET c1=10 WHERE c2="a";
4618 UPDATE t SET c1=20 WHERE c1=2;
4619 UPDATE t SET c1=30 WHERE c3=30;
4620 UPDATE t SET c3=40 WHERE c1=30;
4621 include/rpl_sync.inc
4622 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4623 DELETE FROM t WHERE c2="a";
4624 DELETE FROM t WHERE c1=20;
4625 DELETE FROM t;
4626 include/rpl_sync.inc
4627 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4628 DROP TABLE t;
4629 include/rpl_sync.inc
4630 SET SQL_LOG_BIN=0;
4631 SET SQL_LOG_BIN=0;
4632 SET SQL_LOG_BIN=0;
4633 ### Asserts that updates without blobs in the BI (PK exists int the table)
4634 ### will not break replication
4635 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4636 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4637 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
4638 SET SQL_LOG_BIN=1;
4639 SET SQL_LOG_BIN=1;
4640 SET SQL_LOG_BIN=1;
4641 INSERT INTO t VALUES (1, "a", 10);
4642 INSERT INTO t VALUES (2, "b", 20);
4643 INSERT INTO t VALUES (3, "c", 30);
4644 include/rpl_sync.inc
4645 UPDATE t SET c1=10 WHERE c2="a";
4646 UPDATE t SET c1=20 WHERE c1=2;
4647 UPDATE t SET c1=30 WHERE c3=30;
4648 UPDATE t SET c3=40 WHERE c1=30;
4649 include/rpl_sync.inc
4650 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4651 DELETE FROM t WHERE c2="a";
4652 DELETE FROM t WHERE c1=20;
4653 DELETE FROM t;
4654 include/rpl_sync.inc
4655 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4656 DROP TABLE t;
4657 include/rpl_sync.inc
4658 SET SQL_LOG_BIN=0;
4659 SET SQL_LOG_BIN=0;
4660 SET SQL_LOG_BIN=0;
4661 ### Asserts that declaring a blob in a key does not break replication
4662 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4663 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4664 CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
4665 SET SQL_LOG_BIN=1;
4666 SET SQL_LOG_BIN=1;
4667 SET SQL_LOG_BIN=1;
4668 INSERT INTO t VALUES (1, "a", 10);
4669 INSERT INTO t VALUES (2, "b", 20);
4670 INSERT INTO t VALUES (3, "c", 30);
4671 include/rpl_sync.inc
4672 UPDATE t SET c1=10 WHERE c2="a";
4673 UPDATE t SET c1=20 WHERE c1=2;
4674 UPDATE t SET c1=30 WHERE c3=30;
4675 UPDATE t SET c3=40 WHERE c1=30;
4676 include/rpl_sync.inc
4677 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4678 DELETE FROM t WHERE c2="a";
4679 DELETE FROM t WHERE c1=20;
4680 DELETE FROM t;
4681 include/rpl_sync.inc
4682 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4683 DROP TABLE t;
4684 include/rpl_sync.inc
4685 SET SQL_LOG_BIN=0;
4686 SET SQL_LOG_BIN=0;
4687 SET SQL_LOG_BIN=0;
4688 ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
4689 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4690 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4691 CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
4692 SET SQL_LOG_BIN=1;
4693 SET SQL_LOG_BIN=1;
4694 SET SQL_LOG_BIN=1;
4695 INSERT INTO t VALUES (1, "a", 10);
4696 INSERT INTO t VALUES (2, "b", 20);
4697 INSERT INTO t VALUES (3, "c", 30);
4698 include/rpl_sync.inc
4699 UPDATE t SET c1=10 WHERE c2="a";
4700 UPDATE t SET c1=20 WHERE c1=2;
4701 UPDATE t SET c1=30 WHERE c3=30;
4702 UPDATE t SET c3=40 WHERE c1=30;
4703 include/rpl_sync.inc
4704 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4705 DELETE FROM t WHERE c2="a";
4706 DELETE FROM t WHERE c1=20;
4707 DELETE FROM t;
4708 include/rpl_sync.inc
4709 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4710 DROP TABLE t;
4711 include/rpl_sync.inc
4712 SET SQL_LOG_BIN=0;
4713 SET SQL_LOG_BIN=0;
4714 SET SQL_LOG_BIN=0;
4715 ### Asserts that declaring a blob as part of a primary key does not break replication
4716 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4717 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4718 CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
4719 SET SQL_LOG_BIN=1;
4720 SET SQL_LOG_BIN=1;
4721 SET SQL_LOG_BIN=1;
4722 INSERT INTO t VALUES (1, "a", 10);
4723 INSERT INTO t VALUES (2, "b", 20);
4724 INSERT INTO t VALUES (3, "c", 30);
4725 include/rpl_sync.inc
4726 UPDATE t SET c1=10 WHERE c2="a";
4727 UPDATE t SET c1=20 WHERE c1=2;
4728 UPDATE t SET c1=30 WHERE c3=30;
4729 UPDATE t SET c3=40 WHERE c1=30;
4730 include/rpl_sync.inc
4731 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4732 DELETE FROM t WHERE c2="a";
4733 DELETE FROM t WHERE c1=20;
4734 DELETE FROM t;
4735 include/rpl_sync.inc
4736 include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
4737 DROP TABLE t;
4738 include/rpl_sync.inc
4739 include/rpl_end.inc