Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC69718 Status: Geschlossen

INCORRECT ROWCOUNT IN SQLERRD[2] (OR FROM GET DIAGNOSTICS) WHEN A GLOBAL
VARIABLE IS INSTANTIATED

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
If an insert, update or delete statement refers to global 
variable and the reference is the first time the global variable 
is referenced in the connection, then sqlerrd[2] value in the 
SQLCA for this statement will be incorrectly incremented by 1 
giving an inflated row count.   Similarly if the statement is in 
an SQL procedure, GET DIAGNOSTICS will return an inflated 
rowcount. 
 
So, for example: 
 
CREATE TABLE T1 (i int) 
insert into T1 values 1,2,3 
CREATE VARIABLE var1 INT default 0 
 
 
In a new connection: 
 
update t1 set i=i+1 where i > var1 
 
The sqlerrd[2] value from the sqlca from this operation will 
show a value of 4 instead of 3 
 
If the statement is referenced again, then the count will be 
correct.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* use of global variables                                      * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* incorrect rowcount from sqlca, GET DIAGNOSTIC                * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Move to DB2 for LUW version 9.7, fixpack 3                   * 
****************************************************************
Local-Fix:
If the row count value is relevant, reference global variable in 
a separate statement before referencing it in an 
update/delete/insert statement.
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
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 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
Fixed in DB2 for LUW version 9.7, fixpack 3
Workaround
keiner bekannt / siehe Local-Fix
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC69720 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
06.07.2010
20.09.2010
20.09.2010
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP3
Problem behoben lt. FixList in der Version
9.7.0.3 FixList
9.7.0.3 FixList