1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

Refs: MW-252 MTR tests for FTWRL and desync

This commit is contained in:
Philip Stoev
2016-03-01 08:32:06 -08:00
committed by Nirbhay Choubey
parent a03c45fa98
commit fe6ebb657e
8 changed files with 58 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
FLUSH TABLES WITH READ LOCK;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
UNLOCK TABLES;
DROP TABLE t1;

View File

@@ -12,7 +12,7 @@ STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
CALL mtr.add_suppression("Send action {\\(nil\\), 328, TORDERED} returned -107 \\(Transport endpoint is not connected\\)");
CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
RESET MASTER;

View File

@@ -4,7 +4,7 @@ SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
FLUSH TABLES WITH READ LOCK;
LOCK TABLE t1 WRITE;
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);

View File

@@ -26,4 +26,6 @@ INSERT INTO t1 VALUES (11);
SELECT COUNT(*) = 11 FROM t1;
COUNT(*) = 11
1
CALL mtr.add_suppression("Protocol violation");
DROP TABLE t1;
CALL mtr.add_suppression("Protocol violation");

View File

@@ -0,0 +1,41 @@
#
# MW-252 - Check that FTWRL causes the node to become desynced
# and not subject to flow control
#
--source include/galera_cluster.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
FLUSH TABLES WITH READ LOCK;
# Node #1 is now desynced
--let $wait_condition = SELECT VARIABLE_VALUE = 'Donor/Desynced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
# Node #2 can issue updates without flow control kicking in
--connection node_2
--let $count = 100
--disable_query_log
while ($count)
{
INSERT INTO t1 VALUES (1);
--dec $count
}
--enable_query_log
# Restore cluster
--connection node_1
UNLOCK TABLES;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 100 FROM t1
--source include/wait_condition.inc
DROP TABLE t1;

View File

@@ -87,7 +87,7 @@ RESET SLAVE ALL;
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
CALL mtr.add_suppression("Send action {\\(nil\\), 328, TORDERED} returned -107 \\(Transport endpoint is not connected\\)");
CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");

View File

@@ -16,7 +16,7 @@ SELECT COUNT(*) = 1 FROM t1;
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
# Block the slave applier thread
FLUSH TABLES WITH READ LOCK;
LOCK TABLE t1 WRITE;
--connection node_1

View File

@@ -55,4 +55,8 @@ INSERT INTO t1 VALUES (11);
# Replication continues normally
SELECT COUNT(*) = 11 FROM t1;
CALL mtr.add_suppression("Protocol violation");
DROP TABLE t1;
--connection node_1
CALL mtr.add_suppression("Protocol violation");