DB2 - Problem description
Problem IT11793 | Status: Closed |
DB2 MIGHT PRODUCE INCORRECT RESULTS WHEN ELIMINATING CORRELATED SCALAR SUBQUERY | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
Under rare scenarios, DB2 might produce incorrect result when the following conditions are true: 1) The query contains one or more correlated scalar subqueries 2) The scalar subquery has an aggregation function of type MAX/MIN 3) The table referenced in the subquery is also joined to the parent of the correlation in the outer select 4) The join predicates of the 1 and 2 are identical Eg. SELECT * FROM tab1 d , tab2 c where d.c1 = c.c1 and c.c1 = ( SELECT MAX(c1) FROM tab2 catg WHERE catg.c1 = d.c1 ); | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All which meet the conditions applied in the APAR text. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 V10.5 Fixpack 7 * **************************************************************** | |
Local Fix: | |
Reduce the optimization level to 3 or below | |
Solution | |
Upgrade to DB2 V10.5 Fixpack 7 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 15.10.2015 17.02.2017 17.02.2017 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.7 |