IBM Support

IT20786: INCORRECT RESULT POSSIBLE WHEN CASE AND ANOTHER PREDICATE HAVE THE SAME COMPARISON OPERATION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • If SQL against COLUMNAR table has 2 predicates , one of them
    CASE and part of the CASE or entire CASE condition matches the
    other predicate, then we could eliminate the second predicate by
    mistake.
    
    Example:
    
    SELECT * FROM T WHERE ( SUBSTR(A,1,1) = 'B' ) AND CASE WHEN (
    SUBSTR(A,1,1) = 'B' ) THEN B ELSE B END <> 0
    
    ( SUBSTR(A,1,1) = 'B' ) is used as it's own predicate AND as
    condition in CASE statement.
    
    In some cases we could lose this predicate and only apply CASE
    WHEN ( SUBSTR(A,1,1) = 'B' ) THEN B ELSE B END <> 0 which will
    return extra rows.
    

Local fix

  • rewrite query to avoid this situation or install this fix.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1 Mod 2 Fix Pack 2 iFix001 or higher       *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 11.1 Mod 2 Fix Pack 2 iFix001
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT20786

  • 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

    2017-05-26

  • Closed date

    2017-10-11

  • Last modified date

    2017-10-12

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

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

    IT20790

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB10 PSN

       UP

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

Document Information

Modified date:
12 October 2017