Skip to content

Commit

Permalink
session: change parser.New to get a parser from pool
Browse files Browse the repository at this point in the history
  • Loading branch information
winkyao committed Nov 29, 2022
1 parent 03ce121 commit 68eecc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion session/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,8 @@ func rebuildAllPartitionValueMapAndSorted(s *session) {
PartitionExpr() (*tables.PartitionExpr, error)
}

p := parser.New()
p := parserPool.Get().(*parser.Parser)
defer parserPool.Put(p)
is := s.GetInfoSchema().(infoschema.InfoSchema)
for _, dbInfo := range is.AllSchemas() {
for _, t := range is.SchemaTables(dbInfo.Name) {
Expand Down

0 comments on commit 68eecc2

Please sign in to comment.