diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-02-01 20:33:04 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-02-01 20:33:04 +0100 |
commit | cf63eecef44f189ce2d221612dee9dfc1885ba4e (patch) | |
tree | 93b4e6645a1d371bd8012a0aa8e6e3a3d541b2a6 /sql/ha_partition.cc | |
parent | fb40a2fabf8d8cf765c83a0b8e609dd893c75ec3 (diff) | |
parent | c04a203a10e282e1f33fd04d8a1b7ff0b076bce5 (diff) | |
download | mariadb-git-cf63eecef44f189ce2d221612dee9dfc1885ba4e.tar.gz |
Merge branch '10.4' into 10.5
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 2c6233a6837..337ef684520 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4084,8 +4084,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); @@ -4222,7 +4223,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); } @@ -4241,7 +4242,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); default:; } DBUG_RETURN(error); |