IBM Support

IC83608: SQL WITH NESTED MATH OPERATIONS ON COLUMNS THAT ARE DEFINED WITH NOT NULL AND USING FUNCTIONS MAY RETURN DIFFERENT RESULTS.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Incorrect results are possible when doing nested math operations
    on columns that are defined with NOT NULL and using functions.
    
    Example (pseudo-code):
    
    create function3(col1 bigint,col2 bigint)
    {
        return function1(col1)-function2(col2);
    }
    
    SELECT SUM(function3(column1,column2)) from table;
    <-- intermittent incorrect results are possible on databases
    with smaller non-automatic SORTHEAP.
    

Local fix

  • select SUM(col1) - SUM(col2) from table
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 version 9.7.0.7.                              *
    ****************************************************************
    

Problem conclusion

  • The problem is first fixed in DB2 version 9.7.0.7.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC83608

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    YesSpecatt / Pervasive

  • Submitted date

    2012-05-21

  • Closed date

    2012-10-18

  • Last modified date

    2012-12-07

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

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

    IC83674 IC85217 IC85221

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC83608

Modified date: 07 December 2012