IBM Support

IT02174: Query may throw Runtime Error such as overflow, divide by 0, or casting error due to JOIN PREDICATE EXPRESSION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • This is impacting version 9.7 FP9 only.
    
    Join predicate expression may throw run time error such as
    overflow, divide by 0, or casting error. This behavior is as
    designed and complies with SQL standard. The purpose of this
    APAR is to reduce the risks of hitting this kind of problem.
    
    In version 9.7 FP9, the DB2 query rewrite is able to push down
    expression equality join predicate, called jPrd, to sub query in
    order for the optimizer to plan MSJOIN and HSJOIN; otherwise
    only NLJOIN would be considered for jPrd. Such expression,
    called JExp, push down is restricted to columns output from
    GROUP BY, UNION, and UNION ALL sub query. When there is local
    predicate, called lPrd, applied on top of the same sub query,
    lPrd used to be not pushed down into the sub query. The
    predicate evaluation order is free for DB2 optimizer to
    determine from the access plan costing perspective. For example,
    the desirable predicate order forms better index start-stop key
    if index scan is available. This doesn't necessarily take
    expression run time error into consideration. Either jPrd or
    lPrd may have expression whose computation over the entire sub
    query may get run time error, such as overflow, divide by 0, or
    casting error, whereas applying one before another may avoid the
    run time error. DB2 compiler doesn't have to worry about the run
    time error when it determines the predicate order. But if lPrd
    is simple comparison predicate, it has no expression so it won't
    cause any run time error, and pushing it down to the sub query
    can reduce the chance of run time error from computing jExp.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Please upgrade to V9.7 FP10                                  *
    ****************************************************************
    

Problem conclusion

  • First fixed in V9.7 FP10
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT02174

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-06-03

  • Closed date

    2014-11-10

  • Last modified date

    2014-11-10

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

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

    IT02440 IT02445

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"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:
10 November 2014