Skip to content

Commit 50d98e9

Browse files
committed
Merge MDEV-7940 into 10.0
2 parents 670d4dd + 15a2b5a commit 50d98e9

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ a
4444
1
4545
2
4646
include/stop_slave.inc
47-
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200";
47+
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200,0-1-300";
4848
include/wait_for_slave_to_start.inc
4949
Using_Gtid = 'Current_Pos'
5050
Until_Condition = 'Gtid'
51+
INSERT INTO t1 VALUES (3);
52+
DELETE FROM t1 WHERE a=3;
5153
include/stop_slave.inc
52-
include/start_slave.inc
5354
*** Test UNTIL condition in an earlier binlog than the start GTID. ***
54-
include/stop_slave.inc
5555
SET gtid_domain_id = 1;
5656
INSERT INTO t1 VALUES (3);
5757
SET gtid_domain_id = 2;

mysql-test/suite/rpl/t/rpl_gtid_until.test

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,29 @@ SELECT * FROM t1 ORDER BY a;
7373

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

8181
# Clear the UNTIL condition.
82+
# Note that we need to wait for a transaction to get through from the master.
83+
# Otherwise the IO thread may still be in get_master_version_and_clock()
84+
# (wait_for_slave_to_start.inc returns as soon as the IO thread is connected),
85+
# and we can get test failures from warnings in the log about IO thread being
86+
# killed in the middle of setting @@gtid_strict_mode or similar (MDEV-7940).
87+
--connection server_1
88+
INSERT INTO t1 VALUES (3);
89+
DELETE FROM t1 WHERE a=3;
90+
--save_master_pos
91+
92+
--connection server_2
93+
--sync_with_master
8294
--source include/stop_slave.inc
83-
--source include/start_slave.inc
8495

8596

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

90100
--connection server_1
91101
SET gtid_domain_id = 1;

0 commit comments

Comments
 (0)