[master][tx-free-route] trigger pl ctx release stash savepoint failed
This commit is contained in:
@ -799,7 +799,7 @@ void ObPLContext::destory(
|
||||
}
|
||||
if (has_stash_savepoint_) {
|
||||
const ObString stash_savepoint_name("PL stash savepoint");
|
||||
int pop_ret = ObSqlTransControl::release_savepoint(ctx, stash_savepoint_name);
|
||||
int pop_ret = ObSqlTransControl::release_stash_savepoint(ctx, stash_savepoint_name);
|
||||
if (OB_SUCCESS != pop_ret) {
|
||||
LOG_WARN("fail to release stash savepoint", K(pop_ret));
|
||||
ret = OB_SUCCESS == ret ? pop_ret : ret;
|
||||
|
||||
@ -892,6 +892,20 @@ int ObSqlTransControl::rollback_savepoint(ObExecContext &exec_ctx,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObSqlTransControl::release_stash_savepoint(ObExecContext &exec_ctx,
|
||||
const ObString &sp_name)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObSQLSessionInfo *session = GET_MY_SESSION(exec_ctx);
|
||||
transaction::ObTransService *txs = NULL;
|
||||
CK (OB_NOT_NULL(session));
|
||||
CHECK_SESSION (session);
|
||||
OZ (get_tx_service(session, txs), *session);
|
||||
OZ (acquire_tx_if_need_(txs, *session));
|
||||
OZ (txs->release_explicit_savepoint(*session->get_tx_desc(), sp_name, get_real_session_id(*session)), *session, sp_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObSqlTransControl::release_savepoint(ObExecContext &exec_ctx,
|
||||
const ObString &sp_name)
|
||||
{
|
||||
|
||||
@ -170,6 +170,7 @@ public:
|
||||
static int reset_session_tx_state(ObSQLSessionInfo *session, bool reuse_tx_desc = false);
|
||||
static int reset_session_tx_state(ObBasicSessionInfo *session, bool reuse_tx_desc = false);
|
||||
static int create_stash_savepoint(ObExecContext &exec_ctx, const ObString &name);
|
||||
static int release_stash_savepoint(ObExecContext &exec_ctx, const ObString &name);
|
||||
static int explicit_start_trans(ObExecContext &exec_ctx, const bool read_only, const ObString hint = ObString());
|
||||
static int explicit_end_trans(ObExecContext &exec_ctx, const bool is_rollback, const ObString hint = ObString());
|
||||
static int implicit_end_trans(ObExecContext &exec_ctx,
|
||||
|
||||
Reference in New Issue
Block a user