Bug #27834 transfer chinese database from one server to another cause 'data too long'
Submitted: 15 Apr 2007 10:10 Modified: 10 May 2007 9:51
Reporter: wang sysc Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S3 (Non-critical)
Version:1.1.11 OS:Windows
Assigned to: CPU Architecture:Any

[15 Apr 2007 10:10] wang sysc
Description:
some of my data cant migrate from source server to target server, the table created the data missing. no rows get from source server. migration tell me 'cdescription too long'

when the server database contain chinese big5 character, even if I set the character to big5,big5_chinese_... . Some data can't insert into database correctly, this problem might be the chinese word contain special character like \';....etc

How to repeat:
INSERT INTO `x`.`items`(`id` ,`cdescription`)
VALUES (1, , '隱身粉放置於一個絲質的袋子中. 當搖晃著袋子,隱身粉會使擁有者指定的一塊區域變成霧茫茫的一片並折射任何光線,使軍隊藏身於之中讓敵軍不易攻擊. \r\n範圍: 我方全體')

Suggested fix:
in program add ';\ detect using \ or something like this.
[16 Apr 2007 9:36] Sveta Smirnova
Thank you for the report.

Please provide output of SHOW CREATE TABLE items; and indicate version of both MySQL servers you import from and export to.
[16 Apr 2007 9:55] wang sysc
(Source)from mysql:server version: 4.1.15-nt
(target)to mysql:Server version: 5.0.37-community-nt MySQL Community Edition (GPL)

(Source) get from MYSQLCC
CREATE TABLE `items` (
  `id` int(5) NOT NULL auto_increment,
  `cdescription` text,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=big5;
[8 May 2007 10:53] Sveta Smirnova
Thank you for the report.

I can migrate provided data without problems.

Please provide configuration file for the server you migrate to.
[9 May 2007 8:02] wang sysc
mig target config in chinese windows xp mysql 5.0

Attachment: my.ini (application/octet-stream, text), 8.97 KiB.

[9 May 2007 8:04] wang sysc
my target server is fresh new install.
[9 May 2007 8:36] wang sysc
when I change migration option from 'big5' to 'multi language' then the data insert correctly.
[10 May 2007 9:51] Sveta Smirnova
Thank you for the report.

If you run provided dump script in the mysql command line client, you will see warnings. As you have sql-mode set to STRICT_TRANS_TABLES, you could not insert records. But when you check Multi-language option in the MySQL Migration Toolkit, it will use UTF8 encoding for the created table and all data will be inserted correctly.

So I reclassify this is as "Not a Bug"