From 2175e08a64998f7d5ce01b1d351ec1616414feab Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Tue, 18 Jun 2024 17:23:18 +0800 Subject: [PATCH 1/2] sessionctx: mark tidb_enable_auto_analyze_priority_queue as deprecated Signed-off-by: hi-rustin --- pkg/sessionctx/variable/sysvar.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/sessionctx/variable/sysvar.go b/pkg/sessionctx/variable/sysvar.go index 3fb95efce64f4..7a639b1526bd4 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) { From 28133e745b39e1a797d23556d839a1e40b38fada Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Tue, 18 Jun 2024 17:24:02 +0800 Subject: [PATCH 2/2] fix: add period Signed-off-by: hi-rustin --- pkg/sessionctx/variable/sysvar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sessionctx/variable/sysvar.go b/pkg/sessionctx/variable/sysvar.go index 7a639b1526bd4..0c8fdf9aa74b4 100644 --- a/pkg/sessionctx/variable/sysvar.go +++ b/pkg/sessionctx/variable/sysvar.go @@ -1026,7 +1026,7 @@ var defaultSysVars = []*SysVar{ 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")) + 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 }, },