From 54cba16380378c3074c9e134e8be8b28e238c133 Mon Sep 17 00:00:00 2001 From: Tanner Stirrat Date: Wed, 11 Sep 2024 17:03:51 -0600 Subject: [PATCH] Fix limit max --- internal/datastore/common/sql.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/datastore/common/sql.go b/internal/datastore/common/sql.go index 202379170e..1bccadbb7c 100644 --- a/internal/datastore/common/sql.go +++ b/internal/datastore/common/sql.go @@ -553,7 +553,11 @@ func (tqs QueryExecutor) ExecuteQuery( } var limit uint64 - limit = math.MaxUint64 + // NOTE: we use a uint here because it lines up with the + // assignments in this function, but we set it to MaxInt64 + // because that's the biggest value that postgres and friends + // treat as valid. + limit = math.MaxInt64 if queryOpts.Limit != nil { limit = *queryOpts.Limit }