diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-18 11:37:24 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-18 14:16:01 +0300 |
commit | 9159b8976f7dfe9c956608f23df42d49ba1fcbbc (patch) | |
tree | 3bae634312d8e9c7117534d7305f233fa6e6329c /storage/innobase/include/mem0mem.h | |
parent | 08f6513cb2369a3d5a053a43bb945aa93a3b1da7 (diff) | |
download | mariadb-git-9159b8976f7dfe9c956608f23df42d49ba1fcbbc.tar.gz |
MDEV-22871: Clean up hash_table_t
HASH_TABLE_SYNC_MUTEX was kind-of used for the adaptive hash index,
even though that hash table is already protected by btr_search_latches[].
HASH_TABLE_SYNC_RWLOCK was only being used for buf_pool.page_hash.
It is cleaner to decouple that synchronization from hash_table_t,
and move it to the actual user.
buf_pool_t::page_hash_latches[]: Synchronization for buf_pool.page_hash.
LATCH_ID_HASH_TABLE_MUTEX: Remove.
hash_table_t::sync_obj, hash_table_t::n_sync_obj: Remove.
hash_table_t::type, hash_table_sync_t: Remove.
HASH_ASSERT_OWN(), hash_get_mutex(), hash_get_nth_mutex(): Remove.
ib_recreate(): Merge to the only caller, buf_pool_resize_hash().
ib_create(): Merge to the callers.
ha_clear(): Merge to the only caller buf_pool_t::close().
buf_pool_t::create(): Merge the ib_create() and
hash_create_sync_obj() invocations.
ha_insert_for_fold_func(): Clarify an assertion.
buf_pool_t::page_hash_lock(): Simplify the logic.
hash_assert_can_search(), hash_assert_can_modify(): Remove.
These predicates were only being invoked for the adaptive hash index,
while they only are effective for buf_pool.page_hash.
HASH_DELETE_AND_COMPACT(): Merge to ha_delete_hash_node().
hash_get_sync_obj_index(): Remove.
hash_table_t::heaps[], hash_get_nth_heap(): Remove. It was actually unused!
hash_get_heap(): Remove. It was only used in ha_delete_hash_node(),
where we always use hash_table_t::heap.
hash_table_t::calc_hash(): Replaces hash_calc_hash().
Diffstat (limited to 'storage/innobase/include/mem0mem.h')
-rw-r--r-- | storage/innobase/include/mem0mem.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h index ad4393ba51b..b7fd9c098a6 100644 --- a/storage/innobase/include/mem0mem.h +++ b/storage/innobase/include/mem0mem.h @@ -58,7 +58,6 @@ buffer pool; the latter method is used for very big heaps */ /** Different type of heaps in terms of which datastructure is using them */ #define MEM_HEAP_FOR_BTR_SEARCH (MEM_HEAP_BTR_SEARCH | MEM_HEAP_BUFFER) -#define MEM_HEAP_FOR_PAGE_HASH (MEM_HEAP_DYNAMIC) #define MEM_HEAP_FOR_LOCK_HEAP (MEM_HEAP_BUFFER) /** The following start size is used for the first block in the memory heap if |