summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index f6c4b95dcbd..ccae9fe2bf6 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -4106,8 +4106,9 @@ int ha_partition::external_lock(THD *thd, int lock_type)
These commands may be excluded because working history partition is needed
only for versioned DML. */
thd->lex->sql_command != SQLCOM_SELECT &&
- thd->lex->sql_command != SQLCOM_INSERT_SELECT)
- m_part_info->vers_set_hist_part(thd);
+ thd->lex->sql_command != SQLCOM_INSERT_SELECT &&
+ (error= m_part_info->vers_set_hist_part(thd)))
+ goto err_handler;
}
DBUG_RETURN(0);
@@ -4244,7 +4245,7 @@ int ha_partition::start_stmt(THD *thd, thr_lock_type lock_type)
i= bitmap_get_next_set(&m_part_info->lock_partitions, i))
{
if (unlikely((error= m_file[i]->start_stmt(thd, lock_type))))
- break;
+ DBUG_RETURN(error);
/* Add partition to be called in reset(). */
bitmap_set_bit(&m_partitions_to_reset, i);
}
@@ -4256,7 +4257,7 @@ int ha_partition::start_stmt(THD *thd, thr_lock_type lock_type)
// TODO: MDEV-20345 (see above)
thd->lex->sql_command != SQLCOM_SELECT &&
thd->lex->sql_command != SQLCOM_INSERT_SELECT)
- m_part_info->vers_set_hist_part(thd);
+ error= m_part_info->vers_set_hist_part(thd);
}
DBUG_RETURN(error);
}