db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1573935 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSubqueriesTest.java
Date Tue, 04 Mar 2014 08:35:13 GMT
Author: kahatlen
Date: Tue Mar  4 08:35:12 2014
New Revision: 1573935

URL: http://svn.apache.org/r1573935
Log:
DERBY-6409: Wrong result from quantified comparison

Add test case to verify that the fix for DERBY-6408 fixed this bug too.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSubqueriesTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSubqueriesTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSubqueriesTest.java?rev=1573935&r1=1573934&r2=1573935&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSubqueriesTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSubqueriesTest.java
Tue Mar  4 08:35:12 2014
@@ -603,6 +603,13 @@ public class ExistsWithSubqueriesTest ex
         JDBC.assertSingleValueResultSet(
                 s.executeQuery("values 2 in (select j from onerow)"), "true");
 
+        // DERBY-6409: Quantified comparisons can also be rewritten to EXISTS,
+        // and these two queries returned wrong results before the fix.
+        JDBC.assertSingleValueResultSet(
+                s.executeQuery("values 1 > all (select 2 from tworows)"), "false");
+        JDBC.assertSingleValueResultSet(
+                s.executeQuery("values 1 < all (select 2 from tworows)"), "true");
+
         // Verify that EXISTS works in INSERT and UPDATE.
         s.execute("create table d6408(id int generated by default as identity,"
                 + " b boolean not null)");



Mime
View raw message