Skip to content

Commit 9c722bb

Browse files
authored
Merge pull request #2557 from actiontech/reset_priority
reset sql priority
2 parents 61a642d + 54ffaaf commit 9c722bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sqle/server/auditplan/job_task_handler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ func SetSQLPriority(sqlList []*model.SQLManageRecord) ([]*model.SQLManageRecord,
167167
return nil, err
168168
}
169169
highPriorityConditions := auditPlan.HighPriorityParams
170+
priority := sql.NullString{}
170171
for _, highPriorityCondition := range highPriorityConditions {
171172
var compareParamVale string
172173
// 审核级别特殊处理
@@ -189,12 +190,13 @@ func SetSQLPriority(sqlList []*model.SQLManageRecord) ([]*model.SQLManageRecord,
189190
compareParamVale = fmt.Sprintf("%v", infoV)
190191
}
191192
if high, err := highPriorityConditions.CompareParamValue(highPriorityCondition.Key, compareParamVale); err == nil && high {
192-
sqlList[i].Priority = sql.NullString{
193+
priority = sql.NullString{
193194
String: model.PriorityHigh,
194195
Valid: true,
195196
}
196197
}
197198
}
199+
sqlList[i].Priority = priority
198200
}
199201
return sqlList, nil
200202
}

0 commit comments

Comments
 (0)