IBM Support

PM50325: INCORRECT OUTPUT WHEN USING A DECLFOAT COLUMN IN AN XML INDEX

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Incorrout can occur when a DECFLOAT XML index is used to filter
    an XPath predicate which contains the integer comparison
    operators "=", "<=", or "<".
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of DB2 9 or DB2 10 for z/OS that use   *
    *                 an XML index, or users of DB2 10 for z/OS    *
    *                 that use XMLEXISTS.                          *
    ****************************************************************
    * PROBLEM DESCRIPTION: (1) INCORROUT may occur if using an XML *
    *                      index with a decfloat data type.        *
    *                      (2) INCORROUT may occur if using        *
    *                      XMLEXISTS with XQuery.                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The following example illustrates the first problem,
    
    CREATE TABLE T1 (ID INTEGER, DOC XML);
    CREATE INDEX INDX1 ON T1 (DOC)
        GENERATE KEY USING XMLPATTERN '/a/b/c' AS SQL DECFLOAT;
    INSERT INTO T1 (ID, DOC) VALUES(1,
                             '<a><b><c>-20.12345</c></b></a>');
    SELECT T1.ID, X.*
    FROM T1, XMLTABLE('$x/a/b' PASSING T1.DOC AS "x"
             COLUMNS
                C0 DECIMAL(10, 3) PATH 'c'
              ) X
    WHERE X.C0 = -20.123;
    
    SELECT  -20  FROM T1
    WHERE XMLEXISTS(
       '$x/a/b (xs:integer(xs:decimal(c)) = -20) '
       PASSING T1.DOC AS "x")   ;
    
    For the above two queries, no rows are returned without
    applying this APAR. However, the correct results should have
    one row returned for each query.
    
    The following query illustrates the second problem,
    SELECT XMLQUERY('
         for $i in $x/a/b
         where $i/c > -200
         return $i' PASSING T1.DOC AS "x")
    FROM T1
    WHERE XMLEXISTS('
         for $i in $x/a/b
         where $i/c > -200
         return $i' PASSING T1.DOC AS "x")
    No rows are returned if the APAR is not applied, though the
    correct output should have one row.
    
    Additional keywords: XMLINCORR SQLPREDPUSHDOWN SQLXML XMLINDEXES
                         DB2INCORR/K
    

Problem conclusion

  • DB2 code is modified so that the correct output will be returned
    for the above queries.
    

Temporary fix

  • *********
    * HIPER *
    *********
    

Comments

APAR Information

  • APAR number

    PM50325

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-10-18

  • Closed date

    2011-12-19

  • Last modified date

    2012-02-02

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

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

    UK74966 UK74967

Modules/Macros

  • DSNXQMCH DSNXQXQ2
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RA10 PSY UK74966

       UP12/01/04 P F201

  • R910 PSY UK74967

       UP12/01/04 P F201

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
02 February 2012