summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t/MDEV-22051.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/galera/t/MDEV-22051.test')
-rw-r--r--mysql-test/suite/galera/t/MDEV-22051.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/MDEV-22051.test b/mysql-test/suite/galera/t/MDEV-22051.test
new file mode 100644
index 00000000000..b7332c47d69
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22051.test
@@ -0,0 +1,33 @@
+#
+# If FTWRL is issued on node, DDL statement should report error back to
+# user.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+FLUSH TABLES WITH READ LOCK;
+
+--error ER_UNKNOWN_COM_ERROR
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+
+SET wsrep_OSU_method=RSU;
+--error ER_UNKNOWN_COM_ERROR
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+SET wsrep_OSU_method=TOI;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--error ER_UNKNOWN_COM_ERROR
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+
+--connection node_1
+UNLOCK TABLES;
+
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+
+FLUSH TABLES WITH READ LOCK;
+--error ER_CANT_UPDATE_WITH_READLOCK
+INSERT INTO t1 VALUES (1);
+UNLOCK TABLES;
+
+DROP TABLE t1;