Skip to content

Commit

Permalink
planner: tiny optimization for tableNames2HintTableInfo (pingcap#11785
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lonng authored and sre-bot committed Aug 20, 2019
1 parent a1411ba commit 2f95fae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions planner/core/planbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func tableNames2HintTableInfo(tableNames []model.CIStr) []hintTableInfo {
if len(tableNames) == 0 {
return nil
}
hintTables := make([]hintTableInfo, 0, len(tableNames))
for _, tableName := range tableNames {
hintTables = append(hintTables, hintTableInfo{name: tableName})
hintTables := make([]hintTableInfo, len(tableNames))
for i, tableName := range tableNames {
hintTables[i] = hintTableInfo{name: tableName}
}
return hintTables
}
Expand Down

0 comments on commit 2f95fae

Please sign in to comment.