Lukas Eder created DERBY-7164: --------------------------------- Summary: 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
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)