diff options
author | Philip Stoev <philip.stoev@galeracluster.com> | 2016-03-01 08:32:06 -0800 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-21 16:17:03 -0400 |
commit | fe6ebb657ea02fcb5993ca5d503161056c5a5b86 (patch) | |
tree | 53ca6734716d876ddfff2b0ef949371e1a35bb33 | |
parent | a03c45fa980ab170cd509d10923916aa9d9c4f86 (diff) | |
download | mariadb-git-fe6ebb657ea02fcb5993ca5d503161056c5a5b86.tar.gz |
Refs: MW-252 MTR tests for FTWRL and desync
8 files changed, 58 insertions, 4 deletions
diff --git a/mysql-test/suite/galera/r/MW-252.result b/mysql-test/suite/galera/r/MW-252.result new file mode 100644 index 00000000000..c422edcb82a --- /dev/null +++ b/mysql-test/suite/galera/r/MW-252.result @@ -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; diff --git a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result index fd20f8db2f9..365ea31f292 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result +++ b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result @@ -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; diff --git a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result index ad60ead4b8a..9463b5f8eef 100644 --- a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result +++ b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result @@ -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); diff --git a/mysql-test/suite/galera/r/galera_var_desync_on.result b/mysql-test/suite/galera/r/galera_var_desync_on.result index 0b5f34688b7..f286ae72308 100644 --- a/mysql-test/suite/galera/r/galera_var_desync_on.result +++ b/mysql-test/suite/galera/r/galera_var_desync_on.result @@ -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"); diff --git a/mysql-test/suite/galera/t/MW-252.test b/mysql-test/suite/galera/t/MW-252.test new file mode 100644 index 00000000000..3137aea7011 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-252.test @@ -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; diff --git a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test index 5914e52d851..46a93458271 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test +++ b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test @@ -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"); diff --git a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test index fd77ec0a0eb..721d84ecb05 100644 --- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test +++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test @@ -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 diff --git a/mysql-test/suite/galera/t/galera_var_desync_on.test b/mysql-test/suite/galera/t/galera_var_desync_on.test index fb0fb9f762a..06c5d30a769 100644 --- a/mysql-test/suite/galera/t/galera_var_desync_on.test +++ b/mysql-test/suite/galera/t/galera_var_desync_on.test @@ -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"); |