Skip to content

Commit

Permalink
fix the bug TiDB doesn't log any slow log(#30461)
Browse files Browse the repository at this point in the history
close #30309

Signed-off-by: TonsnakeLin <[email protected]>
  • Loading branch information
TonsnakeLin committed Dec 7, 2021
1 parent ea25b28 commit 5b02862
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion executor/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,6 @@ func (a *ExecStmt) LogSlowQuery(txnTS uint64, succ bool, hasMoreResults bool) {
}
logutil.SlowQueryLogger.Warn(slowLog)
if costTime >= threshold {
logutil.SlowQueryLogger.Warn(sessVars.SlowLogFormat(slowItems))
if sessVars.InRestrictedSQL {
totalQueryProcHistogramInternal.Observe(costTime.Seconds())
totalCopProcHistogramInternal.Observe(execDetail.TimeDetail.ProcessTime.Seconds())
Expand Down

0 comments on commit 5b02862

Please sign in to comment.