Commit f8fa3c55 authored by Jan Lindström's avatar Jan Lindström Committed by Julius Goryavsky

MDEV-33173 : Galera test case galera_sr_kill_slave_before_apply unstable

Add wait_condition to make sure tables are created before next
operations.
Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
parent ddb27a29
......@@ -7,11 +7,11 @@ connection node_3;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0
0
connection node_1;
CREATE TABLE t2 (f1 INTEGER);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
LOCK TABLE t2 WRITE;
connection node_1;
......@@ -37,12 +37,12 @@ count_match
count_match
1
connection node_1;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_2;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_1;
DROP TABLE t1;
......
......@@ -15,18 +15,23 @@
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
# Block node #2's applier before table t1's inserts have come into play
--connection node_2
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM t1;
--connection node_1
CREATE TABLE t2 (f1 INTEGER);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'
--source include/wait_condition.inc
LOCK TABLE t2 WRITE;
--connection node_1
......@@ -77,10 +82,10 @@ if ($mysql_errno == 1213) {
--enable_query_log
--connection node_1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_2
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_1
DROP TABLE t1;
......
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