diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-11-19 15:43:22 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-11-19 15:43:22 +0100 |
commit | af2848a4237b94f783f275b29c590d5318c4b375 (patch) | |
tree | fd6b9076dacd7b2406573e812d95159d610a2c96 /storage/xtradb/include/btr0sea.h | |
parent | 847fb4157e3e5adc51f6fb9d916c9a714c7b60f2 (diff) | |
parent | 667f381aa9495cd521de9c4707c788758cdc88ea (diff) | |
download | mariadb-git-af2848a4237b94f783f275b29c590d5318c4b375.tar.gz |
Percona-Server-5.5.34-rel32.0 merge
Diffstat (limited to 'storage/xtradb/include/btr0sea.h')
-rw-r--r-- | storage/xtradb/include/btr0sea.h | 49 |
1 files changed, 35 insertions, 14 deletions
diff --git a/storage/xtradb/include/btr0sea.h b/storage/xtradb/include/btr0sea.h index dc3bdbd0b0b..6fa7a2d87bf 100644 --- a/storage/xtradb/include/btr0sea.h +++ b/storage/xtradb/include/btr0sea.h @@ -79,14 +79,14 @@ btr_search_info_create( mem_heap_t* heap); /*!< in: heap where created */ /*****************************************************************//** Returns the value of ref_count. The value is protected by -btr_search_latch. +the latch of the AHI partition corresponding to this index. @return ref_count value. */ UNIV_INTERN ulint btr_search_info_get_ref_count( /*==========================*/ btr_search_t* info, /*!< in: search info. */ - index_id_t key); + dict_index_t* index); /*!< in: index */ /*********************************************************************//** Updates the search info. */ UNIV_INLINE @@ -204,36 +204,57 @@ btr_search_validate(void); New functions to control split btr_search_index */ UNIV_INLINE hash_table_t* -btr_search_get_hash_index( +btr_search_get_hash_table( /*======================*/ - index_id_t key); + const dict_index_t* index) /*!< in: index */ + __attribute__((nonnull,pure,warn_unused_result)); UNIV_INLINE rw_lock_t* btr_search_get_latch( /*=================*/ - index_id_t key); + const dict_index_t* index) /*!< in: index */ + __attribute__((nonnull,pure,warn_unused_result)); +/*********************************************************************//** +Returns the AHI partition number corresponding to a given index ID. */ UNIV_INLINE -void -btr_search_x_lock_all(void); -/*========================*/ +ulint +btr_search_get_key( +/*===============*/ + index_id_t index_id) /*!< in: index ID */ + __attribute__((pure,warn_unused_result)); +/*********************************************************************//** +Initializes AHI-related fields in a newly created index. */ UNIV_INLINE void -btr_search_x_unlock_all(void); -/*==========================*/ +btr_search_index_init( +/*===============*/ + dict_index_t* index) /*!< in: index */ + __attribute__((nonnull)); UNIV_INLINE void -btr_search_s_lock_all(void); +btr_search_x_lock_all(void); /*========================*/ UNIV_INLINE void -btr_search_s_unlock_all(void); +btr_search_x_unlock_all(void); /*==========================*/ +#ifdef UNIV_SYNC_DEBUG +/********************************************************************//** +Checks if the thread owns any adaptive hash latches in either S or X mode. +@return TRUE if the thread owns at least one latch in any mode. */ +UNIV_INLINE +ibool +btr_search_own_any(void) +/*=====================*/ + __attribute__((warn_unused_result)); +#endif + /** The search info struct in an index */ struct btr_search_struct{ ulint ref_count; /*!< Number of blocks in this index tree @@ -294,8 +315,8 @@ typedef struct btr_search_sys_struct btr_search_sys_t; /** The hash index system */ struct btr_search_sys_struct{ - hash_table_t** hash_index; /*!< the adaptive hash index, - mapping dtuple_fold values + hash_table_t** hash_tables; /*!< the array of adaptive hash index, + tables mapping dtuple_fold values to rec_t pointers on index pages */ }; |