From e10e38c0d4f27af4e4bd37ebdaaa8da3c8d170b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Date: Wed, 26 Jun 2024 17:12:24 +0200 Subject: [PATCH] Adjust constants in pingcap/tidb, for arm6 and arm7 --- vendor/github.com/pingcap/tidb/pkg/parser/mysql/const.go | 3 ++- vendor/github.com/pingcap/tidb/pkg/parser/mysql/util.go | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/vendor/github.com/pingcap/tidb/pkg/parser/mysql/const.go b/vendor/github.com/pingcap/tidb/pkg/parser/mysql/const.go index c9862fb5..768355f8 100644 --- a/vendor/github.com/pingcap/tidb/pkg/parser/mysql/const.go +++ b/vendor/github.com/pingcap/tidb/pkg/parser/mysql/const.go @@ -16,6 +16,7 @@ package mysql import ( "fmt" "strings" + "math" "github.com/pingcap/errors" "github.com/pingcap/tidb/pkg/parser/format" @@ -428,7 +429,7 @@ func SetSQLMode(ori SQLMode, add SQLMode) SQLMode { // consts for sql modes. // see https://dev.mysql.com/doc/internals/en/query-event.html#q-sql-mode-code const ( - ModeRealAsFloat SQLMode = 1 << iota + ModeRealAsFloat SQLMode = math.MaxUint16 ModePipesAsConcat ModeANSIQuotes ModeIgnoreSpace diff --git a/vendor/github.com/pingcap/tidb/pkg/parser/mysql/util.go b/vendor/github.com/pingcap/tidb/pkg/parser/mysql/util.go index c69e2903..a2c0ac70 100644 --- a/vendor/github.com/pingcap/tidb/pkg/parser/mysql/util.go +++ b/vendor/github.com/pingcap/tidb/pkg/parser/mysql/util.go @@ -13,6 +13,8 @@ package mysql +import "math" + type lengthAndDecimal struct { length int decimal int @@ -41,8 +43,8 @@ var defaultLengthAndDecimal = map[byte]lengthAndDecimal{ TypeTinyBlob: {255, 0}, TypeBlob: {65535, 0}, TypeMediumBlob: {16777215, 0}, - TypeLongBlob: {4294967295, 0}, - TypeJSON: {4294967295, 0}, + TypeLongBlob: {math.MaxUint16, 0}, + TypeJSON: {math.MaxUint16, 0}, TypeNull: {0, 0}, TypeSet: {-1, 0}, TypeEnum: {-1, 0},