Commit c3394870 authored by Jan Lindström's avatar Jan Lindström

Try to fix galera_parallel_simple test case.

parent 37570e84
...@@ -3,11 +3,11 @@ connection node_1; ...@@ -3,11 +3,11 @@ connection node_1;
CREATE TABLE t1 (id INT) ENGINE=InnoDB; CREATE TABLE t1 (id INT) ENGINE=InnoDB;
CREATE TABLE t2 (id INT) ENGINE=InnoDB; CREATE TABLE t2 (id INT) ENGINE=InnoDB;
connection node_2; connection node_2;
SET GLOBAL wsrep_slave_threads = 2;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%'; SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
NAME NAME
test/t1 test/t1
test/t2 test/t2
SET GLOBAL wsrep_slave_threads = 2;
LOCK TABLE t1 WRITE; LOCK TABLE t1 WRITE;
connection node_1; connection node_1;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
...@@ -20,18 +20,20 @@ INSERT INTO t1 VALUES (1); ...@@ -20,18 +20,20 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1); INSERT INTO t1 select * from t1;
INSERT INTO t2 VALUES (1); INSERT INTO t2 select * from t2;
INSERT INTO t1 select * from t1;
INSERT INTO t2 select * from t2;
connection node_2; connection node_2;
SET SESSION wsrep_sync_wait = 0; SET SESSION wsrep_sync_wait = 0;
UNLOCK TABLES; UNLOCK TABLES;
SET SESSION wsrep_sync_wait = 15; SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) = 10 FROM t1; SELECT COUNT(*) as expect_20 FROM t1;
COUNT(*) = 10 expect_20
0 20
SELECT COUNT(*) = 10 FROM t2; SELECT COUNT(*) as expect_20 FROM t2;
COUNT(*) = 10 expect_20
0 20
SET GLOBAL wsrep_slave_threads = 1;; SET GLOBAL wsrep_slave_threads = 1;;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
...@@ -12,7 +12,6 @@ CREATE TABLE t1 (id INT) ENGINE=InnoDB; ...@@ -12,7 +12,6 @@ CREATE TABLE t1 (id INT) ENGINE=InnoDB;
CREATE TABLE t2 (id INT) ENGINE=InnoDB; CREATE TABLE t2 (id INT) ENGINE=InnoDB;
--connection node_2 --connection node_2
SET GLOBAL wsrep_slave_threads = 2;
# Wait until above DDL's are replicated # Wait until above DDL's are replicated
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%'; --let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
...@@ -20,6 +19,8 @@ SET GLOBAL wsrep_slave_threads = 2; ...@@ -20,6 +19,8 @@ SET GLOBAL wsrep_slave_threads = 2;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%'; SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
SET GLOBAL wsrep_slave_threads = 2;
LOCK TABLE t1 WRITE; LOCK TABLE t1 WRITE;
--connection node_1 --connection node_1
...@@ -38,8 +39,11 @@ INSERT INTO t2 VALUES (1); ...@@ -38,8 +39,11 @@ INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1); INSERT INTO t1 select * from t1;
INSERT INTO t2 VALUES (1); INSERT INTO t2 select * from t2;
INSERT INTO t1 select * from t1;
INSERT INTO t2 select * from t2;
--connection node_2 --connection node_2
SET SESSION wsrep_sync_wait = 0; SET SESSION wsrep_sync_wait = 0;
...@@ -54,8 +58,8 @@ UNLOCK TABLES; ...@@ -54,8 +58,8 @@ UNLOCK TABLES;
SET SESSION wsrep_sync_wait = 15; SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) = 10 FROM t1; SELECT COUNT(*) as expect_20 FROM t1;
SELECT COUNT(*) = 10 FROM t2; SELECT COUNT(*) as expect_20 FROM t2;
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig; --eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
......
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