mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
MDEV-7353: rpl_mdev6386 fails sporadically in buildbot
Use include/sync_with_master_gtid.inc instead of --sync_with_master to avoid a race in the test case. In parallel replication, the old-style slave position (which is used by --sync_with_master) is updated out-of-order between parallel threads. This makes it possible for the position to be updated past DROP TEMPORARY TABLE t2 just before the commit of INSERT INTO t1 SELECT * FROM t2 becomes visible. In this case, there is a small window where a SELECT just after --sync_with_master may not see the changes from the INSERT.
This commit is contained in:
parent
f0be022cf0
commit
6e0a00ed75
2 changed files with 4 additions and 2 deletions
|
@ -22,6 +22,7 @@ INSERT INTO t2 VALUE (4, 1);
|
|||
INSERT INTO t2 VALUE (5, 1);
|
||||
INSERT INTO t1 SELECT * FROM t2;
|
||||
DROP TEMPORARY TABLE t2;
|
||||
include/save_master_gtid.inc
|
||||
Contents on master:
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
|
@ -41,6 +42,7 @@ SET sql_log_bin= 0;
|
|||
DELETE FROM t1 WHERE a=1;
|
||||
SET sql_log_bin= 1;
|
||||
include/start_slave.inc
|
||||
include/sync_with_master_gtid.inc
|
||||
Contents on slave after:
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
|
|
|
@ -31,7 +31,7 @@ INSERT INTO t2 VALUE (4, 1);
|
|||
INSERT INTO t2 VALUE (5, 1);
|
||||
INSERT INTO t1 SELECT * FROM t2;
|
||||
DROP TEMPORARY TABLE t2;
|
||||
--save_master_pos
|
||||
--source include/save_master_gtid.inc
|
||||
--echo Contents on master:
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
|
@ -56,7 +56,7 @@ DELETE FROM t1 WHERE a=1;
|
|||
SET sql_log_bin= 1;
|
||||
|
||||
--source include/start_slave.inc
|
||||
--sync_with_master
|
||||
--source include/sync_with_master_gtid.inc
|
||||
--echo Contents on slave after:
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
|
|
Loading…
Reference in a new issue