DB2 - Problem description
| Problem IC98910 | Status: Closed |
A VALUE ASSIGNMENT FROM ARRAY OF ROW DATA TYPE TO ROW DATA TYPE MIGHT CAUSE AN INSTANCE CRASH. | |
| product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
| Problem description: | |
A value assignment from array of row data type to row data type
might cause an instance crash.
The stack trace shows function stack like as follows:
getTargetVar
psm_gen_assignment
psm_gen_array_assignment
sqlnq_psm_process_set_stmt
sqlnq_psm_sem_act
sqlnp_smactn
sqlnp_parser
sqlnp_main
This issue can come up if all the following conditions are met.
- An SQL routine contains an assignment to an unsubscripted row
type variable field.
- The row type variable must be a global variable, or a module
variable (PL/SQL package variable).
- The right-hand side of the assignment must contain an array
subscript.
A script like below illustrates how this problem is produced.
---------------------------
create or replace module M1
/
alter module M1 publish
type TYP1 as row(
C1 varchar(10)
)
/
alter module M1 publish
type TYP1ARRY as typ1 array[integer]
/
alter module M1 publish
variable TYP1VAR typ1
/
alter module M1 publish procedure P1
(
in t1arr typ1arry
)
modifies SQL data
language SQL
begin
set typ1var.c1 = t1arr[1].c1; --
-- this assignment may cause a crash.
end
/
--------------------------- | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users who use value assignment described in the APAR test. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Please upgrade to DB2 V10.5 FixPack 4 or later. * **************************************************************** | |
| Local Fix: | |
A temporary local variable can be used to bypass the condition. | |
| available fix packs: | |
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows | |
| Solution | |
This problem was first fixed in DB2 V10.5 FixPack 4. | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 22.01.2014 15.09.2014 15.09.2014 |
| Problem solved at the following versions (IBM BugInfos) | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 10.5.0.4 |
|