DB2 - Problembeschreibung
Problem IC83977 | Status: Geschlossen |
WITH REOPT ENABLED, STATEMENTS CONTAINING ARRAY VARIABLES MIGHT PRODUCE INCORRECT OUTPUT | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problembeschreibung: | |
A statement that contains an array variable may produce incorrect output when run under REOPT ONCE or REOPT ALWAYS. The array variable will be treated as null in the statement. For this problem to occur, the statement must contain an array variable and one other variable that is not a LOB. For example: call sysproc.set_routine_opts('reopt always') Return Status = 0 create type myarray as integer array[10] DB20000I The SQL command completed successfully. create function foo () returns integer begin declare v1 myarray;-- declare index integer;-- declare returnVal integer default 0;-- set v1 = ARRAY[1, 3, 5];-- set index = 2;-- if v1[index] > index then set returnVal = 1;-- end if;-- return returnVal;-- end DB20000I The SQL command completed successfully. values foo() 1 ----------- 0 1 record(s) selected. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Apply v9.5 Fixpack 10 to the DB2 server. * **************************************************************** | |
Local-Fix: | |
Do not run the statement using the REOPT option. | |
Lösung | |
Problem was first fixed in v9.5 Fixpack 10. This is a DB2 server side fix. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 06.06.2012 21.08.2012 04.09.2012 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.5.FP10 | |
Problem behoben lt. FixList in der Version | |
9.5.0.10 |