This is an automated email from the ASF dual-hosted git repository.
cristof pushed a commit to branch OPENJPA-2940
in repository https://gitbox.apache.org/repos/asf/openjpa.git
The following commit(s) were added to refs/heads/OPENJPA-2940 by this push:
new 616f8762b [WIP][OPENJPA-2940] Fix tests on MariaDB (LTS)
616f8762b is described below
commit 616f8762b942a725aafa3087660b4260d5417f54
Author: Paulo Cristovão de Araújo Silva Filho <[email protected]>
AuthorDate: Thu May 14 20:26:56 2026 -0300
[WIP][OPENJPA-2940] Fix tests on MariaDB (LTS)
---
.../org/apache/openjpa/persistence/criteria/TestJPQLSubquery.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestJPQLSubquery.java
b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestJPQLSubquery.java
index e474f02a1..55933ea8a 100644
---
a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestJPQLSubquery.java
+++
b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestJPQLSubquery.java
@@ -34,7 +34,10 @@ import jakarta.persistence.criteria.Root;
import jakarta.persistence.criteria.SetJoin;
import jakarta.persistence.criteria.Subquery;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
import org.apache.openjpa.jdbc.sql.DerbyDictionary;
+import org.apache.openjpa.jdbc.sql.MariaDBDictionary;
+import org.apache.openjpa.jdbc.sql.MySQLDictionary;
import org.apache.openjpa.jdbc.sql.PostgresDictionary;
/**
@@ -1157,7 +1160,8 @@ public class TestJPQLSubquery extends CriteriaTest {
+ " where o.customer.id = o2.customer.id)";
String expectedSQL = null;
- if (getDictionary() instanceof DerbyDictionary) {
+ DBDictionary dict = getDictionary();
+ if (dict instanceof DerbyDictionary || dict instanceof
MariaDBDictionary || dict instanceof MySQLDictionary) {
expectedSQL = "SELECT t0.id FROM CR_ODR t0 WHERE
(t0.delivered = ("
+ "SELECT CASE WHEN t1.quantity > ?
THEN 1 WHEN t1.quantity = ? THEN 0 ELSE 0 END "
+ "FROM CR_ODR t1 WHERE (t0.CUSTOMER_ID
= t1.CUSTOMER_ID)))";