Skip to content
  • Marko Mäkelä's avatar
    6b65d903
    Bug#20872655 XA ROLLBACK IS NOT CRASH-SAFE · 6b65d903
    Marko Mäkelä authored
    
    
    When InnoDB is killed while XA ROLLBACK is executing, the transaction
    would incorrectly be recovered as being in XA PREPARE state, and
    a subsequent XA COMMIT would be possible, breaking the A in ACID and
    potentially causing corruption between the indexes of a table, depending
    on which changes done by the XA ROLLBACK got persisted.
    
    trx_undo_set_state_at_prepare(): Add the parameter rollback, to allow
    XA ROLLBACK to be persisted.
    
    trx_rollback_for_mysql(): When rolling back a XA PREPARE transaction,
    move its persistent insert_undo and update_undo into ACTIVE state,
    so that the rollback will be completed by crash recovery, in case the
    server is killed before the XA ROLLBACK is finished and persisted.
    
    RB:8596
    Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
    6b65d903
    Bug#20872655 XA ROLLBACK IS NOT CRASH-SAFE
    Marko Mäkelä authored
    
    
    When InnoDB is killed while XA ROLLBACK is executing, the transaction
    would incorrectly be recovered as being in XA PREPARE state, and
    a subsequent XA COMMIT would be possible, breaking the A in ACID and
    potentially causing corruption between the indexes of a table, depending
    on which changes done by the XA ROLLBACK got persisted.
    
    trx_undo_set_state_at_prepare(): Add the parameter rollback, to allow
    XA ROLLBACK to be persisted.
    
    trx_rollback_for_mysql(): When rolling back a XA PREPARE transaction,
    move its persistent insert_undo and update_undo into ACTIVE state,
    so that the rollback will be completed by crash recovery, in case the
    server is killed before the XA ROLLBACK is finished and persisted.
    
    RB:8596
    Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
Loading