summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-05-16 18:44:17 +0300
committerMichael Widenius <monty@askmonty.org>2012-05-16 18:44:17 +0300
commit6d8e329c9a1f1e80bd0e9bc30397aa8349aa7c70 (patch)
treedbb781cd1d0f004e75802a90e34a31353d1de5ae /mysql-test/suite
parentc17bace4f0d05a6852c465513005812e5dc35b6f (diff)
downloadmariadb-git-6d8e329c9a1f1e80bd0e9bc30397aa8349aa7c70.tar.gz
Fixed bug LP:973039 - Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE under LOCK
- 5.5 was missing calls to ha_extra(HA_PREPARE_FOR_DROP | HA_PREPARE_FOR_RENAME); Lost in merge 5.3 -> 5.5 sql/sql_admin.cc: Updated arguments for close_all_tables_for_name sql/sql_base.h: Updated arguments for close_all_tables_for_name sql/sql_partition.cc: Updated arguments for close_all_tables_for_name sql/sql_table.cc: Updated arguments for close_all_tables_for_name Removed test of kill, as we have already called 'ha_extra(HA_PREPARE_FOR_DROP)' and the table may be inconsistent. sql/sql_trigger.cc: Updated arguments for close_all_tables_for_name sql/sql_truncate.cc: For truncate that is done with drop + recreate, signal that the table will be dropped.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/maria/lock.result10
-rw-r--r--mysql-test/suite/maria/lock.test21
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/lock.result b/mysql-test/suite/maria/lock.result
new file mode 100644
index 00000000000..606cb5fed4d
--- /dev/null
+++ b/mysql-test/suite/maria/lock.result
@@ -0,0 +1,10 @@
+drop table if exists t1,t2;
+Warnings:
+Note 1051 Unknown table 't1'
+Note 1051 Unknown table 't2'
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+CREATE TABLE t2 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE, t2 WRITE;
+DROP TABLE t1;
+UNLOCK TABLES;
+DROP TABLE t2;
diff --git a/mysql-test/suite/maria/lock.test b/mysql-test/suite/maria/lock.test
new file mode 100644
index 00000000000..564cf965d17
--- /dev/null
+++ b/mysql-test/suite/maria/lock.test
@@ -0,0 +1,21 @@
+#
+# Testing of potential problems in Aria with locking
+#
+
+-- source include/have_maria.inc
+
+drop table if exists t1,t2;
+
+#
+# Test for Bug#973039
+# Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE
+# under LOCK
+#
+
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+CREATE TABLE t2 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE, t2 WRITE;
+# Also fails with FLUSH TABLE t1 and with REPAIR TABLE t1 USE_FRM
+DROP TABLE t1;
+UNLOCK TABLES;
+DROP TABLE t2;