This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 0d83327a7ca [fix](prepare statement) Not supported such prepared 
statement if prepare a forward master sql (#26512) (#26638)
0d83327a7ca is described below

commit 0d83327a7cae596ba9e8dfee55bd8689d064c97a
Author: meiyi <myime...@gmail.com>
AuthorDate: Thu Nov 9 15:13:48 2023 +0800

    [fix](prepare statement) Not supported such prepared statement if prepare a 
forward master sql (#26512) (#26638)
---
 fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
index e1975be1175..cad5da4aa6a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
@@ -519,6 +519,9 @@ public class StmtExecutor {
             if (logicalPlan instanceof Forward) {
                 redirectStatus = ((Forward) logicalPlan).toRedirectStatus();
                 if (isForwardToMaster()) {
+                    if (context.getCommand() == MysqlCommand.COM_STMT_PREPARE) 
{
+                        throw new UserException("Forward master command is not 
supported for prepare statement");
+                    }
                     if (isProxy) {
                         // This is already a stmt forwarded from other FE.
                         // If we goes here, means we can't find a valid Master 
FE(some error happens).
@@ -686,6 +689,9 @@ public class StmtExecutor {
                     queryAnalysisSpan.end();
                 }
                 if (isForwardToMaster()) {
+                    if (context.getCommand() == MysqlCommand.COM_STMT_PREPARE) 
{
+                        throw new UserException("Forward master command is not 
supported for prepare statement");
+                    }
                     if (isProxy) {
                         // This is already a stmt forwarded from other FE.
                         // If goes here, which means we can't find a valid 
Master FE(some error happens).


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to