This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 9b0bdc8c020 branch-3.0: [fix](fe) multi statements different behavior
in master and follower (#52144) (#52630)
9b0bdc8c020 is described below
commit 9b0bdc8c02078e8ef92f88b47735caed421e5b2d
Author: meiyi <[email protected]>
AuthorDate: Mon Jul 7 14:25:42 2025 +0800
branch-3.0: [fix](fe) multi statements different behavior in master and
follower (#52144) (#52630)
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 | 27 +++++++++++++++++++++
3 files changed, 30 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 06f5397d3dc..6b3640c1d88 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
@@ -381,7 +381,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..6a61ea9388a 100644
--- a/regression-test/suites/insert_p0/insert.groovy
+++ b/regression-test/suites/insert_p0/insert.groovy
@@ -112,4 +112,31 @@ 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]