DB2 - Problem description
Problem IC78767 | Status: Closed |
DB2 MIGHT PRODUCE INCORRECT RESULTS WHEN EXECUTING A NOT IN QUERY WITH MULTIPLE NULLABLE COLUMNS | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
Under rare scenarios, DB2 might produce incorrect results. 1. The query has a NOT IN predicate 2. The NOT IN predicate references 2 or more nullable columns from either parent or subselect tables or both. eg. create table t1 (c1 int, c2 varchar(10), c3 char(1), c4 decimal); create table t4 (c1 int NOT NULL, c2 varchar(10) NOT NULL, c3 char(1) NOT NULL, c4 decimal NOT NULL); insert into t1(c1) values NULL, NULL, 100, 200, 1000; insert into t4 values (1,'a', 'a', 1.0),(2,'b','b',2.0); select t1.* from t1 where (c1,c2) not in (select c1, c2 from t4); Correct result is 3 rows. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Please upgrade to DB2 version 970 fixpack 6 * **************************************************************** | |
Local Fix: | |
for DPF, db2set DB2_ANTIJOIN=NO followed by restart instance for serial, None | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows | |
Solution | |
Problem is fixed in DB2 version 970 fixpack 6 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 19.09.2011 06.06.2012 06.06.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.0 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.6 |