Commit fd0aaad5 authored by Philip Stoev's avatar Philip Stoev Committed by Nirbhay Choubey

Galera MTR Tests: Various test stability fixes (take #2)

parent 997119da
......@@ -4,6 +4,9 @@ CREATE TABLE ten (f1 INTEGER);
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;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = 7;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
SELECT COUNT(*) = 100000 FROM t1;
COUNT(*) = 100000
1
......@@ -12,7 +15,6 @@ SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000
1
UPDATE t1 SET f2 = 1;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT5M';
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
COUNT(*) = 200000
1
......
......@@ -13,13 +13,16 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT COUNT(*) = 6 FROM t1;
COUNT(*) = 6
1
SELECT COUNT(*) = 6 FROM t2;
COUNT(*) = 6
1
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'closing tables';
SELECT COUNT(*) = 10 FROM t1;
COUNT(*) = 10
0
SELECT COUNT(*) = 10 FROM t2;
COUNT(*) = 10
0
SELECT COUNT(DISTINCT ID) FROM INFORMATION_SCHEMA.PROCESSLIST;
COUNT(DISTINCT ID)
4
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
COUNT(*) = 2
1
SET GLOBAL wsrep_slave_threads = 1;;
......
......@@ -10,6 +10,7 @@ INSERT INTO t1 VALUES (1);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
--sleep 1
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
......
......@@ -14,6 +14,12 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoD
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
--connection node_2
SET SESSION wsrep_sync_wait = 0;
--let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options`
SET SESSION wsrep_sync_wait = 7;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
SELECT COUNT(*) = 100000 FROM t1;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
......@@ -22,8 +28,6 @@ SELECT COUNT(*) = 200000 FROM t1;
UPDATE t1 SET f2 = 1;
--connection node_2
--let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT5M';
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
--connection node_1
......
......@@ -35,9 +35,11 @@ INSERT INTO t2 VALUES (1);
--connection node_2
SELECT COUNT(*) = 6 FROM t1;
SELECT COUNT(*) = 6 FROM t2;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'closing tables';
SELECT COUNT(*) = 10 FROM t1;
SELECT COUNT(*) = 10 FROM t2;
SHOW PROCESSLIST;
SELECT COUNT(DISTINCT ID) FROM INFORMATION_SCHEMA.PROCESSLIST;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
......
......@@ -92,6 +92,7 @@ INSERT INTO t1 VALUES (34);
--sleep 5
--connection node_1
--source include/wait_until_connected_again.inc
INSERT INTO t1 VALUES (31);
--connection node_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