[Commits] 7dee7a0: GTID: Add missing test of reconnecting into out-of-order binlog.

Kristian Nielsen knielsen at knielsen-hq.org
Thu Mar 5 10:50:36 EET 2015


revision-id: 7dee7a036acfc0bcf7e6ab13a1556fde84714fd7
parent(s): 3ef0b9b235a931be4264c096319976a180224354
committer: Kristian Nielsen
branch nick: server
timestamp: 2015-03-05 09:41:01 +0100
message:

GTID: Add missing test of reconnecting into out-of-order binlog.

---
 mysql-test/suite/rpl/r/rpl_gtid_basic.result |   23 +++++++++++-
 mysql-test/suite/rpl/t/rpl_gtid_basic.test   |   51 +++++++++++++++++++++++++-
 2 files changed, 72 insertions(+), 2 deletions(-)

diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result
index 465cc87..f3b52d8 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result
@@ -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
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_basic.test b/mysql-test/suite/rpl/t/rpl_gtid_basic.test
index 19f90fc..778cf42 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_basic.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_basic.test
@@ -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;
 


More information about the commits mailing list