1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-12 12:25:37 +03:00

MDEV-19156: Galera test failure on galerra_sr_cc_master

Test cleanup and fix.
This commit is contained in:
Jan Lindström
2019-04-03 09:23:29 +03:00
parent 268d46b87d
commit afca4a3a34
2 changed files with 31 additions and 28 deletions

View File

@@ -1,5 +1,6 @@
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");

View File

@@ -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;