Skip to content

Commit e55c303

Browse files
author
Jan Lindström
committed
Add wait_condition before problematic select
1 parent 69bd2c8 commit e55c303

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

mysql-test/suite/galera/disabled.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ galera_pc_recovery : MDEV-25199 cluster fails to start up
3333
galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
3434
galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting
3535
galera_toi_truncate : MDEV-22996 Hang on galera_toi_truncate test case
36-
galera_var_ignore_apply_errors : MDEV-20451: Lock wait timeout exceeded in galera_var_ignore_apply_errors
3736
galera_var_node_address : MDEV-20485 Galera test failure
3837
galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
3938
galera_var_reject_queries : assertion in inline_mysql_socket_send
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
!include ../galera_2nodes.cnf
2+
3+
[mysqld.1]
4+
wsrep_debug=1
5+
6+
[mysqld.2]
7+
wsrep_debug=1

mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44

55
--source include/galera_cluster.inc
6-
--source include/have_innodb.inc
76

87

98
#
@@ -73,11 +72,15 @@ SET GLOBAL wsrep_on = ON;
7372
DELETE FROM t1 WHERE f1 = 1;
7473

7574
--connection node_1
75+
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
76+
--source include/wait_condition.inc
7677
SELECT COUNT(*) as expect_0 FROM t1;
7778
--connection node_2
7879
--source include/galera_wait_ready.inc
7980
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
8081
--source include/wait_condition.inc
82+
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
83+
--source include/wait_condition.inc
8184
SELECT COUNT(*) as expect_0 FROM t1;
8285

8386
DROP TABLE t1;
@@ -97,11 +100,15 @@ DELETE FROM t1 WHERE f1 = 2;
97100
COMMIT;
98101

99102
--connection node_1
103+
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
104+
--source include/wait_condition.inc
100105
SELECT COUNT(*) as expect_1 FROM t1;
101106
--connection node_2
102107
--source include/galera_wait_ready.inc
103108
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
104109
--source include/wait_condition.inc
110+
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
111+
--source include/wait_condition.inc
105112
SELECT COUNT(*) as expect_1 FROM t1;
106113

107114
DROP TABLE t1;
@@ -132,6 +139,8 @@ SELECT COUNT(*) as expect_0 FROM t1;
132139
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
133140
--source include/wait_condition.inc
134141
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
142+
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
143+
--source include/wait_condition.inc
135144
SELECT COUNT(*) as expect_0 FROM t1;
136145
DROP TABLE t1;
137146

@@ -171,6 +180,8 @@ SELECT COUNT(*) as expect_0 FROM t1;
171180
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
172181
--source include/wait_condition.inc
173182
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
183+
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
184+
--source include/wait_condition.inc
174185
SELECT COUNT(*) as expect_0 FROM t1;
175186
DROP TABLE t1;
176187

@@ -205,6 +216,8 @@ SELECT COUNT(*) as expect_0 FROM t1;
205216
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
206217
--source include/wait_condition.inc
207218
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
219+
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
220+
--source include/wait_condition.inc
208221
SELECT COUNT(*) as expect_0 FROM t1;
209222
DROP TABLE t1,t2;
210223

@@ -239,6 +252,10 @@ SELECT COUNT(*) as expect_0 FROM child;
239252
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
240253
--source include/wait_condition.inc
241254
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
255+
--let $wait_condition = SELECT COUNT(*) = 0 FROM parent;
256+
--source include/wait_condition.inc
257+
--let $wait_condition = SELECT COUNT(*) = 0 FROM child;
258+
--source include/wait_condition.inc
242259
SELECT COUNT(*) as expect_0 FROM parent;
243260
SELECT COUNT(*) as expect_0 FROM child;
244261
DROP TABLE child, parent;

0 commit comments

Comments
 (0)