summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/galera/t')
-rw-r--r--mysql-test/suite/galera/t/MW-284.cnf1
-rw-r--r--mysql-test/suite/galera/t/MW-284.test57
-rw-r--r--mysql-test/suite/galera/t/create.test31
-rw-r--r--mysql-test/suite/galera/t/galera_var_sync_wait.test7
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#237.test1
5 files changed, 97 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/MW-284.cnf b/mysql-test/suite/galera/t/MW-284.cnf
new file mode 100644
index 00000000000..52fd3093931
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-284.cnf
@@ -0,0 +1 @@
+!include ../galera_2nodes_as_master.cnf
diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test
new file mode 100644
index 00000000000..5998e22ed1e
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-284.test
@@ -0,0 +1,57 @@
+#
+# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--disable_query_log
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root', MASTER_CONNECT_RETRY=1;
+--enable_query_log
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+SET SESSION wsrep_on = OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'
+--source include/wait_condition.inc
+SET SESSION wsrep_on = ON;
+
+--connection node_3
+START SLAVE;
+--sleep 1
+--let $slave_param= Slave_IO_Running
+--let $slave_param_value= Connecting
+--source include/wait_for_slave_param.inc
+
+--connection node_1
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+
+# We expect the slave to reconnect and resume replication
+
+--connection node_3
+--source include/wait_for_slave_to_start.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1
+--source include/wait_condition.inc
+
+# Cleanup
+
+--connection node_1
+DROP TABLE t1;
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+
+STOP SLAVE;
+RESET SLAVE ALL;
+
+CALL mtr.add_suppression('failed registering on master');
diff --git a/mysql-test/suite/galera/t/create.test b/mysql-test/suite/galera/t/create.test
index fb9b0935288..96a6640c21f 100644
--- a/mysql-test/suite/galera/t/create.test
+++ b/mysql-test/suite/galera/t/create.test
@@ -54,5 +54,36 @@ SHOW CREATE TABLE t2;
# Cleanup
DROP TABLE t1, t2;
+--echo #
+--echo # MDEV-9853: WSREP says it cannot get fake InnoDB transaction ID
+--echo # followed by segmentation fault
+--echo #
+CREATE TABLE `t1`(`c1` INT) ENGINE=INNODB;
+
+SET autocommit=0;
+CREATE TABLE `t2` (`c1` INT) ENGINE=INNODB SELECT * FROM t1;
+COMMIT;
+SET autocommit=1;
+
+# Cleanup
+DROP TABLE t1, t2;
+
+
+--echo #
+--echo # MDEV-10235: Deadlock in CREATE TABLE ... AS SELECT .. if result set
+--echo # is empty in Galera
+--echo #
+--connection node_1
+CREATE TABLE t1(c1 INT) ENGINE=INNODB;
+INSERT INTO t1 VALUES(1);
+CREATE TABLE t2 AS SELECT * FROM t1 WHERE c1=2;
+
+--connection node_2
+SELECT * FROM t1;
+SELECT * FROM t2;
+# Cleanup
+DROP TABLE t1, t2;
+
+--source include/galera_end.inc
--echo # End of tests
diff --git a/mysql-test/suite/galera/t/galera_var_sync_wait.test b/mysql-test/suite/galera/t/galera_var_sync_wait.test
index 935c271a4d6..288ad62226f 100644
--- a/mysql-test/suite/galera/t/galera_var_sync_wait.test
+++ b/mysql-test/suite/galera/t/galera_var_sync_wait.test
@@ -5,6 +5,13 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--echo #
+--echo # MDEV-10161: wsrep_sync_wait not enabled when set to 1 in config file
+--echo #
+# galera_2nodes.cnf sets wsrep_sync_wait to 7
+SELECT @@global.wsrep_sync_wait;
+SELECT @@global.wsrep_causal_reads;
+
--let $wsrep_sync_wait_orig = `SELECT @@wsrep_sync_wait`
--connection node_1
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#237.test b/mysql-test/suite/galera/t/mysql-wsrep#237.test
index f2dd6bce711..cba8dfeb275 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#237.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#237.test
@@ -28,6 +28,7 @@ SET DEBUG_SYNC= 'now SIGNAL continue';
--connection node_1
--reap
+# Cleanup
DROP TABLE t;
--connection node_1a
SET DEBUG_SYNC= 'RESET';