• Marko Mäkelä's avatar
    MDEV-30100: Assertion purge_sys.tail.trx_no <= purge_sys.rseg->last_trx_no() · cf108c61
    Marko Mäkelä authored
    trx_t::commit_empty(): A special case of transaction "commit" when
    the transaction was actually rolled back or the persistent undo log
    is empty. In this case, we need to change the undo log header state to
    TRX_UNDO_CACHED and move the undo log from rseg->undo_list to
    rseg->undo_cached for fast reuse. Furthermore, unless this is the only
    undo log record in the page, we will remove the record and rewind
    TRX_UNDO_PAGE_START, TRX_UNDO_PAGE_FREE, TRX_UNDO_LAST_LOG.
    
    Even though it is not going to be written persistently anywhere,
    we will invoke trx_sys.assign_new_trx_no(this), so that in the test
    innodb.instant_alter everything will be purged as expected.
    
    trx_t::write_serialisation_history(): Renamed from
    trx_write_serialisation_history(). If there is no undo log,
    invoke commit_empty().
    
    trx_purge_add_undo_to_history(): Simplify an assertion and remove a
    comment. This function will not be invoked on an empty undo log
    anymore.
    
    trx_undo_header_create(): Add a debug assertion.
    
    trx_undo_mem_create_at_db_start(): Remove a duplicated assignment.
    cf108c61
instant_alter_debug.test 15.2 KB