Removed lock wait timeout warning when using CREATE TABLE IF EXISTS
mysql-test/r/create.result: Added test case to show that CREATE TABLE also is not waiting if table exists. mysql-test/t/create.test: Added test case to show that CREATE TABLE also is not waiting if table exists. sql/sql_base.cc: Clear also warnings from acquire_locks if we retry.
This commit is contained in:
parent
33f3a11e2d
commit
b31909ffbb
@ -2416,6 +2416,12 @@ create table if not exists t1 (a int, b int) select 2,2;
|
|||||||
ERROR 42S01: Table 't1' already exists
|
ERROR 42S01: Table 't1' already exists
|
||||||
create table if not exists t1 like t2;
|
create table if not exists t1 like t2;
|
||||||
ERROR 42S01: Table 't1' already exists
|
ERROR 42S01: Table 't1' already exists
|
||||||
|
create table t1 (a int, b int);
|
||||||
|
ERROR 42S01: Table 't1' already exists
|
||||||
|
create table t1 (a int, b int) select 2,2;
|
||||||
|
ERROR 42S01: Table 't1' already exists
|
||||||
|
create table t1 like t2;
|
||||||
|
ERROR 42S01: Table 't1' already exists
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a b
|
a b
|
||||||
1 1
|
1 1
|
||||||
|
@ -2013,6 +2013,12 @@ 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 (a int, b int) select 2,2;
|
||||||
--error ER_TABLE_EXISTS_ERROR
|
--error ER_TABLE_EXISTS_ERROR
|
||||||
create table if not exists t1 like t2;
|
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;
|
disconnect user1;
|
||||||
connection default;
|
connection default;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
@ -4779,6 +4779,7 @@ lock_table_names(THD *thd,
|
|||||||
*/
|
*/
|
||||||
if (check_if_table_exists(thd, tables_start, 1, &exists))
|
if (check_if_table_exists(thd, tables_start, 1, &exists))
|
||||||
DBUG_RETURN(TRUE); // Should never happen
|
DBUG_RETURN(TRUE); // Should never happen
|
||||||
|
thd->warning_info->clear_warning_info(thd->query_id);
|
||||||
thd->clear_error(); // Forget timeout error
|
thd->clear_error(); // Forget timeout error
|
||||||
if (exists)
|
if (exists)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user