diff --git a/core/init.go b/core/init.go index 7708065c00..87d454ead6 100644 --- a/core/init.go +++ b/core/init.go @@ -21,6 +21,8 @@ import ( "github.com/dolthub/doltgresql/core/conflicts" "github.com/dolthub/doltgresql/core/id" "github.com/dolthub/doltgresql/server/plpgsql" + + gmstypes "github.com/dolthub/go-mysql-server/sql/types" ) // Init initializes this package. @@ -29,6 +31,7 @@ func Init() { doltdb.NewRootValue = newRootValue types.DoltgresRootValueHumanReadableStringAtIndentationLevel = rootValueHumanReadableStringAtIndentationLevel types.DoltgresRootValueWalkAddrs = rootValueWalkAddrs + gmstypes.IsValidFloat = isValidFloat conflicts.ClearContextValues = ClearContextValues plpgsql.GetTypesCollectionFromContext = GetTypesCollectionFromContext id.RegisterListener(sequenceIDListener{}, id.Section_Table) diff --git a/core/override_functions.go b/core/override_functions.go index c32601db20..35bc6fe37c 100644 --- a/core/override_functions.go +++ b/core/override_functions.go @@ -97,6 +97,12 @@ func newRootValue(ctx context.Context, vrw types.ValueReadWriter, ns tree.NodeSt return &RootValue{vrw, ns, st, nil, hash.Hash{}}, nil } +// isValidFloat replaces the IsValidFloat function in go-mysql-server since gms does not allow NaN and infinity values +// while Doltgres does +func isValidFloat(f float64) bool { + return true +} + // rootValueHumanReadableStringAtIndentationLevel is Doltgres' implementation of // types.DoltgresRootValueHumanReadableStringAtIndentationLevel. func rootValueHumanReadableStringAtIndentationLevel(sm types.SerialMessage, level int) string { diff --git a/go.mod b/go.mod index 7a799f8c1c..182161331a 100644 --- a/go.mod +++ b/go.mod @@ -9,9 +9,9 @@ require ( github.com/dolthub/dolt/go v0.40.5-0.20250923175150-9d9f7d8c96ce github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-mysql-server v0.20.1-0.20250924230334-0afe2a95c29f + github.com/dolthub/go-mysql-server v0.20.1-0.20251016194931-44f3d601e939 github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216 - github.com/dolthub/vitess v0.0.0-20250924141028-c81f2df5db32 + github.com/dolthub/vitess v0.0.0-20250930230441-70c2c6a98e33 github.com/fatih/color v1.13.0 github.com/goccy/go-json v0.10.2 github.com/gogo/protobuf v1.3.2 diff --git a/go.sum b/go.sum index 84b4d45161..628dcf976f 100644 --- a/go.sum +++ b/go.sum @@ -258,8 +258,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U= github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0= github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 h1:zxMsH7RLiG+dlZ/y0LgJHTV26XoiSJcuWq+em6t6VVc= github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE= -github.com/dolthub/go-mysql-server v0.20.1-0.20250924230334-0afe2a95c29f h1:e/Jm0MwHCgpg5G0l+JUEEr1mpvQA8vLL4X6vieFYBd4= -github.com/dolthub/go-mysql-server v0.20.1-0.20250924230334-0afe2a95c29f/go.mod h1:sNJMEGupPyeoGtzro/f6rUFhhanZ2PccmfuvqnCPI3k= +github.com/dolthub/go-mysql-server v0.20.1-0.20251016194931-44f3d601e939 h1:b4P07cjKVBpovxo5oyPMex97HGe/Ahuf8LWKi+LaGhU= +github.com/dolthub/go-mysql-server v0.20.1-0.20251016194931-44f3d601e939/go.mod h1:EeYR0apo+8j2Dyxmn2ghkPlirO2S5mT1xHBrA+Efys8= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q= github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718 h1:lT7hE5k+0nkBdj/1UOSFwjWpNxf+LCApbRHgnCA17XE= @@ -270,8 +270,8 @@ github.com/dolthub/pg_query_go/v6 v6.0.0-20250702135351-29eb6bfc4ea6 h1:UEX3FGaC github.com/dolthub/pg_query_go/v6 v6.0.0-20250702135351-29eb6bfc4ea6/go.mod h1:nvTHIuoud6e1SfrUaFwHqT0i4b5Nr+1rPWVds3B5+50= github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216 h1:JWkKRE4EHUcEVQCMRBej8DYxjYjRz/9MdF/NNQh0o70= github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216/go.mod h1:e/FIZVvT2IR53HBCAo41NjqgtEnjMJGKca3Y/dAmZaA= -github.com/dolthub/vitess v0.0.0-20250924141028-c81f2df5db32 h1:VvJIKIxqerl/12Z9zndDidUSWejER1/sBPZMaJp06Jo= -github.com/dolthub/vitess v0.0.0-20250924141028-c81f2df5db32/go.mod h1:8pvvk5OLaLN9LLxghyczUapn/97l+mBgIb10qC1LG84= +github.com/dolthub/vitess v0.0.0-20250930230441-70c2c6a98e33 h1:ScHTwNbcVC6JH1OSyXzj8S4w67BIpRXwTSjrac3/PSw= +github.com/dolthub/vitess v0.0.0-20250930230441-70c2c6a98e33/go.mod h1:8pvvk5OLaLN9LLxghyczUapn/97l+mBgIb10qC1LG84= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=