Details
Description
Attached program demonstrates the problem. Only one count is returned (matching CODE= GBR) - the count of CODE=CHA is not returned. Works fine with versions 10.1 and 10.2 or if program is run using 10.3 jars and 10.2 database (soft upgrade).
Query:
SELECT COUNT(t0.ID) FROM CTS1.TEST_TABLE t0
GROUP BY t0.CODE
HAVING (t0.CODE = 'GBR' OR t0.CODE = 'CHA') AND t0.CODE IS NOT NULL
Incorrect results (see last line):
Database product: Apache Derby
Database version: 10.3.1.5 - (579866)
Driver name: Apache Derby Embedded JDBC Driver
Driver version: 10.3.1.5 - (579866)
result: 2
Correct results:
Database product: Apache Derby
Database version: 10.2.2.0 - (485682)
Driver name: Apache Derby Embedded JDBC Driver
Driver version: 10.2.2.0 - (485682)
result: 4
result: 2
Attachments
Attachments
Issue Links
- is part of
-
DERBY-2034 Tracking of bugs that lead to incorrect results being stored or returned to the client
- Closed
- is related to
-
DERBY-681 Eliminate the parser's rewriting of the abstract syntax tree for queries with GROUP BY and/or HAVING clauses
- Closed