Loading mysql-test/r/merge.result +5 −0 Original line number Diff line number Diff line Loading @@ -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 mysql-test/t/merge.test +14 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
mysql-test/r/merge.result +5 −0 Original line number Diff line number Diff line Loading @@ -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
mysql-test/t/merge.test +14 −0 Original line number Diff line number Diff line Loading @@ -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