Skip to content

Commit

Permalink
pkg/apiserver/statement: fix typo (#672)
Browse files Browse the repository at this point in the history
There was a type which jumped out at my while reading the code.
  • Loading branch information
Null not nil authored Jul 3, 2020
1 parent 4a764c1 commit c45b95b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/apiserver/statement/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -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
Expand Down

0 comments on commit c45b95b

Please sign in to comment.