[CP] [XA][4.2/4.3] support autonomous trans in xa
This commit is contained in:
parent
73aa6149cf
commit
7c82486bfc
@ -5919,6 +5919,9 @@ int ObBasicSessionInfo::trans_save_session(TransSavedValue &saved_value)
|
||||
OX (trans_flags_.reset());
|
||||
OX (saved_value.nested_count_ = nested_count_);
|
||||
OX (nested_count_ = -1);
|
||||
OX (saved_value.xid_ = xid_);
|
||||
OX (xid_.reset());
|
||||
OX (associated_xa_ = false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -5944,6 +5947,10 @@ int ObBasicSessionInfo::trans_restore_session(TransSavedValue &saved_value)
|
||||
LOG_WARN("failed to restore base session", K(tmp_ret));
|
||||
ret = COVER_SUCC(tmp_ret);
|
||||
}
|
||||
xid_ = saved_value.xid_;
|
||||
if (!xid_.empty()) {
|
||||
associated_xa_ = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -377,12 +377,14 @@ public:
|
||||
trans_flags_.reset();
|
||||
tx_result_.reset();
|
||||
nested_count_ = -1;
|
||||
xid_.reset();
|
||||
}
|
||||
public:
|
||||
transaction::ObTxDesc *tx_desc_;
|
||||
TransFlags trans_flags_;
|
||||
transaction::ObTxExecResult tx_result_;
|
||||
int64_t nested_count_;
|
||||
transaction::ObXATransID xid_;
|
||||
};
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user