File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ func MakeUpdater(
116
116
}
117
117
118
118
updateColIDToRowIndex := ColIDtoRowIndexFromCols (updateCols )
119
- includeIndexes := make ( []catalog.Index , 0 , len ( tableDesc . WritableNonPrimaryIndexes ()))
119
+ var includeIndexes []catalog.Index
120
120
var deleteOnlyIndexes []catalog.Index
121
121
// If the UPDATE is set to only update columns, do not collect secondary
122
122
// indexes to update.
@@ -128,6 +128,9 @@ func MakeUpdater(
128
128
continue
129
129
}
130
130
if ! index .DeleteOnly () {
131
+ if includeIndexes == nil {
132
+ includeIndexes = make ([]catalog.Index , 0 , len (tableDesc .WritableNonPrimaryIndexes ()))
133
+ }
131
134
includeIndexes = append (includeIndexes , index )
132
135
} else {
133
136
if deleteOnlyIndexes == nil {
You can’t perform that action at this time.
0 commit comments