chore: preallocate slices where we have a good idea of requirements (#91596)

* chore: preallocate slices where we have a good idea of requirements

* pr feedback
This commit is contained in:
Kristin Laemmert
2024-08-07 08:34:52 -04:00
committed by GitHub
parent 9b652612bd
commit a117b090cf
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -866,7 +866,7 @@ func (statement *Statement) genUniqueSQL() []string {
}
func (statement *Statement) genDelIndexSQL() []string {
var sqls []string
sqls := make([]string, 0, len(statement.RefTable.Indexes))
tbName := statement.TableName()
idxPrefixName := strings.Replace(tbName, `"`, "", -1)
idxPrefixName = strings.Replace(idxPrefixName, `.`, "_", -1)