home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 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

DB2 - Problem description

Problem IC78176 Status: Closed

DB2 TERMINATES ABNORMALLY WHILE COMPILING SQL PROCEDURE THAT USES XMLTABLE,
WHEN AUTO_REVAL IS DEFERRED_FORCE

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
If you compile an SQL procedure that contains a cursor 
declaration with an XMLTABLE query, and the AUTO_REVAL database 
configuration parameter is set to DEFERRED_FORCE, DB2 may 
terminate abnormally with a stack trace similar to the 
following: 
 
-------Frame------ ------Function + Offset------ 
0x0900000007D75DC4 
sqlnq_create_with_error__FPUciUcP9sqlnq_qtbT4P3loc + 0x16BC 
0x0900000007D770E8 
sqlnq_create_with_error__FPUciUcP9sqlnq_qtbT4P3loc@glue1080 + 
0x80 
0x09000000050ADC78 
sqlnp_main__FP12sqlnq_stringbP3locPP9sqlnq_qur + 0x4DC 
0x090000000898380C 
sqlnn_cmpl__FP8sqeAgentP11sqlrrstrings17sqlnn_compileModeT3P14sq 
lrr_cmpl_enviT7PP9sqlnq_qur 
+ 0x1D8 
0x0900000008A347E8 
sqlnn_cmpl__FP8sqeAgentP11sqlrrstrings17sqlnn_compileModeT3P14sq 
lrr_cmpl_env 
+ 0x40 
 
The problem does not normally occur for well-formed XMLTABLE 
queries; however, DB2 may trap if the query contains an 
unresolved name reference, such as the following example: 
 
update db cfg for test using auto_reval deferred_force % 
 
connect to test % 
 
create or replace procedure example 
begin 
  declare x1 xml; 
 
  declare c1 cursor for 
    select col1, col2 
  from 
    xmltable('$mem/foo' 
      passing by ref x1 as "mem" 
      columns col1 integer path '@bar'); 
end % 
 
If the example is altered to define the missing column COL2, the 
routine compiles successfully.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* If you compile an SQL procedure that contains a cursor       * 
*                                                              * 
* declaration with an XMLTABLE query, and the AUTO_REVAL       * 
* database                                                     * 
* configuration parameter is set to DEFERRED_FORCE, DB2 may    * 
*                                                              * 
* terminate abnormally with a stack trace similar to the       * 
*                                                              * 
* following:                                                   * 
*                                                              * 
*                                                              * 
*                                                              * 
* -------Frame------ ------Function + Offset------             * 
*                                                              * 
* 0x0900000007D75DC4                                           * 
*                                                              * 
* sqlnq_create_with_error__FPUciUcP9sqlnq_qtbT4P3loc + 0x16BC  * 
*                                                              * 
* 0x0900000007D770E8                                           * 
*                                                              * 
* sqlnq_create_with_error__FPUciUcP9sqlnq_qtbT4P3loc@glue1080  * 
* +                                                            * 
* 0x80                                                         * 
*                                                              * 
* 0x09000000050ADC78                                           * 
*                                                              * 
* sqlnp_main__FP12sqlnq_stringbP3locPP9sqlnq_qur + 0x4DC       * 
*                                                              * 
* 0x090000000898380C                                           * 
*                                                              * 
* sqlnn_cmpl__FP8sqeAgentP11sqlrrstrings17sqlnn_compileModeT3P * 
* 14sq                                                         * 
* lrr_cmpl_enviT7PP9sqlnq_qur                                  * 
*                                                              * 
* + 0x1D8                                                      * 
*                                                              * 
* 0x0900000008A347E8                                           * 
*                                                              * 
* sqlnn_cmpl__FP8sqeAgentP11sqlrrstrings17sqlnn_compileModeT3P * 
* 14sq                                                         * 
* lrr_cmpl_env                                                 * 
*                                                              * 
* + 0x40                                                       * 
*                                                              * 
*                                                              * 
*                                                              * 
* The problem does not normally occur for well-formed XMLTABLE * 
*                                                              * 
* queries; however, DB2 may trap if the query contains an      * 
*                                                              * 
* unresolved name reference, such as the following example:    * 
*                                                              * 
*                                                              * 
*                                                              * 
* update db cfg for test using auto_reval deferred_force %     * 
*                                                              * 
*                                                              * 
*                                                              * 
* connect to test %                                            * 
*                                                              * 
*                                                              * 
*                                                              * 
* create or replace procedure example                          * 
*                                                              * 
* begin                                                        * 
*                                                              * 
*   declare x1 xml;                                            * 
*                                                              * 
*                                                              * 
*                                                              * 
*   declare c1 cursor for                                      * 
*                                                              * 
*     select col1, col2                                        * 
*                                                              * 
*   from                                                       * 
*                                                              * 
*     xmltable('$mem/foo'                                      * 
*                                                              * 
*       passing by ref x1 as "mem"                             * 
*                                                              * 
*       columns col1 integer path '@bar');                     * 
*                                                              * 
* end %                                                        * 
*                                                              * 
*                                                              * 
*                                                              * 
* If the example is altered to define the missing column COL2, * 
* the                                                          * 
* routine compiles successfully.                               * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 9.7 Fix Pack 5.                       * 
****************************************************************
Local Fix:
Visually inspect your XMLTABLE query to ensure that it is 
without errors.  Changing the AUTO_REVAL database configuration 
parameter from DEFERRED_FORCE to DEFERRED may also allow 
compilation to proceed.
available fix packs:
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
This problem is fixed in DB2 Version 9.7 Fix Pack 5.
Workaround
See LOCAL FIX.
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
17.08.2011
22.12.2011
22.12.2011
Problem solved at the following versions (IBM BugInfos)
9.7.FP5
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.5 FixList