mariadb/storage/innobase/buf
Marko Mäkelä 3c312d247c MDEV-35190 HASH_SEARCH duplicates effort before HASH_INSERT or HASH_DELETE
The HASH_ macros are unnecessarily obfuscating the logic,
so we had better replace them.

hash_cell_t::search(): Implement most of the HASH_DELETE logic,
for a subsequent insert or remove().

hash_cell_t::remove(): Remove an element.

hash_cell_t::find(): Implement the HASH_SEARCH logic.

xb_filter_hash_free(): Avoid any hash table lookup;
just traverse the hash bucket chains and free each element.

xb_register_filter_entry(): Search databases_hash only once.

rm_if_not_found(): Make use of find_filter_in_hashtable().

dict_sys_t::acquire_temporary_table(), dict_sys_t::find_table():
Define non-inline to avoid unnecessary code duplication.

dict_sys_t::add(dict_table_t *table), dict_table_rename_in_cache():
Look for duplicate while finding the insert position.

dict_table_change_id_in_cache(): Merged to the only caller
row_discard_tablespace().

hash_insert(): Helper function of dict_sys_t::resize().

fil_space_t::create(): Look for a duplicate (and crash if found)
when searching for the insert position.

lock_rec_discard(): Take the hash array cell as a parameter
to avoid a duplicated lookup.

lock_rec_free_all_from_discard_page(): Remove a parameter.

Reviewed by: Debarun Banerjee
2024-11-21 08:59:02 +02:00
..
buf0buddy.cc MDEV-35190 HASH_SEARCH duplicates effort before HASH_INSERT or HASH_DELETE 2024-11-21 08:59:02 +02:00
buf0buf.cc MDEV-34830: LSN in the future is not being treated as serious corruption 2024-10-17 17:24:20 +03:00
buf0checksum.cc MDEV-25105 Remove innodb_checksum_algorithm values none,innodb,... 2021-03-11 12:46:18 +02:00
buf0dblwr.cc MDEV-34830: LSN in the future is not being treated as serious corruption 2024-10-17 17:24:20 +03:00
buf0dump.cc Merge branch '10.5' into 10.6 2024-07-16 15:54:22 +08:00
buf0flu.cc MDEV-35409 InnoDB can still hang while running out of buffer pool 2024-11-18 08:13:18 +02:00
buf0lru.cc MDEV-35149 Race condition around SET GLOBAL innodb_lru_scan_depth 2024-10-21 10:08:58 +03:00
buf0rea.cc MDEV-34830: LSN in the future is not being treated as serious corruption 2024-10-17 17:24:20 +03:00