Commit 44e7e1f0 authored by Jan Lindström's avatar Jan Lindström

MDEV-23611 : galera_sr.galera_sr_kill_query MTR failed: 15 instead of 0 on...

MDEV-23611 : galera_sr.galera_sr_kill_query MTR failed: 15 instead of 0 on "SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;"

Add wait_condition to stabilize test.
parent 90bea7c3
...@@ -17,17 +17,25 @@ SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; ...@@ -17,17 +17,25 @@ SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT COUNT(*) AS EXPECT_0 FROM t1; SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0 EXPECT_0
0 0
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3; INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t1; SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000 EXPECT_1000
1000 1000
connection node_1a; connection node_1;
SET GLOBAL wsrep_sync_wait=15; SET GLOBAL wsrep_sync_wait=15;
SELECT COUNT(*) AS EXPECT_1000 FROM t1; SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000 EXPECT_1000
1000 1000
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_2;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_1;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE ten; DROP TABLE ten;
...@@ -33,18 +33,27 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ...@@ -33,18 +33,27 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
# Confirm that the kill caused the updates made so far to be removed # Confirm that the kill caused the updates made so far to be removed
--connection node_2 --connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1
--source include/wait_condition.inc
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT COUNT(*) AS EXPECT_0 FROM t1; SELECT COUNT(*) AS EXPECT_0 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
# Confirm that the transaction can be reissued in its entirety on the slave without a conflict # Confirm that the transaction can be reissued in its entirety on the slave without a conflict
INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3; INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t1; SELECT COUNT(*) AS EXPECT_1000 FROM t1;
--connection node_1a --connection node_1
SET GLOBAL wsrep_sync_wait=15; SET GLOBAL wsrep_sync_wait=15;
--let $wait_condition = SELECT COUNT(*) = 1000 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_2
SELECT COUNT(*) AS EXPECT_1000 FROM t1; SELECT COUNT(*) AS EXPECT_1000 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_1
DROP TABLE t1; DROP TABLE t1;
DROP TABLE ten; DROP TABLE ten;
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