List:Commits« Previous MessageNext Message »
From:Ingo Struewing Date:October 9 2007 11:10am
Subject:bk commit into 5.0 tree (istruewing:1.2531) BUG#15522
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of istruewing. When istruewing does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-10-09 13:10:51+02:00, istruewing@stripped +2 -0
  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@stripped, 2007-10-09 13:10:50+02:00, istruewing@stripped +5 -0
    Bug#15522 - create ... select and with merge tables
    Added test result.

  mysql-test/t/merge.test@stripped, 2007-10-09 13:10:50+02:00, istruewing@stripped +14 -0
    Bug#15522 - create ... select and with merge tables
    Added test case.

diff -Nrup a/mysql-test/r/merge.result b/mysql-test/r/merge.result
--- a/mysql-test/r/merge.result	2007-06-14 13:18:00 +02:00
+++ b/mysql-test/r/merge.result	2007-10-09 13:10:50 +02:00
@@ -876,4 +876,9 @@ CHECK TABLE tm1;
 Table	Op	Msg_type	Msg_text
 test.tm1	check	status	OK
 DROP TABLE tm1, t1, t2;
+CREATE TABLE t1(c1 INT);
+CREATE TABLE t2 (c1 INT) ENGINE=MERGE UNION=(t1) INSERT_METHOD=FIRST;
+CREATE TABLE IF NOT EXISTS t1 SELECT * FROM t2;
+ERROR HY000: You can't specify target table 't1' for update in FROM clause
+DROP TABLE t1, t2;
 End of 5.0 tests
diff -Nrup a/mysql-test/t/merge.test b/mysql-test/t/merge.test
--- a/mysql-test/t/merge.test	2007-06-06 01:42:39 +02:00
+++ b/mysql-test/t/merge.test	2007-10-09 13:10:50 +02:00
@@ -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
Thread
bk commit into 5.0 tree (istruewing:1.2531) BUG#15522Ingo Struewing9 Oct