DB2 - Problembeschreibung
Problem IC61541 | Status: Geschlossen |
XQUERY RETURNS INCORRECT RESULTS. FOR LEAF ELEMENTS ONLY THE ELEMENT TAG IS RETURNED AND THE TEXT WITHIN IS SKIPPED | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problembeschreibung: | |
The problem starts from V95 GA and is also in V97 GA. This is a stale pointer XML serialization problem which leads to incorrect xml query results. The problem happens when the in memory page which holds the document section being processed is erroneously released causing a stale pointer during XML serialization. When this happens simple queries such as the following will return incorrect results. xquery for $i in db2-fn:xmlcolumn(<column name>)//<element name>return $i; The incorrect results are made up of only the Element tag being returned, and the Text within the element being skipped. This happens in most cases for leaf elements. For example if we have this sample doc: <?xml version="1.0" standalone="yes"?> <someroot xmlns="http://www.w3.org/"> <a> <b> <c> <d> <e> <f> <g> <h>Elem Text Child</h> </g> <g/> <g/> ................... ..... </someroot> xquery let $i := db2-fn:sqlquery('select doc from stlptr')//text()/.. return $i; Would return the wrong result: <h xmlns="http://www.w3.org/" /> Instead of the correct result: <h xmlns="http://www.w3.org/">Elem Text Child</h> | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * DB2 LUW All Platforms * **************************************************************** * PROBLEM DESCRIPTION: * * This is a stale pointer problem in XML serialization which * * leads to * * incorrect xml query results. * * * * The problem happens when the in memory page which holds the * * document section being processed is erroneously * * released causing a stale pointer during XML serialization. * * When * * this happens simple queries such as the following will * * return * * incorrect results. * * * * xquery for $i in db2-fn:xmlcolumn(<column name>)//<element * * name>return $i; * * * * The incorrect results are made up of only the Element tag * * being * * returned, and the Text within the element being skipped. * * This * * happens in most cases for leaf elements. * * * * For example if we have this sample doc: * * * * <?xml version="1.0" standalone="yes"?> * * <someroot xmlns="http://www.w3.org/"> * * <a> * * <b> * * <c> * * <d> * * <e> * * <f> * * <g> * * <h>Elem Text Child</h> * * </g> * * <g/> * * <g/> * * ................... * * ..... * * </someroot> * * * * xquery let $i := db2-fn:sqlquery('select doc from * * stlptr')//text()/.. return $i; * * * * Would return the wrong result: * * * * <h xmlns="http://www.w3.org/" /> * * * * Instead of the correct result: * * * * <h xmlns="http://www.w3.org/">Elem Text Child</h> * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v95 Fixpack 5 * **************************************************************** | |
Local-Fix: | |
verfügbare FixPacks: | |
DB2 Version 9.5 Fix Pack 5 for Linux, UNIX, and Windows | |
Lösung | |
The fix makes sure we serialize the in scope namespaces for the element with the correct flags which prevents it from going stale. With the fix the customer should see the missing element text as part of the element node. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 17.06.2009 19.02.2010 19.02.2010 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.5.FP5 | |
Problem behoben lt. FixList in der Version | |
9.5.0.5 |