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

MDEV-24165 : Galera test failure on galera_var_ignore_apply_errors

Add wait conditions.
parent bbf0b55c
...@@ -75,6 +75,9 @@ DELETE FROM t1 WHERE f1 = 1; ...@@ -75,6 +75,9 @@ DELETE FROM t1 WHERE f1 = 1;
--connection node_1 --connection node_1
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
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--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;
...@@ -96,6 +99,9 @@ COMMIT; ...@@ -96,6 +99,9 @@ COMMIT;
--connection node_1 --connection node_1
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
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--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;
...@@ -120,6 +126,11 @@ DELETE FROM t1; ...@@ -120,6 +126,11 @@ DELETE FROM t1;
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
--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 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'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT COUNT(*) as expect_0 FROM t1; SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1; DROP TABLE t1;
...@@ -154,6 +165,11 @@ SET AUTOCOMMIT=ON; ...@@ -154,6 +165,11 @@ SET AUTOCOMMIT=ON;
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
--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 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'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT COUNT(*) as expect_0 FROM t1; SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1; DROP TABLE t1;
...@@ -183,6 +199,11 @@ DELETE t1, t2 FROM t1 JOIN t2 WHERE t1.f1 = t2.f1; ...@@ -183,6 +199,11 @@ DELETE t1, t2 FROM t1 JOIN t2 WHERE t1.f1 = t2.f1;
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
--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 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'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT COUNT(*) as expect_0 FROM t1; SELECT COUNT(*) as expect_0 FROM t1;
DROP TABLE t1,t2; DROP TABLE t1,t2;
...@@ -212,6 +233,11 @@ SELECT COUNT(*) as expect_0 FROM parent; ...@@ -212,6 +233,11 @@ SELECT COUNT(*) as expect_0 FROM parent;
SELECT COUNT(*) as expect_0 FROM child; SELECT COUNT(*) as expect_0 FROM child;
--connection node_2 --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 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'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
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;
......
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