summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/btr/btr0sea.cc2
-rw-r--r--storage/innobase/include/btr0sea.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index e65bef02f47..de2f58a23b4 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -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);
}
diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h
index e3de4926a57..f09920b1816 100644
--- a/storage/innobase/include/btr0sea.h
+++ b/storage/innobase/include/btr0sea.h
@@ -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;
+ }
}
};