Skip to content

Commit 31f38fc

Browse files
committed
fix: correct variable assignment in ExecSQLs function for error handling
1 parent 93c2390 commit 31f38fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqle/server/sqled.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,15 +786,15 @@ ExecSQLs:
786786
TaskId: rollbackSQL.TaskId,
787787
Content: node.Text,
788788
}, ExecuteSQLId: rollbackSQL.ExecuteSQLId}
789-
_, execErr := a.plugin.Exec(context.TODO(), node.Text)
789+
_, execErr = a.plugin.Exec(context.TODO(), node.Text)
790790
if execErr != nil {
791791
currentSQL.ExecStatus = model.SQLExecuteStatusFailed
792792
currentSQL.ExecResult = execErr.Error()
793793
} else {
794794
currentSQL.ExecStatus = model.SQLExecuteStatusSucceeded
795795
currentSQL.ExecResult = model.TaskExecResultOK
796796
}
797-
if execErr := st.Save(currentSQL); execErr != nil {
797+
if execErr = st.Save(currentSQL); execErr != nil {
798798
break ExecSQLs
799799
}
800800
}

0 commit comments

Comments
 (0)