summaryrefslogtreecommitdiff
path: root/mysql-test/r/create.result
diff options
context:
space:
mode:
authorMagne Mahre <magne.mahre@sun.com>2010-05-05 12:17:07 +0200
committerMagne Mahre <magne.mahre@sun.com>2010-05-05 12:17:07 +0200
commit1cf9861f86cdc13de6e9fcc48af1f4de5bd41572 (patch)
treed38f3ba61157ed0601cdd3c4db58d680e14b2169 /mysql-test/r/create.result
parent27da41cc2ed3177ba0f64a6bddf06f80060add14 (diff)
downloadmariadb-git-1cf9861f86cdc13de6e9fcc48af1f4de5bd41572.tar.gz
Bug#48800 CREATE TABLE t...SELECT fails if t is a temporary
table If a temporary table A exists, and a (permanent) table with the same name is attempted created with "CREATE TABLE ... AS SELECT", the create would fail with an error. 1050: Table 'A' already exists The error occured in MySQL 5.1 releases, but is not present in MySQL 5.5. This patch adds a regression test to ensure that the problem does not reoccur.
Diffstat (limited to 'mysql-test/r/create.result')
-rw-r--r--mysql-test/r/create.result15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index eb1437414e7..49597caa027 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1977,3 +1977,18 @@ CREATE TABLE t1 LIKE t2;
ERROR 42S01: Table 't1' already exists
DROP TABLE t2;
DROP TABLE t1;
+#
+# Bug #48800 CREATE TABLE t...SELECT fails if t is a
+# temporary table
+#
+CREATE TEMPORARY TABLE t1 (a INT);
+CREATE TABLE t1 (a INT);
+CREATE TEMPORARY TABLE t2 (a INT);
+CREATE VIEW t2 AS SELECT 1;
+CREATE TABLE t3 (a INT);
+CREATE TEMPORARY TABLE t3 SELECT 1;
+CREATE TEMPORARY TABLE t4 (a INT);
+CREATE TABLE t4 AS SELECT 1;
+DROP TEMPORARY TABLE t1, t2, t3, t4;
+DROP TABLE t1, t3, t4;
+DROP VIEW t2;