• Alexander Barkov's avatar
    MDEV-14609 XA Transction unable to ROLLBACK TO SAVEPOINT · 88a9b233
    Alexander Barkov authored
    The function trans_rollback_to_savepoint(), unlike trans_savepoint(),
    did not allow xa_state=XA_ACTIVE, so an attempt to do ROLLBCK TO SAVEPOINT
    inside an XA transaction incorrectly returned an error
    "...command cannot be executed ... in the ACTIVE state...".
    
    Partially merging a MySQL patch:
      7fb5c47390311d9b1b5367f97cb8fedd4102dd05
      This is WL#7193 (Decouple THD and st_transactions)...
    
    The currently merged part includes these changes:
    - Introducing st_xid_state::check_has_uncommitted_xa()
    - Reusing it in both trans_rollback_to_savepoint() and trans_savepoint(),
      so now both allow XA_ACTIVE.
    88a9b233
sql_class.h 141 KB