• marko's avatar
    Reduce the size of btr_search_t from 13 machine words to 7. This · 0efd5d66
    marko authored
    structure is reserved for every index in the data dictionary cache.
    (Bug #20877)
    
    We could shrink the structure further to three 32-bit words or two
    64-bit words by turning the remaining fields to bit-fields.
    Unfortunately, the fields are not protected by any mutex, and thus we
    would better keep each field aligned to a machine word.
    
    btr_search_t, buf_block_t: Rename "ulint side" to "ibool left_side".
    Remove BTR_SEARCH_LEFT_SIDE and BTR_SEARCH_RIGHT_SIDE, and also rename
    some local variables and function parameters from "ulint side" to
    "ibool left_side".
    
    btr_search_t: Remove the unused fields last_search, n_direction, direction,
    and modify_clock.  Remove the unused constants BTR_SEA_NO_DIRECTION,
    BTR_SEA_LEFT, BTR_SEA_RIGHT, and BTR_SEA_SAME_REC.
    
    btr_search_t: Remove magic_n unless #defined UNIV_DEBUG.  Turn an assertion
    about the magic number into a debug assertion.
    0efd5d66
buf0buf.h 38.1 KB