mariadb/innobase/include/btr0sea.ic
unknown 8eaf6f1177 Fixed BUG#15653, BUG#16582.
Applied innodb-4.1-ss20 snapshot.


innobase/btr/btr0sea.c:
  Applied innodb-4.1-ss20 snapshot.
    Account for a race condition when dropping the adaptive
    hash index for a B-tree page (Bug #16582).
    btr_search_drop_page_hash_index(): Retry the operation if a hash
    index with different parameters was built meanwhile. Add
    diagnostics for the case that hash node pointers to the page
    remain. This fix is from Heikki.
    btr_search_info_update_hash(), btr_search_info_update_slow():
    Document the parameter "info" as in/out.
innobase/fil/fil0fil.c:
  Applied innodb-4.1-ss20 snapshot.
    Keep track on unflushed modifications to file spaces. When
    there are tens of thousnads of file spaces, flushing all files
    in fil_flush_file_spaces() would be very slow (Bug #16582).
    fil_flush_file_spaces(): Only flush unflushed file spaces.
    fil_space_t, fil_system_t: Add a list of unflushed spaces.
innobase/include/btr0sea.ic:
  Applied innodb-4.1-ss20 snapshot.
    btr_search_info_update_hash(), btr_search_info_update_slow():
    Document the parameter "info" as in/out.
2006-01-30 22:33:02 +03:00

67 lines
1.6 KiB
Text

/************************************************************************
The index tree adaptive search
(c) 1996 Innobase Oy
Created 2/17/1996 Heikki Tuuri
*************************************************************************/
#include "dict0mem.h"
#include "btr0cur.h"
#include "buf0buf.h"
/*************************************************************************
Updates the search info. */
void
btr_search_info_update_slow(
/*========================*/
btr_search_t* info, /* in/out: search info */
btr_cur_t* cursor);/* in: cursor which was just positioned */
/************************************************************************
Returns search info for an index. */
UNIV_INLINE
btr_search_t*
btr_search_get_info(
/*================*/
/* out: search info; search mutex reserved */
dict_index_t* index) /* in: index */
{
ut_ad(index);
return(index->search_info);
}
/*************************************************************************
Updates the search info. */
UNIV_INLINE
void
btr_search_info_update(
/*===================*/
dict_index_t* index, /* in: index of the cursor */
btr_cur_t* cursor) /* in: cursor which was just positioned */
{
btr_search_t* info;
#ifdef UNIV_SYNC_DEBUG
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
#endif /* UNIV_SYNC_DEBUG */
info = btr_search_get_info(index);
info->hash_analysis++;
if (info->hash_analysis < BTR_SEARCH_HASH_ANALYSIS) {
/* Do nothing */
return;
}
ut_ad(cursor->flag != BTR_CUR_HASH);
btr_search_info_update_slow(info, cursor);
}