Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

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 FixList