DB2 - Problembeschreibung
Problem IC73241 | Status: Geschlossen |
EXECUTION OF QUERY CONTAINING 2 OR MORE LEFT OR RIGHT OUTER JOIN S WITH NON-TRIVIAL JOIN PREDICATE(S) MAY TERMINATE ABNORMALLY | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
Query execution may terminate abnormally with an SQL0901N or an SQL0183N if the following conditions are satisfied: 1. The query contains 2 or more instances of LEFT or RIGHT OUTER JOIN (LOJ) 2. One LOJ is nested within another 3. The join predicate(s) of the outer LOJ: a. are all equi-join predicates, where the operands are columns, i.e., not function expressions b. reference only columns from the row-preserving and null-producing sides, i.e., no constants, host-variables, etc. c. the columns from the null-producing side are from the application of the inner LOJ 4. The join predicate(s) of the inner LOJ: a. contain at least one reference to a not-nullable column from the row-preserving side b. the not-nullable column is used inside possibly nested function expression(s) An example scenario: -- tables create table t1 (pid int); create table t2 (sid int not null, pid int); create table t3 (char_sid char(11)); -- query select t1.pid, t2.sid from t1 left join t2 left join t3 on char(coalesce(t2.sid, 0)) <= t3.char_sid on t1.pid = t2.pid ; | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * The issue is due to internal missing nullability * * synchronization after Outer Join linearization. * * The fix is to propagate the nullability through consumer * * function PIDs. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 4. * **************************************************************** | |
Local-Fix: | |
Manually rewrite any problematic queries to preclude the conditions described above, e.g., for the query above, this can be done like so: select t1.pid, t2.sid from t1 left join t2 on t1.pid = t2.pid left join t3 on char(coalesce(t2.sid, 0)) <= t3.char_sid ; | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in DB2 Version 9.7 Fix Pack 4. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 13.12.2010 28.04.2011 28.04.2011 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP4 | |
Problem behoben lt. FixList in der Version | |
9.7.0.4 |