summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2021-10-05 11:58:54 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2021-10-05 11:58:54 +0400
commitecd1aaa60d1af231fffa4b0788b2a2d073a66cc0 (patch)
tree8593d8e3b1e050fb9d0c67a3ee6fa02cb32daed1 /sql/ha_partition.cc
parent1d57892949eeb317a0914da0ff2d03deed45505a (diff)
downloadmariadb-git-bb-10.3-hf.tar.gz
MDEV-26540 Assertion `inited==RND' failed in handler::ha_rnd_end on DELETE.bb-10.3-hf
We supposed to run the ha_rnd_end() when rnd_seq is on. Also the ha_spider::info() should not raise the error in the mysql_delete.
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index fc1f0ebcb4e..dca17947a50 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -11664,10 +11664,13 @@ int ha_partition::direct_delete_rows(ha_rows *delete_rows_result)
file->pre_direct_delete_rows() :
file->ha_direct_delete_rows(&delete_rows))))
{
- if (m_pre_calling)
- file->ha_pre_rnd_end();
- else
- file->ha_rnd_end();
+ if (rnd_seq)
+ {
+ if (m_pre_calling)
+ file->ha_pre_rnd_end();
+ else
+ file->ha_rnd_end();
+ }
DBUG_RETURN(error);
}
delete_rows_result+= delete_rows;