Skip to content

Commit

Permalink
skip strconv.FormatInt() call
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Feb 9, 2024
1 parent 8d66347 commit 0a3290e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/vt/sqlparser/comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func (c *ParsedComments) GetMySQLSetVarValue(key string) string {

// SetMySQLMaxExecutionTime sets a query level maximum execution time using a /*+ MAX_EXECUTION_TIME() */ MySQL optimizer hint.
func (c *ParsedComments) SetMySQLMaxExecutionTime(maxExecutionTime time.Duration) (newComments Comments) {
return c.SetMySQLOptimizerHint(OptimizerHintMaxExecutionTime, "", strconv.FormatInt(maxExecutionTime.Milliseconds(), 10))
return c.SetMySQLOptimizerHint(OptimizerHintMaxExecutionTime, "", maxExecutionTime.Milliseconds())
}

// SetMySQLSetVarValue updates or sets the value of the given variable as part of a /*+ SET_VAR() */ MySQL optimizer hint.
Expand All @@ -333,7 +333,7 @@ func (c *ParsedComments) SetMySQLSetVarValue(key string, value string) (newComme
}

// SetMySQLOptimizerHint updates or sets the value of a MySQL optimizer hint.
func (c *ParsedComments) SetMySQLOptimizerHint(hint, key, value string) (newComments Comments) {
func (c *ParsedComments) SetMySQLOptimizerHint(hint, key string, value interface{}) (newComments Comments) {
keyAndValue := value
if key != "" {
keyAndValue = fmt.Sprintf("%v=%v", key, value)
Expand Down

0 comments on commit 0a3290e

Please sign in to comment.