Skip to content

Commit 97a3a07

Browse files
philip-galeramariadb-SachinSetiya
authored andcommitted
Galera MTR Tests: Stability fix for MW-329
1 parent 59f3285 commit 97a3a07

File tree

3 files changed

+23
-62
lines changed

3 files changed

+23
-62
lines changed

mysql-test/suite/galera/r/MW-329.result

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,66 +13,6 @@ INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
1313
END WHILE;
1414
END|
1515
CALL proc_insert();;
16-
SELECT ROW_COUNT() > 0;
17-
ROW_COUNT() > 0
18-
1
19-
SELECT FOUND_ROWS() > 0;
20-
FOUND_ROWS() > 0
21-
1
22-
SELECT ROW_COUNT() > 0;
23-
ROW_COUNT() > 0
24-
1
25-
SELECT FOUND_ROWS() > 0;
26-
FOUND_ROWS() > 0
27-
1
28-
SELECT ROW_COUNT() > 0;
29-
ROW_COUNT() > 0
30-
1
31-
SELECT FOUND_ROWS() > 0;
32-
FOUND_ROWS() > 0
33-
1
34-
SELECT ROW_COUNT() > 0;
35-
ROW_COUNT() > 0
36-
1
37-
SELECT FOUND_ROWS() > 0;
38-
FOUND_ROWS() > 0
39-
1
40-
SELECT ROW_COUNT() > 0;
41-
ROW_COUNT() > 0
42-
1
43-
SELECT FOUND_ROWS() > 0;
44-
FOUND_ROWS() > 0
45-
1
46-
SELECT ROW_COUNT() > 0;
47-
ROW_COUNT() > 0
48-
1
49-
SELECT FOUND_ROWS() > 0;
50-
FOUND_ROWS() > 0
51-
1
52-
SELECT ROW_COUNT() > 0;
53-
ROW_COUNT() > 0
54-
1
55-
SELECT FOUND_ROWS() > 0;
56-
FOUND_ROWS() > 0
57-
1
58-
SELECT ROW_COUNT() > 0;
59-
ROW_COUNT() > 0
60-
1
61-
SELECT FOUND_ROWS() > 0;
62-
FOUND_ROWS() > 0
63-
1
64-
SELECT ROW_COUNT() > 0;
65-
ROW_COUNT() > 0
66-
1
67-
SELECT FOUND_ROWS() > 0;
68-
FOUND_ROWS() > 0
69-
1
70-
SELECT ROW_COUNT() > 0;
71-
ROW_COUNT() > 0
72-
1
73-
SELECT FOUND_ROWS() > 0;
74-
FOUND_ROWS() > 0
75-
1
7616
SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
7717
VARIABLE_VALUE > 0
7818
1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--wsrep-retry-autocommit=0

mysql-test/suite/galera/t/MW-329.test

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ DELIMITER ;|
3131

3232
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
3333
--connection node_1b
34+
--let $connection_id = `SELECT CONNECTION_ID()`
3435
--send CALL proc_insert();
3536

3637
#
@@ -44,10 +45,15 @@ while ($count)
4445
{
4546
--let $signature = `SELECT LEFT(MD5(RAND()), 10)`
4647
--disable_query_log
48+
--error 0,ER_LOCK_DEADLOCK
4749
--eval UPDATE t1 SET f2 = '$signature'
4850
--enable_query_log
49-
SELECT ROW_COUNT() > 0;
50-
SELECT FOUND_ROWS() > 0;
51+
--let $row_count = `SELECT ROW_COUNT()`
52+
if (`SELECT @@error_count = 0`) {
53+
if (`SELECT $row_count = 0`) {
54+
--die ROW_COUNT() = 0
55+
}
56+
}
5157
--dec $count
5258
}
5359

@@ -57,5 +63,19 @@ while ($count)
5763

5864
SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
5965

66+
#
67+
# Terminate the stored procedure
68+
#
69+
70+
--connection node_1
71+
--disable_query_log
72+
--eval KILL CONNECTION $connection_id
73+
--enable_query_log
74+
75+
--connection node_1b
76+
--error 0,2013,1317
77+
--reap
78+
79+
--connection node_1
6080
DROP PROCEDURE proc_insert;
6181
DROP TABLE t1;

0 commit comments

Comments
 (0)