DB2 - Problembeschreibung
Problem IT10009 | Status: Geschlossen |
WRONG RESULTS ARE POSSIBLE WHEN USING THE SAME COLUMN TWICE IN DIFFERENT AGGREGATION FUNCTIONS | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problembeschreibung: | |
A complex query might produce wrong results with the following conditions: - using aggregation - the same column is used twice in different aggregation functions - internal optimization is done (this can only be checked by DB2 support looking at the section dumps for the query) Example: select a11.ART_DAN ART_DAN_S, max(a13.ART_ARTBEZ) ART_ARTBEZ, a14.DAT_JJJJMM DAT_JJJJMM, max(a14.DAT_MON_KBEZ) DAT_MON_KBEZ, a12.DAT_JJJJMM DAT_JJJJMM0, min(a12.DAT_MON_KBEZ) DAT_MON_KBEZ0, sum((a11.WB_MENGE * a11.WB_C_FIL)) WJXBFS1 from dpermv.F3WB_A_L_M a11, dpermv.D1TAGMON a12, dpermv.D1DANDAN a13, dpermv.D1TAGMON a14 where a11.DAT_JJJJMM = a12.DAT_VJM and a11.ART_DAN = a13.ART_DAN and (a13.ART_HLNR in (14) and a12.DAT_JJJJMM in (201312, 201311, 201310, 201309, 201308, 201307, 201306, 201305, 201304, 201303, 201302, 201301) and a12.DAT_JJJJMM = a14.DAT_JJJJMM and a11.BWART_BWART in ('S02', 'S14', 'S15', 'S11', 'S03', 'S08 ', 'I02 ', 'I03 ', 'S72 ', 'S81 ', 'S73 ', 'S78 ', 'S23 ', 'S20 ', 'S21 ', 'S22 ')) group by a11.ART_DAN, a14.DAT_JJJJMM, a12.DAT_JJJJMM; Note: max(a14.DAT_MON_KBEZ) DAT_MON_KBEZ, min(a12.DAT_MON_KBEZ) DAT_MON_KBEZ0, are coming from the same column in the same table: dpermv.D1TAGMON a12, dpermv.D1TAGMON a14 | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.5 and Fix Pack 7 * **************************************************************** | |
Local-Fix: | |
db2set DB2_TCG_DEFAULT_OPTIONS="set disable_pushdown on" | |
Lösung | |
Problem was first fixed in DB2 Version 10.5 and Fix Pack 7 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 10.07.2015 19.01.2016 19.01.2016 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.5.0.7 |