Skip to content

Commit 5482d62

Browse files
committed
Fix sporadic test failure on galera_parallel_apply_3nodes.
Test itself is not deterministic.
1 parent a90b158 commit 5482d62

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ UPDATE t1 SET f1 = f1 + 10;;
77
connection node_2;
88
UPDATE t1 SET f1 = f1 + 100;;
99
connection node_1;
10+
SELECT COUNT(*) FROM t1;
11+
COUNT(*)
12+
1
1013
connection node_2;
14+
SELECT COUNT(*) FROM t1;
15+
COUNT(*)
16+
1
1117
connection node_3;
12-
SELECT f1 = 111 FROM t1;
13-
f1 = 111
18+
SELECT COUNT(*) FROM t1;
19+
COUNT(*)
1420
1
15-
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
21+
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
1622
COUNT(*) IN (1, 2)
1723
1
1824
SET GLOBAL wsrep_slave_threads = 1;;

mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,26 @@ SET GLOBAL wsrep_slave_threads = 2;
2424
--send UPDATE t1 SET f1 = f1 + 100;
2525

2626
--connection node_1
27+
#
28+
# Note that test is not deterministic. We have following cases possible
29+
# (1) Both updates are certified locally and then executed by the applier
30+
# (2) Certification of update in node_1 fails because applier has started
31+
# update from node_2
32+
# (3) Certification of update in node_2 fails because applier has started
33+
# update from node_1
34+
#
35+
--error 0,ER_LOCK_DEADLOCK
2736
--reap
37+
SELECT COUNT(*) FROM t1;
2838

2939
--connection node_2
40+
--error 0,ER_LOCK_DEADLOCK
3041
--reap
42+
SELECT COUNT(*) FROM t1;
3143

3244
--connection node_3
33-
SELECT f1 = 111 FROM t1;
34-
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
45+
SELECT COUNT(*) FROM t1;
46+
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
3547

3648
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
3749

0 commit comments

Comments
 (0)