From 4d33027523c5d25efdfe9acb1ef1feef780ba7a9 Mon Sep 17 00:00:00 2001 From: duzhuolin Date: Wed, 26 Jul 2023 19:26:27 +0800 Subject: [PATCH] =?UTF-8?q?pbe=E5=86=85=E5=AD=98=E7=BB=93=E7=82=B9?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/backend/parser/analyze.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/backend/parser/analyze.cpp b/src/common/backend/parser/analyze.cpp index 176e8d370..12c7763ec 100644 --- a/src/common/backend/parser/analyze.cpp +++ b/src/common/backend/parser/analyze.cpp @@ -2630,7 +2630,7 @@ static bool shouldTransformStartWithStmt(ParseState* pstate, SelectStmt* stmt, Q * Back up the current select statement to be restored after query re-writing * for cases of START WITH CONNNECT BY under CREATE TABLE AS. */ - selectQuery->sql_statement = fetchSelectStmtFromCTAS((char*)pstate->p_sourcetext); + selectQuery->sql_statement = fetchSelectStmtFromCTAS((char*)pstrdup(pstate->p_sourcetext)); return true; }