summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-03-30 20:12:02 +0300
committerMonty <monty@mariadb.org>2020-04-19 17:33:51 +0300
commitf9f33b85be6b5006f0ecd0de7961c71d415a9d73 (patch)
treeae547acc02c05876ccc9f54a3c7be614af206425 /sql/sql_partition.cc
parent7866b723048d1d0f4a202d5a1e5475420b1dda64 (diff)
downloadmariadb-git-f9f33b85be6b5006f0ecd0de7961c71d415a9d73.tar.gz
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
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index ff1ddd200d0..d5915f65998 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -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);
}