DB2 - Problem description
Problem IT22091 | Status: Closed |
CONVERSION BETWEEN DIFFERENT CODE PAGES CAN LEAD TO UNEXPECTED TRUNCATION OF DATA | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem description: | |
When converting from one codepage to another, it is possible for the resultant data to need more space than before. Db2 will calculate the maximum amount of space needed after the conversion and then truncate if the estimation exceeds the page size. This is the normal case. If the estimated size is larger than 64KB, export unexpectedly truncates too much due to an integer overflow. Here is a sample repro scenario: # test.del contains 30000 bytes string like "0123456..." export LANG=Ja_JP db2 terminate db2 drop db sample db2 create db sample using codeset IBM-943 territory JP db2 connect to sample db2 create bufferpool BUFF32K size 10 pagesize 32768 db2 "create large tablespace tbs1 pagesize 32768 managed by database using (file 'cont1' 1024) bufferpool BUFF32K" db2 CREATE TABLE TEST (COl1 VARCHAR(30000)) long in tbs1 db2 "import from test.del of del insert into TEST (COl1)" db2 terminate # IBM-943->IBM-943 no code conversion export LANG=Ja_JP db2 connect to sample db2 export to export1.del of del select COL1 from test db2 terminate # IBM-943->UTF-8 code conversion export LANG=JA_JP db2 connect to sample db2 export to export2.del of del select COL1 from test db2 terminate $ ls -l *.del -rw-rw-rw- 1 db2inst1 db2iadm 30003 Aug 13 21:46 export1.del -rw-rw-rw- 1 db2inst1 db2iadm 24467 Aug 13 21:46 export2.del | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users using export. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 next release. * **************************************************************** | |
Local Fix: | |
Use the same code page when exporting the data. | |
Solution | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : follow-up : IT22161 IT22162 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 22.08.2017 28.08.2017 28.08.2017 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |