openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [openjpa] 02/04: OPENJPA-2771 fix h2 'unlimited' LIMIT case
Date Sat, 02 Feb 2019 11:09:47 GMT
This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git

commit 43aa42ccb533212db9acf1a238d24172b18dc513
Author: Mark Struberg <struberg@apache.org>
AuthorDate: Sat Feb 2 12:02:58 2019 +0100

    OPENJPA-2771 fix h2 'unlimited' LIMIT case
    
    With h2 one should omit the LIMIT section to get all results.
    Our old LIMIT 0 did effectively prune the whole result list to zero entries.
---
 .../src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java         | 2 --
 1 file changed, 2 deletions(-)

diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java
index a6f1e79..925e2c9 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java
@@ -225,8 +225,6 @@ public class H2Dictionary extends DBDictionary {
         if (end != Long.MAX_VALUE)
             buf.append(" LIMIT ").appendValue(end - start);
         if (start != 0) {
-            if(end == Long.MAX_VALUE)
-                buf.append(" LIMIT 0");
             buf.append(" OFFSET ").appendValue(start);
         }
     }


Mime
View raw message