Skip to content

Commit

Permalink
Fix compile on 32-bit platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Oct 2, 2018
1 parent 37689d2 commit 6d79e86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions physical/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,9 @@ func (i *MySQLLock) becomeLeader() error {
func (i *MySQLLock) Lock() error {
defer metrics.MeasureSince([]string{"mysql", "get_lock"}, time.Now())

// Lock timeout math.MaxUint32 instead of -1 solves compatibility issues with
// Lock timeout math.MaxInt32 instead of -1 solves compatibility issues with
// different MySQL flavours i.e. MariaDB
rows, err := i.in.Query("SELECT GET_LOCK(?, ?), IS_USED_LOCK(?)", i.key, math.MaxUint32, i.key)
rows, err := i.in.Query("SELECT GET_LOCK(?, ?), IS_USED_LOCK(?)", i.key, math.MaxInt32, i.key)
if err != nil {
return err
}
Expand Down

0 comments on commit 6d79e86

Please sign in to comment.