Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ public void executeQuery(MysqlCommand mysqlCommand, String originStmt) throws Ex
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) {
Expand Down
6 changes: 6 additions & 0 deletions regression-test/data/insert_p0/insert.out
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,9 @@
44980 113.8777 again 1987-04-09 2010-01-02T04:03:06 false -0.01 0E-10
44980 113.8777 again 1987-04-09 2010-01-02T04:03:06 false -0.01 0E-10

-- !select1 --
1994-12-08 1 1
1994-12-14 1 1
1994-12-14 2 1
2000-12-08 1 1

26 changes: 26 additions & 0 deletions regression-test/suites/insert_p0/insert.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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; """
}