From dec121a850358f75aa179c5ac4b3e246ee43b6e6 Mon Sep 17 00:00:00 2001 From: LiuYoung00 Date: Thu, 12 Oct 2023 07:47:54 +0000 Subject: [PATCH] [CP] [to #52558204]local retry not close ps stmt --- src/observer/mysql/obmp_stmt_prexecute.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/observer/mysql/obmp_stmt_prexecute.cpp b/src/observer/mysql/obmp_stmt_prexecute.cpp index ba021b785..a7ff3b84d 100644 --- a/src/observer/mysql/obmp_stmt_prexecute.cpp +++ b/src/observer/mysql/obmp_stmt_prexecute.cpp @@ -573,9 +573,9 @@ int ObMPStmtPrexecute::execute_response(ObSQLSessionInfo &session, if (OB_NOT_NULL(cursor) && OB_FAIL(session.close_cursor(cursor->get_id()))) { LOG_WARN("close cursor failed.", K(ret), K(stmt_id_)); } - // first time the stmt_id do not response to the client - // Whether the cursor close is successful or not, it is required - if (first_time_ && OB_FAIL(session.close_ps_stmt(stmt_id_))) { + if (OB_FAIL(clean_ps_stmt(session, + RETRY_TYPE_LOCAL == retry_ctrl.get_retry_type(), + ctx.multi_stmt_item_.is_batched_multi_stmt()))) { LOG_WARN("close cursor failed.", K(ret), K(stmt_id_)); } ret = tmp_ret;