From c45b95b60a604c4b2f8c405c9316f6a3dc21e7c5 Mon Sep 17 00:00:00 2001 From: Null not nil <67764674+nullnotnil@users.noreply.github.com> Date: Fri, 3 Jul 2020 08:15:46 -0600 Subject: [PATCH] pkg/apiserver/statement: fix typo (#672) There was a type which jumped out at my while reading the code. --- pkg/apiserver/statement/queries.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/apiserver/statement/queries.go b/pkg/apiserver/statement/queries.go index d328e640c6..2825bb198c 100644 --- a/pkg/apiserver/statement/queries.go +++ b/pkg/apiserver/statement/queries.go @@ -26,7 +26,7 @@ const ( statementsTable = "INFORMATION_SCHEMA.CLUSTER_STATEMENTS_SUMMARY_HISTORY" stmtEnableVar = "tidb_enable_stmt_summary" stmtRefreshIntervalVar = "tidb_stmt_summary_refresh_interval" - stmtHistroySizeVar = "tidb_stmt_summary_history_size" + stmtHistorySizeVar = "tidb_stmt_summary_history_size" ) // How to get sql variables by GORM @@ -68,7 +68,7 @@ func QueryStmtConfig(db *gorm.DB) (*Config, error) { config.RefreshInterval = refreshInterval } - historySize, err := querySQLIntVariable(db, stmtHistroySizeVar) + historySize, err := querySQLIntVariable(db, stmtHistorySizeVar) if err != nil { return nil, err } @@ -93,7 +93,7 @@ func UpdateStmtConfig(db *gorm.DB, config *Config) (err error) { if err != nil { return } - sql = fmt.Sprintf("SET GLOBAL %s = ?", stmtHistroySizeVar) + sql = fmt.Sprintf("SET GLOBAL %s = ?", stmtHistorySizeVar) err = db.Exec(sql, config.HistorySize).Error } return