summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-06 14:25:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-06 14:25:20 +0300
commit780d2bb8a7eca4fdbdf70fbd51c0bdbae5b0057e (patch)
treeb7447115f45de0f03bbe18c26fc0866367483066 /storage/heap
parentdb9e41ddc31f2e705a54132cf69c781e1cc60f07 (diff)
parent18af13b88ba580562981a190c25da128a2e9db26 (diff)
downloadmariadb-git-780d2bb8a7eca4fdbdf70fbd51c0bdbae5b0057e.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/hp_scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/heap/hp_scan.c b/storage/heap/hp_scan.c
index 3315cb05b3f..f07efe6cf67 100644
--- a/storage/heap/hp_scan.c
+++ b/storage/heap/hp_scan.c
@@ -50,7 +50,9 @@ int heap_scan(register HP_INFO *info, uchar *record)
}
else
{
- info->next_block+=share->block.records_in_block;
+ /* increase next_block to the next records_in_block boundary */
+ ulong rem= info->next_block % share->block.records_in_block;
+ info->next_block+=share->block.records_in_block - rem;
if (info->next_block >= share->records+share->deleted)
{
info->next_block= share->records+share->deleted;