IBM Support

IC87073: XQUERY MAY RETURN INCORRECT RESULT WHEN WHERE CLAUSE PREDICATE HAS CERTAIN FORMAT AND XML INDEX IS USED

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • xrquery may return incorrect results when the following
    conditions are all met:
    1. There is XML index created on xpath expression, called
    "xpath_exp".
    2. XQUERY contains a comparison WHERE predicate "a_variable"
    <comp_op> "xpath_exp".
    2.1. "a_variable" is a variable specified by LET or FOR clause.
    It is bound to expression(s) that casts a literal value to XML
    type.
    2.2 <comp_op> is one out of  {>, >=, <=, <}.
    2.3 "xpath_exp" is placed at predicate right side.
    

Local fix

  • (1) Change XQUERY statement. Identify predicates falling into
    condition 2's format. Rewrite predicate to "xpath_exp"
    <reverse_comp_op> "a_variable".
    (2) Drop XML index.
    (3) If "a_variable" is from LET clause, substitute "a_variable"
    with constant in comparison predicate, i.e.  "<xml_type_cast>
    <literal_value> <comp_op> "xpath_exp".
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 UDB version 9.7 fixpack 8.                    *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 UDB Version 9.7 FixPack 8.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC87073

  • 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

    2012-10-08

  • Closed date

    2013-04-01

  • Last modified date

    2013-04-01

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

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

    IC87106

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       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:
01 April 2013