diff --git a/session/bootstrap.go b/session/bootstrap.go index 678cc2c1832a3..ce25efa427349 100644 --- a/session/bootstrap.go +++ b/session/bootstrap.go @@ -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) {