diff --git a/executor/adapter.go b/executor/adapter.go index ed2c0566e0f81..444c358f96c97 100644 --- a/executor/adapter.go +++ b/executor/adapter.go @@ -1611,8 +1611,8 @@ func (a *ExecStmt) LogSlowQuery(txnTS uint64, succ bool, hasMoreResults bool) { } func extractMsgFromSQLWarn(SQLWarn *stmtctx.SQLWarn) string { - // Currently, this function is only used in extractMsgFromSQLWarn(). - // extractMsgFromSQLWarn() can make sure SQLWarn is not nil so no need to add a nil check here. + // Currently, this function is only used in collectWarningsForSlowLog. + // collectWarningsForSlowLog can make sure SQLWarn is not nil so no need to add a nil check here. warn := errors.Cause(SQLWarn.Err) if x, ok := warn.(*terror.Error); ok && x != nil { sqlErr := terror.ToSQLError(x)