From 20a64ff1e3f28cba993b385c5bf19452c8560440 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 13 Dec 2017 17:06:26 +0100 Subject: [PATCH] fix(MainDb): LIMIT -1 is not supported by Mysql --- src/db/main-db.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index 5a6b4c4f1..0779a7d4f 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -1870,7 +1870,7 @@ static inline string blobToString (soci::blob &in) { if (end > 0) query += " LIMIT " + Utils::toString(end - begin); else - query += " LIMIT -1"; + query += " LIMIT 9999999999999999999"; // For Mysql compatibility, do not set -1. if (begin > 0) query += " OFFSET " + Utils::toString(begin);