diff options
author | Monty <monty@mariadb.org> | 2022-03-17 19:37:51 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2022-03-18 17:16:50 +0200 |
commit | a240eb916e9000f1a59687a586c3a12901720637 (patch) | |
tree | 60c99d67409b5b5e040a36088308b45e2fcb9f21 | |
parent | df0124952466f71c70bdd55e36fa085878138db4 (diff) | |
download | mariadb-git-10.2-force_drop.tar.gz |
Last sync of functions for drop table between 10.2 and 10.710.2-force_drop
Functions checked / synced between 10.2 and 10.7:
handler.cc
ha_delete_table()
int handler::delete_table(const char *name)
static my_bool delete_table_force(THD *thd, plugin_ref plugin, void *arg);
int ha_delete_table_force(THD *thd, const char *path, const LEX_CSTRING *db,
const LEX_CSTRING *alias);
sql_table.cc
mysql_rm_table_no_locks()
- Things related to drop force synced
Usage of ha_delete_table()
-rw-r--r-- | sql/handler.cc | 3 | ||||
-rw-r--r-- | sql/sql_table.cc | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 87a0566e49c..ad42cb324ab 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2535,7 +2535,8 @@ int ha_delete_table(THD *thd, handlerton *hton, const char *path, error= -1; } } - + if (error) + DBUG_PRINT("exit", ("error: %d", error)); DBUG_RETURN(error); } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 57b3a69089f..2d207294975 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2422,6 +2422,8 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, */ local_non_tmp_error= 1; error= table_type == FRMTYPE_ERROR ? ENOENT : -1; + tdc_remove_table(thd, TDC_RT_REMOVE_ALL, table->db, table->table_name, + false); } else { @@ -2835,7 +2837,8 @@ bool quick_rm_table(THD *thd, handlerton *base, const char *db, delete file; } if (!(flags & (FRM_ONLY|NO_HA_TABLE))) - error|= ha_delete_table(current_thd, base, path, db, table_name, 0); + if (ha_delete_table(current_thd, base, path, db, table_name, 0) > 0) + error= 1; if (likely(error == 0)) { |