summaryrefslogtreecommitdiff
path: root/mysql-test/t/merge.test
diff options
context:
space:
mode:
authorunknown <istruewing@stella.local>2007-10-09 13:10:51 +0200
committerunknown <istruewing@stella.local>2007-10-09 13:10:51 +0200
commit0c0042a5de8df6a26fa70d52e10ace7dde3e43b3 (patch)
tree85848eb7a2ba7a6ce604659549eba981aff99381 /mysql-test/t/merge.test
parentd1210318db1c23f084d5aa41f9abf16e82b13d8f (diff)
downloadmariadb-git-0c0042a5de8df6a26fa70d52e10ace7dde3e43b3.tar.gz
Bug#15522 - create ... select and with merge tables
Added test case. The fix for Bug#20662 does also fix this one. mysql-test/r/merge.result: Bug#15522 - create ... select and with merge tables Added test result. mysql-test/t/merge.test: Bug#15522 - create ... select and with merge tables Added test case.
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r--mysql-test/t/merge.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index c3e5cef5e63..b5c1a01fe8e 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -507,4 +507,18 @@ SELECT * FROM tm1;
CHECK TABLE tm1;
DROP TABLE tm1, t1, t2;
+#
+# Bug#15522 - create ... select and with merge tables
+#
+# This was fixed together with Bug#20662 (Infinite loop in CREATE TABLE
+# IF NOT EXISTS ... SELECT with locked tables).
+# The new behavior for MERGE tables is consistent with the
+# CREATE TABLE SELECT behavior for ordinary tables.
+#
+CREATE TABLE t1(c1 INT);
+CREATE TABLE t2 (c1 INT) ENGINE=MERGE UNION=(t1) INSERT_METHOD=FIRST;
+--error ER_UPDATE_TABLE_USED
+CREATE TABLE IF NOT EXISTS t1 SELECT * FROM t2;
+DROP TABLE t1, t2;
+
--echo End of 5.0 tests