InnoDB Plugin  1.0
Macros | Functions
ha0ha.ic File Reference
#include "ut0rnd.h"
#include "mem0mem.h"
#include "btr0types.h"
Include dependency graph for ha0ha.ic:
This graph shows which files directly or indirectly include this file:

Macros

#define ha_node_set_data(n, b, d)   ha_node_set_data_func(n,b,d)

Functions

UNIV_INTERN void ha_delete_hash_node (hash_table_t *table, ha_node_t *del_node)
UNIV_INLINE const rec_t * ha_node_get_data (const ha_node_t *node)
UNIV_INLINE void ha_node_set_data_func (ha_node_t *node, buf_block_t *block, const rec_t *data)
UNIV_INLINE ha_node_tha_chain_get_next (ha_node_t *node)
UNIV_INLINE ha_node_tha_chain_get_first (hash_table_t *table, ulint fold)
UNIV_INLINE void hash_assert_can_modify (hash_table_t *table, ulint fold)
UNIV_INLINE void hash_assert_can_search (hash_table_t *table, ulint fold)
UNIV_INLINE const rec_t * ha_search_and_get_data (hash_table_t *table, ulint fold)
UNIV_INLINE ha_node_tha_search_with_data (hash_table_t *table, ulint fold, const rec_t *data)
UNIV_INLINE ibool ha_search_and_delete_if_found (hash_table_t *table, ulint fold, const rec_t *data)

Detailed Description

The hash table with external chains

Created 8/18/1994 Heikki Tuuri

Macro Definition Documentation

#define ha_node_set_data (   n,
  b,
 
)    ha_node_set_data_func(n,b,d)
Sets hash node data.
Parameters
nin: hash chain node
bin: buffer block containing the data
din: pointer to the data

Function Documentation

UNIV_INLINE ha_node_t* ha_chain_get_first ( hash_table_t table,
ulint  fold 
)

Gets the first node in a hash chain.

Returns
first node, NULL if none
Parameters
tablein: hash table
foldin: fold value determining the chain
UNIV_INLINE ha_node_t* ha_chain_get_next ( ha_node_t node)

Gets the next node in a hash chain.

Returns
next node, NULL if none
Parameters
nodein: hash chain node
UNIV_INTERN void ha_delete_hash_node ( hash_table_t table,
ha_node_t del_node 
)

Deletes a hash node. in: node to be deleted

Parameters
tablein: hash table
UNIV_INLINE const rec_t* ha_node_get_data ( const ha_node_t node)

Gets a hash node data.

Returns
pointer to the data
Parameters
nodein: hash chain node
UNIV_INLINE void ha_node_set_data_func ( ha_node_t node,
buf_block_t block,
const rec_t *  data 
)

Sets hash node data.

Parameters
nodein: hash chain node
blockin: buffer block containing the data
datain: pointer to the data
UNIV_INLINE ibool ha_search_and_delete_if_found ( hash_table_t table,
ulint  fold,
const rec_t *  data 
)

Looks for an element when we know the pointer to the data, and deletes it from the hash table, if found.

Returns
TRUE if found
Parameters
tablein: hash table
foldin: folded value of the searched data
datain: pointer to the data
UNIV_INLINE const rec_t* ha_search_and_get_data ( hash_table_t table,
ulint  fold 
)

Looks for an element in a hash table.

Returns
pointer to the data of the first hash table node in chain having the fold number, NULL if not found
Parameters
tablein: hash table
foldin: folded value of the searched data
UNIV_INLINE ha_node_t* ha_search_with_data ( hash_table_t table,
ulint  fold,
const rec_t *  data 
)

Looks for an element when we know the pointer to the data.

Returns
pointer to the hash table node, NULL if not found in the table
Parameters
tablein: hash table
foldin: folded value of the searched data
datain: pointer to the data
UNIV_INLINE void hash_assert_can_modify ( hash_table_t table,
ulint  fold 
)

Assert that the synchronization object in a hash operation involving possible change in the hash table is held. Note that in case of mutexes we assert that mutex is owned while in case of rw-locks we assert that it is held in exclusive mode.

Parameters
tablein: hash table
foldin: fold value
UNIV_INLINE void hash_assert_can_search ( hash_table_t table,
ulint  fold 
)

Assert that the synchronization object in a hash search operation is held. Note that in case of mutexes we assert that mutex is owned while in case of rw-locks we assert that it is held either in x-mode or s-mode.

Parameters
tablein: hash table
foldin: fold value