db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DERBY-4385) Comparision with ALL (subquery) may give wrong result if constant is selected
Date Tue, 22 Sep 2009 21:24:16 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen resolved DERBY-4385.
---------------------------------------

    Resolution: Duplicate

It works as expected with 10.5.3.0 and trunk. Probably a duplicate of DERBY-4001.

> Comparision with ALL (subquery) may give wrong result if constant is selected
> -----------------------------------------------------------------------------
>
>                 Key: DERBY-4385
>                 URL: https://issues.apache.org/jira/browse/DERBY-4385
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Bernt M. Johnsen
>            Priority: Critical
>
> Consider the following:
> CREATE TABLE t1 (i INT PRIMARY KEY, j INT);
> CREATE TABLE t2 (i INT);
> INSERT INTO t1 VALUES (1,1),(2,2);
> INSERT INTO t2 VALUES (81);
> The two following queries should give the same result:
> SELECT * FROM t1 WHERE i < ALL (SELECT i FROM t2);
> SELECT * FROM t1 WHERE i < ALL (SELECT 81 FROM t2);
> But, they don't:
> ij> SELECT * FROM t1 WHERE i < ALL (SELECT i FROM t2);
> I          |J          
> -----------------------
> 1          |1          
> 2          |2          
> 2 rows selected
> ij> SELECT * FROM t1 WHERE i < ALL (SELECT 81 FROM t2);
> I          |J          
> -----------------------
> 0 rows selected
> ij> 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message