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 IC65953 Status: Closed

RECURSIVE QUERY WITHOUT INITIALIZATION FULLSELECT HANGS DURING COMPILATION

product:
DB2 FOR LUW / DB2FORLUW / 950 - DB2
Problem description:
A recursive query that is missing the initialization full select 
hangs during compilation.  Here is an example of such a query: 
 
   with tab (col) as (select 'const' from tab) select * from tab 
 
Because there is no initialization full select, the query would 
never return any rows.  This is a badly written query where the 
intention was either: 
 
a) a recursive query but the initialization full select was 
merely neglected 
b) that the table reference 'tab' in the the common table 
expression full select is a real table.  In this case, the table 
references must be changed or qualified to avoid confusion, 
e.g.: 
 
    with A.tab (col) as (select 'const' from B.tab) select * 
from A.tab
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Recursive query                                              * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* A recursive query that is missing the initialization full    * 
* select hangs during compilation.                             * 
* Here is an example of such a query:                          * 
*                                                              * 
* with tab (col) as (select 'const' from tab) select * from    * 
* tab                                                          * 
*                                                              * 
* Because there is no initialization full select, the query    * 
* would never return any rows.  This is a badly written query  * 
* where the intention was either:                              * 
*                                                              * 
* a) a recursive query but the initialization full select was  * 
* merely neglected                                             * 
* b) that the table reference 'tab' in the the common table    * 
* expression full select is a real table.  In this case, the   * 
* table references must be changed or qualified to avoid       * 
* confusion, e.g.:                                             * 
*                                                              * 
*     with A.tab (col) as (select 'const' from B.tab) select * * 
*                                                              * 
* from A.tab                                                   * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 9.5 Fix Pack 6 or later               * 
****************************************************************
Local Fix:
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
First fixed in DB2 version 9.5 Fix Pack 6
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC65954 IC65955 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
29.01.2010
17.03.2010
17.03.2010
Problem solved at the following versions (IBM BugInfos)
9.5.FP6
Problem solved according to the fixlist(s) of the following version(s)