DB2 - Problem description
Problem IT05436 | Status: Closed |
IN A RARE CONDITION, A QUERY AGGREGATING WITHOUT GROUP BY CLAUSE ON A PROVABLE 0-ROW STREAM CAN RETURN INCORRECT RESULT | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
The problem can happen in DPF environment only. Queries that aggregate on a provable 0 row stream without group by clause can return incorrect result when DB2 optimizer uses the "0 row" property to optimize query plans, such as removing duplicate-eliminating sort. For example: select max(IBMREQD) from sysibm.sysdummy1 where 0=1 union select max(IBMREQD) from sysibm.sysdummy1 where 0=1 ; In this query, each union leg should return 1 row of "NULL" value. Since this is a distinct UNION, the final result should still be 1 row of "NULL" value. But because DB2 optimizer thinks that each union leg returns 0 row, it removes the duplicate-eliminating sort that should have been done after "UNION ALL". So the final returned result is 2 rows of "NULL" value, which is incorrect. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * DPF (Database Partitioning Feature) * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 10.5 Fix Pack 5 * **************************************************************** | |
Local Fix: | |
Solution | |
First fixed in DB2 10.5 Fix Pack 5 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 07.11.2014 15.12.2014 15.12.2014 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.5 |