DB2 - Problem description
Problem IT35118 | Status: Closed |
POSSIBLE WRONG RESULT WITH ALWAYS-FALSE PRED OR EXISTS PRED | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - DB2 | |
Problem description: | |
When a query has always-false predicates or EXISTS predicates, we may get wrong results. More specifically, we may get more rows returned than anticipated. Another example with always-false predicates: create table t1 (c1 int); create table t2 (c1 int); insert into t1 values (5); insert into t2 values (5), (5); -- Bad query with "always false" predicate, should return 1 row, returns 2 select * from t1 where ((t1.c1 < 1 and t1.c1 > 2 ) -- Always false predicate or (exists(select * from t2 where t2.c1=t1.c1))); C1 ----------- 5 5 2 record(s) selected. -- Same query without "always false" predicate, correctly returns 1 row select * from t1 where exists(select * from t2 where t2.c1=t1.c1); C1 ----------- 5 1 record(s) selected. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 version 11.1.4.6 * **************************************************************** | |
Local Fix: | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 version 11.1.4.6 * **************************************************************** | |
Comment | |
Fixed in Db2 version 11.1.4.6 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 01.12.2020 16.03.2021 29.03.2021 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |