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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new b0e83ca7d1d branch-2.1: [fix](fe) multi statements different behavior 
in master and follower (#52144) (#52632)
b0e83ca7d1d is described below

commit b0e83ca7d1d516beeb955946182cbe3c92a438a5
Author: meiyi <[email protected]>
AuthorDate: Thu Jul 3 14:53:19 2025 +0800

    branch-2.1: [fix](fe) multi statements different behavior in master and 
follower (#52144) (#52632)
    
    pick https://github.com/apache/doris/pull/52144
---
 .../java/org/apache/doris/qe/ConnectProcessor.java |   4 +++-
 regression-test/data/insert_p0/insert.out          | Bin 15806 -> 15882 bytes
 regression-test/suites/insert_p0/insert.groovy     |  26 +++++++++++++++++++++
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
index a91f5e868a7..af54a66d3df 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
@@ -384,7 +384,9 @@ public abstract class ConnectProcessor {
                     auditAfterExec(auditStmt, executor.getParsedStmt(), 
executor.getQueryStatisticsForAuditLog(),
                             true);
                     // execute failed, skip remaining stmts
-                    if (ctx.getState().getStateType() == MysqlStateType.ERR) {
+                    if (ctx.getState().getStateType() == MysqlStateType.ERR || 
(!Env.getCurrentEnv().isMaster()
+                            && ctx.executor != null && 
ctx.executor.isForwardToMaster()
+                            && ctx.executor.getProxyStatusCode() != 0)) {
                         break;
                     }
                 } catch (Throwable throwable) {
diff --git a/regression-test/data/insert_p0/insert.out 
b/regression-test/data/insert_p0/insert.out
index b582f45123d..bd2216290c7 100644
Binary files a/regression-test/data/insert_p0/insert.out and 
b/regression-test/data/insert_p0/insert.out differ
diff --git a/regression-test/suites/insert_p0/insert.groovy 
b/regression-test/suites/insert_p0/insert.groovy
index bcab9956c1d..cd7ba6e54bc 100644
--- a/regression-test/suites/insert_p0/insert.groovy
+++ b/regression-test/suites/insert_p0/insert.groovy
@@ -112,4 +112,30 @@ suite("insert") {
           b as (select * from a)
         select id from a;
         """
+
+    sql """
+    DROP TABLE IF EXISTS source;
+    CREATE TABLE source (
+                l_shipdate    DATE NOT NULL,
+                        l_orderkey    bigint NOT NULL,
+                l_linenumber  int not null
+        )ENGINE=OLAP
+        DUPLICATE KEY(`l_shipdate`, `l_orderkey`)
+        COMMENT "OLAP"
+        DISTRIBUTED BY HASH(`l_orderkey`) BUCKETS 96
+        PROPERTIES (
+                "replication_num" = "1"
+        );
+
+    insert into source values('1994-12-08', 1,1) , ('1994-12-14',1,1), 
('1994-12-14',2,1);
+    """
+
+    try {
+        sql """ insert into source values('2000-12-08', 1, 1);
+            insert into source values('2000-12-09', 1, 1, 100);
+            insert into source values('2000-12-10', 1, 1); """
+    } catch (Exception e) {
+        logger.info("exception: " + e.getMessage())
+    }
+    order_qt_select1 """ select * from source; """
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to