mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
GTID: Add missing test of reconnecting into out-of-order binlog.
This commit is contained in:
@@ -310,7 +310,7 @@ master_gtid_wait('2-1-10')
|
||||
0
|
||||
master_gtid_wait('2-1-10')
|
||||
0
|
||||
*** Test sql_gtid_slave_pos when used with GTID ***
|
||||
*** Test gtid_slave_pos when used with GTID ***
|
||||
include/stop_slave.inc
|
||||
SET gtid_domain_id=2;
|
||||
SET gtid_seq_no=1000;
|
||||
@@ -413,5 +413,26 @@ SELECT IF(LOCATE("2-1-1040", @@GLOBAL.gtid_slave_pos)>0, "Ok", CONCAT("ERROR! ex
|
||||
status
|
||||
Ok
|
||||
SET GLOBAL slave_ddl_exec_mode= @saved_mode;
|
||||
*** Test GTID-connecting to a master with out-of-order sequence numbers in the binlog. ***
|
||||
SET gtid_domain_id= @@GLOBAL.gtid_domain_id;
|
||||
INSERT INTO t1 VALUES (31);
|
||||
SET gtid_domain_id= @@GLOBAL.gtid_domain_id;
|
||||
INSERT INTO t1 VALUES (32);
|
||||
INSERT INTO t1 VALUES (33);
|
||||
include/stop_slave.inc
|
||||
INSERT INTO t1 VALUES (34);
|
||||
include/start_slave.inc
|
||||
SELECT * FROM t1 WHERE a >= 30 ORDER BY a;
|
||||
a
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
SELECT * FROM t1 WHERE a >= 30 ORDER BY a;
|
||||
a
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -367,7 +367,7 @@ reap;
|
||||
reap;
|
||||
|
||||
|
||||
--echo *** Test sql_gtid_slave_pos when used with GTID ***
|
||||
--echo *** Test gtid_slave_pos when used with GTID ***
|
||||
|
||||
--connection server_2
|
||||
--source include/stop_slave.inc
|
||||
@@ -481,6 +481,55 @@ SELECT IF(LOCATE("2-1-1040", @@GLOBAL.gtid_slave_pos)>0, "Ok", CONCAT("ERROR! ex
|
||||
|
||||
SET GLOBAL slave_ddl_exec_mode= @saved_mode;
|
||||
|
||||
|
||||
--echo *** Test GTID-connecting to a master with out-of-order sequence numbers in the binlog. ***
|
||||
|
||||
# Create an out-of-order binlog on server 2.
|
||||
# Let server 3 replicate to an out-of-order point, stop it, restart it,
|
||||
# and check that it replicates correctly despite the out-of-order.
|
||||
|
||||
--connection server_1
|
||||
SET gtid_domain_id= @@GLOBAL.gtid_domain_id;
|
||||
INSERT INTO t1 VALUES (31);
|
||||
--save_master_pos
|
||||
|
||||
--connection server_2
|
||||
--sync_with_master
|
||||
SET gtid_domain_id= @@GLOBAL.gtid_domain_id;
|
||||
INSERT INTO t1 VALUES (32);
|
||||
|
||||
--connection server_1
|
||||
INSERT INTO t1 VALUES (33);
|
||||
--save_master_pos
|
||||
|
||||
--connection server_2
|
||||
--sync_with_master
|
||||
--save_master_pos
|
||||
|
||||
--connection server_3
|
||||
--sync_with_master
|
||||
--source include/stop_slave.inc
|
||||
|
||||
--connection server_1
|
||||
INSERT INTO t1 VALUES (34);
|
||||
--save_master_pos
|
||||
|
||||
--connection server_2
|
||||
--sync_with_master
|
||||
--save_master_pos
|
||||
|
||||
--connection server_3
|
||||
--source include/start_slave.inc
|
||||
--sync_with_master
|
||||
SELECT * FROM t1 WHERE a >= 30 ORDER BY a;
|
||||
--save_master_pos
|
||||
|
||||
--connection server_4
|
||||
SELECT * FROM t1 WHERE a >= 30 ORDER BY a;
|
||||
--sync_with_master
|
||||
|
||||
|
||||
# Clean up.
|
||||
--connection server_1
|
||||
DROP TABLE t1;
|
||||
|
||||
|
Reference in New Issue
Block a user