From c137df4a1bc2c276d2b8aa985a6a63f00ba9930d Mon Sep 17 00:00:00 2001 From: jemappellehc <386956049@qq.com> Date: Mon, 5 Aug 2024 09:28:25 +0800 Subject: [PATCH] fix debugger function core --- src/common/pl/plpgsql/src/pl_debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/pl/plpgsql/src/pl_debugger.cpp b/src/common/pl/plpgsql/src/pl_debugger.cpp index ca2b90385..666634c20 100644 --- a/src/common/pl/plpgsql/src/pl_debugger.cpp +++ b/src/common/pl/plpgsql/src/pl_debugger.cpp @@ -224,12 +224,12 @@ static void set_debugger_procedure_state(int commIdx, bool state) void server_debug_main(PLpgSQL_function* func, PLpgSQL_execstate* estate) { DebugInfo* debug_ptr = func->debug; - debug_ptr->cur_stmt = estate->err_stmt; if (unlikely(debug_ptr == NULL || debug_ptr->comm == NULL)) { ereport(ERROR, (errmodule(MOD_PLDEBUGGER), errcode(ERRCODE_UNEXPECTED_NULL_VALUE), errmsg("Invalid debug info from func %s", func->fn_signature))); } + debug_ptr->cur_stmt = estate->err_stmt; PlDebuggerComm* debug_comm = &g_instance.pldebug_cxt.debug_comm[debug_ptr->comm->comm_idx]; /* stop to wait client conn if need */ debug_ptr->stop_next_stmt = debug_ptr->stop_next_stmt ||