[CP] [XA][4.2/4.3] support autonomous trans in xa

This commit is contained in:
jw-guo
2023-10-17 08:09:38 +00:00
committed by ob-robot
parent 73aa6149cf
commit 7c82486bfc
2 changed files with 9 additions and 0 deletions

View File

@ -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;
}