Skip to content

Commit 9274d4b

Browse files
committed
modify: check sql in batch
1 parent 0e1aeda commit 9274d4b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sqle/server/sqled.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,11 @@ func (a *action) executeSqlsGroupByBatchId(sqls []*model.ExecuteSQL) error {
569569
if err := a.executeSQLBatch(sqlBatch); err != nil {
570570
return err
571571
}
572-
if sql.ExecStatus == model.SQLExecuteStatusFailed {
573-
// 一旦出现执行失败的SQL,则不再执行其他未执行的SQL
574-
return nil
572+
for _, sqlInBatch := range sqlBatch {
573+
if sqlInBatch.ExecStatus == model.SQLExecuteStatusFailed {
574+
// 一旦出现执行失败的SQL,则不再执行其他未执行的SQL
575+
return nil
576+
}
575577
}
576578
// clear sql batch
577579
sqlBatch = make([]*model.ExecuteSQL, 0)

0 commit comments

Comments
 (0)