DB2 - Problem description
Problem IC63673 | Status: Closed |
PSEUDO COLUMN ROWID AND SCALAR FUNCTIONS RID_BIT/RID DOES NOT RETURN CORRECT ROWID FORMAT ON GLOBAL TEMPORARY TABLE(GTT). | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
Pseudo column ROWID and scalar functions RID_BIT()/RID() returns the row identifier with table information to protect from inadvertently using it with a different table. The extra table information is not returned on global temporary tables(GTT). Here is an example: declare global temporary table dgtt(C1 int) on commit preserve rows; insert into session.dgtt values 1, 2, 3; select rowid, c1 from session.dgtt; select rowid, c1 from cgtt1; 1 C1 ----------------------------------- ----------- x'04000000000000000000000000000000' 1 x'05000000000000000000000000000000' 2 x'06000000000000000000000000000000' 3 3 record(s) selected. update session.dgtt set c1=10 where ROWID=x'04000000000000000000000000000000'; SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000 The rowid returned from select was incorrect because it does not contain the extra table information and thus the update failed to find the corresponding row and returned SQL100W. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL. * **************************************************************** * PROBLEM DESCRIPTION: * * Pseudo column ROWID and scalar functions RID_BIT()/RID() * * returns * * the row identifier with table information to protect from * * inadvertently using it with a different table. The extra * * table * * information is not returned on global temporary tables(GTT). * * * * Here is an example: * * * * declare global temporary table dgtt(C1 int) on commit * * preserve * * rows; * * insert into session.dgtt values 1, 2, 3; * * select rowid, c1 from session.dgtt; * * select rowid, c1 from cgtt1; * * * * 1 C1 * * ----------------------------------- ----------- * * x'04000000000000000000000000000000' 1 * * x'05000000000000000000000000000000' 2 * * x'06000000000000000000000000000000' 3 * * 3 record(s) selected. * * * * update session.dgtt set c1=10 where * * ROWID=x'04000000000000000000000000000000'; * * * * SQL0100W No row was found for FETCH, UPDATE or DELETE; or * * the * * result of a * * query is an empty table. SQLSTATE=02000 * * * * The rowid returned from select was incorrect because it does * * not * * contain the extra table information and thus the update * * failed * * to find the corresponding row and returned SQL100W. * **************************************************************** * RECOMMENDATION: * * Update to 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 | |
Solution | |
This problem is first fixed in version 9.5 fix pack 6. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 09.10.2009 25.05.2010 26.05.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP6 | |
Problem solved according to the fixlist(s) of the following version(s) |