• Marko Mäkelä's avatar
    MDEV-13495 Crash in rollback of a recovered INSERT transaction after upgrade · 347d9456
    Marko Mäkelä authored
    If the server is upgraded from a database that was created
    before MDEV-12288, and if the undo logs in the database contain
    an incomplete transaction that performed an INSERT operation,
    the server would crash when rolling back that transaction.
    
    trx_commit_low(): Relax a too strict transaction. This function
    will also be called after completing the rollback of a recovered
    transaction.
    
    trx_purge_add_undo_to_history(): Merged from the functions
    trx_purge_add_update_undo_to_history() and trx_undo_update_cleanup(),
    which are removed. Remove the parameter undo_page, and instead call
    trx_undo_set_state_at_finish() to obtain it.
    
    trx_write_serialisation_history(): Treat undo and old_insert equally.
    That is, after the rollback (or XA COMMIT) of a recovered transaction
    before upgrade, move all logs (both insert_undo and update_undo) to
    the purge queue.
    347d9456
trx0purge.cc 47.9 KB