summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2019-05-13 13:23:52 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2019-05-17 08:29:45 +0300
commit61469b3a3b01d9491f17f58c4bd34a33150efcb3 (patch)
tree0631be274e1d9c170d43512a3b8b9c359e037def
parent579c1a8c202dc1a725ae9a0d897734604f2f2444 (diff)
downloadmariadb-git-61469b3a3b01d9491f17f58c4bd34a33150efcb3.tar.gz
MDEV-13549: Timeout in wait_condition.inc for PROCESSLIST
Use wsrep sync wait instead of unnecessary waits and correct slave setting.
-rw-r--r--mysql-test/suite/galera/disabled.def1
-rw-r--r--mysql-test/suite/galera/r/MW-336.result18
-rw-r--r--mysql-test/suite/galera/t/MW-336.test28
3 files changed, 18 insertions, 29 deletions
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 5389730710b..a9458f599d4 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -15,7 +15,6 @@ MW-328A : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-328B : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-328C : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-329 : wsrep_local_replays not stable
-MW-336 : MDEV-13549 Timeout in wait_condition.inc for PROCESSLIST
MW-416 : MDEV-13549 Galera test failures
MW-44 : MDEV-15809 Test failure on galera.MW-44
galera_account_management : MariaDB 10.0 does not support ALTER USER
diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result
index 81e8eae0eb3..9a5bc88a48f 100644
--- a/mysql-test/suite/galera/r/MW-336.result
+++ b/mysql-test/suite/galera/r/MW-336.result
@@ -3,29 +3,29 @@ INSERT INTO t1 values(0);
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1;
# Wait 10 slave threads to start 1
-# Generate 12 replication events
+SET SESSION wsrep_sync_wait=15;
+# Generate 100 replication events
+SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM t1;
COUNT(*)
-13
+101
# Wait 9 slave threads to exit 1
SET GLOBAL wsrep_slave_threads = 10;
# Wait 10 slave threads to start 2
SET GLOBAL wsrep_slave_threads = 20;
# Wait 20 slave threads to start 3
SET GLOBAL wsrep_slave_threads = 1;
-# Generate 40 replication events
+# Generate 100 replication events
SELECT COUNT(*) FROM t1;
COUNT(*)
-53
+201
# Wait 10 slave threads to exit 3
SET GLOBAL wsrep_slave_threads = 10;
-SET GLOBAL wsrep_slave_threads = 0;
-Warnings:
-Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
+SET GLOBAL wsrep_slave_threads = 1;
# Wait 10 slave threads to start 3
-# Generate 12 replication events
+# Generate 100 replication events
SELECT COUNT(*) FROM t1;
COUNT(*)
-65
+301
# Wait 10 slave threads to exit 4
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test
index 749ffe671be..15e0a38a0b7 100644
--- a/mysql-test/suite/galera/t/MW-336.test
+++ b/mysql-test/suite/galera/t/MW-336.test
@@ -19,13 +19,14 @@ SET GLOBAL wsrep_slave_threads = 1;
--source include/wait_condition.inc
--connection node_2
+SET SESSION wsrep_sync_wait=15;
# Wait until inserts are replicated
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
---echo # Generate 12 replication events
+--echo # Generate 100 replication events
--disable_query_log
--disable_result_log
---let $count = 12
+--let $count = 100
while ($count)
{
INSERT INTO t1 VALUES (1);
@@ -35,9 +36,7 @@ while ($count)
--enable_query_log
--connection node_1
-# Wait until inserts are replicated
---let $wait_condition = SELECT COUNT(*) = 13 FROM t1;
---source include/wait_condition.inc
+SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM t1;
@@ -61,10 +60,10 @@ SET GLOBAL wsrep_slave_threads = 20;
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
---echo # Generate 40 replication events
+--echo # Generate 100 replication events
--disable_query_log
--disable_result_log
---let $count = 40
+--let $count = 100
while ($count)
{
INSERT INTO t1 VALUES (1);
@@ -74,11 +73,6 @@ while ($count)
--enable_result_log
--connection node_1
-
-# Wait until inserts are replicated
---let $wait_condition = SELECT COUNT(*) = 53 FROM t1;
---source include/wait_condition.inc
-
SELECT COUNT(*) FROM t1;
--echo # Wait 10 slave threads to exit 3
@@ -87,7 +81,7 @@ SELECT COUNT(*) FROM t1;
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 10;
-SET GLOBAL wsrep_slave_threads = 0;
+SET GLOBAL wsrep_slave_threads = 1;
--echo # Wait 10 slave threads to start 3
--let $wait_timeout=600
@@ -95,10 +89,10 @@ SET GLOBAL wsrep_slave_threads = 0;
--source include/wait_condition.inc
--connection node_2
---echo # Generate 12 replication events
+--echo # Generate 100 replication events
--disable_query_log
--disable_result_log
---let $count = 12
+--let $count = 100
while ($count)
{
INSERT INTO t1 VALUES (1);
@@ -108,10 +102,6 @@ while ($count)
--enable_query_log
--connection node_1
-# Wait until inserts are replicated
---let $wait_condition = SELECT COUNT(*) = 65 FROM t1;
---source include/wait_condition.inc
-
SELECT COUNT(*) FROM t1;
--echo # Wait 10 slave threads to exit 4