Commit e55c303c authored by Jan Lindström's avatar Jan Lindström

Add wait_condition before problematic select

parent 69bd2c88
...@@ -33,7 +33,6 @@ galera_pc_recovery : MDEV-25199 cluster fails to start up ...@@ -33,7 +33,6 @@ galera_pc_recovery : MDEV-25199 cluster fails to start up
galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting
galera_toi_truncate : MDEV-22996 Hang on galera_toi_truncate test case 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_node_address : MDEV-20485 Galera test failure
galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
galera_var_reject_queries : assertion in inline_mysql_socket_send galera_var_reject_queries : assertion in inline_mysql_socket_send
......
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep_debug=1
[mysqld.2]
wsrep_debug=1
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# #
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc
# #
...@@ -73,11 +72,15 @@ SET GLOBAL wsrep_on = ON; ...@@ -73,11 +72,15 @@ SET GLOBAL wsrep_on = ON;
DELETE FROM t1 WHERE f1 = 1; DELETE FROM t1 WHERE f1 = 1;
--connection node_1 --connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_0 FROM t1; SELECT COUNT(*) as expect_0 FROM t1;
--connection node_2 --connection node_2
--source include/galera_wait_ready.inc --source include/galera_wait_ready.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc --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; SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1; DROP TABLE t1;
...@@ -97,11 +100,15 @@ DELETE FROM t1 WHERE f1 = 2; ...@@ -97,11 +100,15 @@ DELETE FROM t1 WHERE f1 = 2;
COMMIT; COMMIT;
--connection node_1 --connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_1 FROM t1; SELECT COUNT(*) as expect_1 FROM t1;
--connection node_2 --connection node_2
--source include/galera_wait_ready.inc --source include/galera_wait_ready.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc --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; SELECT COUNT(*) as expect_1 FROM t1;
DROP TABLE t1; DROP TABLE t1;
...@@ -132,6 +139,8 @@ SELECT COUNT(*) as expect_0 FROM 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'; --let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc --source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; 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; SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1; DROP TABLE t1;
...@@ -171,6 +180,8 @@ SELECT COUNT(*) as expect_0 FROM 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'; --let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc --source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; 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; SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1; DROP TABLE t1;
...@@ -205,6 +216,8 @@ SELECT COUNT(*) as expect_0 FROM 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'; --let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc --source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; 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; SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1,t2; DROP TABLE t1,t2;
...@@ -239,6 +252,10 @@ SELECT COUNT(*) as expect_0 FROM child; ...@@ -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'; --let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc --source include/wait_condition.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; 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 parent;
SELECT COUNT(*) as expect_0 FROM child; SELECT COUNT(*) as expect_0 FROM child;
DROP TABLE child, parent; DROP TABLE child, parent;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment