[master] fix pl autonomous transaction and pl cursor cases

This commit is contained in:
chinaxing
2023-01-28 18:32:41 +08:00
committed by ob-robot
parent 48159dd15d
commit 10b85bdc42
6 changed files with 42 additions and 20 deletions

View File

@ -1728,7 +1728,7 @@ int ObSPIService::spi_check_autonomous_trans(pl::ObPLExecCtx *ctx)
CK (OB_NOT_NULL(pl_context = ctx->exec_ctx_->get_pl_stack_ctx()));
if (OB_SUCC(ret) && pl_context->is_autonomous()) {
if (session_info->is_in_transaction()) {
if (session_info->is_in_transaction() && session_info->has_exec_inner_dml()) {
ret = OB_ERR_AUTONOMOUS_TRANSACTION_ROLLBACK;
LOG_WARN("active autonomous transaction detected", K(ret));
}