suche 36x36
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 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)