Add wait_condition before problematic select

This commit is contained in:
Jan Lindström 2021-09-24 11:11:57 +03:00
parent 69bd2c88e1
commit e55c303cc5
3 changed files with 25 additions and 2 deletions

View file

@ -33,7 +33,6 @@ galera_pc_recovery : MDEV-25199 cluster fails to start up
galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting
galera_toi_truncate : MDEV-22996 Hang on galera_toi_truncate test case
galera_var_ignore_apply_errors : MDEV-20451: Lock wait timeout exceeded in galera_var_ignore_apply_errors
galera_var_node_address : MDEV-20485 Galera test failure
galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
galera_var_reject_queries : assertion in inline_mysql_socket_send

View file

@ -0,0 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep_debug=1
[mysqld.2]
wsrep_debug=1

View file

@ -3,7 +3,6 @@
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
#
@ -73,11 +72,15 @@ SET GLOBAL wsrep_on = ON;
DELETE FROM t1 WHERE f1 = 1;
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_0 FROM t1;
--connection node_2
--source include/galera_wait_ready.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1;
@ -97,11 +100,15 @@ DELETE FROM t1 WHERE f1 = 2;
COMMIT;
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_1 FROM t1;
--connection node_2
--source include/galera_wait_ready.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_1 FROM t1;
DROP TABLE t1;
@ -132,6 +139,8 @@ SELECT COUNT(*) as expect_0 FROM t1;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1;
@ -171,6 +180,8 @@ SELECT COUNT(*) as expect_0 FROM t1;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1;
@ -205,6 +216,8 @@ SELECT COUNT(*) as expect_0 FROM t1;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1,t2;
@ -239,6 +252,10 @@ SELECT COUNT(*) as expect_0 FROM child;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--let $wait_condition = SELECT COUNT(*) = 0 FROM parent;
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 0 FROM child;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_0 FROM parent;
SELECT COUNT(*) as expect_0 FROM child;
DROP TABLE child, parent;