Skip to content

Commit

Permalink
Make with capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
joechenrh committed Jul 27, 2024
1 parent b5a7af0 commit ab606c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/planner/core/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,7 @@ func tryLockMDLAndUpdateSchemaIfNecessary(ctx context.Context, sctx base.PlanCon
if tbl.Meta().Revision != tableInfo.Revision && !sctx.GetSessionVars().IsPessimisticReadConsistency() {
var copyTableInfo *model.TableInfo

infoIndices := make(map[string]int64)
infoIndices := make(map[string]int64, len(tableInfo.Indices))
for _, idx := range tableInfo.Indices {
infoIndices[idx.Name.L] = idx.ID
}
Expand All @@ -1899,7 +1899,7 @@ func tryLockMDLAndUpdateSchemaIfNecessary(ctx context.Context, sctx base.PlanCon
}
}
// Check the column change.
infoColumns := make(map[string]int64)
infoColumns := make(map[string]int64, len(tableInfo.Columns))
for _, col := range tableInfo.Columns {
infoColumns[col.Name.L] = col.ID
}
Expand Down

0 comments on commit ab606c1

Please sign in to comment.