MySQL 8.0.40
Source Code Documentation
|
The simple hash table utility. More...
#include "ut0rnd.h"
Functions | |
static hash_cell_t * | hash_get_nth_cell (hash_table_t *table, size_t n) |
static void | hash_table_clear (hash_table_t *table) |
Clears a hash table so that all the cells become empty. More... | |
static size_t | hash_get_n_cells (hash_table_t const *table) |
static uint64_t | hash_calc_cell_id (uint64_t hash_value, hash_table_t const *table) |
static uint64_t | hash_get_sync_obj_index (hash_table_t *table, uint64_t hash_value) |
Gets the sync object index for a hash value in a hash table. More... | |
static mem_heap_t * | hash_get_heap (hash_table_t *table) |
Gets the heap for a hash value in a hash table. More... | |
static rw_lock_t * | hash_get_nth_lock (hash_table_t *table, size_t i) |
Gets the nth rw_lock in a hash table. More... | |
static rw_lock_t * | hash_get_lock (hash_table_t *table, uint64_t hash_value) |
Gets the rw_lock for a hash value in a hash table. More... | |
static rw_lock_t * | hash_lock_s_confirm (rw_lock_t *hash_lock, hash_table_t *table, uint64_t hash_value) |
If not appropriate rw_lock for a hash value in a hash table, relock S-lock the another rw_lock until appropriate for a hash value. More... | |
static rw_lock_t * | hash_lock_x_confirm (rw_lock_t *hash_lock, hash_table_t *table, uint64_t hash_value) |
If not appropriate rw_lock for a hash value in a hash table, relock X-lock the another rw_lock until appropriate for a hash value. More... | |
static void | hash_assert_can_modify (hash_table_t *table, uint64_t hash_value) |
Assert that the synchronization object in a hash operation involving possible change in the hash table is held. More... | |
static void | hash_assert_can_search (hash_table_t *table, uint64_t hash_value) |
Assert that the synchronization object in a hash search operation is held. More... | |
The simple hash table utility.
Created 5/20/1997 Heikki Tuuri
|
inlinestatic |
Assert that the synchronization object in a hash operation involving possible change in the hash table is held.
We assert that the specific rw_lock is held in exclusive mode.
[in] | table | The hash table |
[in] | hash_value | The hash value for which the modification is performed |
UNIV_HOTBACKUP
|
inlinestatic |
Assert that the synchronization object in a hash search operation is held.
We assert that the specific rw_lock is held either in x-mode or s-mode.
[in] | table | The hash table |
[in] | hash_value | The hash value for which the search is performed |
UNIV_HOTBACKUP
|
inlinestatic |
|
inlinestatic |
Gets the heap for a hash value in a hash table.
table | in: hash table |
|
inlinestatic |
Gets the rw_lock for a hash value in a hash table.
table | in: hash table |
hash_value | in: hash value |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Gets the nth rw_lock in a hash table.
table | in: hash table |
i | in: index of the rw_lock |
|
inlinestatic |
Gets the sync object index for a hash value in a hash table.
table | in: hash table |
hash_value | in: hash value |
|
inlinestatic |
If not appropriate rw_lock for a hash value in a hash table, relock S-lock the another rw_lock until appropriate for a hash value.
[in] | hash_lock | latched rw_lock to be confirmed |
[in] | table | hash table |
[in] | hash_value | hash value |
|
inlinestatic |
If not appropriate rw_lock for a hash value in a hash table, relock X-lock the another rw_lock until appropriate for a hash value.
[in] | hash_lock | latched rw_lock to be confirmed |
[in] | table | hash table |
[in] | hash_value | hash value |
|
inlinestatic |
Clears a hash table so that all the cells become empty.
table | in/out: hash table |