From e6fa13aeb06d42eab7a3664356d3ab656a2c4fcd Mon Sep 17 00:00:00 2001 From: chenxiaobin19 <1025221611@qq.com> Date: Sat, 26 Oct 2024 14:15:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmysql=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E4=B8=8B=E5=A4=9A=E5=91=BD=E4=BB=A4=E7=BB=93=E6=9E=9C=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/process/tcop/postgres.cpp | 2 ++ src/gausskernel/process/threadpool/knl_session.cpp | 1 + src/include/knl/knl_session.h | 1 + 3 files changed, 4 insertions(+) diff --git a/src/gausskernel/process/tcop/postgres.cpp b/src/gausskernel/process/tcop/postgres.cpp index e9ac1d914..b060f0a7f 100755 --- a/src/gausskernel/process/tcop/postgres.cpp +++ b/src/gausskernel/process/tcop/postgres.cpp @@ -3080,6 +3080,8 @@ static void exec_simple_query(const char* query_string, MessageType messageType, CommandCounterIncrement(); } + u_sess->proc_cxt.nextQuery = lnext(parsetree_item) != NULL; + /* * Tell client that we're done with this query. Note we emit exactly * one EndCommand report for each raw parsetree, thus one for each SQL diff --git a/src/gausskernel/process/threadpool/knl_session.cpp b/src/gausskernel/process/threadpool/knl_session.cpp index 1a41dd263..7891194c0 100755 --- a/src/gausskernel/process/threadpool/knl_session.cpp +++ b/src/gausskernel/process/threadpool/knl_session.cpp @@ -621,6 +621,7 @@ static void knl_u_proc_init(knl_u_proc_context* proc_cxt) proc_cxt->sessionBackupState = SESSION_BACKUP_NONE; proc_cxt->registerExclusiveHandlerdone = false; proc_cxt->check_auth = false; + proc_cxt->nextQuery = false; } static void knl_u_time_init(knl_u_time_context* time_cxt) diff --git a/src/include/knl/knl_session.h b/src/include/knl/knl_session.h index dabb4ed19..663efea7e 100644 --- a/src/include/knl/knl_session.h +++ b/src/include/knl/knl_session.h @@ -1258,6 +1258,7 @@ typedef struct knl_u_proc_context { char* TblspcMapFile; bool registerAbortBackupHandlerdone; /* unterminated backups handler flag */ bool check_auth; + bool nextQuery; /* for B-cmpt protocal */ } knl_u_proc_context; /* maximum possible number of fields in a date string */