diff --git a/pkg/executor/analyze.go b/pkg/executor/analyze.go index 2fbf0bc179cfa..b27040fee3137 100644 --- a/pkg/executor/analyze.go +++ b/pkg/executor/analyze.go @@ -169,7 +169,10 @@ TASKLOOP: } } else { for globalStatsID := range globalStatsMap { - statsHandle.SaveMetaToStorage(globalStatsID.tableID, 0, 0, handleutil.StatsMetaHistorySourceAnalyze) + err = statsHandle.SaveMetaToStorage(globalStatsID.tableID, 0, 0, handleutil.StatsMetaHistorySourceAnalyze) + if err != nil { + return err + } } } }