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

DYNAMIC QUERY EXECUTION FAILS WITH SQLCODE SQL0901N REASON CODE "CONSTANT
OF UNSUPPORTED TYPE"

product:
DB2 FOR LUW / DB2FORLUW / B50 - DB2
Problem description:
A dynamic query may fail at execution time with SQLCODE -901
and reason code "Constant of unsupported type".  This can occur
when all the following are true:

- REOPT ONCE is enabled
- The statement includes at least one REOPT supported variable
- The query references an array global variable

For example:

   create table t (c int);
   create type intarray as int array[2];
   create variable arrayvar intarray;
   creaet variable intVar int default 2;

   set arrayvar[2] = 200;

   call set_routine_opts('REOPT ONCE');

   create procedure P
   language sql
   begin atomic
    declare stmtText varchar(1024) default 'delete from t where
c = arrayvar[2] or c =intVar'; --
    prepare stmt from stmtText; --
    execute stmt; --
   end;

   call P();
   SQL0901N  The SQL statement or command failed because of a
database system
   error. (Reason "Constant of unsupported type".)
SQLSTATE=58004
Problem Summary:
****************************************************************
* USERS AFFECTED:                                              *
* ALL                                                          *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* See Error Description                                        *
****************************************************************
* RECOMMENDATION:                                              *
* Upgrade to Db2 version 11.5.6.0                              *
****************************************************************
Local Fix:
Disable REOPT ONCE.
Solution
Workaround
****************************************************************
* USERS AFFECTED:                                              *
* ALL                                                          *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* See Error Description                                        *
****************************************************************
* RECOMMENDATION:                                              *
* Upgrade to Db2 version 11.5.6.0                              *
****************************************************************
Comment
First fixed in Db2 version 11.5.6.0
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
17.12.2020
21.06.2021
28.06.2021
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)