summaryrefslogtreecommitdiff
path: root/mysql-test/r/create.result
diff options
context:
space:
mode:
authorMagne Mahre <magne.mahre@sun.com>2010-05-05 23:28:58 +0200
committerMagne Mahre <magne.mahre@sun.com>2010-05-05 23:28:58 +0200
commit24a14875bc19d2959393aec9dbfe4b098b73b592 (patch)
tree93403e47238694206d2f6d8c6fe21f5e0cadb8b3 /mysql-test/r/create.result
parent1cf9861f86cdc13de6e9fcc48af1f4de5bd41572 (diff)
downloadmariadb-git-24a14875bc19d2959393aec9dbfe4b098b73b592.tar.gz
Bug#49193 CREATE TABLE reacts differently depending on whether
data is selected or not Temporary and permanent tables should live in different namespaces. In this case, resolving a permanent table name gave the temporary table, resulting in a name collision.
Diffstat (limited to 'mysql-test/r/create.result')
-rw-r--r--mysql-test/r/create.result41
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 49597caa027..e37f9d580ba 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1992,3 +1992,44 @@ CREATE TABLE t4 AS SELECT 1;
DROP TEMPORARY TABLE t1, t2, t3, t4;
DROP TABLE t1, t3, t4;
DROP VIEW t2;
+#
+# Bug #49193 CREATE TABLE reacts differently depending
+# on whether data is selected or not
+#
+CREATE TEMPORARY TABLE t2 (ID INT);
+INSERT INTO t2 VALUES (1),(2),(3);
+CREATE TEMPORARY TABLE t1 (ID INT);
+CREATE TABLE IF NOT EXISTS t1 (ID INT);
+INSERT INTO t1 SELECT * FROM t2;
+SELECT * FROM t1;
+ID
+1
+2
+3
+DROP TEMPORARY TABLE t1;
+SELECT * FROM t1;
+ID
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (ID INT);
+CREATE TABLE IF NOT EXISTS t1 SELECT * FROM t2;
+SELECT * FROM t1;
+ID
+DROP TEMPORARY TABLE t1;
+SELECT * FROM t1;
+ID
+1
+2
+3
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (ID INT);
+CREATE TABLE t1 SELECT * FROM t2;
+SELECT * FROM t1;
+ID
+DROP TEMPORARY TABLE t1;
+SELECT * FROM t1;
+ID
+1
+2
+3
+DROP TABLE t1;
+DROP TEMPORARY TABLE t2;