• Marko Mäkelä's avatar
    MDEV-13626: Improve innodb.xa_recovery_debug · b1742a5c
    Marko Mäkelä authored
    Improve the test that was imported and adapted for MariaDB in
    commit fb217449.
    
    row_undo_step(): Move the DEBUG_SYNC point from trx_rollback_for_mysql().
    This DEBUG_SYNC point is executed after rolling back one row.
    
    trx_rollback_for_mysql(): Clarify the comments that describe the scenario,
    and remove the DEBUG_SYNC point.
    
    If the statement "if (trx->has_logged_persistent())" and its body are
    removed from trx_rollback_for_mysql(), then the test
    innodb.xa_recovery_debug will fail because the transaction would still
    exist in the XA PREPARE state. If we allow the XA COMMIT statement
    to succeed in the test, we would observe an incorrect state of the
    XA transaction where the table would contain row (1,NULL). Depending
    on whether the XA transaction was committed, the table should either
    be empty or contain the record (1,1). The intermediate state of
    (1,NULL) should never be observed after completed recovery.
    b1742a5c
xa_recovery_debug.test 1.29 KB