• Marko Mäkelä's avatar
    MDEV-26826 fixup: ROW_FORMAT=COMPRESSED may corrupt buf_pool.page_hash · 9b967c4c
    Marko Mäkelä authored
    In commit c091a0bc we removed
    the use of the HASH_ macros for inserting into
    buf_pool.page_hash, or accessing buf_page_t::hash.
    
    However, the binary buddy allocator for block->page.zip.data would
    still use the HASH_ macros. HASH_INSERT and not HASH_DELETE would reset
    the next-block pointer to the null pointer. Our replacement of
    HASH_DELETE() will reset the next-block pointer, and the replacement of
    HASH_INSERT() assumes that the pointer is the null pointer.
    
    buf_LRU_block_free_non_file_page(): Assert that the next-block pointer
    is the null pointer.
    
    buf_buddy_block_free(): Reset the pointer before invoking
    buf_LRU_block_free_non_file_page(). Without this, the added
    assertion would fail in the test encryption.innochecksum.
    9b967c4c
buf0buddy.cc 22 KB