Skip to content

Commit fea1568

Browse files
committed
Fix sporadic test failure in rpl_gtid_mdev4820.test
Use sync_with_master_gtid.inc instead of --sync_with_master. The latter is not correct because the test case uses RESET MASTER; this invalidates the existing binlog positions on the slave. In this particular case, there was a small window where --sync_with_master could trigger too early (on the old position), causing the test case to miss one event.
1 parent 81727cd commit fea1568

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ RESET MASTER;
1818
SET GLOBAL gtid_slave_pos= 'OLD_GTID_POS';
1919
include/start_slave.inc
2020
INSERT INTO t1 VALUES (4);
21+
include/save_master_gtid.inc
2122
SET sql_log_bin= 0;
2223
CALL mtr.add_suppression("The binlog on the master is missing the GTID");
2324
SET sql_log_bin= 1;
2425
include/wait_for_slave_io_error.inc [errno=1236]
2526
STOP SLAVE SQL_THREAD;
2627
SET GLOBAL gtid_slave_pos= 'OLD_GTID_POS';
2728
include/start_slave.inc
29+
include/sync_with_master_gtid.inc
2830
SELECT * FROM t1 ORDER BY a;
2931
a
3032
1

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ eval SET GLOBAL gtid_slave_pos= '$old_gtid_pos';
3434

3535
--connection server_1
3636
INSERT INTO t1 VALUES (4);
37-
--save_master_pos
37+
--source include/save_master_gtid.inc
3838

3939
--connection server_2
4040
SET sql_log_bin= 0;
@@ -48,7 +48,7 @@ STOP SLAVE SQL_THREAD;
4848
eval SET GLOBAL gtid_slave_pos= '$old_gtid_pos';
4949

5050
--source include/start_slave.inc
51-
--sync_with_master
51+
--source include/sync_with_master_gtid.inc
5252
SELECT * FROM t1 ORDER BY a;
5353

5454
--source include/stop_slave.inc

0 commit comments

Comments
 (0)