summaryrefslogtreecommitdiff
path: root/sql/sql_base.h
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_base.h
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_base.h')
-rw-r--r--sql/sql_base.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_base.h b/sql/sql_base.h
index 6ec998c44f8..45d41777fea 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -302,7 +302,8 @@ TABLE *find_table_for_mdl_upgrade(THD *thd, const char *db,
const char *table_name,
bool no_error);
void mark_tmp_table_for_reuse(TABLE *table);
-bool check_if_table_exists(THD *thd, TABLE_LIST *table, bool *exists);
+bool check_if_table_exists(THD *thd, TABLE_LIST *table, bool fast_check,
+ bool *exists);
int update_virtual_fields(THD *thd, TABLE *table,
enum enum_vcol_update_mode vcol_update_mode= VCOL_UPDATE_FOR_READ);
int dynamic_column_error_message(enum_dyncol_func_result rc);