diff --git a/statistics/update.go b/statistics/update.go index e84165d7e1534..3dd2106fa3aaa 100644 --- a/statistics/update.go +++ b/statistics/update.go @@ -670,6 +670,12 @@ func parseAutoAnalyzeRatio(ratio string) float64 { } func parseAnalyzePeriod(start, end string) (time.Time, time.Time, error) { + if start == "" { + start = variable.DefAutoAnalyzeStartTime + } + if end == "" { + end = variable.DefAutoAnalyzeEndTime + } s, err := time.ParseInLocation(variable.AnalyzeFullTimeFormat, start, time.UTC) if err != nil { return s, s, errors.Trace(err)