• marko's avatar
    branches/zip: Make innodb_adaptive_hash_index settable. · 06375f3c
    marko authored
    btr_search_disabled: Rename to btr_search_enabled and change the type
    to char, so that it can be directly linked to the MySQL parameters.
    Note that the variable is protected by btr_search_latch and
    btr_search_enabled_mutex, a new mutex introduced in this patch.
    
    btr_search_enabled_mutex: A new mutex, to protect btr_search_enabled
    together with btr_search_latch.
    
    buf_pool_drop_hash_index(): New function, to be called from
    btr_search_disable().
    
    btr_search_disable(), btr_search_enable(): Fix bugs.  These functions
    were previously unused.
    
    btr_search_guess_on_hash(), btr_search_build_page_hash_index():
    Check btr_search_enabled once more, while holding btr_search_latch.
    
    btr_cur_search_to_nth_level(): Note that the reads of btr_search_enabled
    may be dirty and explain why it should not be a problem.
    
    innobase_adaptive_hash_index: Remove. The variable btr_search_enabled will be used directly instead.
    
    innodb_adaptive_hash_index_update(): New function, an update callback for
    innodb_adaptive_hash_index.  This will call either btr_search_disable()
    or btr_search_enable() when the value is assigned.  The functions will
    be called even if the value does not appear to be changed, e.g., when
    setting from TRUE to TRUE or FALSE to FALSE.
    
    rb://85 approved by Heikki Tuuri.  This addresses Issue #163.
    06375f3c
ha_innodb.cc 283 KB