diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 103bed598ef..a4f5cc517b3 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -497,9 +497,9 @@ drop database mysqltest; select database(); database() NULL -select database(); -database() -NULL +select database(), user(); +database() user() +NULL mysqltest_1@localhost use test; create table t1 (a int, index `primary` (a)); ERROR 42000: Incorrect index name 'primary' @@ -563,3 +563,11 @@ select * from t2; b 1 drop table t1,t2; +create table t1 (a int); +create table t1 select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +create table t2 union = (t1) select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +flush tables with read lock; +unlock tables; +drop table t1; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 2ba726f29e2..4644d3db5c5 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -403,8 +403,11 @@ drop database mysqltest; select database(); # Connect without a database -connect (user4,localhost,mysqltest_1,,*NO-ONE*); -select database(); +connect (user1,localhost,mysqltest_1,,*NO-ONE*); +connection user1; +select database(), user(); +connection default; +disconnect user1; # # Test for Bug 856 'Naming a key "Primary" causes trouble'