Latest versionsfixlist
11.1.0.6 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26
Question in the chat LiveZilla Live Help

DB2 - Problem description

Problem IC66734 Status: Closed

ORDER BY WITH XMLTABLE INVOLVING CONSTRUCTED OR INLINED XML DOCUMENTS
MAY CRASH INSTANCE.

product:
DB2 FOR LUW / DB2FORLUW / 950 - DB2
Problem description:
If you run a SQL, order by with xmltable table function which 
works on a constructed or inlined xml document, as below, the 
instance may be crashed.  The associated trap file may have 
stack trace backs as below. 
 
A snip of an example SQL: 
------------ 
    : 
  (SELECT 
           XMLELEMENT(NAME "root", 
         XMLAGG( 
           XMLELEMENT(NAME "kind", 
             XMLELEMENT(NAME "id", trim(ki.id)), 
             XMLELEMENT(NAME "d_id", trim(ki.d_id)), 
             XMLELEMENT(NAME "name", km.name), 
               XMLELEMENT(NAME "d", km.d) 
           ) 
           ORDER BY km.d 
         ) as kind 
       ) 
    : 
, xmltable( 
        '$KIND/kind[1]' COLUMNS 
        col1 DECIMAL(8,0) PATH './d', 
        col2 VARCHAR(10) PATH './id', 
        col3 VARCHAR(10) PATH './d_id' 
) 
ORDER BY 
        col1 ASC, col2 ASC, col3 ASC 
; 
------------ 
 
A snip of the stack trace backs of associated trap file: 
------------ 
--EBP------EIP------ARGS----------------------------- 
.. <?getLength@XmlsNidSubdigit@@QAEEXZ> 
.. <?xmlrnTestRootNode@@YA_NPAD@Z> 
.. <?fetchTempNode@XmlrnNodeMgr@@CAHPAUXMLSTORE_CB@@PAUxml... 
.. <?fetchNode@XmlrnNodeMgr@@SAHPAUXMLSTORE_CB@@PAUxmlData... 
.. <?fetchNode@XmlrnNodeMgr@@QAEHPAUxmlDataDescriptor@@AAU... 
.. <?fetchXDMNode@XmlrnNodeMgr@@QAEHPAUxmlDataDescriptor@@... 
.. <?m_traverse@XmlnvNavigator@@AAEH_N@Z> 
.. <?getTuple@XmlnvNavigator@@QAEHAA_NPAUsqlrr_cb@@@Z> 
.. <?sqlriXMLScan@@YAHPAUsqlrr_cb@@@Z> 
------------
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* DB2 UDB Version 9.5.                                         * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error description field for more information.            * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to Version 9.5 FixPack 6.                            * 
****************************************************************
Local Fix:
1. Removeing ORDER BY clause. 
   In the above case, remove 
   "ORDER BY col1 ASC, col2 ASC, col3 ASC" 
2. Changing ORDER BY clause. 
   In the above case, change it 
   from 
   ----- 
   ) ORDER BY col1 ASC, col2 ASC, col3 ASC ; 
   ----- 
   to 
   ----- 
   ) order by xmlcast(xmlquery('$k/kind[1]/d' passing 
     kind as "k") as decimal(8,0) ) ; 
   -----
available fix packs:
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Problem was first fixed in DB2 UDB Version 9.5 FixPack 6.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
26.02.2010
10.09.2010
10.09.2010
Problem solved at the following versions (IBM BugInfos)
9.5.FP6
Problem solved according to the fixlist(s) of the following version(s)
This site uses cookies to make it easier for us to provide you with our services. By using our site you agree to the use of cookies.