Skip to content

Commit

Permalink
executor: add globalAnalyzeTracker back (#39500)
Browse files Browse the repository at this point in the history
close #39499
  • Loading branch information
XuHuaiyu authored Dec 1, 2022
1 parent 7b91e6a commit 3bb8e79
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 3bb8e79

Please sign in to comment.