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

MDEV-19156: Galera test failure on galerra_sr_cc_master

Test cleanup and fix.
parent 268d46b8
connection node_2;
connection node_1;
CALL mtr.add_suppression("WSREP: discarding established.*");
connection node_1;
connection node_2;
connection node_2;
......@@ -12,13 +13,13 @@ INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
COUNT(*) > 0
1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
5
connection node_1;
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
COUNT(*) > 0
1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
5
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
SET SESSION wsrep_sync_wait=0;
......@@ -28,18 +29,18 @@ connection node_2;
INSERT INTO t1 VALUES (6);
ERROR HY000: Lost connection to MySQL server during query
connection node_1;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
0
connection node_2a;
connection node_1;
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2b;
SELECT * FROM mysql.wsrep_streaming_log;
node_uuid trx_id seqno flags frag
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
0
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
......@@ -48,16 +49,16 @@ INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
COMMIT;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
0
connection node_1;
SELECT COUNT(*) = 5 FROM t1;
COUNT(*) = 5
1
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
5
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
0
DROP TABLE t1;
connection node_2b;
CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
......
......@@ -7,6 +7,8 @@
# leave the cluster.
#
CALL mtr.add_suppression("WSREP: discarding established.*");
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
......@@ -26,10 +28,10 @@ INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
--connection node_1
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
#
# Trigger CC . The transaction is aborted and we expect the SR tables to be cleaned up
......@@ -50,7 +52,7 @@ SET SESSION wsrep_sync_wait = DEFAULT;
INSERT INTO t1 VALUES (6);
--connection node_1
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
# Restore cluster
......@@ -68,7 +70,7 @@ SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
--connection node_2b
--source include/galera_wait_ready.inc
SELECT * FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
# Repeat transaction to confirm no locks are left from previous transaction
......@@ -81,11 +83,11 @@ INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
COMMIT;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
--connection node_1
SELECT COUNT(*) = 5 FROM t1;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
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