diff options
author | unknown <istruewing@stella.local> | 2007-10-10 16:52:56 +0200 |
---|---|---|
committer | unknown <istruewing@stella.local> | 2007-10-10 16:52:56 +0200 |
commit | 4273430f1c5f78473a55112c3ace7a9c9cf3c58c (patch) | |
tree | a12ff310cff608c044954282c328e63a36e96ec4 | |
parent | d67410b57d04755d8e0877990e75fb4aae7d16da (diff) | |
parent | 0249c0a54002052cf19331b2fb3eedccfd930682 (diff) | |
download | mariadb-git-4273430f1c5f78473a55112c3ace7a9c9cf3c58c.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into stella.local:/home2/mydev/mysql-5.1-bug15522
-rw-r--r-- | mysql-test/r/merge.result | 5 | ||||
-rw-r--r-- | mysql-test/t/merge.test | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 5aa4288500c..d6e19107ec4 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -879,4 +879,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 --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index fd479276b3b..a50588b1e78 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -511,4 +511,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 |