IBM Support

IT35118: POSSIBLE WRONG RESULT WITH ALWAYS-FALSE PRED OR EXISTS PRED

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error 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.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 version 11.1.4.6                              *
    ****************************************************************
    

Problem conclusion

  • Fixed in Db2 version 11.1.4.6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT35118

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-12-01

  • Closed date

    2021-03-16

  • Last modified date

    2021-03-29

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
31 March 2021