• Marko Mäkelä's avatar
    MDEV-12353: Reduce log volume by an UNDO_APPEND record · 84e3f9ce
    Marko Mäkelä authored
    We introduce an EXTENDED log record for appending an undo log record
    to an undo log page. This is equivalent to the MLOG_UNDO_INSERT record
    that was removed in commit f802c989,
    only using more compact encoding.
    
    mtr_t::log_write(): Fix a bug that affects longer log
    record writes in the !same_page && !have_offset case.
    Similar code is already implemented for the have_offset code path.
    The bug was unobservable before we started to write longer
    EXTENDED records. All !have_offset records (FREE_PAGE, INIT_PAGE,
    EXTENDED) that were written so far are short, and we never write
    RESERVED or OPTION records.
    
    mtr_t::undo_append(): Write an UNDO_APPEND record.
    
    log_phys_t::undo_append(): Apply an UNDO_APPEND record.
    
    trx_undo_page_set_next_prev_and_add(),
    trx_undo_page_report_modify(),
    trx_undo_page_report_rename():
    Invoke mtr_t::undo_append() instead of emitting WRITE records.
    84e3f9ce
mtr0log.h 17.6 KB