IBM Support

IT23261: INCORRECT RESULTS WITH AGGREGATION ON OUTER JOINED TABLE WITH FOREIGN KEY ON NULL PRODUCING TABLE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Incorrect results might be observed from queries:
    1. contain at least one of these aggregations:
       COUNT(*), COUNT_BIG(*), COUNT(CONSTANT), COUNT_BIG(CONSTANT),
    SUM(CONSTANT), MAX(CONSTANT) and MIN(CONSTANT)
    2. the aggregations are on outer joined tables;
    3. a foreign key on the NULL producing table of the outer join
    references the primary key on the table at the other side of the
    outer join;
    
    An example query:
    SELECT T1.X, COUNT (*) as c1 from TABLE_1 T1 left join TABLE_2
    T2 on (T1.X = T2.Y) group by T1.X
    
    whereas TABLE_1.X is the primary key and TABLE_2.Y is a foreign
    key referencing the primary key TABLE_1.X
    

Local fix

  • Set OPT level 1 by adding the following text after the
    problematic query:
    /* <OPTGUIDELINES>
         <QRYOPT VALUE='1'/>
    </OPTGUIDELINES> */
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All Db2 users                                                *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1.3.3 or later.                            *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 11.1.3.3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT23261

  • 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-11-23

  • Closed date

    2018-03-15

  • Last modified date

    2018-03-16

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

    IT23260

  • 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

  • RB10 PSN

       UP

  • RB10 PSY

       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:
16 March 2018