From 88a27ef2de5ec37b06e57ccbc40989a0fc1d1af1 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sun, 25 Mar 2018 16:37:41 -0700 Subject: Fix OFFSET without LIMIT for H2 Database Carbonado used LIMIT 2^32+1 as a kludge to allow OFFSET without LIMIT in H2 Database, but this approach no longer works. As of version 1.4.191 Beta (2016-01-21), H2 supports OFFSET without LIMIT natively, so use that instead. --- src/main/java/com/amazon/carbonado/repo/jdbc/H2SupportStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/H2SupportStrategy.java b/src/main/java/com/amazon/carbonado/repo/jdbc/H2SupportStrategy.java index 61d6516..ac9573f 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/H2SupportStrategy.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/H2SupportStrategy.java @@ -53,7 +53,7 @@ class H2SupportStrategy extends JDBCSupportStrategy { return select.concat(" LIMIT ?"); } } else if (from) { - return select.concat(" LIMIT 2147483647 OFFSET ?"); + return select.concat(" OFFSET ?"); } else { return select; } -- cgit v1.2.3