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.test17
1 files changed, 16 insertions, 1 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index 33282348325..f8bed9c92cd 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -392,4 +392,19 @@ create table tm (b bit(1)) engine = merge union = (t1,t2);
select * from tm;
drop table tm, t1, t2;
-# End of 5.0 tests
+#
+# Bug #17766: The server accepts to create MERGE tables which cannot work
+#
+create table t1 (a int) insert_method = last engine = merge;
+--error ER_OPEN_AS_READONLY
+insert into t1 values (1);
+create table t2 (a int) engine = myisam;
+alter table t1 union (t2);
+insert into t1 values (1);
+alter table t1 insert_method = no;
+--error ER_OPEN_AS_READONLY
+insert into t1 values (1);
+drop table t2;
+drop table t1;
+
+--echo End of 5.0 tests