summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/handler.cc3
-rw-r--r--sql/sql_table.cc5
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))
{