branch-2.1: [fix](fe) multi statements different behavior in master and follower (#52144) (#52632)

pick https://github.com/apache/doris/pull/52144
This commit is contained in:
meiyi
2025-07-03 14:53:19 +08:00
committed by GitHub
parent 6404277795
commit b0e83ca7d1
3 changed files with 35 additions and 1 deletions

View File

@ -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) {