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 @@ -381,7 +381,9 @@ public void executeQuery(String originStmt) throws Exception {
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

23 changes: 23 additions & 0 deletions regression-test/suites/insert_p0/insert.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,20 @@ suite("insert") {
"""

sql """
DROP TABLE IF EXISTS source;
DROP TABLE IF EXISTS dest;
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"
);

CREATE TABLE dest (
l_shipdate DATE NOT NULL,
l_orderkey bigint NOT NULL,
Expand All @@ -127,10 +140,20 @@ suite("insert") {
PROPERTIES (
"replication_num" = "1"
);
insert into source values('1994-12-08', 1,1) , ('1994-12-14',1,1), ('1994-12-14',2,1);
"""

test {
sql("insert into dest values(now(), 0xff, 0xaa)")
exception "Unknown column '0xff' in 'table list' in UNBOUND_OLAP_TABLE_SINK clause"
}

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; """
}