mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed the CREATE TABLE IF EXIST generates warnings instead of errors
mysql-test/r/create.result: Updated test results mysql-test/t/create.test: Updated test sql/sql_base.cc: Use push_internal_handler/pop_internal_handler to avoid errors & warnings instead of clear_error Give a warnings instead of an error for CREATE TABLE IF EXISTS sql/sql_parse.cc: Check if we failed because of table exists (can only happen from create) sql/sql_table.cc: Check if we failed because of table exists (can only happen from create)
This commit is contained in:
@ -2411,11 +2411,14 @@ insert into t1 values (1,1);
|
||||
lock tables t1 read;
|
||||
set @@lock_wait_timeout=5;
|
||||
create table if not exists t1 (a int, b int);
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
create table if not exists t1 (a int, b int) select 2,2;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
create table if not exists t1 like t2;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
Warnings:
|
||||
Note 1050 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;
|
||||
|
Reference in New Issue
Block a user