diff --git a/pkg/sessionctx/variable/sysvar.go b/pkg/sessionctx/variable/sysvar.go index 3fb95efce64f4..0c8fdf9aa74b4 100644 --- a/pkg/sessionctx/variable/sysvar.go +++ b/pkg/sessionctx/variable/sysvar.go @@ -1025,6 +1025,10 @@ var defaultSysVars = []*SysVar{ EnableAutoAnalyzePriorityQueue.Store(TiDBOptOn(val)) return nil }, + Validation: func(s *SessionVars, normalizedValue string, originalValue string, scope ScopeFlag) (string, error) { + s.StmtCtx.AppendWarning(ErrWarnDeprecatedSyntaxSimpleMsg.FastGen("tidb_enable_auto_analyze_priority_queue will be removed in the future and TiDB will always use priority queue to execute auto analyze.")) + return normalizedValue, nil + }, }, {Scope: ScopeGlobal, Name: TiDBGOGCTunerThreshold, Value: strconv.FormatFloat(DefTiDBGOGCTunerThreshold, 'f', -1, 64), Type: TypeFloat, MinValue: 0, MaxValue: math.MaxUint64, GetGlobal: func(_ context.Context, s *SessionVars) (string, error) {