IBM Support

LI73890: Incorrect query output in certain xmlexists queries

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Following query returns 40 records:
    SELECT ACTNUM
    FROM XMLTABLE (
    'db2-fn:xmlcolumn("IOD.ACTIVITIES.ACTIVITY")/iod'
    COLUMNS "ACTNUM" CHAR(180) PATH 'activityNumber',
    abstract VARCHAR(1000) PATH 'abstract')
    as X where ABSTRACT like '%Java%'@
    Where similar query using fn:contains returns 0 records
    SELECT * FROM IOD.activities WHERE XMLEXISTS('for $d in
    $doc/iod where
    fn:contains($d/abstract/text(),$abstract) return $d'
    passing activity as "doc" , info AS "abstract" );
    This is happening on v95 GA Windows 32 bit build.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * DB2 ESE                                                      *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Wrong results are returned from sql/xml queries such as the  *
    * one below where predicate evaluation and node extraction     *
    * are part of the same function.                               *
    * SELECT * FROM IOD.activities WHERE XMLEXISTS('for $d in      *
    * $doc/iod where                                               *
    * fn:contains($d/abstract/text(),$abstract) return $d'         *
    * passing activity as "doc" , info AS "abstract" );            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Install v95 fp4                                              *
    ****************************************************************
    

Problem conclusion

  • With this fix sql/xml functions and xqueries return expected
    results. Fix is included in version "DB2 v9.5.0.4"
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI73890

  • Reported component name

    DB2 UDE ESE LIN

  • Reported component ID

    5765F4104

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-11-11

  • Closed date

    2009-06-02

  • Last modified date

    2009-06-02

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

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

Fix information

  • Fixed component name

    DB2 UDE ESE LIN

  • Fixed component ID

    5765F4104

Applicable component levels

  • R950 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":"950","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
02 June 2009