Commit 71c211d4 authored by unknown's avatar unknown

Fix race in test case.

parent e4634175
...@@ -14,9 +14,9 @@ Note 1937 SLAVE '' started ...@@ -14,9 +14,9 @@ Note 1937 SLAVE '' started
include/wait_for_slave_to_start.inc include/wait_for_slave_to_start.inc
SET GLOBAL gtid_domain_id= 1; SET GLOBAL gtid_domain_id= 1;
SET SESSION gtid_domain_id= 1; SET SESSION gtid_domain_id= 1;
CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB;
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10));
INSERT INTO t1 VALUES (1, "initial"); INSERT INTO t1 VALUES (1, "initial");
CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t3 VALUES (101, "initial 1"); INSERT INTO t3 VALUES (101, "initial 1");
SET GLOBAL gtid_domain_id= 2; SET GLOBAL gtid_domain_id= 2;
SET SESSION gtid_domain_id= 2; SET SESSION gtid_domain_id= 2;
......
...@@ -32,11 +32,17 @@ start all slaves; ...@@ -32,11 +32,17 @@ start all slaves;
--connection master1 --connection master1
SET GLOBAL gtid_domain_id= 1; SET GLOBAL gtid_domain_id= 1;
SET SESSION gtid_domain_id= 1; SET SESSION gtid_domain_id= 1;
CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB;
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10));
INSERT INTO t1 VALUES (1, "initial"); INSERT INTO t1 VALUES (1, "initial");
CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t3 VALUES (101, "initial 1"); INSERT INTO t3 VALUES (101, "initial 1");
# Make sure we have CREATE TABLE t3 from master1 before replicating INSERT INTO
# t3 from master2.
--connection slave1
--let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.tables WHERE table_name = "t3" AND table_schema = "test"
--source include/wait_condition.inc
--connection master2 --connection master2
SET GLOBAL gtid_domain_id= 2; SET GLOBAL gtid_domain_id= 2;
SET SESSION gtid_domain_id= 2; SET SESSION gtid_domain_id= 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment