You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2014/03/04 09:35:13 UTC
svn commit: r1573935 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSubqueriesTest.java
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)");