• Marko Mäkelä's avatar
    Bug#58212 Possible deadlock in change buffer in debug builds · 9bfb5ece
    Marko Mäkelä authored
    ibuf_page(): Renamed to ibuf_page_low(). Add the parameters file, line
    so that the latch diagnostics will be more meaningful.
    In debug builds, add the parameter ibool x_latch. When x_latch=FALSE,
    do not x-latch the page, but only buffer-fix it for reading the bit.
    In UNIV_SYNC_DEBUG, display a message if an insert buffer bitmap page
    was already latched. (The message should be displayed in those cases
    where the code would have previously failed.)
    
    ibuf_page(): A wrapper macro for ibuf_page_low(). Pass x_latch=TRUE.
    
    ibuf_bitmap_page_get_bits(): Renamed to ibuf_bitmap_page_get_bits_low().
    In UNIV_DEBUG, add the parameter latch_mode.
    Remove the parameter mtr unless UNIV_DEBUG is defined.
    
    ibuf_bitmap_page_get_bits(): A wrapper macro for
    ibuf_bitmap_page_get_bits_low(). Pass latch_type=MTR_MEMO_PAGE_X_FIX.
    
    buf_page_get_gen(): Use ibuf_page_low(x_latch=FALSE) in the debug assertion.
    This avoids the possible deadlock.
    9bfb5ece
ibuf0ibuf.c 132 KB