Skip to content

Commit 44e7e1f

Browse files
author
Jan Lindström
committed
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.
1 parent 90bea7c commit 44e7e1f

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

mysql-test/suite/galera_sr/r/galera_sr_kill_query.result

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,25 @@ SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
1717
SELECT COUNT(*) AS EXPECT_0 FROM t1;
1818
EXPECT_0
1919
0
20-
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
21-
EXPECT_0
22-
0
2320
INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
2421
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
2522
EXPECT_1000
2623
1000
27-
connection node_1a;
24+
connection node_1;
2825
SET GLOBAL wsrep_sync_wait=15;
2926
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
3027
EXPECT_1000
3128
1000
29+
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
30+
EXPECT_0
31+
0
32+
connection node_2;
33+
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
34+
EXPECT_1000
35+
1000
36+
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
37+
EXPECT_0
38+
0
39+
connection node_1;
3240
DROP TABLE t1;
3341
DROP TABLE ten;

mysql-test/suite/galera_sr/t/galera_sr_kill_query.test

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,27 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
3333

3434
# Confirm that the kill caused the updates made so far to be removed
3535
--connection node_2
36+
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1
37+
--source include/wait_condition.inc
3638
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
3739
SELECT COUNT(*) AS EXPECT_0 FROM t1;
38-
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
3940

4041
# Confirm that the transaction can be reissued in its entirety on the slave without a conflict
4142

4243
INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
4344
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
4445

45-
--connection node_1a
46+
--connection node_1
4647
SET GLOBAL wsrep_sync_wait=15;
48+
--let $wait_condition = SELECT COUNT(*) = 1000 FROM t1;
49+
--source include/wait_condition.inc
50+
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
51+
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
52+
53+
--connection node_2
4754
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
55+
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
4856

57+
--connection node_1
4958
DROP TABLE t1;
5059
DROP TABLE ten;

0 commit comments

Comments
 (0)