mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-23000: Ensure we get a warning from THD::drop_temporary_table() in case of disk errors
This commit is contained in:
committed by
Daniel Black
parent
1e58b8afc0
commit
231c0eb7a6
@@ -5050,7 +5050,7 @@ private:
|
|||||||
bool use_temporary_table(TABLE *table, TABLE **out_table);
|
bool use_temporary_table(TABLE *table, TABLE **out_table);
|
||||||
void close_temporary_table(TABLE *table);
|
void close_temporary_table(TABLE *table);
|
||||||
bool log_events_and_free_tmp_shares();
|
bool log_events_and_free_tmp_shares();
|
||||||
void free_tmp_table_share(TMP_TABLE_SHARE *share, bool delete_table);
|
bool free_tmp_table_share(TMP_TABLE_SHARE *share, bool delete_table);
|
||||||
void free_temporary_table(TABLE *table);
|
void free_temporary_table(TABLE *table);
|
||||||
bool lock_temporary_tables();
|
bool lock_temporary_tables();
|
||||||
void unlock_temporary_tables();
|
void unlock_temporary_tables();
|
||||||
|
@@ -670,7 +670,7 @@ bool THD::drop_temporary_table(TABLE *table, bool *is_trans, bool delete_table)
|
|||||||
temporary_tables->remove(share);
|
temporary_tables->remove(share);
|
||||||
|
|
||||||
/* Free the TABLE_SHARE and/or delete the files. */
|
/* 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:
|
end:
|
||||||
if (locked)
|
if (locked)
|
||||||
@@ -1455,20 +1455,21 @@ bool THD::log_events_and_free_tmp_shares()
|
|||||||
@param share [IN] TABLE_SHARE to free
|
@param share [IN] TABLE_SHARE to free
|
||||||
@param delete_table [IN] Whether to delete the table files?
|
@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");
|
DBUG_ENTER("THD::free_tmp_table_share");
|
||||||
|
|
||||||
if (delete_table)
|
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);
|
free_table_share(share);
|
||||||
my_free(share);
|
my_free(share);
|
||||||
|
DBUG_RETURN(error);
|
||||||
DBUG_VOID_RETURN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user