mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
MDEV-22871 follow-up fix: AHI corruption & leak
Commit bf3c862faa
accidentally introduced two bugs.
btr_search_update_hash_ref(): Pass the correct parameter part->heap.
btr_search_sys_t::free(): Free all memory.
Thanks to Michael Widenius and Thirunarayanan Balathandayuthapani
for pointing out these bugs.
This commit is contained in:
parent
4243785f28
commit
e341fb0dae
2 changed files with 5 additions and 1 deletions
|
|
@ -740,7 +740,7 @@ btr_search_update_hash_ref(
|
|||
mem_heap_free(heap);
|
||||
}
|
||||
|
||||
ha_insert_for_fold(&part->table, heap, fold, block, rec);
|
||||
ha_insert_for_fold(&part->table, part->heap, fold, block, rec);
|
||||
|
||||
MONITOR_INC(MONITOR_ADAPTIVE_HASH_ROW_ADDED);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -338,8 +338,12 @@ struct btr_search_sys_t
|
|||
void free()
|
||||
{
|
||||
if (parts)
|
||||
{
|
||||
for (ulong i= 0; i < btr_ahi_parts; ++i)
|
||||
parts[i].free();
|
||||
ut_free(parts);
|
||||
parts= nullptr;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue