• Thirunarayanan Balathandayuthapani's avatar
    MDEV-22646 Assertion `table2->cached' failed in dict_table_t::add_to_cache · ad2bf112
    Thirunarayanan Balathandayuthapani authored
    Problem:
    ========
      During buffer pool resizing, InnoDB recreates the dictionary hash
    tables. Dictionary hash table reuses the heap of AHI hash tables.
    It leads to memory corruption.
    
    Fix:
    ====
    - While disabling AHI, free the heap and AHI hash tables. Recreate the
    AHI hash tables and assign new heap when AHI is enabled.
    
    - btr_blob_free() access invalid page if page was reallocated during
    buffer poolresizing. So btr_blob_free() should get the page from
    buf_pool instead of using existing block.
    
    - btr_search_enabled and block->index should be checked after
    acquiring the btr_search_sys latch
    
    - Moved the buffer_pool_scan debug sync to earlier before accessing the
    btr_search_sys latches to avoid the hang of truncate_purge_debug
    test case
    
    - srv_printf_innodb_monitor() should acquire btr_search_sys latches
    before AHI hash tables.
    ad2bf112
btr0sea.cc 53 KB