From 9a8a4c14236f7739bd6bb63ca8049298e6f9661d Mon Sep 17 00:00:00 2001 From: Jensen Date: Mon, 25 Dec 2023 11:01:52 +0800 Subject: [PATCH] try --- pkg/frontend/computation_wrapper.go | 9 +++++++++ pkg/frontend/mysql_cmd_executor.go | 1 + 2 files changed, 10 insertions(+) diff --git a/pkg/frontend/computation_wrapper.go b/pkg/frontend/computation_wrapper.go index 92268c84e7474..fe35016af9dbb 100644 --- a/pkg/frontend/computation_wrapper.go +++ b/pkg/frontend/computation_wrapper.go @@ -109,6 +109,15 @@ func (cwft *TxnComputationWrapper) GetAst() tree.Statement { return cwft.stmt } +func (cwft *TxnComputationWrapper) FreeAst() { + // cwft.plan = nil + // cwft.proc = nil + // cwft.ses = nil + // cwft.compile = nil + // cwft.runResult = nil + // cwft.stmt = nil +} + func (cwft *TxnComputationWrapper) GetProcess() *process.Process { return cwft.proc } diff --git a/pkg/frontend/mysql_cmd_executor.go b/pkg/frontend/mysql_cmd_executor.go index 7429eb2011f2a..11b6f952fffc7 100644 --- a/pkg/frontend/mysql_cmd_executor.go +++ b/pkg/frontend/mysql_cmd_executor.go @@ -3915,6 +3915,7 @@ func (mce *MysqlCmdExecutor) doComQuery(requestCtx context.Context, input *UserI plans[i] = cwft.plan stmts[i] = cwft.stmt } else { + cwft.FreeAst() return nil } }