IBM Support

IT11713: DB2 MIGHT PRODUCE INCORRECT RESULTS WHEN ELIMINATING CORRELATED SCALAR SUBQUERY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as fixed if next.

Error description

  • The issue is fixed in DB2 v10.1, DB2 v10.5 and DB2 v11.
    
    Under rare scenarios, DB2 might produce incorrect result when
    the following conditions are true:
    1) The query contains one or more correlated scalar subqueries
    2) The scalar subquery has an aggregation function of type
    MAX/MIN
    3) The table referenced in the subquery is also joined to the
    parent of the correlation in the outer select
    4) The join predicates of the 1 and 2 are identical
    
    Eg.
    SELECT *
    FROM  tab1 d , tab2 c
    where d.c1 = c.c1
    and c.c1 =
           ( SELECT MAX(c1)
             FROM tab2 catg
             WHERE catg.c1 = d.c1 );
    

Local fix

  • Reduce the optimization level to 3 or below
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * See SYSROUTE APARs to see where this APAR is addressed       *
    ****************************************************************
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IT11713

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-10-12

  • Closed date

    2017-05-08

  • Last modified date

    2017-05-30

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

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

    IT11774 IT11793

Fix information

Applicable component levels

  • R970 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
30 May 2017