1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Handle errors from external_unlock & mysql_unlock_tables

Other things:
- Handler errors from ha_maria::implict_commit
- Disable DBUG in safe_mutex_lock to get trace file easier to read
This commit is contained in:
Monty
2020-03-30 20:12:02 +03:00
parent 7866b72304
commit f9f33b85be
15 changed files with 101 additions and 56 deletions

View File

@ -6778,20 +6778,21 @@ static bool alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt)
@param lpt Struct carrying parameters
@return Always 0.
@return error code if external_unlock fails
*/
static int alter_close_table(ALTER_PARTITION_PARAM_TYPE *lpt)
{
int error;
DBUG_ENTER("alter_close_table");
if (lpt->table->db_stat)
{
mysql_lock_remove(lpt->thd, lpt->thd->lock, lpt->table);
lpt->table->file->ha_close();
error= mysql_lock_remove(lpt->thd, lpt->thd->lock, lpt->table);
error= lpt->table->file->ha_close();
lpt->table->db_stat= 0; // Mark file closed
}
DBUG_RETURN(0);
DBUG_RETURN(error);
}