summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/maria')
-rw-r--r--mysql-test/suite/maria/alter.result14
-rw-r--r--mysql-test/suite/maria/alter.test21
-rw-r--r--mysql-test/suite/maria/kill.result13
-rw-r--r--mysql-test/suite/maria/kill.test14
4 files changed, 58 insertions, 4 deletions
diff --git a/mysql-test/suite/maria/alter.result b/mysql-test/suite/maria/alter.result
index c2ddc813cdc..4e6f21b70a7 100644
--- a/mysql-test/suite/maria/alter.result
+++ b/mysql-test/suite/maria/alter.result
@@ -90,3 +90,17 @@ check table t2;
Table Op Msg_type Msg_text
test.t2 check status OK
DROP TABLE t1,t2;
+#
+# MDEV-17576
+# Assertion `share->reopen == 1' failed in maria_extra upon ALTER on
+# Aria table with triggers and locks
+#
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t1 SELECT * FROM t1;
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 FORCE, LOCK=EXCLUSIVE;
+DROP TRIGGER tr;
+DROP TABLE t1;
+#
+# End of 10.2 test
+#
diff --git a/mysql-test/suite/maria/alter.test b/mysql-test/suite/maria/alter.test
index ef21ab2e5d2..31eeac1df87 100644
--- a/mysql-test/suite/maria/alter.test
+++ b/mysql-test/suite/maria/alter.test
@@ -11,7 +11,7 @@ drop table if exists t1;
CREATE TABLE t1 (pk INT, d DATETIME, PRIMARY KEY(pk), KEY(d)) ENGINE=Aria;
ALTER TABLE t1 DISABLE KEYS;
INSERT INTO t1 VALUES (1,'2000-01-01 22:22:22'),(2,'2012-12-21 12:12:12');
-INSERT INTO t1 VALUES (3, '2008-07-24');
+INSERT INTO t1 VALUES (3, '2008-07-24');
ALTER TABLE t1 ENABLE KEYS;
SELECT t1a.pk FROM t1 AS t1a LEFT JOIN t1 AS t1b ON t1a.pk = t1b.pk;
@@ -74,6 +74,19 @@ check table t1;
check table t2;
DROP TABLE t1,t2;
-#
-# End of 10.2 tests
-#
+--echo #
+--echo # MDEV-17576
+--echo # Assertion `share->reopen == 1' failed in maria_extra upon ALTER on
+--echo # Aria table with triggers and locks
+--echo #
+
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t1 SELECT * FROM t1;
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 FORCE, LOCK=EXCLUSIVE;
+DROP TRIGGER tr;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.2 test
+--echo #
diff --git a/mysql-test/suite/maria/kill.result b/mysql-test/suite/maria/kill.result
new file mode 100644
index 00000000000..5e75e75a41a
--- /dev/null
+++ b/mysql-test/suite/maria/kill.result
@@ -0,0 +1,13 @@
+#
+# MDEV-14996
+# Assertion `!thd->get_stmt_da()->is_sent() ||
+# thd->killed == KILL_CONNECTION' failed in ha_maria::external_lock
+#
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+connect con1,localhost,root,,;
+FLUSH TABLE t1 FOR EXPORT;
+KILL CONNECTION_ID();
+ERROR 70100: Connection was killed
+disconnect con1;
+connection default;
+DROP TABLE t1;
diff --git a/mysql-test/suite/maria/kill.test b/mysql-test/suite/maria/kill.test
new file mode 100644
index 00000000000..98a588a6698
--- /dev/null
+++ b/mysql-test/suite/maria/kill.test
@@ -0,0 +1,14 @@
+--echo #
+--echo # MDEV-14996
+--echo # Assertion `!thd->get_stmt_da()->is_sent() ||
+--echo # thd->killed == KILL_CONNECTION' failed in ha_maria::external_lock
+--echo #
+
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+--connect (con1,localhost,root,,)
+FLUSH TABLE t1 FOR EXPORT;
+--error ER_CONNECTION_KILLED
+KILL CONNECTION_ID();
+--disconnect con1
+--connection default
+DROP TABLE t1;