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

MDEV-19970 Galera test failure on galera_sr.galera-features#56

Move test to big_test as it takes significant amount of time and
add wait to get slave threads start and setup to replicate.
parent 52448131
...@@ -2,11 +2,19 @@ connection node_2; ...@@ -2,11 +2,19 @@ connection node_2;
connection node_1; connection node_1;
SET SESSION wsrep_trx_fragment_size = 1; SET SESSION wsrep_trx_fragment_size = 1;
connection node_1; connection node_1;
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
SET SESSION wsrep_trx_fragment_size = 1; SET SESSION wsrep_trx_fragment_size = 1;
connection node_2; connection node_2;
set session wsrep_sync_wait=15;
SELECT COUNT(*) from ten;
COUNT(*)
10
SELECT COUNT(*) from t1;
COUNT(*)
0
set session wsrep_sync_wait=0;
SET GLOBAL wsrep_slave_threads = 4; SET GLOBAL wsrep_slave_threads = 4;
SET SESSION wsrep_trx_fragment_size = 1; SET SESSION wsrep_trx_fragment_size = 1;
connection node_1; connection node_1;
...@@ -18,15 +26,12 @@ INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; ...@@ -18,15 +26,12 @@ INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
connection node_1; connection node_1;
connection node_1a; connection node_1a;
connection node_2; connection node_2;
SELECT COUNT(*) = 30000 FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) = 30000 COUNT(*)
1 30000
SELECT COUNT(DISTINCT f1) = 30000 FROM t1; SELECT COUNT(DISTINCT f1) FROM t1;
COUNT(DISTINCT f1) = 30000 COUNT(DISTINCT f1)
1 30000
SELECT COUNT(*) = 6 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
COUNT(*) = 6
0
connection default; connection default;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE ten; DROP TABLE ten;
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/big_test.inc
# Create a second connection to node1 so that we can run transactions concurrently # Create a second connection to node1 so that we can run transactions concurrently
--let $galera_connection_name = node_1a --let $galera_connection_name = node_1a
...@@ -12,7 +13,7 @@ ...@@ -12,7 +13,7 @@
SET SESSION wsrep_trx_fragment_size = 1; SET SESSION wsrep_trx_fragment_size = 1;
--connection node_1 --connection node_1
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
...@@ -20,8 +21,17 @@ SET SESSION wsrep_trx_fragment_size = 1; ...@@ -20,8 +21,17 @@ SET SESSION wsrep_trx_fragment_size = 1;
--connection node_2 --connection node_2
set session wsrep_sync_wait=15;
SELECT COUNT(*) from ten;
SELECT COUNT(*) from t1;
set session wsrep_sync_wait=0;
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads` --let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
SET GLOBAL wsrep_slave_threads = 4; SET GLOBAL wsrep_slave_threads = 4;
--let $wait_condition = SELECT COUNT(*) >= 3 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
--source include/wait_condition.inc
SET SESSION wsrep_trx_fragment_size = 1; SET SESSION wsrep_trx_fragment_size = 1;
--connection node_1 --connection node_1
...@@ -42,9 +52,8 @@ SET SESSION wsrep_trx_fragment_size = 1; ...@@ -42,9 +52,8 @@ SET SESSION wsrep_trx_fragment_size = 1;
--connection node_2 --connection node_2
--reap --reap
SELECT COUNT(*) = 30000 FROM t1; SELECT COUNT(*) FROM t1;
SELECT COUNT(DISTINCT f1) = 30000 FROM t1; SELECT COUNT(DISTINCT f1) FROM t1;
SELECT COUNT(*) = 6 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--disable_query_log --disable_query_log
--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