From 2d908d6962b56ede90dab1f909c6acedad0a16fb Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 2 Oct 2018 14:42:50 -0400 Subject: [PATCH] Fix compile on 32-bit platforms --- physical/mysql/mysql.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physical/mysql/mysql.go b/physical/mysql/mysql.go index af666b5d6..db078af5d 100644 --- a/physical/mysql/mysql.go +++ b/physical/mysql/mysql.go @@ -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 }