Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_mts_spco_alter_table_commands_nobinlog.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 [connection slave]
7 CALL mtr.add_suppression("You need to use --log-bin to make --binlog-format work");
8 CALL mtr.add_suppression("The transaction owned GTID is already in the gtid_executed table");
9 SET @save_replica_parallel_workers= @@global.replica_parallel_workers;
10 SET @save_replica_parallel_type= @@global.replica_parallel_type;
11 Warnings:
12 Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
13 SET @save_replica_preserve_commit_order= @@global.replica_preserve_commit_order;
14 SET GLOBAL replica_parallel_type = 'LOGICAL_CLOCK';
15 Warnings:
16 Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
17 SET GLOBAL replica_parallel_workers= 8;
18 SET GLOBAL replica_preserve_commit_order= ON;
19 include/start_slave.inc
20 [connection master1]
21 SET @save_binlog_transaction_dependency_tracking= @@global.binlog_transaction_dependency_tracking;
22 Warnings:
23 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
24 SET @@global.binlog_transaction_dependency_tracking = COMMIT_ORDER;
25 Warnings:
26 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
27 CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE = InnoDB;
28 CREATE TABLE t2 (c1 INT PRIMARY KEY) ENGINE = InnoDB;
29 CREATE TABLE commands (a INT AUTO_INCREMENT PRIMARY KEY, b VARCHAR(100));
30 LOAD DATA INFILE '../../std_data/alter_table.csv' INTO TABLE commands(b);
31 include/sync_slave_sql_with_master.inc
32
33 # Check for CREATE TABLE ti1(a INT NOT NULL, b INT, c INT) engine=InnoDB;
34
35 # Setup
36
37
38 # Block slave sql applier threads
39
40 [connection slave]
41 BEGIN; INSERT INTO t1 VALUES (1);;
42 [connection slave]
43 [connection slave]
44
45 # Generate the transactions which can be applied in parallel on slave
46
47 [connection master]
48 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
49 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; CREATE TABLE ti1(a INT NOT NULL, b INT, c INT) engine=InnoDB;;
50 [connection server_1]
51 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
52 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
53
54 # Verify the transactions are ordered correctly on slave
55
56 [connection server_2]
57 include/assert.inc [Verify table t1 is empty]
58 include/assert.inc [Verify table t2 is empty]
59 [connection slave]
60 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
61
62 # Rollback the first insert so that slave applier threads can
63 # unblock and proceed. Verify the transactions are applied.
64
65 [connection slave]
66 ROLLBACK;;
67 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
68 include/sync_slave_sql_with_master.inc
69
70 # Check for CREATE TABLE ti2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=InnoDB;
71
72 # Setup
73
74
75 # Block slave sql applier threads
76
77 [connection slave]
78 BEGIN; INSERT INTO t1 VALUES (1);;
79 [connection slave]
80 [connection slave]
81
82 # Generate the transactions which can be applied in parallel on slave
83
84 [connection master]
85 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
86 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; CREATE TABLE ti2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=InnoDB;;
87 [connection server_1]
88 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
89 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
90
91 # Verify the transactions are ordered correctly on slave
92
93 [connection server_2]
94 include/assert.inc [Verify table t1 is empty]
95 include/assert.inc [Verify table t2 is empty]
96 [connection slave]
97 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
98
99 # Rollback the first insert so that slave applier threads can
100 # unblock and proceed. Verify the transactions are applied.
101
102 [connection slave]
103 ROLLBACK;;
104 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
105 include/sync_slave_sql_with_master.inc
106
107 # Check for INSERT INTO ti1 VALUES (1,1,1), (2,2,2);
108
109 # Setup
110
111
112 # Block slave sql applier threads
113
114 [connection slave]
115 BEGIN; INSERT INTO t1 VALUES (1);;
116 [connection slave]
117 [connection slave]
118
119 # Generate the transactions which can be applied in parallel on slave
120
121 [connection master]
122 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
123 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; INSERT INTO ti1 VALUES (1,1,1), (2,2,2);;
124 [connection server_1]
125 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
126 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
127
128 # Verify the transactions are ordered correctly on slave
129
130 [connection server_2]
131 include/assert.inc [Verify table t1 is empty]
132 include/assert.inc [Verify table t2 is empty]
133 [connection slave]
134 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
135
136 # Rollback the first insert so that slave applier threads can
137 # unblock and proceed. Verify the transactions are applied.
138
139 [connection slave]
140 ROLLBACK;;
141 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
142 include/sync_slave_sql_with_master.inc
143
144 # Check for INSERT INTO ti2 VALUES (1,1,1), (2,2,2);
145
146 # Setup
147
148
149 # Block slave sql applier threads
150
151 [connection slave]
152 BEGIN; INSERT INTO t1 VALUES (1);;
153 [connection slave]
154 [connection slave]
155
156 # Generate the transactions which can be applied in parallel on slave
157
158 [connection master]
159 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
160 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; INSERT INTO ti2 VALUES (1,1,1), (2,2,2);;
161 [connection server_1]
162 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
163 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
164
165 # Verify the transactions are ordered correctly on slave
166
167 [connection server_2]
168 include/assert.inc [Verify table t1 is empty]
169 include/assert.inc [Verify table t2 is empty]
170 [connection slave]
171 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
172
173 # Rollback the first insert so that slave applier threads can
174 # unblock and proceed. Verify the transactions are applied.
175
176 [connection slave]
177 ROLLBACK;;
178 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
179 include/sync_slave_sql_with_master.inc
180
181 # Check for CREATE TABLE talter (a int AUTO_INCREMENT PRIMARY KEY);
182
183 # Setup
184
185
186 # Block slave sql applier threads
187
188 [connection slave]
189 BEGIN; INSERT INTO t1 VALUES (1);;
190 [connection slave]
191 [connection slave]
192
193 # Generate the transactions which can be applied in parallel on slave
194
195 [connection master]
196 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
197 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; CREATE TABLE talter (a int AUTO_INCREMENT PRIMARY KEY);;
198 [connection server_1]
199 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
200 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
201
202 # Verify the transactions are ordered correctly on slave
203
204 [connection server_2]
205 include/assert.inc [Verify table t1 is empty]
206 include/assert.inc [Verify table t2 is empty]
207 [connection slave]
208 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
209
210 # Rollback the first insert so that slave applier threads can
211 # unblock and proceed. Verify the transactions are applied.
212
213 [connection slave]
214 ROLLBACK;;
215 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
216 include/sync_slave_sql_with_master.inc
217
218 # Check for CREATE TABLE tgeom (a VARCHAR(20));
219
220 # Setup
221
222
223 # Block slave sql applier threads
224
225 [connection slave]
226 BEGIN; INSERT INTO t1 VALUES (1);;
227 [connection slave]
228 [connection slave]
229
230 # Generate the transactions which can be applied in parallel on slave
231
232 [connection master]
233 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
234 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; CREATE TABLE tgeom (a VARCHAR(20));;
235 [connection server_1]
236 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
237 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
238
239 # Verify the transactions are ordered correctly on slave
240
241 [connection server_2]
242 include/assert.inc [Verify table t1 is empty]
243 include/assert.inc [Verify table t2 is empty]
244 [connection slave]
245 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
246
247 # Rollback the first insert so that slave applier threads can
248 # unblock and proceed. Verify the transactions are applied.
249
250 [connection slave]
251 ROLLBACK;;
252 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
253 include/sync_slave_sql_with_master.inc
254
255 # Check for INSERT INTO talter VALUES (1),(2),(3);
256
257 # Setup
258
259
260 # Block slave sql applier threads
261
262 [connection slave]
263 BEGIN; INSERT INTO t1 VALUES (1);;
264 [connection slave]
265 [connection slave]
266
267 # Generate the transactions which can be applied in parallel on slave
268
269 [connection master]
270 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
271 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; INSERT INTO talter VALUES (1),(2),(3);;
272 [connection server_1]
273 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
274 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
275
276 # Verify the transactions are ordered correctly on slave
277
278 [connection server_2]
279 include/assert.inc [Verify table t1 is empty]
280 include/assert.inc [Verify table t2 is empty]
281 [connection slave]
282 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
283
284 # Rollback the first insert so that slave applier threads can
285 # unblock and proceed. Verify the transactions are applied.
286
287 [connection slave]
288 ROLLBACK;;
289 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
290 include/sync_slave_sql_with_master.inc
291
292 # Check for ALTER TABLE ti1;
293
294 # Setup
295
296
297 # Block slave sql applier threads
298
299 [connection slave]
300 BEGIN; INSERT INTO t1 VALUES (1);;
301 [connection slave]
302 [connection slave]
303
304 # Generate the transactions which can be applied in parallel on slave
305
306 [connection master]
307 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
308 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1;;
309 [connection server_1]
310 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
311 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
312
313 # Verify the transactions are ordered correctly on slave
314
315 [connection server_2]
316 include/assert.inc [Verify table t1 is empty]
317 include/assert.inc [Verify table t2 is empty]
318 [connection slave]
319 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
320
321 # Rollback the first insert so that slave applier threads can
322 # unblock and proceed. Verify the transactions are applied.
323
324 [connection slave]
325 ROLLBACK;;
326 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
327 include/sync_slave_sql_with_master.inc
328
329 # Check for ALTER TABLE ti1 AUTO_INCREMENT=10;
330
331 # Setup
332
333
334 # Block slave sql applier threads
335
336 [connection slave]
337 BEGIN; INSERT INTO t1 VALUES (1);;
338 [connection slave]
339 [connection slave]
340
341 # Generate the transactions which can be applied in parallel on slave
342
343 [connection master]
344 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
345 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 AUTO_INCREMENT=10;;
346 [connection server_1]
347 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
348 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
349
350 # Verify the transactions are ordered correctly on slave
351
352 [connection server_2]
353 include/assert.inc [Verify table t1 is empty]
354 include/assert.inc [Verify table t2 is empty]
355 [connection slave]
356 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
357
358 # Rollback the first insert so that slave applier threads can
359 # unblock and proceed. Verify the transactions are applied.
360
361 [connection slave]
362 ROLLBACK;;
363 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
364 include/sync_slave_sql_with_master.inc
365
366 # Check for ALTER TABLE ti1 ADD COLUMN d VARCHAR(200);
367
368 # Setup
369
370
371 # Block slave sql applier threads
372
373 [connection slave]
374 BEGIN; INSERT INTO t1 VALUES (1);;
375 [connection slave]
376 [connection slave]
377
378 # Generate the transactions which can be applied in parallel on slave
379
380 [connection master]
381 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
382 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD COLUMN d VARCHAR(200);;
383 [connection server_1]
384 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
385 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
386
387 # Verify the transactions are ordered correctly on slave
388
389 [connection server_2]
390 include/assert.inc [Verify table t1 is empty]
391 include/assert.inc [Verify table t2 is empty]
392 [connection slave]
393 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
394
395 # Rollback the first insert so that slave applier threads can
396 # unblock and proceed. Verify the transactions are applied.
397
398 [connection slave]
399 ROLLBACK;;
400 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
401 include/sync_slave_sql_with_master.inc
402
403 # Check for ALTER TABLE ti1 ADD COLUMN d2 VARCHAR(200);
404
405 # Setup
406
407
408 # Block slave sql applier threads
409
410 [connection slave]
411 BEGIN; INSERT INTO t1 VALUES (1);;
412 [connection slave]
413 [connection slave]
414
415 # Generate the transactions which can be applied in parallel on slave
416
417 [connection master]
418 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
419 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD COLUMN d2 VARCHAR(200);;
420 [connection server_1]
421 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
422 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
423
424 # Verify the transactions are ordered correctly on slave
425
426 [connection server_2]
427 include/assert.inc [Verify table t1 is empty]
428 include/assert.inc [Verify table t2 is empty]
429 [connection slave]
430 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
431
432 # Rollback the first insert so that slave applier threads can
433 # unblock and proceed. Verify the transactions are applied.
434
435 [connection slave]
436 ROLLBACK;;
437 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
438 include/sync_slave_sql_with_master.inc
439
440 # Check for ALTER TABLE ti1 ADD COLUMN e ENUM ("a","b");
441
442 # Setup
443
444
445 # Block slave sql applier threads
446
447 [connection slave]
448 BEGIN; INSERT INTO t1 VALUES (1);;
449 [connection slave]
450 [connection slave]
451
452 # Generate the transactions which can be applied in parallel on slave
453
454 [connection master]
455 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
456 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD COLUMN e ENUM ("a","b");;
457 [connection server_1]
458 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
459 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
460
461 # Verify the transactions are ordered correctly on slave
462
463 [connection server_2]
464 include/assert.inc [Verify table t1 is empty]
465 include/assert.inc [Verify table t2 is empty]
466 [connection slave]
467 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
468
469 # Rollback the first insert so that slave applier threads can
470 # unblock and proceed. Verify the transactions are applied.
471
472 [connection slave]
473 ROLLBACK;;
474 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
475 include/sync_slave_sql_with_master.inc
476
477 # Check for ALTER TABLE ti1 ADD COLUMN f INT AFTER a;
478
479 # Setup
480
481
482 # Block slave sql applier threads
483
484 [connection slave]
485 BEGIN; INSERT INTO t1 VALUES (1);;
486 [connection slave]
487 [connection slave]
488
489 # Generate the transactions which can be applied in parallel on slave
490
491 [connection master]
492 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
493 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD COLUMN f INT AFTER a;;
494 [connection server_1]
495 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
496 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
497
498 # Verify the transactions are ordered correctly on slave
499
500 [connection server_2]
501 include/assert.inc [Verify table t1 is empty]
502 include/assert.inc [Verify table t2 is empty]
503 [connection slave]
504 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
505
506 # Rollback the first insert so that slave applier threads can
507 # unblock and proceed. Verify the transactions are applied.
508
509 [connection slave]
510 ROLLBACK;;
511 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
512 include/sync_slave_sql_with_master.inc
513
514 # Check for ALTER TABLE ti1 ADD INDEX ii1(b);
515
516 # Setup
517
518
519 # Block slave sql applier threads
520
521 [connection slave]
522 BEGIN; INSERT INTO t1 VALUES (1);;
523 [connection slave]
524 [connection slave]
525
526 # Generate the transactions which can be applied in parallel on slave
527
528 [connection master]
529 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
530 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD INDEX ii1(b);;
531 [connection server_1]
532 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
533 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
534
535 # Verify the transactions are ordered correctly on slave
536
537 [connection server_2]
538 include/assert.inc [Verify table t1 is empty]
539 include/assert.inc [Verify table t2 is empty]
540 [connection slave]
541 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
542
543 # Rollback the first insert so that slave applier threads can
544 # unblock and proceed. Verify the transactions are applied.
545
546 [connection slave]
547 ROLLBACK;;
548 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
549 include/sync_slave_sql_with_master.inc
550
551 # Check for ALTER TABLE ti1 ADD UNIQUE INDEX ii2 (c);
552
553 # Setup
554
555
556 # Block slave sql applier threads
557
558 [connection slave]
559 BEGIN; INSERT INTO t1 VALUES (1);;
560 [connection slave]
561 [connection slave]
562
563 # Generate the transactions which can be applied in parallel on slave
564
565 [connection master]
566 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
567 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD UNIQUE INDEX ii2 (c);;
568 [connection server_1]
569 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
570 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
571
572 # Verify the transactions are ordered correctly on slave
573
574 [connection server_2]
575 include/assert.inc [Verify table t1 is empty]
576 include/assert.inc [Verify table t2 is empty]
577 [connection slave]
578 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
579
580 # Rollback the first insert so that slave applier threads can
581 # unblock and proceed. Verify the transactions are applied.
582
583 [connection slave]
584 ROLLBACK;;
585 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
586 include/sync_slave_sql_with_master.inc
587
588 # Check for ALTER TABLE ti1 ADD FULLTEXT INDEX ii3 (d);
589
590 # Setup
591
592
593 # Block slave sql applier threads
594
595 [connection slave]
596 BEGIN; INSERT INTO t1 VALUES (1);;
597 [connection slave]
598 [connection slave]
599
600 # Generate the transactions which can be applied in parallel on slave
601
602 [connection master]
603 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
604 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD FULLTEXT INDEX ii3 (d);;
605 Warnings:
606 Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
607 [connection server_1]
608 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
609 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
610
611 # Verify the transactions are ordered correctly on slave
612
613 [connection server_2]
614 include/assert.inc [Verify table t1 is empty]
615 include/assert.inc [Verify table t2 is empty]
616 [connection slave]
617 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
618
619 # Rollback the first insert so that slave applier threads can
620 # unblock and proceed. Verify the transactions are applied.
621
622 [connection slave]
623 ROLLBACK;;
624 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
625 include/sync_slave_sql_with_master.inc
626
627 # Check for ALTER TABLE ti1 ADD FULLTEXT INDEX ii4 (d2);
628
629 # Setup
630
631
632 # Block slave sql applier threads
633
634 [connection slave]
635 BEGIN; INSERT INTO t1 VALUES (1);;
636 [connection slave]
637 [connection slave]
638
639 # Generate the transactions which can be applied in parallel on slave
640
641 [connection master]
642 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
643 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD FULLTEXT INDEX ii4 (d2);;
644 [connection server_1]
645 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
646 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
647
648 # Verify the transactions are ordered correctly on slave
649
650 [connection server_2]
651 include/assert.inc [Verify table t1 is empty]
652 include/assert.inc [Verify table t2 is empty]
653 [connection slave]
654 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
655
656 # Rollback the first insert so that slave applier threads can
657 # unblock and proceed. Verify the transactions are applied.
658
659 [connection slave]
660 ROLLBACK;;
661 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
662 include/sync_slave_sql_with_master.inc
663
664 # Check for ALTER TABLE ti1 ADD PRIMARY KEY(a);
665
666 # Setup
667
668
669 # Block slave sql applier threads
670
671 [connection slave]
672 BEGIN; INSERT INTO t1 VALUES (1);;
673 [connection slave]
674 [connection slave]
675
676 # Generate the transactions which can be applied in parallel on slave
677
678 [connection master]
679 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
680 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD PRIMARY KEY(a);;
681 [connection server_1]
682 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
683 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
684
685 # Verify the transactions are ordered correctly on slave
686
687 [connection server_2]
688 include/assert.inc [Verify table t1 is empty]
689 include/assert.inc [Verify table t2 is empty]
690 [connection slave]
691 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
692
693 # Rollback the first insert so that slave applier threads can
694 # unblock and proceed. Verify the transactions are applied.
695
696 [connection slave]
697 ROLLBACK;;
698 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
699 include/sync_slave_sql_with_master.inc
700
701 # Check for ALTER TABLE ti1 DROP INDEX ii3;
702
703 # Setup
704
705
706 # Block slave sql applier threads
707
708 [connection slave]
709 BEGIN; INSERT INTO t1 VALUES (1);;
710 [connection slave]
711 [connection slave]
712
713 # Generate the transactions which can be applied in parallel on slave
714
715 [connection master]
716 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
717 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 DROP INDEX ii3;;
718 [connection server_1]
719 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
720 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
721
722 # Verify the transactions are ordered correctly on slave
723
724 [connection server_2]
725 include/assert.inc [Verify table t1 is empty]
726 include/assert.inc [Verify table t2 is empty]
727 [connection slave]
728 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
729
730 # Rollback the first insert so that slave applier threads can
731 # unblock and proceed. Verify the transactions are applied.
732
733 [connection slave]
734 ROLLBACK;;
735 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
736 include/sync_slave_sql_with_master.inc
737
738 # Check for ALTER TABLE ti1 DROP COLUMN d2;
739
740 # Setup
741
742
743 # Block slave sql applier threads
744
745 [connection slave]
746 BEGIN; INSERT INTO t1 VALUES (1);;
747 [connection slave]
748 [connection slave]
749
750 # Generate the transactions which can be applied in parallel on slave
751
752 [connection master]
753 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
754 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 DROP COLUMN d2;;
755 [connection server_1]
756 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
757 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
758
759 # Verify the transactions are ordered correctly on slave
760
761 [connection server_2]
762 include/assert.inc [Verify table t1 is empty]
763 include/assert.inc [Verify table t2 is empty]
764 [connection slave]
765 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
766
767 # Rollback the first insert so that slave applier threads can
768 # unblock and proceed. Verify the transactions are applied.
769
770 [connection slave]
771 ROLLBACK;;
772 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
773 include/sync_slave_sql_with_master.inc
774
775 # Check for ALTER TABLE ti1 ADD CONSTRAINT fi1 FOREIGN KEY (b) REFERENCES ti2(a);
776
777 # Setup
778
779
780 # Block slave sql applier threads
781
782 [connection slave]
783 BEGIN; INSERT INTO t1 VALUES (1);;
784 [connection slave]
785 [connection slave]
786
787 # Generate the transactions which can be applied in parallel on slave
788
789 [connection master]
790 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
791 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ADD CONSTRAINT fi1 FOREIGN KEY (b) REFERENCES ti2(a);;
792 [connection server_1]
793 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
794 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
795
796 # Verify the transactions are ordered correctly on slave
797
798 [connection server_2]
799 include/assert.inc [Verify table t1 is empty]
800 include/assert.inc [Verify table t2 is empty]
801 [connection slave]
802 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
803
804 # Rollback the first insert so that slave applier threads can
805 # unblock and proceed. Verify the transactions are applied.
806
807 [connection slave]
808 ROLLBACK;;
809 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
810 include/sync_slave_sql_with_master.inc
811
812 # Check for ALTER TABLE ti1 ALTER COLUMN b SET DEFAULT 1;
813
814 # Setup
815
816
817 # Block slave sql applier threads
818
819 [connection slave]
820 BEGIN; INSERT INTO t1 VALUES (1);;
821 [connection slave]
822 [connection slave]
823
824 # Generate the transactions which can be applied in parallel on slave
825
826 [connection master]
827 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
828 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ALTER COLUMN b SET DEFAULT 1;;
829 [connection server_1]
830 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
831 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
832
833 # Verify the transactions are ordered correctly on slave
834
835 [connection server_2]
836 include/assert.inc [Verify table t1 is empty]
837 include/assert.inc [Verify table t2 is empty]
838 [connection slave]
839 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
840
841 # Rollback the first insert so that slave applier threads can
842 # unblock and proceed. Verify the transactions are applied.
843
844 [connection slave]
845 ROLLBACK;;
846 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
847 include/sync_slave_sql_with_master.inc
848
849 # Check for ALTER TABLE ti1 ALTER COLUMN b DROP DEFAULT;
850
851 # Setup
852
853
854 # Block slave sql applier threads
855
856 [connection slave]
857 BEGIN; INSERT INTO t1 VALUES (1);;
858 [connection slave]
859 [connection slave]
860
861 # Generate the transactions which can be applied in parallel on slave
862
863 [connection master]
864 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
865 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ALTER COLUMN b DROP DEFAULT;;
866 [connection server_1]
867 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
868 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
869
870 # Verify the transactions are ordered correctly on slave
871
872 [connection server_2]
873 include/assert.inc [Verify table t1 is empty]
874 include/assert.inc [Verify table t2 is empty]
875 [connection slave]
876 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
877
878 # Rollback the first insert so that slave applier threads can
879 # unblock and proceed. Verify the transactions are applied.
880
881 [connection slave]
882 ROLLBACK;;
883 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
884 include/sync_slave_sql_with_master.inc
885
886 # Check for ALTER TABLE ti1 CHANGE COLUMN f g INT;
887
888 # Setup
889
890
891 # Block slave sql applier threads
892
893 [connection slave]
894 BEGIN; INSERT INTO t1 VALUES (1);;
895 [connection slave]
896 [connection slave]
897
898 # Generate the transactions which can be applied in parallel on slave
899
900 [connection master]
901 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
902 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 CHANGE COLUMN f g INT;;
903 [connection server_1]
904 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
905 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
906
907 # Verify the transactions are ordered correctly on slave
908
909 [connection server_2]
910 include/assert.inc [Verify table t1 is empty]
911 include/assert.inc [Verify table t2 is empty]
912 [connection slave]
913 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
914
915 # Rollback the first insert so that slave applier threads can
916 # unblock and proceed. Verify the transactions are applied.
917
918 [connection slave]
919 ROLLBACK;;
920 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
921 include/sync_slave_sql_with_master.inc
922
923 # Check for ALTER TABLE ti1 CHANGE COLUMN g h VARCHAR(20);
924
925 # Setup
926
927
928 # Block slave sql applier threads
929
930 [connection slave]
931 BEGIN; INSERT INTO t1 VALUES (1);;
932 [connection slave]
933 [connection slave]
934
935 # Generate the transactions which can be applied in parallel on slave
936
937 [connection master]
938 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
939 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 CHANGE COLUMN g h VARCHAR(20);;
940 [connection server_1]
941 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
942 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
943
944 # Verify the transactions are ordered correctly on slave
945
946 [connection server_2]
947 include/assert.inc [Verify table t1 is empty]
948 include/assert.inc [Verify table t2 is empty]
949 [connection slave]
950 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
951
952 # Rollback the first insert so that slave applier threads can
953 # unblock and proceed. Verify the transactions are applied.
954
955 [connection slave]
956 ROLLBACK;;
957 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
958 include/sync_slave_sql_with_master.inc
959
960 # Check for ALTER TABLE ti1 MODIFY COLUMN e ENUM ("a","b","c");
961
962 # Setup
963
964
965 # Block slave sql applier threads
966
967 [connection slave]
968 BEGIN; INSERT INTO t1 VALUES (1);;
969 [connection slave]
970 [connection slave]
971
972 # Generate the transactions which can be applied in parallel on slave
973
974 [connection master]
975 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
976 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MODIFY COLUMN e ENUM ("a","b","c");;
977 [connection server_1]
978 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
979 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
980
981 # Verify the transactions are ordered correctly on slave
982
983 [connection server_2]
984 include/assert.inc [Verify table t1 is empty]
985 include/assert.inc [Verify table t2 is empty]
986 [connection slave]
987 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
988
989 # Rollback the first insert so that slave applier threads can
990 # unblock and proceed. Verify the transactions are applied.
991
992 [connection slave]
993 ROLLBACK;;
994 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
995 include/sync_slave_sql_with_master.inc
996
997 # Check for ALTER TABLE ti1 MODIFY COLUMN e INT;
998
999 # Setup
1000
1001
1002 # Block slave sql applier threads
1003
1004 [connection slave]
1005 BEGIN; INSERT INTO t1 VALUES (1);;
1006 [connection slave]
1007 [connection slave]
1008
1009 # Generate the transactions which can be applied in parallel on slave
1010
1011 [connection master]
1012 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1013 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MODIFY COLUMN e INT;;
1014 [connection server_1]
1015 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1016 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1017
1018 # Verify the transactions are ordered correctly on slave
1019
1020 [connection server_2]
1021 include/assert.inc [Verify table t1 is empty]
1022 include/assert.inc [Verify table t2 is empty]
1023 [connection slave]
1024 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1025
1026 # Rollback the first insert so that slave applier threads can
1027 # unblock and proceed. Verify the transactions are applied.
1028
1029 [connection slave]
1030 ROLLBACK;;
1031 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1032 include/sync_slave_sql_with_master.inc
1033
1034 # Check for ALTER TABLE ti1 MODIFY COLUMN e INT AFTER h;
1035
1036 # Setup
1037
1038
1039 # Block slave sql applier threads
1040
1041 [connection slave]
1042 BEGIN; INSERT INTO t1 VALUES (1);;
1043 [connection slave]
1044 [connection slave]
1045
1046 # Generate the transactions which can be applied in parallel on slave
1047
1048 [connection master]
1049 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1050 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MODIFY COLUMN e INT AFTER h;;
1051 [connection server_1]
1052 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1053 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1054
1055 # Verify the transactions are ordered correctly on slave
1056
1057 [connection server_2]
1058 include/assert.inc [Verify table t1 is empty]
1059 include/assert.inc [Verify table t2 is empty]
1060 [connection slave]
1061 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1062
1063 # Rollback the first insert so that slave applier threads can
1064 # unblock and proceed. Verify the transactions are applied.
1065
1066 [connection slave]
1067 ROLLBACK;;
1068 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1069 include/sync_slave_sql_with_master.inc
1070
1071 # Check for ALTER TABLE ti1 MODIFY COLUMN e INT FIRST;
1072
1073 # Setup
1074
1075
1076 # Block slave sql applier threads
1077
1078 [connection slave]
1079 BEGIN; INSERT INTO t1 VALUES (1);;
1080 [connection slave]
1081 [connection slave]
1082
1083 # Generate the transactions which can be applied in parallel on slave
1084
1085 [connection master]
1086 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1087 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MODIFY COLUMN e INT FIRST;;
1088 [connection server_1]
1089 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1090 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1091
1092 # Verify the transactions are ordered correctly on slave
1093
1094 [connection server_2]
1095 include/assert.inc [Verify table t1 is empty]
1096 include/assert.inc [Verify table t2 is empty]
1097 [connection slave]
1098 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1099
1100 # Rollback the first insert so that slave applier threads can
1101 # unblock and proceed. Verify the transactions are applied.
1102
1103 [connection slave]
1104 ROLLBACK;;
1105 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1106 include/sync_slave_sql_with_master.inc
1107
1108 # Check for ALTER TABLE ti1 MODIFY COLUMN c INT NOT NULL;
1109
1110 # Setup
1111
1112
1113 # Block slave sql applier threads
1114
1115 [connection slave]
1116 BEGIN; INSERT INTO t1 VALUES (1);;
1117 [connection slave]
1118 [connection slave]
1119
1120 # Generate the transactions which can be applied in parallel on slave
1121
1122 [connection master]
1123 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1124 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MODIFY COLUMN c INT NOT NULL;;
1125 [connection server_1]
1126 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1127 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1128
1129 # Verify the transactions are ordered correctly on slave
1130
1131 [connection server_2]
1132 include/assert.inc [Verify table t1 is empty]
1133 include/assert.inc [Verify table t2 is empty]
1134 [connection slave]
1135 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1136
1137 # Rollback the first insert so that slave applier threads can
1138 # unblock and proceed. Verify the transactions are applied.
1139
1140 [connection slave]
1141 ROLLBACK;;
1142 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1143 include/sync_slave_sql_with_master.inc
1144
1145 # Check for ALTER TABLE ti1 MODIFY COLUMN c INT NULL;
1146
1147 # Setup
1148
1149
1150 # Block slave sql applier threads
1151
1152 [connection slave]
1153 BEGIN; INSERT INTO t1 VALUES (1);;
1154 [connection slave]
1155 [connection slave]
1156
1157 # Generate the transactions which can be applied in parallel on slave
1158
1159 [connection master]
1160 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1161 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MODIFY COLUMN c INT NULL;;
1162 [connection server_1]
1163 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1164 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1165
1166 # Verify the transactions are ordered correctly on slave
1167
1168 [connection server_2]
1169 include/assert.inc [Verify table t1 is empty]
1170 include/assert.inc [Verify table t2 is empty]
1171 [connection slave]
1172 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1173
1174 # Rollback the first insert so that slave applier threads can
1175 # unblock and proceed. Verify the transactions are applied.
1176
1177 [connection slave]
1178 ROLLBACK;;
1179 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1180 include/sync_slave_sql_with_master.inc
1181
1182 # Check for ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30);
1183
1184 # Setup
1185
1186
1187 # Block slave sql applier threads
1188
1189 [connection slave]
1190 BEGIN; INSERT INTO t1 VALUES (1);;
1191 [connection slave]
1192 [connection slave]
1193
1194 # Generate the transactions which can be applied in parallel on slave
1195
1196 [connection master]
1197 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1198 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30);;
1199 [connection server_1]
1200 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1201 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1202
1203 # Verify the transactions are ordered correctly on slave
1204
1205 [connection server_2]
1206 include/assert.inc [Verify table t1 is empty]
1207 include/assert.inc [Verify table t2 is empty]
1208 [connection slave]
1209 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1210
1211 # Rollback the first insert so that slave applier threads can
1212 # unblock and proceed. Verify the transactions are applied.
1213
1214 [connection slave]
1215 ROLLBACK;;
1216 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1217 include/sync_slave_sql_with_master.inc
1218
1219 # Check for ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30) AFTER d;
1220
1221 # Setup
1222
1223
1224 # Block slave sql applier threads
1225
1226 [connection slave]
1227 BEGIN; INSERT INTO t1 VALUES (1);;
1228 [connection slave]
1229 [connection slave]
1230
1231 # Generate the transactions which can be applied in parallel on slave
1232
1233 [connection master]
1234 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1235 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30) AFTER d;;
1236 [connection server_1]
1237 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1238 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1239
1240 # Verify the transactions are ordered correctly on slave
1241
1242 [connection server_2]
1243 include/assert.inc [Verify table t1 is empty]
1244 include/assert.inc [Verify table t2 is empty]
1245 [connection slave]
1246 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1247
1248 # Rollback the first insert so that slave applier threads can
1249 # unblock and proceed. Verify the transactions are applied.
1250
1251 [connection slave]
1252 ROLLBACK;;
1253 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1254 include/sync_slave_sql_with_master.inc
1255
1256 # Check for ALTER TABLE ti1 DROP COLUMN h;
1257
1258 # Setup
1259
1260
1261 # Block slave sql applier threads
1262
1263 [connection slave]
1264 BEGIN; INSERT INTO t1 VALUES (1);;
1265 [connection slave]
1266 [connection slave]
1267
1268 # Generate the transactions which can be applied in parallel on slave
1269
1270 [connection master]
1271 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1272 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 DROP COLUMN h;;
1273 [connection server_1]
1274 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1275 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1276
1277 # Verify the transactions are ordered correctly on slave
1278
1279 [connection server_2]
1280 include/assert.inc [Verify table t1 is empty]
1281 include/assert.inc [Verify table t2 is empty]
1282 [connection slave]
1283 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1284
1285 # Rollback the first insert so that slave applier threads can
1286 # unblock and proceed. Verify the transactions are applied.
1287
1288 [connection slave]
1289 ROLLBACK;;
1290 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1291 include/sync_slave_sql_with_master.inc
1292
1293 # Check for ALTER TABLE ti1 DROP INDEX ii2;
1294
1295 # Setup
1296
1297
1298 # Block slave sql applier threads
1299
1300 [connection slave]
1301 BEGIN; INSERT INTO t1 VALUES (1);;
1302 [connection slave]
1303 [connection slave]
1304
1305 # Generate the transactions which can be applied in parallel on slave
1306
1307 [connection master]
1308 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1309 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 DROP INDEX ii2;;
1310 [connection server_1]
1311 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1312 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1313
1314 # Verify the transactions are ordered correctly on slave
1315
1316 [connection server_2]
1317 include/assert.inc [Verify table t1 is empty]
1318 include/assert.inc [Verify table t2 is empty]
1319 [connection slave]
1320 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1321
1322 # Rollback the first insert so that slave applier threads can
1323 # unblock and proceed. Verify the transactions are applied.
1324
1325 [connection slave]
1326 ROLLBACK;;
1327 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1328 include/sync_slave_sql_with_master.inc
1329
1330 # Check for ALTER TABLE ti1 DROP PRIMARY KEY;
1331
1332 # Setup
1333
1334
1335 # Block slave sql applier threads
1336
1337 [connection slave]
1338 BEGIN; INSERT INTO t1 VALUES (1);;
1339 [connection slave]
1340 [connection slave]
1341
1342 # Generate the transactions which can be applied in parallel on slave
1343
1344 [connection master]
1345 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1346 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 DROP PRIMARY KEY;;
1347 [connection server_1]
1348 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1349 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1350
1351 # Verify the transactions are ordered correctly on slave
1352
1353 [connection server_2]
1354 include/assert.inc [Verify table t1 is empty]
1355 include/assert.inc [Verify table t2 is empty]
1356 [connection slave]
1357 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1358
1359 # Rollback the first insert so that slave applier threads can
1360 # unblock and proceed. Verify the transactions are applied.
1361
1362 [connection slave]
1363 ROLLBACK;;
1364 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1365 include/sync_slave_sql_with_master.inc
1366
1367 # Check for ALTER TABLE ti1 DROP FOREIGN KEY fi1;
1368
1369 # Setup
1370
1371
1372 # Block slave sql applier threads
1373
1374 [connection slave]
1375 BEGIN; INSERT INTO t1 VALUES (1);;
1376 [connection slave]
1377 [connection slave]
1378
1379 # Generate the transactions which can be applied in parallel on slave
1380
1381 [connection master]
1382 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1383 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 DROP FOREIGN KEY fi1;;
1384 [connection server_1]
1385 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1386 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1387
1388 # Verify the transactions are ordered correctly on slave
1389
1390 [connection server_2]
1391 include/assert.inc [Verify table t1 is empty]
1392 include/assert.inc [Verify table t2 is empty]
1393 [connection slave]
1394 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1395
1396 # Rollback the first insert so that slave applier threads can
1397 # unblock and proceed. Verify the transactions are applied.
1398
1399 [connection slave]
1400 ROLLBACK;;
1401 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1402 include/sync_slave_sql_with_master.inc
1403
1404 # Check for ALTER TABLE ti1 RENAME TO ti3;
1405
1406 # Setup
1407
1408
1409 # Block slave sql applier threads
1410
1411 [connection slave]
1412 BEGIN; INSERT INTO t1 VALUES (1);;
1413 [connection slave]
1414 [connection slave]
1415
1416 # Generate the transactions which can be applied in parallel on slave
1417
1418 [connection master]
1419 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1420 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 RENAME TO ti3;;
1421 [connection server_1]
1422 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1423 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1424
1425 # Verify the transactions are ordered correctly on slave
1426
1427 [connection server_2]
1428 include/assert.inc [Verify table t1 is empty]
1429 include/assert.inc [Verify table t2 is empty]
1430 [connection slave]
1431 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1432
1433 # Rollback the first insert so that slave applier threads can
1434 # unblock and proceed. Verify the transactions are applied.
1435
1436 [connection slave]
1437 ROLLBACK;;
1438 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1439 include/sync_slave_sql_with_master.inc
1440
1441 # Check for ALTER TABLE ti3 RENAME TO ti1;
1442
1443 # Setup
1444
1445
1446 # Block slave sql applier threads
1447
1448 [connection slave]
1449 BEGIN; INSERT INTO t1 VALUES (1);;
1450 [connection slave]
1451 [connection slave]
1452
1453 # Generate the transactions which can be applied in parallel on slave
1454
1455 [connection master]
1456 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1457 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti3 RENAME TO ti1;;
1458 [connection server_1]
1459 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1460 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1461
1462 # Verify the transactions are ordered correctly on slave
1463
1464 [connection server_2]
1465 include/assert.inc [Verify table t1 is empty]
1466 include/assert.inc [Verify table t2 is empty]
1467 [connection slave]
1468 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1469
1470 # Rollback the first insert so that slave applier threads can
1471 # unblock and proceed. Verify the transactions are applied.
1472
1473 [connection slave]
1474 ROLLBACK;;
1475 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1476 include/sync_slave_sql_with_master.inc
1477
1478 # Check for ALTER TABLE ti1 ORDER BY b;
1479
1480 # Setup
1481
1482
1483 # Block slave sql applier threads
1484
1485 [connection slave]
1486 BEGIN; INSERT INTO t1 VALUES (1);;
1487 [connection slave]
1488 [connection slave]
1489
1490 # Generate the transactions which can be applied in parallel on slave
1491
1492 [connection master]
1493 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1494 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 ORDER BY b;;
1495 [connection server_1]
1496 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1497 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1498
1499 # Verify the transactions are ordered correctly on slave
1500
1501 [connection server_2]
1502 include/assert.inc [Verify table t1 is empty]
1503 include/assert.inc [Verify table t2 is empty]
1504 [connection slave]
1505 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1506
1507 # Rollback the first insert so that slave applier threads can
1508 # unblock and proceed. Verify the transactions are applied.
1509
1510 [connection slave]
1511 ROLLBACK;;
1512 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1513 include/sync_slave_sql_with_master.inc
1514
1515 # Check for ALTER TABLE ti1 CONVERT TO CHARACTER SET utf16;
1516
1517 # Setup
1518
1519
1520 # Block slave sql applier threads
1521
1522 [connection slave]
1523 BEGIN; INSERT INTO t1 VALUES (1);;
1524 [connection slave]
1525 [connection slave]
1526
1527 # Generate the transactions which can be applied in parallel on slave
1528
1529 [connection master]
1530 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1531 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 CONVERT TO CHARACTER SET utf16;;
1532 [connection server_1]
1533 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1534 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1535
1536 # Verify the transactions are ordered correctly on slave
1537
1538 [connection server_2]
1539 include/assert.inc [Verify table t1 is empty]
1540 include/assert.inc [Verify table t2 is empty]
1541 [connection slave]
1542 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1543
1544 # Rollback the first insert so that slave applier threads can
1545 # unblock and proceed. Verify the transactions are applied.
1546
1547 [connection slave]
1548 ROLLBACK;;
1549 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1550 include/sync_slave_sql_with_master.inc
1551
1552 # Check for ALTER TABLE ti1 DEFAULT CHARACTER SET utf8;
1553
1554 # Setup
1555
1556
1557 # Block slave sql applier threads
1558
1559 [connection slave]
1560 BEGIN; INSERT INTO t1 VALUES (1);;
1561 [connection slave]
1562 [connection slave]
1563
1564 # Generate the transactions which can be applied in parallel on slave
1565
1566 [connection master]
1567 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1568 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 DEFAULT CHARACTER SET utf8;;
1569 Warnings:
1570 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
1571 [connection server_1]
1572 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1573 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1574
1575 # Verify the transactions are ordered correctly on slave
1576
1577 [connection server_2]
1578 include/assert.inc [Verify table t1 is empty]
1579 include/assert.inc [Verify table t2 is empty]
1580 [connection slave]
1581 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1582
1583 # Rollback the first insert so that slave applier threads can
1584 # unblock and proceed. Verify the transactions are applied.
1585
1586 [connection slave]
1587 ROLLBACK;;
1588 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1589 include/sync_slave_sql_with_master.inc
1590
1591 # Check for ALTER TABLE ti1 FORCE;
1592
1593 # Setup
1594
1595
1596 # Block slave sql applier threads
1597
1598 [connection slave]
1599 BEGIN; INSERT INTO t1 VALUES (1);;
1600 [connection slave]
1601 [connection slave]
1602
1603 # Generate the transactions which can be applied in parallel on slave
1604
1605 [connection master]
1606 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1607 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 FORCE;;
1608 [connection server_1]
1609 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1610 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1611
1612 # Verify the transactions are ordered correctly on slave
1613
1614 [connection server_2]
1615 include/assert.inc [Verify table t1 is empty]
1616 include/assert.inc [Verify table t2 is empty]
1617 [connection slave]
1618 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1619
1620 # Rollback the first insert so that slave applier threads can
1621 # unblock and proceed. Verify the transactions are applied.
1622
1623 [connection slave]
1624 ROLLBACK;;
1625 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1626 include/sync_slave_sql_with_master.inc
1627
1628 # Check for ALTER TABLE ti1 AUTO_INCREMENT 3;
1629
1630 # Setup
1631
1632
1633 # Block slave sql applier threads
1634
1635 [connection slave]
1636 BEGIN; INSERT INTO t1 VALUES (1);;
1637 [connection slave]
1638 [connection slave]
1639
1640 # Generate the transactions which can be applied in parallel on slave
1641
1642 [connection master]
1643 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1644 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 AUTO_INCREMENT 3;;
1645 [connection server_1]
1646 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1647 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1648
1649 # Verify the transactions are ordered correctly on slave
1650
1651 [connection server_2]
1652 include/assert.inc [Verify table t1 is empty]
1653 include/assert.inc [Verify table t2 is empty]
1654 [connection slave]
1655 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1656
1657 # Rollback the first insert so that slave applier threads can
1658 # unblock and proceed. Verify the transactions are applied.
1659
1660 [connection slave]
1661 ROLLBACK;;
1662 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1663 include/sync_slave_sql_with_master.inc
1664
1665 # Check for ALTER TABLE ti1 AVG_ROW_LENGTH 10;
1666
1667 # Setup
1668
1669
1670 # Block slave sql applier threads
1671
1672 [connection slave]
1673 BEGIN; INSERT INTO t1 VALUES (1);;
1674 [connection slave]
1675 [connection slave]
1676
1677 # Generate the transactions which can be applied in parallel on slave
1678
1679 [connection master]
1680 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1681 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 AVG_ROW_LENGTH 10;;
1682 [connection server_1]
1683 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1684 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1685
1686 # Verify the transactions are ordered correctly on slave
1687
1688 [connection server_2]
1689 include/assert.inc [Verify table t1 is empty]
1690 include/assert.inc [Verify table t2 is empty]
1691 [connection slave]
1692 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1693
1694 # Rollback the first insert so that slave applier threads can
1695 # unblock and proceed. Verify the transactions are applied.
1696
1697 [connection slave]
1698 ROLLBACK;;
1699 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1700 include/sync_slave_sql_with_master.inc
1701
1702 # Check for ALTER TABLE ti1 CHECKSUM 1;
1703
1704 # Setup
1705
1706
1707 # Block slave sql applier threads
1708
1709 [connection slave]
1710 BEGIN; INSERT INTO t1 VALUES (1);;
1711 [connection slave]
1712 [connection slave]
1713
1714 # Generate the transactions which can be applied in parallel on slave
1715
1716 [connection master]
1717 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1718 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 CHECKSUM 1;;
1719 [connection server_1]
1720 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1721 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1722
1723 # Verify the transactions are ordered correctly on slave
1724
1725 [connection server_2]
1726 include/assert.inc [Verify table t1 is empty]
1727 include/assert.inc [Verify table t2 is empty]
1728 [connection slave]
1729 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1730
1731 # Rollback the first insert so that slave applier threads can
1732 # unblock and proceed. Verify the transactions are applied.
1733
1734 [connection slave]
1735 ROLLBACK;;
1736 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1737 include/sync_slave_sql_with_master.inc
1738
1739 # Check for ALTER TABLE ti1 COMMENT = "test";
1740
1741 # Setup
1742
1743
1744 # Block slave sql applier threads
1745
1746 [connection slave]
1747 BEGIN; INSERT INTO t1 VALUES (1);;
1748 [connection slave]
1749 [connection slave]
1750
1751 # Generate the transactions which can be applied in parallel on slave
1752
1753 [connection master]
1754 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1755 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 COMMENT = "test";;
1756 [connection server_1]
1757 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1758 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1759
1760 # Verify the transactions are ordered correctly on slave
1761
1762 [connection server_2]
1763 include/assert.inc [Verify table t1 is empty]
1764 include/assert.inc [Verify table t2 is empty]
1765 [connection slave]
1766 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1767
1768 # Rollback the first insert so that slave applier threads can
1769 # unblock and proceed. Verify the transactions are applied.
1770
1771 [connection slave]
1772 ROLLBACK;;
1773 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1774 include/sync_slave_sql_with_master.inc
1775
1776 # Check for ALTER TABLE ti1 MAX_ROWS 100;
1777
1778 # Setup
1779
1780
1781 # Block slave sql applier threads
1782
1783 [connection slave]
1784 BEGIN; INSERT INTO t1 VALUES (1);;
1785 [connection slave]
1786 [connection slave]
1787
1788 # Generate the transactions which can be applied in parallel on slave
1789
1790 [connection master]
1791 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1792 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MAX_ROWS 100;;
1793 [connection server_1]
1794 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1795 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1796
1797 # Verify the transactions are ordered correctly on slave
1798
1799 [connection server_2]
1800 include/assert.inc [Verify table t1 is empty]
1801 include/assert.inc [Verify table t2 is empty]
1802 [connection slave]
1803 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1804
1805 # Rollback the first insert so that slave applier threads can
1806 # unblock and proceed. Verify the transactions are applied.
1807
1808 [connection slave]
1809 ROLLBACK;;
1810 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1811 include/sync_slave_sql_with_master.inc
1812
1813 # Check for ALTER TABLE ti1 MIN_ROWS 1;
1814
1815 # Setup
1816
1817
1818 # Block slave sql applier threads
1819
1820 [connection slave]
1821 BEGIN; INSERT INTO t1 VALUES (1);;
1822 [connection slave]
1823 [connection slave]
1824
1825 # Generate the transactions which can be applied in parallel on slave
1826
1827 [connection master]
1828 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1829 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 MIN_ROWS 1;;
1830 [connection server_1]
1831 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1832 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1833
1834 # Verify the transactions are ordered correctly on slave
1835
1836 [connection server_2]
1837 include/assert.inc [Verify table t1 is empty]
1838 include/assert.inc [Verify table t2 is empty]
1839 [connection slave]
1840 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1841
1842 # Rollback the first insert so that slave applier threads can
1843 # unblock and proceed. Verify the transactions are applied.
1844
1845 [connection slave]
1846 ROLLBACK;;
1847 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1848 include/sync_slave_sql_with_master.inc
1849
1850 # Check for ALTER TABLE ti1 PACK_KEYS 1;
1851
1852 # Setup
1853
1854
1855 # Block slave sql applier threads
1856
1857 [connection slave]
1858 BEGIN; INSERT INTO t1 VALUES (1);;
1859 [connection slave]
1860 [connection slave]
1861
1862 # Generate the transactions which can be applied in parallel on slave
1863
1864 [connection master]
1865 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1866 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE ti1 PACK_KEYS 1;;
1867 [connection server_1]
1868 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1869 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1870
1871 # Verify the transactions are ordered correctly on slave
1872
1873 [connection server_2]
1874 include/assert.inc [Verify table t1 is empty]
1875 include/assert.inc [Verify table t2 is empty]
1876 [connection slave]
1877 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1878
1879 # Rollback the first insert so that slave applier threads can
1880 # unblock and proceed. Verify the transactions are applied.
1881
1882 [connection slave]
1883 ROLLBACK;;
1884 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1885 include/sync_slave_sql_with_master.inc
1886
1887 # Check for ALTER TABLE talter ADD COLUMN c1 INT, ADD COLUMN c2 FLOAT GENERATED ALWAYS AS ((1.4 * 2.8)) VIRTUAL;
1888
1889 # Setup
1890
1891
1892 # Block slave sql applier threads
1893
1894 [connection slave]
1895 BEGIN; INSERT INTO t1 VALUES (1);;
1896 [connection slave]
1897 [connection slave]
1898
1899 # Generate the transactions which can be applied in parallel on slave
1900
1901 [connection master]
1902 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1903 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter ADD COLUMN c1 INT, ADD COLUMN c2 FLOAT GENERATED ALWAYS AS ((1.4 * 2.8)) VIRTUAL;;
1904 [connection server_1]
1905 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1906 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1907
1908 # Verify the transactions are ordered correctly on slave
1909
1910 [connection server_2]
1911 include/assert.inc [Verify table t1 is empty]
1912 include/assert.inc [Verify table t2 is empty]
1913 [connection slave]
1914 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1915
1916 # Rollback the first insert so that slave applier threads can
1917 # unblock and proceed. Verify the transactions are applied.
1918
1919 [connection slave]
1920 ROLLBACK;;
1921 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1922 include/sync_slave_sql_with_master.inc
1923
1924 # Check for ALTER TABLE talter ADD KEY(c1);
1925
1926 # Setup
1927
1928
1929 # Block slave sql applier threads
1930
1931 [connection slave]
1932 BEGIN; INSERT INTO t1 VALUES (1);;
1933 [connection slave]
1934 [connection slave]
1935
1936 # Generate the transactions which can be applied in parallel on slave
1937
1938 [connection master]
1939 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1940 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter ADD KEY(c1);;
1941 [connection server_1]
1942 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1943 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1944
1945 # Verify the transactions are ordered correctly on slave
1946
1947 [connection server_2]
1948 include/assert.inc [Verify table t1 is empty]
1949 include/assert.inc [Verify table t2 is empty]
1950 [connection slave]
1951 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1952
1953 # Rollback the first insert so that slave applier threads can
1954 # unblock and proceed. Verify the transactions are applied.
1955
1956 [connection slave]
1957 ROLLBACK;;
1958 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1959 include/sync_slave_sql_with_master.inc
1960
1961 # Check for ALTER TABLE talter disable keys;
1962
1963 # Setup
1964
1965
1966 # Block slave sql applier threads
1967
1968 [connection slave]
1969 BEGIN; INSERT INTO t1 VALUES (1);;
1970 [connection slave]
1971 [connection slave]
1972
1973 # Generate the transactions which can be applied in parallel on slave
1974
1975 [connection master]
1976 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
1977 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter disable keys;;
1978 Warnings:
1979 Note 1031 Table storage engine for 'talter' doesn't have this option
1980 [connection server_1]
1981 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
1982 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
1983
1984 # Verify the transactions are ordered correctly on slave
1985
1986 [connection server_2]
1987 include/assert.inc [Verify table t1 is empty]
1988 include/assert.inc [Verify table t2 is empty]
1989 [connection slave]
1990 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
1991
1992 # Rollback the first insert so that slave applier threads can
1993 # unblock and proceed. Verify the transactions are applied.
1994
1995 [connection slave]
1996 ROLLBACK;;
1997 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
1998 include/sync_slave_sql_with_master.inc
1999
2000 # Check for ALTER TABLE talter enable keys;
2001
2002 # Setup
2003
2004
2005 # Block slave sql applier threads
2006
2007 [connection slave]
2008 BEGIN; INSERT INTO t1 VALUES (1);;
2009 [connection slave]
2010 [connection slave]
2011
2012 # Generate the transactions which can be applied in parallel on slave
2013
2014 [connection master]
2015 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2016 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter enable keys;;
2017 Warnings:
2018 Note 1031 Table storage engine for 'talter' doesn't have this option
2019 [connection server_1]
2020 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2021 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2022
2023 # Verify the transactions are ordered correctly on slave
2024
2025 [connection server_2]
2026 include/assert.inc [Verify table t1 is empty]
2027 include/assert.inc [Verify table t2 is empty]
2028 [connection slave]
2029 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2030
2031 # Rollback the first insert so that slave applier threads can
2032 # unblock and proceed. Verify the transactions are applied.
2033
2034 [connection slave]
2035 ROLLBACK;;
2036 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2037 include/sync_slave_sql_with_master.inc
2038
2039 # Check for ALTER TABLE talter RENAME COLUMN a TO aa;
2040
2041 # Setup
2042
2043
2044 # Block slave sql applier threads
2045
2046 [connection slave]
2047 BEGIN; INSERT INTO t1 VALUES (1);;
2048 [connection slave]
2049 [connection slave]
2050
2051 # Generate the transactions which can be applied in parallel on slave
2052
2053 [connection master]
2054 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2055 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter RENAME COLUMN a TO aa;;
2056 [connection server_1]
2057 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2058 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2059
2060 # Verify the transactions are ordered correctly on slave
2061
2062 [connection server_2]
2063 include/assert.inc [Verify table t1 is empty]
2064 include/assert.inc [Verify table t2 is empty]
2065 [connection slave]
2066 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2067
2068 # Rollback the first insert so that slave applier threads can
2069 # unblock and proceed. Verify the transactions are applied.
2070
2071 [connection slave]
2072 ROLLBACK;;
2073 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2074 include/sync_slave_sql_with_master.inc
2075
2076 # Check for ALTER TABLE talter RENAME COLUMN aa TO aaa, ALGORITHM=COPY;
2077
2078 # Setup
2079
2080
2081 # Block slave sql applier threads
2082
2083 [connection slave]
2084 BEGIN; INSERT INTO t1 VALUES (1);;
2085 [connection slave]
2086 [connection slave]
2087
2088 # Generate the transactions which can be applied in parallel on slave
2089
2090 [connection master]
2091 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2092 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter RENAME COLUMN aa TO aaa, ALGORITHM=COPY;;
2093 [connection server_1]
2094 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2095 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2096
2097 # Verify the transactions are ordered correctly on slave
2098
2099 [connection server_2]
2100 include/assert.inc [Verify table t1 is empty]
2101 include/assert.inc [Verify table t2 is empty]
2102 [connection slave]
2103 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2104
2105 # Rollback the first insert so that slave applier threads can
2106 # unblock and proceed. Verify the transactions are applied.
2107
2108 [connection slave]
2109 ROLLBACK;;
2110 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2111 include/sync_slave_sql_with_master.inc
2112
2113 # Check for ALTER TABLE talter RENAME COLUMN aaa TO a, ALGORITHM=INPLACE;
2114
2115 # Setup
2116
2117
2118 # Block slave sql applier threads
2119
2120 [connection slave]
2121 BEGIN; INSERT INTO t1 VALUES (1);;
2122 [connection slave]
2123 [connection slave]
2124
2125 # Generate the transactions which can be applied in parallel on slave
2126
2127 [connection master]
2128 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2129 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter RENAME COLUMN aaa TO a, ALGORITHM=INPLACE;;
2130 [connection server_1]
2131 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2132 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2133
2134 # Verify the transactions are ordered correctly on slave
2135
2136 [connection server_2]
2137 include/assert.inc [Verify table t1 is empty]
2138 include/assert.inc [Verify table t2 is empty]
2139 [connection slave]
2140 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2141
2142 # Rollback the first insert so that slave applier threads can
2143 # unblock and proceed. Verify the transactions are applied.
2144
2145 [connection slave]
2146 ROLLBACK;;
2147 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2148 include/sync_slave_sql_with_master.inc
2149
2150 # Check for ALTER TABLE talter ADD INDEX id1 USING BTREE (a);
2151
2152 # Setup
2153
2154
2155 # Block slave sql applier threads
2156
2157 [connection slave]
2158 BEGIN; INSERT INTO t1 VALUES (1);;
2159 [connection slave]
2160 [connection slave]
2161
2162 # Generate the transactions which can be applied in parallel on slave
2163
2164 [connection master]
2165 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2166 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter ADD INDEX id1 USING BTREE (a);;
2167 [connection server_1]
2168 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2169 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2170
2171 # Verify the transactions are ordered correctly on slave
2172
2173 [connection server_2]
2174 include/assert.inc [Verify table t1 is empty]
2175 include/assert.inc [Verify table t2 is empty]
2176 [connection slave]
2177 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2178
2179 # Rollback the first insert so that slave applier threads can
2180 # unblock and proceed. Verify the transactions are applied.
2181
2182 [connection slave]
2183 ROLLBACK;;
2184 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2185 include/sync_slave_sql_with_master.inc
2186
2187 # Check for ALTER TABLE talter RENAME INDEX id1 to id11;
2188
2189 # Setup
2190
2191
2192 # Block slave sql applier threads
2193
2194 [connection slave]
2195 BEGIN; INSERT INTO t1 VALUES (1);;
2196 [connection slave]
2197 [connection slave]
2198
2199 # Generate the transactions which can be applied in parallel on slave
2200
2201 [connection master]
2202 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2203 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter RENAME INDEX id1 to id11;;
2204 [connection server_1]
2205 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2206 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2207
2208 # Verify the transactions are ordered correctly on slave
2209
2210 [connection server_2]
2211 include/assert.inc [Verify table t1 is empty]
2212 include/assert.inc [Verify table t2 is empty]
2213 [connection slave]
2214 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2215
2216 # Rollback the first insert so that slave applier threads can
2217 # unblock and proceed. Verify the transactions are applied.
2218
2219 [connection slave]
2220 ROLLBACK;;
2221 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2222 include/sync_slave_sql_with_master.inc
2223
2224 # Check for ALTER TABLE talter RENAME KEY id11 to id1;
2225
2226 # Setup
2227
2228
2229 # Block slave sql applier threads
2230
2231 [connection slave]
2232 BEGIN; INSERT INTO t1 VALUES (1);;
2233 [connection slave]
2234 [connection slave]
2235
2236 # Generate the transactions which can be applied in parallel on slave
2237
2238 [connection master]
2239 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2240 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter RENAME KEY id11 to id1;;
2241 [connection server_1]
2242 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2243 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2244
2245 # Verify the transactions are ordered correctly on slave
2246
2247 [connection server_2]
2248 include/assert.inc [Verify table t1 is empty]
2249 include/assert.inc [Verify table t2 is empty]
2250 [connection slave]
2251 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2252
2253 # Rollback the first insert so that slave applier threads can
2254 # unblock and proceed. Verify the transactions are applied.
2255
2256 [connection slave]
2257 ROLLBACK;;
2258 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2259 include/sync_slave_sql_with_master.inc
2260
2261 # Check for ALTER TABLE talter key_block_size=16;
2262
2263 # Setup
2264
2265
2266 # Block slave sql applier threads
2267
2268 [connection slave]
2269 BEGIN; INSERT INTO t1 VALUES (1);;
2270 [connection slave]
2271 [connection slave]
2272
2273 # Generate the transactions which can be applied in parallel on slave
2274
2275 [connection master]
2276 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2277 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter key_block_size=16;;
2278 [connection server_1]
2279 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2280 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2281
2282 # Verify the transactions are ordered correctly on slave
2283
2284 [connection server_2]
2285 include/assert.inc [Verify table t1 is empty]
2286 include/assert.inc [Verify table t2 is empty]
2287 [connection slave]
2288 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2289
2290 # Rollback the first insert so that slave applier threads can
2291 # unblock and proceed. Verify the transactions are applied.
2292
2293 [connection slave]
2294 ROLLBACK;;
2295 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2296 include/sync_slave_sql_with_master.inc
2297
2298 # Check for ALTER TABLE talter ALTER INDEX id1 INVISIBLE;
2299
2300 # Setup
2301
2302
2303 # Block slave sql applier threads
2304
2305 [connection slave]
2306 BEGIN; INSERT INTO t1 VALUES (1);;
2307 [connection slave]
2308 [connection slave]
2309
2310 # Generate the transactions which can be applied in parallel on slave
2311
2312 [connection master]
2313 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2314 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter ALTER INDEX id1 INVISIBLE;;
2315 [connection server_1]
2316 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2317 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2318
2319 # Verify the transactions are ordered correctly on slave
2320
2321 [connection server_2]
2322 include/assert.inc [Verify table t1 is empty]
2323 include/assert.inc [Verify table t2 is empty]
2324 [connection slave]
2325 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2326
2327 # Rollback the first insert so that slave applier threads can
2328 # unblock and proceed. Verify the transactions are applied.
2329
2330 [connection slave]
2331 ROLLBACK;;
2332 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2333 include/sync_slave_sql_with_master.inc
2334
2335 # Check for ALTER TABLE talter ALTER INDEX id1 VISIBLE;
2336
2337 # Setup
2338
2339
2340 # Block slave sql applier threads
2341
2342 [connection slave]
2343 BEGIN; INSERT INTO t1 VALUES (1);;
2344 [connection slave]
2345 [connection slave]
2346
2347 # Generate the transactions which can be applied in parallel on slave
2348
2349 [connection master]
2350 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2351 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE talter ALTER INDEX id1 VISIBLE;;
2352 [connection server_1]
2353 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2354 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2355
2356 # Verify the transactions are ordered correctly on slave
2357
2358 [connection server_2]
2359 include/assert.inc [Verify table t1 is empty]
2360 include/assert.inc [Verify table t2 is empty]
2361 [connection slave]
2362 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2363
2364 # Rollback the first insert so that slave applier threads can
2365 # unblock and proceed. Verify the transactions are applied.
2366
2367 [connection slave]
2368 ROLLBACK;;
2369 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2370 include/sync_slave_sql_with_master.inc
2371
2372 # Check for ALTER TABLE tgeom ADD b GEOMETRY NOT NULL SRID 0, ADD SPATIAL INDEX(b);
2373
2374 # Setup
2375
2376
2377 # Block slave sql applier threads
2378
2379 [connection slave]
2380 BEGIN; INSERT INTO t1 VALUES (1);;
2381 [connection slave]
2382 [connection slave]
2383
2384 # Generate the transactions which can be applied in parallel on slave
2385
2386 [connection master]
2387 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2388 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER TABLE tgeom ADD b GEOMETRY NOT NULL SRID 0, ADD SPATIAL INDEX(b);;
2389 [connection server_1]
2390 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2391 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2392
2393 # Verify the transactions are ordered correctly on slave
2394
2395 [connection server_2]
2396 include/assert.inc [Verify table t1 is empty]
2397 include/assert.inc [Verify table t2 is empty]
2398 [connection slave]
2399 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2400
2401 # Rollback the first insert so that slave applier threads can
2402 # unblock and proceed. Verify the transactions are applied.
2403
2404 [connection slave]
2405 ROLLBACK;;
2406 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2407 include/sync_slave_sql_with_master.inc
2408
2409 # Check for DROP TABLE talter,tgeom;
2410
2411 # Setup
2412
2413
2414 # Block slave sql applier threads
2415
2416 [connection slave]
2417 BEGIN; INSERT INTO t1 VALUES (1);;
2418 [connection slave]
2419 [connection slave]
2420
2421 # Generate the transactions which can be applied in parallel on slave
2422
2423 [connection master]
2424 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2425 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; DROP TABLE talter,tgeom;;
2426 [connection server_1]
2427 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2428 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2429
2430 # Verify the transactions are ordered correctly on slave
2431
2432 [connection server_2]
2433 include/assert.inc [Verify table t1 is empty]
2434 include/assert.inc [Verify table t2 is empty]
2435 [connection slave]
2436 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2437
2438 # Rollback the first insert so that slave applier threads can
2439 # unblock and proceed. Verify the transactions are applied.
2440
2441 [connection slave]
2442 ROLLBACK;;
2443 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2444 include/sync_slave_sql_with_master.inc
2445
2446 # Check for DROP TABLE ti1,ti2;
2447
2448 # Setup
2449
2450
2451 # Block slave sql applier threads
2452
2453 [connection slave]
2454 BEGIN; INSERT INTO t1 VALUES (1);;
2455 [connection slave]
2456 [connection slave]
2457
2458 # Generate the transactions which can be applied in parallel on slave
2459
2460 [connection master]
2461 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
2462 BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; DROP TABLE ti1,ti2;;
2463 [connection server_1]
2464 BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;;
2465 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
2466
2467 # Verify the transactions are ordered correctly on slave
2468
2469 [connection server_2]
2470 include/assert.inc [Verify table t1 is empty]
2471 include/assert.inc [Verify table t2 is empty]
2472 [connection slave]
2473 include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation]
2474
2475 # Rollback the first insert so that slave applier threads can
2476 # unblock and proceed. Verify the transactions are applied.
2477
2478 [connection slave]
2479 ROLLBACK;;
2480 TRUNCATE TABLE t1; TRUNCATE TABLE t2;;
2481 include/sync_slave_sql_with_master.inc
2482
2483 # Cleanup
2484
2485 [connection master1]
2486 SET GLOBAL binlog_transaction_dependency_tracking=@save_binlog_transaction_dependency_tracking;
2487 Warnings:
2488 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
2489 DROP TABLE t1,t2,commands;
2490 include/sync_slave_sql_with_master.inc
2491 include/stop_slave.inc
2492 SET GLOBAL replica_parallel_type=@save_replica_parallel_type;
2493 Warnings:
2494 Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
2495 SET GLOBAL replica_parallel_workers=@save_replica_parallel_workers;
2496 SET GLOBAL replica_preserve_commit_order=@save_replica_preserve_commit_order;
2497 include/start_slave.inc
2498 include/rpl_end.inc