Skip to content

Commit

Permalink
Merge MDEV-7940 into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
knielsen committed Apr 9, 2015
2 parents 66ff163 + 15a2b5a commit abba418
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 3 additions & 3 deletions mysql-test/suite/rpl/r/rpl_gtid_until.result
Expand Up @@ -44,14 +44,14 @@ a
1
2
include/stop_slave.inc
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200";
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200,0-1-300";
include/wait_for_slave_to_start.inc
Using_Gtid = 'Current_Pos'
Until_Condition = 'Gtid'
INSERT INTO t1 VALUES (3);
DELETE FROM t1 WHERE a=3;
include/stop_slave.inc
include/start_slave.inc
*** Test UNTIL condition in an earlier binlog than the start GTID. ***
include/stop_slave.inc
SET gtid_domain_id = 1;
INSERT INTO t1 VALUES (3);
SET gtid_domain_id = 2;
Expand Down
16 changes: 13 additions & 3 deletions mysql-test/suite/rpl/t/rpl_gtid_until.test
Expand Up @@ -73,19 +73,29 @@ SELECT * FROM t1 ORDER BY a;

# Test showing the UNTIL condition in SHOW SLAVE STATUS.
--source include/stop_slave.inc
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200";
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200,0-1-300";
--source include/wait_for_slave_to_start.inc
--let $status_items= Using_Gtid,Until_Condition
--source include/show_slave_status.inc

# Clear the UNTIL condition.
# Note that we need to wait for a transaction to get through from the master.
# Otherwise the IO thread may still be in get_master_version_and_clock()
# (wait_for_slave_to_start.inc returns as soon as the IO thread is connected),
# and we can get test failures from warnings in the log about IO thread being
# killed in the middle of setting @@gtid_strict_mode or similar (MDEV-7940).
--connection server_1
INSERT INTO t1 VALUES (3);
DELETE FROM t1 WHERE a=3;
--save_master_pos

--connection server_2
--sync_with_master
--source include/stop_slave.inc
--source include/start_slave.inc


--echo *** Test UNTIL condition in an earlier binlog than the start GTID. ***
--connection server_2
--source include/stop_slave.inc

--connection server_1
SET gtid_domain_id = 1;
Expand Down

0 comments on commit abba418

Please sign in to comment.