Skip to content

Commit

Permalink
executor: add globalAnalyzeTracker back
Browse files Browse the repository at this point in the history
  • Loading branch information
XuHuaiyu committed Nov 30, 2022
1 parent 31d943f commit a145cb6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1975,6 +1975,7 @@ func ResetContextOfStmt(ctx sessionctx.Context, s ast.StmtNode) (err error) {
if _, ok := s.(*ast.AnalyzeTableStmt); ok {
sc.InitMemTracker(memory.LabelForAnalyzeMemory, -1)
vars.MemTracker.SetBytesLimit(-1)
vars.MemTracker.AttachTo(GlobalAnalyzeMemoryTracker)
} else {
sc.InitMemTracker(memory.LabelForSQLText, -1)
logOnQueryExceedMemQuota := domain.GetDomain(ctx).ExpensiveQueryHandle().LogOnQueryExceedMemQuota
Expand Down

0 comments on commit a145cb6

Please sign in to comment.