From f5383728b61dae00c59266c358627b296227df34 Mon Sep 17 00:00:00 2001 From: crazycs520 Date: Wed, 25 Sep 2019 19:10:37 +0800 Subject: [PATCH] *: DNM, bench for slow log --- executor/adapter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/executor/adapter.go b/executor/adapter.go index 4ee50440f468f..c95e98c320f49 100644 --- a/executor/adapter.go +++ b/executor/adapter.go @@ -753,9 +753,8 @@ func FormatSQL(sql string, pps variable.PreparedParams) stringutil.StringerFunc func (a *ExecStmt) LogSlowQuery(txnTS uint64, succ bool, hasMoreResults bool) { sessVars := a.Ctx.GetSessionVars() level := log.GetLevel() - cfg := config.GetGlobalConfig() costTime := time.Since(a.Ctx.GetSessionVars().StartTime) - threshold := time.Duration(atomic.LoadUint64(&cfg.Log.SlowThreshold)) * time.Millisecond + threshold := time.Duration(int64(0)) if costTime < threshold && level > zapcore.DebugLevel { return }