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

MDEV-29882 : Galera test failure on galera_sr_cc_master

Test case changes only to wait expected membership and
streaming replication status.
Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
parent c712a530
...@@ -11,4 +11,3 @@ ...@@ -11,4 +11,3 @@
############################################################################## ##############################################################################
GCF-1060 : MDEV-32160 GCF-1060 test failure due to wsrep MDL conflict GCF-1060 : MDEV-32160 GCF-1060 test failure due to wsrep MDL conflict
galera_sr_cc_master : MDEV-29882 Galera test failure on galera_sr_cc_master
...@@ -13,12 +13,12 @@ INSERT INTO t1 VALUES (2); ...@@ -13,12 +13,12 @@ INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5); INSERT INTO t1 VALUES (5);
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
COUNT(*) EXPECT_5
5 5
connection node_1; connection node_1;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
COUNT(*) EXPECT_5
5 5
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a; connection node_2a;
...@@ -29,8 +29,8 @@ connection node_2; ...@@ -29,8 +29,8 @@ connection node_2;
INSERT INTO t1 VALUES (6); INSERT INTO t1 VALUES (6);
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
connection node_1; connection node_1;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
COUNT(*) EXPECT_0
0 0
connection node_2a; connection node_2a;
connection node_1; connection node_1;
...@@ -38,8 +38,8 @@ connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2; ...@@ -38,8 +38,8 @@ connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2b; connection node_2b;
SELECT * FROM mysql.wsrep_streaming_log; SELECT * FROM mysql.wsrep_streaming_log;
node_uuid trx_id seqno flags frag node_uuid trx_id seqno flags frag
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
COUNT(*) EXPECT_0
0 0
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -49,18 +49,20 @@ INSERT INTO t1 VALUES (3); ...@@ -49,18 +49,20 @@ INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5); INSERT INTO t1 VALUES (5);
COMMIT; COMMIT;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
COUNT(*) EXPECT_0
0 0
connection node_1; connection node_1;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) AS EXPECT_5 FROM t1;
COUNT(*) EXPECT_5
5 5
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
COUNT(*) EXPECT_0
0 0
DROP TABLE t1; DROP TABLE t1;
connection node_2b; connection node_2b;
CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for"); CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
disconnect node_2; disconnect node_2;
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2; connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
disconnect node_2a;
disconnect node_2b;
...@@ -28,10 +28,13 @@ INSERT INTO t1 VALUES (3); ...@@ -28,10 +28,13 @@ INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5); INSERT INTO t1 VALUES (5);
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
--connection node_1 --connection node_1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; --let $wait_condition = SELECT COUNT(*) = 5 FROM mysql.wsrep_streaming_log
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
# #
# Trigger CC . The transaction is aborted and we expect the SR tables to be cleaned up # Trigger CC . The transaction is aborted and we expect the SR tables to be cleaned up
...@@ -52,7 +55,9 @@ SET SESSION wsrep_sync_wait = DEFAULT; ...@@ -52,7 +55,9 @@ SET SESSION wsrep_sync_wait = DEFAULT;
INSERT INTO t1 VALUES (6); INSERT INTO t1 VALUES (6);
--connection node_1 --connection node_1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; --let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
# Restore cluster # Restore cluster
...@@ -69,8 +74,10 @@ SELECT COUNT(*) FROM mysql.wsrep_streaming_log; ...@@ -69,8 +74,10 @@ SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2 --connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2b --connection node_2b
--source include/galera_wait_ready.inc --source include/galera_wait_ready.inc
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
--source include/wait_condition.inc
SELECT * FROM mysql.wsrep_streaming_log; SELECT * FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
# Repeat transaction to confirm no locks are left from previous transaction # Repeat transaction to confirm no locks are left from previous transaction
...@@ -83,11 +90,13 @@ INSERT INTO t1 VALUES (4); ...@@ -83,11 +90,13 @@ INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5); INSERT INTO t1 VALUES (5);
COMMIT; COMMIT;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_1 --connection node_1
SELECT COUNT(*) FROM t1; --let $wait_condition = SELECT COUNT(*) = 5 FROM t1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log; --source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_5 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
DROP TABLE t1; DROP TABLE t1;
...@@ -98,3 +107,6 @@ CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for"); ...@@ -98,3 +107,6 @@ CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2 --connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
# Restore original auto_increment_offset values. # Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc --source ../galera/include/auto_increment_offset_restore.inc
--disconnect node_2a
--disconnect node_2b
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