1#
2# Checking that CREATE IF NOT EXISTS is not blocked by running SELECT
3#
4create table t1 (a int, b int) engine=myisam;
5create table t2 (a int, b int) engine=myisam;
6insert into t1 values (1,1);
7lock tables t1 read;
8set @@lock_wait_timeout=5;
9create table if not exists t1 (a int, b int);
10Warnings:
11Note	1050	Table 't1' already exists
12create table if not exists t1 (a int, b int) select 2,2;
13Warnings:
14Note	1050	Table 't1' already exists
15create table if not exists t1 like t2;
16Warnings:
17Note	1050	Table 't1' already exists
18create table t1 (a int, b int);
19ERROR 42S01: Table 't1' already exists
20create table t1 (a int, b int) select 2,2;
21ERROR 42S01: Table 't1' already exists
22create table t1 like t2;
23ERROR 42S01: Table 't1' already exists
24select * from t1;
25a	b
261	1
27unlock tables;
28drop table t1,t2;
29