diff --git a/config/config.go b/config/config.go index 2c62f8a4b80b2..a52def3169317 100644 --- a/config/config.go +++ b/config/config.go @@ -782,21 +782,28 @@ func StoreGlobalConfig(config *Config) { } var deprecatedConfig = map[string]struct{}{ - "pessimistic-txn.ttl": {}, - "pessimistic-txn.enable": {}, - "log.file.log-rotate": {}, - "log.log-slow-query": {}, - "txn-local-latches": {}, - "txn-local-latches.enabled": {}, - "txn-local-latches.capacity": {}, - "performance.max-memory": {}, - "max-txn-time-use": {}, - "experimental.allow-auto-random": {}, - "enable-redact-log": {}, // use variable tidb_redact_log instead - "tikv-client.copr-cache.enable": {}, - "alter-primary-key": {}, // use NONCLUSTERED keyword instead - "enable-streaming": {}, - "performance.mem-profile-interval": {}, + "pessimistic-txn.ttl": {}, + "pessimistic-txn.enable": {}, + "log.file.log-rotate": {}, + "log.log-slow-query": {}, + "txn-local-latches": {}, + "txn-local-latches.enabled": {}, + "txn-local-latches.capacity": {}, + "performance.max-memory": {}, + "max-txn-time-use": {}, + "experimental.allow-auto-random": {}, + "enable-redact-log": {}, // use variable tidb_redact_log instead + "tikv-client.copr-cache.enable": {}, + "alter-primary-key": {}, // use NONCLUSTERED keyword instead + "enable-streaming": {}, + "performance.mem-profile-interval": {}, + "stmt-summary": {}, + "stmt-summary.enable": {}, + "stmt-summary.enable-internal-query": {}, + "stmt-summary.max-stmt-count": {}, + "stmt-summary.max-sql-length": {}, + "stmt-summary.refresh-interval": {}, + "stmt-summary.history-size": {}, } func isAllDeprecatedConfigItems(items []string) bool { diff --git a/config/config_test.go b/config/config_test.go index 913dbe088f0be..bc90a2763bfad 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -327,7 +327,14 @@ grpc-max-send-msg-size = 40960 [log.file] log-rotate = true [performance] -mem-profile-interval="1m"`) +mem-profile-interval="1m" +[stmt-summary] +enable=false +enable-internal-query=true +max-stmt-count=1000 +max-sql-length=1024 +refresh-interval=100 +history-size=100`) require.NoError(t, err) err = conf.Load(configFile) tmp := err.(*ErrConfigValidationFailed)