summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-12-16 16:13:17 +0200
committerMichael Widenius <monty@askmonty.org>2012-12-16 16:13:17 +0200
commit33f3a11e2db38fad3c43ce3c1a30dc8d72bd53bd (patch)
tree5bd311c170eb30d9d4a3034e94537f506d4c2031 /sql/sql_db.cc
parenta6a8f12fa302aa38270370558ac3de979af4fde6 (diff)
downloadmariadb-git-33f3a11e2db38fad3c43ce3c1a30dc8d72bd53bd.tar.gz
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()
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 5704b6d51b6..99e5f3a035c 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -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;