From 48063813510cc36dffc9bd9e700608a102fba26c Mon Sep 17 00:00:00 2001 From: mhwwhu Date: Sun, 27 Oct 2024 00:34:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=A1=8Cquer?= =?UTF-8?q?y=E5=A4=B1=E8=B4=A5=E5=90=8E=E5=87=BA=E7=8E=B0frame=20unlock=20?= =?UTF-8?q?while=20not=20holding=20read=20lock=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/net/plain_communicator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/observer/net/plain_communicator.cpp b/src/observer/net/plain_communicator.cpp index e16746716..786fe8978 100644 --- a/src/observer/net/plain_communicator.cpp +++ b/src/observer/net/plain_communicator.cpp @@ -245,6 +245,11 @@ RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disc } if (OB_FAIL(rc)) { + // 失败时也close sql_result, 防止出现"frame unlock while not holding read lock" + RC rc_close = sql_result->close(); + if (OB_SUCC(rc)) { + rc = rc_close; + } return rc; }