• Nikita Malyavin's avatar
    MDEV-32771 Server crash upon online alter with concurrent XA · d59d8836
    Nikita Malyavin authored
    In case of a non-recovery XA rollback/commit in the same connection,
    thon->rollback is called instead of rollback_by_xid, Though previously,
    thd_ha_data was moved to thd->transaction->xid_state.xid in hton->prepare.
    
    Like it wasn't enough, XA PREPARE can be skipped upon user and thus we
    can end up in hton->commit/rollback with and unprepared XA, so checking
    xid_state.is_explicit_XA is not enough -- we should check
    xid_state.get_state_code() == XA_PREPARED, which will also guarantee
    is_explicit_XA() == true.
    d59d8836
online_alter.cc 12.1 KB