• Andrei's avatar
    MDEV-31949 IV. Recovery · 1bdc9bc8
    Andrei authored
    MDEV-33168 XA crash-recovery base on engines prepare first rule
    
    This commit address XA transaction's prepare, commit and rollback
    commands' crash-recovery both in the normal and semisync slave mode.
    
    Key changes include:
    - xid_recovery_member is extended to keep track of XID transaction
      "state" change. The state associated with its XID that when being
      reused could exists in binlog in multiple instance
    - xarecover_handlerton is extended to register the user prepare xid
      similarly to the normal transactions
    - xarecover_do_commit_or_rollback calls now a new
      xarecover_decide_xa() to decide on a user xid at the
      end of recovery
    - TC_LOG_BINLOG::recover and few members of Recovery_context class are
      extended to scan binlog for the user XIDs and keep track of them, and
      their marking as truncatable or contrary - that is durable
    
    Todo:
    1. integrate with Xid_list_log_event
    2. tests with multiple-engines
    1bdc9bc8
handler.h 197 KB