• Thirunarayanan Balathandayuthapani's avatar
    MDEV-31851 After crash recovery, undo tablespace fails to open · 3da5d047
    Thirunarayanan Balathandayuthapani authored
    Problem:
    ========
    - InnoDB fails to open undo tablespace when page0 is corrupted
    and fails to throw error.
    
    Solution:
    =========
    - InnoDB throws DB_CORRUPTION error when InnoDB encounters
    page0 corruption of undo tablespace.
    
    - InnoDB restores the page0 of undo tablespace from
    doublewrite buffer if it encounters page corruption
    
    - Moved Datafile::restore_from_doublewrite() to
    recv_dblwr_t::restore_first_page(). So that undo
    tablespace and system tablespace can use this function
    instead of duplicating the code
    
    srv_undo_tablespace_open(): Returns 0 if file doesn't exist
    or ULINT_UNDEFINED if page0 is corrupted.
    3da5d047
buf0dblwr.cc 25.6 KB