Summary of Change

Queries for which Derby flattens EXISTS subqueries may have previously returned incorrect results.

Symptoms Seen by Applications Affected by Change

Applications having queries which include flattenable EXISTS subqueries may have seen incorrect results in Derby 10.2 and 10.3 releases.  In particular, dependencies between the EXISTS subquery and its parent query's FROM list may not have been enforced in some cases.  That could in turn cause the optimizer to choose an invalid join order, and that join order could then yield incorrect query results for some queries.

This problem has been fixed in Derby 10.4.

Incompatibilities with Previous Release

None.

Rationale for Change

Due to an error in the optimizer's dependency tracking logic, it was possible for Derby to choose an invalid join order for some queries, thereby leading to incorrect results.  By fixing this bug we ensure that the affected queries will now return correct results.

Application Changes Required

None.