• Marko Mäkelä's avatar
    MDEV-29999 innodb_undo_log_truncate=ON is not crash safe · 0b25551a
    Marko Mäkelä authored
    If a log checkpoint occurs at the end LSN of mtr.commit_shrink(space)
    in trx_purge_truncate_history(), then recovery may fail because
    it could try to apply too old log records to too old copies of
    undo log pages. This was repeated with the following test:
    
    ./mtr innodb.undo_log_truncate,4k,strict_full_crc32
    
    recv_sys_t::trim(): Move some code to the caller.
    
    recv_sys_t::apply(): For undo tablespace truncation, discard
    all old redo log for the undo tablespace, and then truncate
    the file to the desired size.
    
    Tested by: Matthias Leich
    0b25551a
log0recv.cc 113 KB