summaryrefslogtreecommitdiff
path: root/mysql-test/t/merge.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r--mysql-test/t/merge.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index f0d8960322e..4035752b72d 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -2089,5 +2089,24 @@ execute stmt;
execute stmt;
drop table t4, t3, t2, t1;
+
+--echo #
+--echo # Bug#51240 ALTER TABLE of a locked MERGE table fails
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS m1, t1;
+--enable_warnings
+
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1);
+LOCK TABLE m1 WRITE;
+# This used to cause an error.
+ALTER TABLE m1 ADD INDEX (c1);
+
+UNLOCK TABLES;
+DROP TABLE m1, t1;
+
+
--echo End of 6.0 tests