1
/************************************************************************
2
The index tree adaptive search
6
Created 2/17/1996 Heikki Tuuri
7
*************************************************************************/
13
/*************************************************************************
14
Updates the search info. */
17
btr_search_info_update_slow(
18
/*========================*/
19
btr_search_t* info, /* in/out: search info */
20
btr_cur_t* cursor);/* in: cursor which was just positioned */
22
/************************************************************************
23
Returns search info for an index. */
28
/* out: search info; search mutex reserved */
29
dict_index_t* index) /* in: index */
33
return(index->search_info);
36
/*************************************************************************
37
Updates the search info. */
40
btr_search_info_update(
41
/*===================*/
42
dict_index_t* index, /* in: index of the cursor */
43
btr_cur_t* cursor) /* in: cursor which was just positioned */
47
#ifdef UNIV_SYNC_DEBUG
48
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
49
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
50
#endif /* UNIV_SYNC_DEBUG */
52
info = btr_search_get_info(index);
54
info->hash_analysis++;
56
if (info->hash_analysis < BTR_SEARCH_HASH_ANALYSIS) {
64
ut_ad(cursor->flag != BTR_CUR_HASH);
66
btr_search_info_update_slow(info, cursor);