Commit fe6ebb65 authored by Philip Stoev's avatar Philip Stoev Committed by Nirbhay Choubey

Refs: MW-252 MTR tests for FTWRL and desync

parent a03c45fa
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;
......@@ -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;
......@@ -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);
......
......@@ -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");
#
# 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;
......@@ -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");
......
......@@ -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
......
......@@ -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");
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