summaryrefslogtreecommitdiff
path: root/sql/temporary_tables.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/temporary_tables.cc')
-rw-r--r--sql/temporary_tables.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc
index a477aef0bc3..3ba6a772549 100644
--- a/sql/temporary_tables.cc
+++ b/sql/temporary_tables.cc
@@ -671,7 +671,7 @@ bool THD::drop_temporary_table(TABLE *table, bool *is_trans, bool delete_table)
temporary_tables->remove(share);
/* Free the TABLE_SHARE and/or delete the files. */
- free_tmp_table_share(share, delete_table);
+ result= free_tmp_table_share(share, delete_table);
end:
if (locked)
@@ -1464,20 +1464,21 @@ bool THD::log_events_and_free_tmp_shares()
@param share [IN] TABLE_SHARE to free
@param delete_table [IN] Whether to delete the table files?
- @return void
+ @return false Success
+ true Error
*/
-void THD::free_tmp_table_share(TMP_TABLE_SHARE *share, bool delete_table)
+bool THD::free_tmp_table_share(TMP_TABLE_SHARE *share, bool delete_table)
{
+ bool error= false;
DBUG_ENTER("THD::free_tmp_table_share");
if (delete_table)
{
- rm_temporary_table(share->db_type(), share->path.str);
+ error= rm_temporary_table(share->db_type(), share->path.str);
}
free_table_share(share);
my_free(share);
-
- DBUG_VOID_RETURN;
+ DBUG_RETURN(error);
}