mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Implemented MDEV-3941: CREATE TABLE xxx IF NOT EXISTS should not block if table exists.
- Added option to check_if_table_exists() to quickly check if table exists (either SHARE or .FRM) - Extended lock_table_names() to not wait for meta data locks if CREATE IF NOT EXISTS is used. mysql-test/r/create.result: New test case mysql-test/t/create.test: New test case sql/sql_base.cc: Added option to check_if_table_exists() to quickly check if table exists (either SHARE or .FRM) Extended lock_table_names() to not wait for meta data locks if CREATE IF NOT EXISTS is used. sql/sql_base.h: Updated prototype sql/sql_db.cc: Added extra argument to call to check_if_table_exists()
This commit is contained in:
@ -927,7 +927,7 @@ update_binlog:
|
||||
char quoted_name[FN_REFLEN+3];
|
||||
|
||||
// Only write drop table to the binlog for tables that no longer exist.
|
||||
if (check_if_table_exists(thd, tbl, &exists))
|
||||
if (check_if_table_exists(thd, tbl, 0, &exists))
|
||||
{
|
||||
error= true;
|
||||
goto exit;
|
||||
|
Reference in New Issue
Block a user