[
https://issues.apache.org/jira/browse/DERBY-7164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard N. Hillegas updated DERBY-7164:
---------------------------------------
Urgency: Normal
> Wrong result from EXISTS aggregate subquery that counts zero rows
> -----------------------------------------------------------------
>
> Key: DERBY-7164
> URL: https://issues.apache.org/jira/browse/DERBY-7164
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.17.1.0
> Reporter: Lukas Eder
> Priority: Major
>
> This query should return true as the aggregate subquery always produces
> exactly 1 row, so the EXISTS predicate is trivially always true:
> {code:sql}
> select exists (
> select count(*)
> from SYSIBM.SYSDUMMY1
> where false
> )
> from SYSIBM.SYSDUMMY1;
> {code}
> But it returns false, probably due to a wrong optimisation
--
This message was sent by Atlassian Jira
(v8.20.10#820010)