Skip to content

Commit 5fa4b33

Browse files
committed
fix(audit_plan): too many placeholder when create a large batch of sqls
1 parent 494a0a9 commit 5fa4b33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sqle/model/instance_audit_plan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ func (s *Storage) PushSQLToManagerSQLQueue(sqls []*SQLManageQueue) error {
640640
if len(sqls) == 0 {
641641
return nil
642642
}
643-
return s.db.Create(sqls).Error
643+
return s.db.CreateInBatches(sqls, 50).Error
644644
}
645645

646646
type SqlManageMetricRecord struct {

0 commit comments

Comments
 (0)