DB2 - Problem description
Problem IC66586 | Status: Closed |
ORDER BY WITH XMLTABLE INVOLVING CONSTRUCTED OR INLINED XML DOCUMENTS MAY CRASH INSTANCE. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - 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.7. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error description field for more information. * **************************************************************** * RECOMMENDATION: * * Upgrade to Version 9.7 FixPack 2. * **************************************************************** | |
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.7 Fix Pack 2 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 UDB Version 9.7 FixPack 2. | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC66734 IC66735 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 22.02.2010 16.06.2010 16.06.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP2 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.2 |