home clear 64x64
en blue 200x116 de orange 200x116 info letter User
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 IC63950 Status: Closed

GRAPHIC DATA IN A UNICODE DATABASE IS BEING INSERTED
DIFFERENTLYIN V8.2 AS IT IS IN DB2 V9.5

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Graphic data in a Unicode database is being inserted differently 
in DB2 V8.2 as it is in DB2 DB2 V9.5. 
 
Here is a CLI testscript that reproduces this problem: 
 
opt calldiag on 
opt autocommit on 
sqlallocenv 1 
sqlallocconnect 1 1 
SQLSetConnectAttr 1 SQL_ATTR_WCHARTYPE 1 
sqlconnect 1 "utf8" -3 
sqlallocstmt 1 1 
sqlexecdirect 1 "drop table testtab" -3 
sqlexecdirect 1 "create table testtab (c1 vargraphic(127), c2 
vargraphic(127))" -3 
sqlprepare 1 "insert into testtab values (?, ?)" -3 
getmem 1 1 sql_c_dbchar 128 
getmem 1 2 sql_c_dbchar 128 
sqlbindparameter 1 1 sql_param_input sql_c_dbchar sql_vargraphic 
0 0 1 
sqlbindparameter 1 2 sql_param_input sql_c_dbchar sql_vargraphic 
0 0 2 
updatemem 1 sql_c_dbchar value 28 
0x0000004D00000079000000430000006F0000006E0000007300000074 
updatemem 2 sql_c_dbchar value 28 
0x0000004D0000007900000056000000610000006C0000007500000065 
sqlexecute 1 
 
sqlallocstmt 1 2 
sqlprepare 2 "select hex(c1) from testtab" -3 
sqlexecute 2 
fetchall 2 
 
 
The "fetchall" output in DB2 V8.2, you get the value 
"0x004D00790043006F006E00730074" 
 
The "fetchall" output in DB2 V9.5, you get the value 
"0x0000004D00000079000000430000006F0000006E0000007300000074" 
 
The expected value from DB2 V8.2 & DB2 V9.5 should be 
consistent. 
 
If you query the actual value (not the hex value) from the CLP, 
then the values returned are "MyConst" and "MyValue" for both C1 
and C2 in v8.2. But in DB2 v9.5, the values are not converted 
properly and you see blanks.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* db2_v95fp4                                                   * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* If you query the actual value (not the hex value) from the   * 
* CLP,                                                         * 
* then the values returned are "MyConst" and "MyValue" for     * 
* both C1                                                      * 
* and C2 in v8.2. This was coming blank for db2_v95fp4.        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* db2_v95fp5                                                   * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
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 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 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

Solution
If you query the actual value (not the hex value) from the CLP, 
 
then the values returned are "MyConst" and "MyValue" for 
both C1 
and C2 in v95fp5
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
22.10.2009
24.02.2010
11.12.2010
Problem solved at the following versions (IBM BugInfos)
9.5.FP5
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.1 FixList