Debian Codegraph @

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

raw
1 include/master-slave.inc
2 [connection master]
3 connection slave;
4 SET sql_log_bin=0;
5 call mtr.add_suppression("Slave: An attempt was made.*");
6 call mtr.add_suppression("Both DO_DOMAIN_IDS & IGNORE_DOMAIN_IDS lists can't be non-empty at the same time");
7 SET sql_log_bin=1;
8 include/stop_slave.inc
9 connection master;
10 RESET MASTER;
11 connection slave;
12 include/start_slave.inc
13 #
14 #
15 # Test Case 1: Base case to ensure that mariadb-binlog and replica
16 # are consistent without any filtering
17 #
18 include/mysqlbinlog_slave_consistency.inc
19 connection slave;
20 set @@global.gtid_strict_mode=0;
21 connection slave;
22 connection master;
23 # Populating master data
24 connection slave;
25 CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
26 START SLAVE ;
27 # No slave error expecting - waiting for slave to catch up to master
28 # Stop slave so it stops receiving master events.
29 connection master;
30 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
31 RESET MASTER;
32 # MYSQL_BINLOG BINLOG_FILE_PARAM 2> MYSQLBINLOG_STDERR | MYSQL
33 connection slave;
34 # Checking consistency of 'test' database tables between master and slave
35 connection master;
36 # Both servers have 5 tables
37 # Verifying integrity of tables..
38 connection master;
39 connection slave;
40 # t1 is equivalent on master and slave
41 connection master;
42 connection slave;
43 # t2 is equivalent on master and slave
44 connection master;
45 connection slave;
46 # t3 is equivalent on master and slave
47 connection master;
48 connection slave;
49 # t4 is equivalent on master and slave
50 connection master;
51 connection slave;
52 # t5 is equivalent on master and slave
53 # All tables are consistent
54 # Test finished - resetting master and slave..
55 connection slave;
56 RESET SLAVE;
57 RESET MASTER;
58 set global gtid_slave_pos="";
59 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
60 connection master;
61 RESET MASTER;
62 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
63 connection slave;
64 RESET SLAVE;
65 set global gtid_slave_pos="";
66 RESET MASTER;
67 connection master;
68 RESET MASTER;
69 connection slave;
70 connection master;
71 #
72 #
73 # Test Case 2: Ensure filtering by a single id in --do-domain-ids is
74 # consistent between mariadb-binlog and replica
75 #
76 include/mysqlbinlog_slave_consistency.inc
77 connection slave;
78 set @@global.gtid_strict_mode=0;
79 connection slave;
80 connection master;
81 # Populating master data
82 connection slave;
83 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(0);
84 START SLAVE ;
85 # No slave error expecting - waiting for slave to catch up to master
86 # Stop slave so it stops receiving master events.
87 connection master;
88 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
89 RESET MASTER;
90 # MYSQL_BINLOG BINLOG_FILE_PARAM --do-domain-ids=0 2> MYSQLBINLOG_STDERR | MYSQL
91 connection slave;
92 # Checking consistency of 'test' database tables between master and slave
93 connection master;
94 # Both servers have 2 tables
95 # Verifying integrity of tables..
96 connection master;
97 connection slave;
98 # t1 is equivalent on master and slave
99 connection master;
100 connection slave;
101 # t2 is equivalent on master and slave
102 # All tables are consistent
103 # Test finished - resetting master and slave..
104 connection slave;
105 RESET SLAVE;
106 RESET MASTER;
107 set global gtid_slave_pos="";
108 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
109 connection master;
110 RESET MASTER;
111 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
112 Warnings:
113 Note 1051 Unknown table 'test.t3,test.t4,test.t5'
114 connection slave;
115 RESET SLAVE;
116 set global gtid_slave_pos="";
117 RESET MASTER;
118 connection master;
119 RESET MASTER;
120 connection slave;
121 connection master;
122 #
123 #
124 # Test Case 3: Ensure filtering by multiple ids in --do-domain-ids is
125 # consistent between mariadb-binlog and replica
126 #
127 include/mysqlbinlog_slave_consistency.inc
128 connection slave;
129 set @@global.gtid_strict_mode=0;
130 connection slave;
131 connection master;
132 # Populating master data
133 connection slave;
134 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(0,1);
135 START SLAVE ;
136 # No slave error expecting - waiting for slave to catch up to master
137 # Stop slave so it stops receiving master events.
138 connection master;
139 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
140 RESET MASTER;
141 # MYSQL_BINLOG BINLOG_FILE_PARAM --do-domain-ids=0,1 2> MYSQLBINLOG_STDERR | MYSQL
142 connection slave;
143 # Checking consistency of 'test' database tables between master and slave
144 connection master;
145 # Both servers have 4 tables
146 # Verifying integrity of tables..
147 connection master;
148 connection slave;
149 # t1 is equivalent on master and slave
150 connection master;
151 connection slave;
152 # t2 is equivalent on master and slave
153 connection master;
154 connection slave;
155 # t3 is equivalent on master and slave
156 connection master;
157 connection slave;
158 # t4 is equivalent on master and slave
159 # All tables are consistent
160 # Test finished - resetting master and slave..
161 connection slave;
162 RESET SLAVE;
163 RESET MASTER;
164 set global gtid_slave_pos="";
165 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
166 connection master;
167 RESET MASTER;
168 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
169 Warnings:
170 Note 1051 Unknown table 'test.t5'
171 connection slave;
172 RESET SLAVE;
173 set global gtid_slave_pos="";
174 RESET MASTER;
175 connection master;
176 RESET MASTER;
177 connection slave;
178 connection master;
179 #
180 # Test Case 4: Ensure filtering by a single id in --ignore-domain-ids
181 # is consistent between mariadb-binlog and replica
182 #
183 include/mysqlbinlog_slave_consistency.inc
184 connection slave;
185 set @@global.gtid_strict_mode=0;
186 connection slave;
187 connection master;
188 # Populating master data
189 connection slave;
190 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_DOMAIN_IDS=(0);
191 START SLAVE ;
192 # No slave error expecting - waiting for slave to catch up to master
193 # Stop slave so it stops receiving master events.
194 connection master;
195 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
196 RESET MASTER;
197 # MYSQL_BINLOG BINLOG_FILE_PARAM --ignore-domain-ids=0 2> MYSQLBINLOG_STDERR | MYSQL
198 connection slave;
199 # Checking consistency of 'test' database tables between master and slave
200 connection master;
201 # Both servers have 3 tables
202 # Verifying integrity of tables..
203 connection master;
204 connection slave;
205 # t3 is equivalent on master and slave
206 connection master;
207 connection slave;
208 # t4 is equivalent on master and slave
209 connection master;
210 connection slave;
211 # t5 is equivalent on master and slave
212 # All tables are consistent
213 # Test finished - resetting master and slave..
214 connection slave;
215 RESET SLAVE;
216 RESET MASTER;
217 set global gtid_slave_pos="";
218 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
219 connection master;
220 RESET MASTER;
221 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
222 Warnings:
223 Note 1051 Unknown table 'test.t1,test.t2'
224 connection slave;
225 RESET SLAVE;
226 set global gtid_slave_pos="";
227 RESET MASTER;
228 connection master;
229 RESET MASTER;
230 connection slave;
231 connection master;
232 #
233 #
234 # Test Case 5: Ensure filtering by multiple ids in --ignore-domain-ids
235 # is consistent between mariadb-binlog and replica
236 #
237 include/mysqlbinlog_slave_consistency.inc
238 connection slave;
239 set @@global.gtid_strict_mode=0;
240 connection slave;
241 connection master;
242 # Populating master data
243 connection slave;
244 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_DOMAIN_IDS=(0,1);
245 START SLAVE ;
246 # No slave error expecting - waiting for slave to catch up to master
247 # Stop slave so it stops receiving master events.
248 connection master;
249 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
250 RESET MASTER;
251 # MYSQL_BINLOG BINLOG_FILE_PARAM --ignore-domain-ids=0,1 2> MYSQLBINLOG_STDERR | MYSQL
252 connection slave;
253 # Checking consistency of 'test' database tables between master and slave
254 connection master;
255 # Both servers have 1 tables
256 # Verifying integrity of tables..
257 connection master;
258 connection slave;
259 # t5 is equivalent on master and slave
260 # All tables are consistent
261 # Test finished - resetting master and slave..
262 connection slave;
263 RESET SLAVE;
264 RESET MASTER;
265 set global gtid_slave_pos="";
266 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
267 connection master;
268 RESET MASTER;
269 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
270 Warnings:
271 Note 1051 Unknown table 'test.t1,test.t2,test.t3,test.t4'
272 connection slave;
273 RESET SLAVE;
274 set global gtid_slave_pos="";
275 RESET MASTER;
276 connection master;
277 RESET MASTER;
278 connection slave;
279 connection master;
280 #
281 # Test Case 6: Ensure filtering by a single id in --ignore-server-ids
282 # is consistent between mariadb-binlog and replica
283 #
284 include/mysqlbinlog_slave_consistency.inc
285 connection slave;
286 set @@global.gtid_strict_mode=0;
287 connection slave;
288 connection master;
289 # Populating master data
290 connection slave;
291 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_SERVER_IDS=(1);
292 START SLAVE ;
293 # No slave error expecting - waiting for slave to catch up to master
294 # Stop slave so it stops receiving master events.
295 connection master;
296 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
297 RESET MASTER;
298 # MYSQL_BINLOG BINLOG_FILE_PARAM --ignore-server-ids=1 2> MYSQLBINLOG_STDERR | MYSQL
299 connection slave;
300 # Checking consistency of 'test' database tables between master and slave
301 connection master;
302 # Both servers have 2 tables
303 # Verifying integrity of tables..
304 connection master;
305 connection slave;
306 # t2 is equivalent on master and slave
307 connection master;
308 connection slave;
309 # t4 is equivalent on master and slave
310 # All tables are consistent
311 # Test finished - resetting master and slave..
312 connection slave;
313 RESET SLAVE;
314 RESET MASTER;
315 set global gtid_slave_pos="";
316 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
317 connection master;
318 RESET MASTER;
319 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
320 Warnings:
321 Note 1051 Unknown table 'test.t1,test.t3,test.t5'
322 connection slave;
323 RESET SLAVE;
324 set global gtid_slave_pos="";
325 RESET MASTER;
326 connection master;
327 RESET MASTER;
328 connection slave;
329 connection master;
330 #
331 #
332 # Test Case 7: Ensure filtering by multiple ids in --ignore-server-ids
333 # is consistent between mariadb-binlog and replica
334 #
335 include/mysqlbinlog_slave_consistency.inc
336 connection slave;
337 set @@global.gtid_strict_mode=0;
338 connection slave;
339 connection master;
340 # Populating master data
341 connection slave;
342 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_SERVER_IDS=(0,1);
343 START SLAVE ;
344 # No slave error expecting - waiting for slave to catch up to master
345 # Stop slave so it stops receiving master events.
346 connection master;
347 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
348 RESET MASTER;
349 # MYSQL_BINLOG BINLOG_FILE_PARAM --ignore-server-ids=0,1 2> MYSQLBINLOG_STDERR | MYSQL
350 connection slave;
351 # Checking consistency of 'test' database tables between master and slave
352 connection master;
353 # Both servers have 2 tables
354 # Verifying integrity of tables..
355 connection master;
356 connection slave;
357 # t2 is equivalent on master and slave
358 connection master;
359 connection slave;
360 # t4 is equivalent on master and slave
361 # All tables are consistent
362 # Test finished - resetting master and slave..
363 connection slave;
364 RESET SLAVE;
365 RESET MASTER;
366 set global gtid_slave_pos="";
367 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
368 connection master;
369 RESET MASTER;
370 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
371 Warnings:
372 Note 1051 Unknown table 'test.t1,test.t3,test.t5'
373 connection slave;
374 RESET SLAVE;
375 set global gtid_slave_pos="";
376 RESET MASTER;
377 connection master;
378 RESET MASTER;
379 connection slave;
380 connection master;
381 #
382 #
383 # Test Case 8: Ensure stop position consistency
384 #
385 include/mysqlbinlog_slave_consistency.inc
386 connection slave;
387 set @@global.gtid_strict_mode=0;
388 connection slave;
389 connection master;
390 # Populating master data
391 connection slave;
392 CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
393 START SLAVE UNTIL master_gtid_pos="1-1-2";
394 # No slave error expecting - waiting for slave to catch up to master
395 # Because there is a stop position we wait for all events to process
396 # and slave to automatically stop
397 # Stop slave so it stops receiving master events.
398 Warnings:
399 Note 1255 Slave already has been stopped
400 connection master;
401 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
402 RESET MASTER;
403 # MYSQL_BINLOG BINLOG_FILE_PARAM --stop-position=1-1-2 2> MYSQLBINLOG_STDERR | MYSQL
404 connection slave;
405 # Checking consistency of 'test' database tables between master and slave
406 connection master;
407 # Both servers have 1 tables
408 # Verifying integrity of tables..
409 connection master;
410 connection slave;
411 # t3 is equivalent on master and slave
412 # All tables are consistent
413 # Test finished - resetting master and slave..
414 connection slave;
415 RESET SLAVE;
416 RESET MASTER;
417 set global gtid_slave_pos="";
418 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
419 connection master;
420 RESET MASTER;
421 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
422 Warnings:
423 Note 1051 Unknown table 'test.t1,test.t2,test.t4,test.t5'
424 connection slave;
425 RESET SLAVE;
426 set global gtid_slave_pos="";
427 RESET MASTER;
428 connection master;
429 RESET MASTER;
430 connection slave;
431 connection master;
432 #
433 #
434 # Test Case 9: Ensure start position consistency
435 #
436 include/mysqlbinlog_slave_consistency.inc
437 connection slave;
438 set @@global.gtid_strict_mode=0;
439 connection slave;
440 connection master;
441 # Populating master data
442 connection slave;
443 set global gtid_slave_pos="1-4-2";
444 CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
445 START SLAVE ;
446 # No slave error expecting - waiting for slave to catch up to master
447 # Stop slave so it stops receiving master events.
448 connection master;
449 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
450 RESET MASTER;
451 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=1-4-2 2> MYSQLBINLOG_STDERR | MYSQL
452 connection slave;
453 # Checking consistency of 'test' database tables between master and slave
454 connection master;
455 # Both servers have 4 tables
456 # Verifying integrity of tables..
457 connection master;
458 connection slave;
459 # t1 is equivalent on master and slave
460 connection master;
461 connection slave;
462 # t2 is equivalent on master and slave
463 connection master;
464 connection slave;
465 # t4 is equivalent on master and slave
466 connection master;
467 connection slave;
468 # t5 is equivalent on master and slave
469 # All tables are consistent
470 # Test finished - resetting master and slave..
471 connection slave;
472 RESET SLAVE;
473 RESET MASTER;
474 set global gtid_slave_pos="";
475 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
476 connection master;
477 RESET MASTER;
478 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
479 Warnings:
480 Note 1051 Unknown table 'test.t3'
481 connection slave;
482 RESET SLAVE;
483 set global gtid_slave_pos="";
484 RESET MASTER;
485 connection master;
486 RESET MASTER;
487 connection slave;
488 connection master;
489 #
490 #
491 # Test Case 10: Ensure consistency when filtering by both
492 # --do-domain-ids and --ignore-server-ids
493 #
494 include/mysqlbinlog_slave_consistency.inc
495 connection slave;
496 set @@global.gtid_strict_mode=0;
497 connection slave;
498 connection master;
499 # Populating master data
500 connection slave;
501 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(0), IGNORE_SERVER_IDS=(1);
502 START SLAVE ;
503 # No slave error expecting - waiting for slave to catch up to master
504 # Stop slave so it stops receiving master events.
505 connection master;
506 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
507 RESET MASTER;
508 # MYSQL_BINLOG BINLOG_FILE_PARAM --do-domain-ids=0 --ignore-server-ids=1 2> MYSQLBINLOG_STDERR | MYSQL
509 connection slave;
510 # Checking consistency of 'test' database tables between master and slave
511 connection master;
512 # Both servers have 1 tables
513 # Verifying integrity of tables..
514 connection master;
515 connection slave;
516 # t2 is equivalent on master and slave
517 # All tables are consistent
518 # Test finished - resetting master and slave..
519 connection slave;
520 RESET SLAVE;
521 RESET MASTER;
522 set global gtid_slave_pos="";
523 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
524 connection master;
525 RESET MASTER;
526 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
527 Warnings:
528 Note 1051 Unknown table 'test.t1,test.t3,test.t4,test.t5'
529 connection slave;
530 RESET SLAVE;
531 set global gtid_slave_pos="";
532 RESET MASTER;
533 connection master;
534 RESET MASTER;
535 connection slave;
536 connection master;
537 #
538 #
539 # Test Case 11: Ensure consistency when filtering by both
540 # --ignore-domain-ids and --ignore-server-ids
541 #
542 include/mysqlbinlog_slave_consistency.inc
543 connection slave;
544 set @@global.gtid_strict_mode=0;
545 connection slave;
546 connection master;
547 # Populating master data
548 connection slave;
549 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_DOMAIN_IDS=(1,2), IGNORE_SERVER_IDS=(1);
550 START SLAVE ;
551 # No slave error expecting - waiting for slave to catch up to master
552 # Stop slave so it stops receiving master events.
553 connection master;
554 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
555 RESET MASTER;
556 # MYSQL_BINLOG BINLOG_FILE_PARAM --ignore-domain-ids=1,2 --ignore-server-ids=1 2> MYSQLBINLOG_STDERR | MYSQL
557 connection slave;
558 # Checking consistency of 'test' database tables between master and slave
559 connection master;
560 # Both servers have 1 tables
561 # Verifying integrity of tables..
562 connection master;
563 connection slave;
564 # t2 is equivalent on master and slave
565 # All tables are consistent
566 # Test finished - resetting master and slave..
567 connection slave;
568 RESET SLAVE;
569 RESET MASTER;
570 set global gtid_slave_pos="";
571 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
572 connection master;
573 RESET MASTER;
574 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
575 Warnings:
576 Note 1051 Unknown table 'test.t1,test.t3,test.t4,test.t5'
577 connection slave;
578 RESET SLAVE;
579 set global gtid_slave_pos="";
580 RESET MASTER;
581 connection master;
582 RESET MASTER;
583 connection slave;
584 connection master;
585 #
586 #
587 # Test Case 12: Ensure consistency when filtering by
588 # --do-domain-ids with a stop position
589 #
590 include/mysqlbinlog_slave_consistency.inc
591 connection slave;
592 set @@global.gtid_strict_mode=0;
593 connection slave;
594 connection master;
595 # Populating master data
596 connection slave;
597 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(0);
598 START SLAVE UNTIL master_gtid_pos="0-1-4";
599 # No slave error expecting - waiting for slave to catch up to master
600 # Because there is a stop position we wait for all events to process
601 # and slave to automatically stop
602 # Stop slave so it stops receiving master events.
603 Warnings:
604 Note 1255 Slave already has been stopped
605 connection master;
606 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
607 RESET MASTER;
608 # MYSQL_BINLOG BINLOG_FILE_PARAM --do-domain-ids=0 --stop-position=0-1-4 2> MYSQLBINLOG_STDERR | MYSQL
609 connection slave;
610 # Checking consistency of 'test' database tables between master and slave
611 connection master;
612 # Both servers have 2 tables
613 # Verifying integrity of tables..
614 connection master;
615 connection slave;
616 # t1 is equivalent on master and slave
617 connection master;
618 connection slave;
619 # t2 is equivalent on master and slave
620 # All tables are consistent
621 # Test finished - resetting master and slave..
622 connection slave;
623 RESET SLAVE;
624 RESET MASTER;
625 set global gtid_slave_pos="";
626 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
627 connection master;
628 RESET MASTER;
629 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
630 Warnings:
631 Note 1051 Unknown table 'test.t3,test.t4,test.t5'
632 connection slave;
633 RESET SLAVE;
634 set global gtid_slave_pos="";
635 RESET MASTER;
636 connection master;
637 RESET MASTER;
638 connection slave;
639 connection master;
640 #
641 #
642 # Test Case 13: Ensure consistency when filtering by
643 # --ignore-domain-ids with a stop position
644 #
645 include/mysqlbinlog_slave_consistency.inc
646 connection slave;
647 set @@global.gtid_strict_mode=0;
648 connection slave;
649 connection master;
650 # Populating master data
651 connection slave;
652 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_DOMAIN_IDS=(0);
653 START SLAVE UNTIL master_gtid_pos="0-1-4";
654 # No slave error expecting - waiting for slave to catch up to master
655 # Because there is a stop position we wait for all events to process
656 # and slave to automatically stop
657 # Stop slave so it stops receiving master events.
658 Warnings:
659 Note 1255 Slave already has been stopped
660 connection master;
661 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
662 RESET MASTER;
663 # MYSQL_BINLOG BINLOG_FILE_PARAM --ignore-domain-ids=0 --stop-position=0-1-4 2> MYSQLBINLOG_STDERR | MYSQL
664 connection slave;
665 # Checking consistency of 'test' database tables between master and slave
666 connection master;
667 # Both servers have 0 tables
668 # Verifying integrity of tables..
669 # All tables are consistent
670 # Test finished - resetting master and slave..
671 connection slave;
672 RESET SLAVE;
673 RESET MASTER;
674 set global gtid_slave_pos="";
675 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
676 connection master;
677 RESET MASTER;
678 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
679 Warnings:
680 Note 1051 Unknown table 'test.t1,test.t2,test.t3,test.t4,test.t5'
681 connection slave;
682 RESET SLAVE;
683 set global gtid_slave_pos="";
684 RESET MASTER;
685 connection master;
686 RESET MASTER;
687 connection slave;
688 connection master;
689 #
690 #
691 # Test Case 14: Ensure consistency when filtering by
692 # --ignore-server-ids with a stop position
693 #
694 include/mysqlbinlog_slave_consistency.inc
695 connection slave;
696 set @@global.gtid_strict_mode=0;
697 connection slave;
698 connection master;
699 # Populating master data
700 connection slave;
701 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_SERVER_IDS=(3);
702 START SLAVE UNTIL master_gtid_pos="0-1-4";
703 # No slave error expecting - waiting for slave to catch up to master
704 # Because there is a stop position we wait for all events to process
705 # and slave to automatically stop
706 # Stop slave so it stops receiving master events.
707 Warnings:
708 Note 1255 Slave already has been stopped
709 connection master;
710 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
711 RESET MASTER;
712 # MYSQL_BINLOG BINLOG_FILE_PARAM --ignore-server-ids=3 --stop-position=0-1-4 2> MYSQLBINLOG_STDERR | MYSQL
713 connection slave;
714 # Checking consistency of 'test' database tables between master and slave
715 connection master;
716 # Both servers have 1 tables
717 # Verifying integrity of tables..
718 connection master;
719 connection slave;
720 # t1 is equivalent on master and slave
721 # All tables are consistent
722 # Test finished - resetting master and slave..
723 connection slave;
724 RESET SLAVE;
725 RESET MASTER;
726 set global gtid_slave_pos="";
727 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
728 connection master;
729 RESET MASTER;
730 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
731 Warnings:
732 Note 1051 Unknown table 'test.t2,test.t3,test.t4,test.t5'
733 connection slave;
734 RESET SLAVE;
735 set global gtid_slave_pos="";
736 RESET MASTER;
737 connection master;
738 RESET MASTER;
739 connection slave;
740 connection master;
741 #
742 #
743 # Test Case 15: Ensure consistency when filtering by
744 # --do-domain-ids with a start position
745 #
746 include/mysqlbinlog_slave_consistency.inc
747 connection slave;
748 set @@global.gtid_strict_mode=0;
749 connection slave;
750 connection master;
751 # Populating master data
752 connection slave;
753 set global gtid_slave_pos="1-1-2";
754 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(2);
755 START SLAVE ;
756 # No slave error expecting - waiting for slave to catch up to master
757 # Stop slave so it stops receiving master events.
758 connection master;
759 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
760 RESET MASTER;
761 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=1-1-2 --do-domain-ids=2 2> MYSQLBINLOG_STDERR | MYSQL
762 connection slave;
763 # Checking consistency of 'test' database tables between master and slave
764 connection master;
765 # Both servers have 1 tables
766 # Verifying integrity of tables..
767 connection master;
768 connection slave;
769 # t5 is equivalent on master and slave
770 # All tables are consistent
771 # Test finished - resetting master and slave..
772 connection slave;
773 RESET SLAVE;
774 RESET MASTER;
775 set global gtid_slave_pos="";
776 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
777 connection master;
778 RESET MASTER;
779 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
780 Warnings:
781 Note 1051 Unknown table 'test.t1,test.t2,test.t3,test.t4'
782 connection slave;
783 RESET SLAVE;
784 set global gtid_slave_pos="";
785 RESET MASTER;
786 connection master;
787 RESET MASTER;
788 connection slave;
789 connection master;
790 #
791 #
792 # Test Case 16: Ensure consistency when filtering by
793 # --ignore-domain-ids with a start position
794 #
795 include/mysqlbinlog_slave_consistency.inc
796 connection slave;
797 set @@global.gtid_strict_mode=0;
798 connection slave;
799 connection master;
800 # Populating master data
801 connection slave;
802 set global gtid_slave_pos="0-1-1";
803 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_DOMAIN_IDS=(0);
804 START SLAVE ;
805 # No slave error expecting - waiting for slave to catch up to master
806 # Stop slave so it stops receiving master events.
807 connection master;
808 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
809 RESET MASTER;
810 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=0-1-1 --ignore-domain-ids=0 2> MYSQLBINLOG_STDERR | MYSQL
811 connection slave;
812 # Checking consistency of 'test' database tables between master and slave
813 connection master;
814 # Both servers have 3 tables
815 # Verifying integrity of tables..
816 connection master;
817 connection slave;
818 # t3 is equivalent on master and slave
819 connection master;
820 connection slave;
821 # t4 is equivalent on master and slave
822 connection master;
823 connection slave;
824 # t5 is equivalent on master and slave
825 # All tables are consistent
826 # Test finished - resetting master and slave..
827 connection slave;
828 RESET SLAVE;
829 RESET MASTER;
830 set global gtid_slave_pos="";
831 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
832 connection master;
833 RESET MASTER;
834 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
835 Warnings:
836 Note 1051 Unknown table 'test.t1,test.t2'
837 connection slave;
838 RESET SLAVE;
839 set global gtid_slave_pos="";
840 RESET MASTER;
841 connection master;
842 RESET MASTER;
843 connection slave;
844 connection master;
845 #
846 #
847 # Test Case 17: Ensure consistency when filtering by
848 # --ignore-server-ids with a start position
849 #
850 include/mysqlbinlog_slave_consistency.inc
851 connection slave;
852 set @@global.gtid_strict_mode=0;
853 connection slave;
854 connection master;
855 # Populating master data
856 connection slave;
857 set global gtid_slave_pos="0-1-1";
858 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_SERVER_IDS=(1);
859 START SLAVE ;
860 # No slave error expecting - waiting for slave to catch up to master
861 # Stop slave so it stops receiving master events.
862 connection master;
863 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
864 RESET MASTER;
865 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=0-1-1 --ignore-server-ids=1 2> MYSQLBINLOG_STDERR | MYSQL
866 connection slave;
867 # Checking consistency of 'test' database tables between master and slave
868 connection master;
869 # Both servers have 2 tables
870 # Verifying integrity of tables..
871 connection master;
872 connection slave;
873 # t2 is equivalent on master and slave
874 connection master;
875 connection slave;
876 # t4 is equivalent on master and slave
877 # All tables are consistent
878 # Test finished - resetting master and slave..
879 connection slave;
880 RESET SLAVE;
881 RESET MASTER;
882 set global gtid_slave_pos="";
883 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
884 connection master;
885 RESET MASTER;
886 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
887 Warnings:
888 Note 1051 Unknown table 'test.t1,test.t3,test.t5'
889 connection slave;
890 RESET SLAVE;
891 set global gtid_slave_pos="";
892 RESET MASTER;
893 connection master;
894 RESET MASTER;
895 connection slave;
896 connection master;
897 #
898 #
899 # Test Case 18: Ensure consistency when filtering by
900 # --do-domain-ids with both a start position and stop position that
901 # all have the same domain id
902 #
903 include/mysqlbinlog_slave_consistency.inc
904 connection slave;
905 set @@global.gtid_strict_mode=0;
906 connection slave;
907 connection master;
908 # Populating master data
909 connection slave;
910 set global gtid_slave_pos="0-1-1";
911 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(0);
912 START SLAVE UNTIL master_gtid_pos="0-3-3";
913 # No slave error expecting - waiting for slave to catch up to master
914 # Because there is a stop position we wait for all events to process
915 # and slave to automatically stop
916 # Stop slave so it stops receiving master events.
917 Warnings:
918 Note 1255 Slave already has been stopped
919 connection master;
920 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
921 RESET MASTER;
922 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=0-1-1 --do-domain-ids=0 --stop-position=0-3-3 2> MYSQLBINLOG_STDERR | MYSQL
923 connection slave;
924 # Checking consistency of 'test' database tables between master and slave
925 connection master;
926 # Both servers have 1 tables
927 # Verifying integrity of tables..
928 connection master;
929 connection slave;
930 # t2 is equivalent on master and slave
931 # All tables are consistent
932 # Test finished - resetting master and slave..
933 connection slave;
934 RESET SLAVE;
935 RESET MASTER;
936 set global gtid_slave_pos="";
937 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
938 connection master;
939 RESET MASTER;
940 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
941 Warnings:
942 Note 1051 Unknown table 'test.t1,test.t3,test.t4,test.t5'
943 connection slave;
944 RESET SLAVE;
945 set global gtid_slave_pos="";
946 RESET MASTER;
947 connection master;
948 RESET MASTER;
949 connection slave;
950 connection master;
951 #
952 #
953 # Test Case 19: Ensure consistency when filtering by
954 # --do-domain-ids with both a start position and stop position that
955 # have differing domain ids. Due to the implicit filtering in stop
956 # position, the result should be empty (no tables replicated).
957 #
958 include/mysqlbinlog_slave_consistency.inc
959 connection slave;
960 set @@global.gtid_strict_mode=0;
961 connection slave;
962 connection master;
963 # Populating master data
964 connection slave;
965 set global gtid_slave_pos="0-1-1";
966 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(1);
967 START SLAVE UNTIL master_gtid_pos="0-3-3";
968 # No slave error expecting - waiting for slave to catch up to master
969 # Because there is a stop position we wait for all events to process
970 # and slave to automatically stop
971 # Stop slave so it stops receiving master events.
972 Warnings:
973 Note 1255 Slave already has been stopped
974 connection master;
975 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
976 RESET MASTER;
977 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=0-1-1 --do-domain-ids=1 --stop-position=0-3-3 2> MYSQLBINLOG_STDERR | MYSQL
978 connection slave;
979 # Checking consistency of 'test' database tables between master and slave
980 connection master;
981 # Both servers have 0 tables
982 # Verifying integrity of tables..
983 # All tables are consistent
984 # Test finished - resetting master and slave..
985 connection slave;
986 RESET SLAVE;
987 RESET MASTER;
988 set global gtid_slave_pos="";
989 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
990 connection master;
991 RESET MASTER;
992 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
993 Warnings:
994 Note 1051 Unknown table 'test.t1,test.t2,test.t3,test.t4,test.t5'
995 connection slave;
996 RESET SLAVE;
997 set global gtid_slave_pos="";
998 RESET MASTER;
999 connection master;
1000 RESET MASTER;
1001 connection slave;
1002 connection master;
1003 #
1004 #
1005 # Test Case 20: Ensure consistency when filtering by
1006 # --ignore-domain-ids with both a start position and stop position that
1007 # all have the same domain id. The result set should be empty due to
1008 # implicit filtering from stop position and ignoring that same domain.
1009 #
1010 include/mysqlbinlog_slave_consistency.inc
1011 connection slave;
1012 set @@global.gtid_strict_mode=0;
1013 connection slave;
1014 connection master;
1015 # Populating master data
1016 connection slave;
1017 set global gtid_slave_pos="0-1-1";
1018 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_DOMAIN_IDS=(0);
1019 START SLAVE UNTIL master_gtid_pos="0-3-3";
1020 # No slave error expecting - waiting for slave to catch up to master
1021 # Because there is a stop position we wait for all events to process
1022 # and slave to automatically stop
1023 # Stop slave so it stops receiving master events.
1024 Warnings:
1025 Note 1255 Slave already has been stopped
1026 connection master;
1027 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1028 RESET MASTER;
1029 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=0-1-1 --ignore-domain-ids=0 --stop-position=0-3-3 2> MYSQLBINLOG_STDERR | MYSQL
1030 connection slave;
1031 # Checking consistency of 'test' database tables between master and slave
1032 connection master;
1033 # Both servers have 0 tables
1034 # Verifying integrity of tables..
1035 # All tables are consistent
1036 # Test finished - resetting master and slave..
1037 connection slave;
1038 RESET SLAVE;
1039 RESET MASTER;
1040 set global gtid_slave_pos="";
1041 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
1042 connection master;
1043 RESET MASTER;
1044 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1045 Warnings:
1046 Note 1051 Unknown table 'test.t1,test.t2,test.t3,test.t4,test.t5'
1047 connection slave;
1048 RESET SLAVE;
1049 set global gtid_slave_pos="";
1050 RESET MASTER;
1051 connection master;
1052 RESET MASTER;
1053 connection slave;
1054 connection master;
1055 #
1056 #
1057 # Test Case 21: Ensure consistency when filtering by
1058 # --ignore-domain-ids with both a start position and stop position that
1059 # have differing domain ids. The ignore domain ids should take no
1060 # effect due to the implicit filtering by stop position, i.e. the
1061 # specified domain to ignore is already being filtered.
1062 #
1063 include/mysqlbinlog_slave_consistency.inc
1064 connection slave;
1065 set @@global.gtid_strict_mode=0;
1066 connection slave;
1067 connection master;
1068 # Populating master data
1069 connection slave;
1070 set global gtid_slave_pos="0-1-1";
1071 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_DOMAIN_IDS=(1);
1072 START SLAVE UNTIL master_gtid_pos="0-3-3";
1073 # No slave error expecting - waiting for slave to catch up to master
1074 # Because there is a stop position we wait for all events to process
1075 # and slave to automatically stop
1076 # Stop slave so it stops receiving master events.
1077 Warnings:
1078 Note 1255 Slave already has been stopped
1079 connection master;
1080 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1081 RESET MASTER;
1082 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=0-1-1 --ignore-domain-ids=1 --stop-position=0-3-3 2> MYSQLBINLOG_STDERR | MYSQL
1083 connection slave;
1084 # Checking consistency of 'test' database tables between master and slave
1085 connection master;
1086 # Both servers have 1 tables
1087 # Verifying integrity of tables..
1088 connection master;
1089 connection slave;
1090 # t2 is equivalent on master and slave
1091 # All tables are consistent
1092 # Test finished - resetting master and slave..
1093 connection slave;
1094 RESET SLAVE;
1095 RESET MASTER;
1096 set global gtid_slave_pos="";
1097 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
1098 connection master;
1099 RESET MASTER;
1100 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1101 Warnings:
1102 Note 1051 Unknown table 'test.t1,test.t3,test.t4,test.t5'
1103 connection slave;
1104 RESET SLAVE;
1105 set global gtid_slave_pos="";
1106 RESET MASTER;
1107 connection master;
1108 RESET MASTER;
1109 connection slave;
1110 connection master;
1111 #
1112 #
1113 # Test Case 22: Ensure consistency when filtering by
1114 # --ignore-server-ids with both a start position and stop position.
1115 #
1116 include/mysqlbinlog_slave_consistency.inc
1117 connection slave;
1118 set @@global.gtid_strict_mode=0;
1119 connection slave;
1120 connection master;
1121 # Populating master data
1122 connection slave;
1123 set global gtid_slave_pos="0-1-0";
1124 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_SERVER_IDS=(3);
1125 START SLAVE UNTIL master_gtid_pos="0-3-3";
1126 # No slave error expecting - waiting for slave to catch up to master
1127 # Because there is a stop position we wait for all events to process
1128 # and slave to automatically stop
1129 # Stop slave so it stops receiving master events.
1130 Warnings:
1131 Note 1255 Slave already has been stopped
1132 connection master;
1133 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1134 RESET MASTER;
1135 # MYSQL_BINLOG BINLOG_FILE_PARAM --start-position=0-1-0 --ignore-server-ids=3 --stop-position=0-3-3 2> MYSQLBINLOG_STDERR | MYSQL
1136 connection slave;
1137 # Checking consistency of 'test' database tables between master and slave
1138 connection master;
1139 # Both servers have 1 tables
1140 # Verifying integrity of tables..
1141 connection master;
1142 connection slave;
1143 # t1 is equivalent on master and slave
1144 # All tables are consistent
1145 # Test finished - resetting master and slave..
1146 connection slave;
1147 RESET SLAVE;
1148 RESET MASTER;
1149 set global gtid_slave_pos="";
1150 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
1151 connection master;
1152 RESET MASTER;
1153 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1154 Warnings:
1155 Note 1051 Unknown table 'test.t2,test.t3,test.t4,test.t5'
1156 connection slave;
1157 RESET SLAVE;
1158 set global gtid_slave_pos="";
1159 RESET MASTER;
1160 connection master;
1161 RESET MASTER;
1162 connection slave;
1163 connection master;
1164 #
1165 #
1166 # Test Case 23: Out of order GTIDs from domains or servers which are
1167 # filtered out should not error
1168 #
1169 include/mysqlbinlog_slave_consistency.inc
1170 connection slave;
1171 set @@global.gtid_strict_mode=1;
1172 connection slave;
1173 connection master;
1174 # Populating master data
1175 connection slave;
1176 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(0), IGNORE_SERVER_IDS=(3);
1177 START SLAVE ;
1178 # No slave error expecting - waiting for slave to catch up to master
1179 # Stop slave so it stops receiving master events.
1180 connection master;
1181 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1182 Warnings:
1183 Note 1051 Unknown table 'test.t4,test.t5'
1184 RESET MASTER;
1185 # MYSQL_BINLOG BINLOG_FILE_PARAM --do-domain-ids=0 --ignore-server-ids=3 --gtid-strict-mode 2> MYSQLBINLOG_STDERR | MYSQL
1186 connection slave;
1187 # Checking consistency of 'test' database tables between master and slave
1188 connection master;
1189 # Both servers have 1 tables
1190 # Verifying integrity of tables..
1191 connection master;
1192 connection slave;
1193 # t1 is equivalent on master and slave
1194 # All tables are consistent
1195 # Strict mode enabled - checking mysqlbinlog error output for out
1196 # of order GTIDs
1197 # Not expecting to find out of order GTID error..
1198 NOT FOUND /Found out of order GTID/ in mysqlbinlog_stderr.out
1199 # Test finished - resetting master and slave..
1200 connection slave;
1201 RESET SLAVE;
1202 RESET MASTER;
1203 set global gtid_slave_pos="";
1204 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
1205 connection master;
1206 RESET MASTER;
1207 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1208 Warnings:
1209 Note 1051 Unknown table 'test.t2,test.t3,test.t4,test.t5'
1210 connection slave;
1211 RESET SLAVE;
1212 set global gtid_slave_pos="";
1213 RESET MASTER;
1214 connection master;
1215 RESET MASTER;
1216 connection slave;
1217 set @@global.gtid_strict_mode=0;
1218 connection master;
1219 #
1220 #
1221 # Test Case 24: Out of order GTIDs from included domains should error
1222 #
1223 include/mysqlbinlog_slave_consistency.inc
1224 connection slave;
1225 set @@global.gtid_strict_mode=1;
1226 connection slave;
1227 connection master;
1228 # Populating master data
1229 connection slave;
1230 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(1);
1231 START SLAVE ;
1232 # slave SQL Thread error expected - waiting for errno 1950
1233 # Stop slave so it stops receiving master events.
1234 connection master;
1235 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1236 Warnings:
1237 Note 1051 Unknown table 'test.t4,test.t5'
1238 RESET MASTER;
1239 # MYSQL_BINLOG BINLOG_FILE_PARAM --do-domain-ids=1 --gtid-strict-mode 2> MYSQLBINLOG_STDERR | MYSQL
1240 connection slave;
1241 # Checking consistency of 'test' database tables between master and slave
1242 connection master;
1243 # Both servers have 1 tables
1244 # Verifying integrity of tables..
1245 connection master;
1246 connection slave;
1247 # t3 is equivalent on master and slave
1248 # All tables are consistent
1249 # Strict mode enabled - checking mysqlbinlog error output for out
1250 # of order GTIDs
1251 # Expecting to find out of order GTID error..
1252 FOUND 1 /Found out of order GTID/ in mysqlbinlog_stderr.out
1253 # Test finished - resetting master and slave..
1254 connection slave;
1255 RESET SLAVE;
1256 RESET MASTER;
1257 set global gtid_slave_pos="";
1258 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
1259 connection master;
1260 RESET MASTER;
1261 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1262 Warnings:
1263 Note 1051 Unknown table 'test.t1,test.t2,test.t4,test.t5'
1264 connection slave;
1265 RESET SLAVE;
1266 set global gtid_slave_pos="";
1267 RESET MASTER;
1268 connection master;
1269 RESET MASTER;
1270 connection slave;
1271 set @@global.gtid_strict_mode=0;
1272 connection master;
1273 #
1274 #
1275 # Test Case 25: Out of order GTIDs from included servers should error
1276 #
1277 include/mysqlbinlog_slave_consistency.inc
1278 connection slave;
1279 set @@global.gtid_strict_mode=1;
1280 connection slave;
1281 connection master;
1282 # Populating master data
1283 connection slave;
1284 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, IGNORE_SERVER_IDS=(1);
1285 START SLAVE ;
1286 # slave SQL Thread error expected - waiting for errno 1950
1287 # Stop slave so it stops receiving master events.
1288 connection master;
1289 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1290 Warnings:
1291 Note 1051 Unknown table 'test.t4,test.t5'
1292 RESET MASTER;
1293 # MYSQL_BINLOG BINLOG_FILE_PARAM --ignore-server-ids=1 --gtid-strict-mode 2> MYSQLBINLOG_STDERR | MYSQL
1294 connection slave;
1295 # Checking consistency of 'test' database tables between master and slave
1296 connection master;
1297 # Both servers have 1 tables
1298 # Verifying integrity of tables..
1299 connection master;
1300 connection slave;
1301 # t2 is equivalent on master and slave
1302 # All tables are consistent
1303 # Strict mode enabled - checking mysqlbinlog error output for out
1304 # of order GTIDs
1305 # Expecting to find out of order GTID error..
1306 FOUND 1 /Found out of order GTID/ in mysqlbinlog_stderr.out
1307 # Test finished - resetting master and slave..
1308 connection slave;
1309 RESET SLAVE;
1310 RESET MASTER;
1311 set global gtid_slave_pos="";
1312 CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), IGNORE_SERVER_IDS=();
1313 connection master;
1314 RESET MASTER;
1315 DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
1316 Warnings:
1317 Note 1051 Unknown table 'test.t1,test.t3,test.t4,test.t5'
1318 connection slave;
1319 RESET SLAVE;
1320 set global gtid_slave_pos="";
1321 RESET MASTER;
1322 connection master;
1323 RESET MASTER;
1324 connection slave;
1325 set @@global.gtid_strict_mode=0;
1326 connection master;
1327 #
1328 #
1329 # Test Case 26: Neither mysqlbinlog nor CHANGE MASTER TO should allow
1330 # both do domain ids and ignore domain ids to be set together
1331 #
1332 connection slave;
1333 include/stop_slave.inc
1334 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(0), IGNORE_DOMAIN_IDS=(1);
1335 ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
1336 RESET MASTER;
1337 set global gtid_slave_pos="";
1338 CHANGE MASTER TO MASTER_USE_GTID=slave_pos, DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=();
1339 include/start_slave.inc
1340 connection master;
1341 RESET MASTER;
1342 include/rpl_end.inc
1343 # End of tests (rpl.rpl_mysqlbinlog_slave_consistency)