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] Updated: (DERBY-4411) Scalar subquery erroneously rejected for not returning exactly one row
Date Fri, 23 Oct 2009 12:25:59 GMT

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

Knut Anders Hatlen updated DERBY-4411:
--------------------------------------

    Issue & fix info: [Repro attached]  (was: [Repro attached, Patch Available])
       Fix Version/s: 10.6.0.0

Committed revision 829022.

I'll leave the issue open until the fix has been back-ported to 10.5.

> Scalar subquery erroneously rejected for not returning exactly one row
> ----------------------------------------------------------------------
>
>                 Key: DERBY-4411
>                 URL: https://issues.apache.org/jira/browse/DERBY-4411
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.1, 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.6.0.0
>
>         Attachments: constantRestriction.diff, derby-4411-1a.diff
>
>
> This sequence of statements causes an error because the scalar sub-query supposedly doesn't
return exactly one row, even though it does return exactly one row:
> ij> create table t (x int unique, y int);
> 0 rows inserted/updated/deleted
> ij> insert into t values (1,2);
> 1 row inserted/updated/deleted
> ij> select * from t where x > (values 1 union select y from t where 1=0);
> ERROR 21000: Scalar subquery is only allowed to return a single row.
> ij> values 1 union select y from t where 1=0;
> 1          
> -----------
> 1          
> 1 row selected
> Before DERBY-4391, the problematic statement would have caused a NullPointerException.

-- 
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