diff options
author | Igor Babaev <igor@askmonty.org> | 2013-01-08 19:34:33 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-01-08 19:34:33 -0800 |
commit | f853333e09b222f6d6d76d9343b6202b4769ffab (patch) | |
tree | ccbd97f5dbba13aa19469b61108bdc6e10c3a255 /mysql-test/t/create.test | |
parent | 88b59efef6ae869bac9d14cefe2982a1061d3c93 (diff) | |
parent | 7d9df8075e4c9392f4352e6ccd86921994f264bc (diff) | |
download | mariadb-git-f853333e09b222f6d6d76d9343b6202b4769ffab.tar.gz |
Merge 5.5-mwl248 -> 10.0-base
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r-- | mysql-test/t/create.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 258213620ce..a61f89539cb 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1996,4 +1996,28 @@ create table if not exists t1 (a int unique, b int) ignore select 1 as a, 1 as b union select 1 as a, 2 as b; select * from t1; drop table t1; + +--echo # +--echo # Checking that CREATE IF NOT EXISTS is not blocked by running SELECT --echo # + +create table t1 (a int, b int) engine=myisam; +create table t2 (a int, b int) engine=myisam; +insert into t1 values (1,1); +lock tables t1 read; +connect (user1,localhost,root,,test); +set @@lock_wait_timeout=5; +create table if not exists t1 (a int, b int); +create table if not exists t1 (a int, b int) select 2,2; +create table if not exists t1 like t2; +--error ER_TABLE_EXISTS_ERROR +create table t1 (a int, b int); +--error ER_TABLE_EXISTS_ERROR +create table t1 (a int, b int) select 2,2; +--error ER_TABLE_EXISTS_ERROR +create table t1 like t2; +disconnect user1; +connection default; +select * from t1; +unlock tables; +drop table t1,t2; |