List:Commits« Previous MessageNext Message »
From:Magne Mahre Date:May 5 2010 10:17am
Subject:bzr commit into mysql-trunk-runtime branch (magne.mahre:3012) Bug#48800
View as plain text  
#At file:///export/home/tmp/z/mysql-trunk-runtime/ based on revid:jon.hauglid@stripped

 3012 Magne Mahre	2010-05-05
      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.

    modified:
      mysql-test/r/create.result
      mysql-test/t/create.test
=== modified file 'mysql-test/r/create.result'
--- a/mysql-test/r/create.result	2010-02-27 07:43:32 +0000
+++ b/mysql-test/r/create.result	2010-05-05 10:17:07 +0000
@@ -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;

=== modified file 'mysql-test/t/create.test'
--- a/mysql-test/t/create.test	2010-02-06 10:28:06 +0000
+++ b/mysql-test/t/create.test	2010-05-05 10:17:07 +0000
@@ -1668,3 +1668,25 @@ CREATE TABLE t1 LIKE t2;
 
 DROP TABLE t2;
 DROP TABLE t1;
+
+--echo #
+--echo # Bug #48800 CREATE TABLE t...SELECT fails if t is a 
+--echo #            temporary table
+--echo #
+
+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;
+


Attachment: [text/bzr-bundle] bzr/magne.mahre@sun.com-20100505101707-hbuahi9sq2zgobai.bundle
Thread
bzr commit into mysql-trunk-runtime branch (magne.mahre:3012) Bug#48800Magne Mahre5 May