Bug #38885 a japanese character make sql bad
Submitted: 19 Aug 2008 8:24 Modified: 19 Aug 2008 9:34
Reporter: tie chen Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version:5.0.22 OS:Other (centos)
Assigned to: CPU Architecture:Any
Tags: japanese character

[19 Aug 2008 8:24] tie chen
Description:
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(45) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
insert into `user` set name='

How to repeat:
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(45) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
insert into `user` set name='
[19 Aug 2008 8:26] tie chen
the sql file

Attachment: query.sql (application/octet-stream, text), 362 bytes.

[19 Aug 2008 8:27] tie chen
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(45) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
insert into `user` set name='
[19 Aug 2008 8:29] tie chen
detail for the problem

Attachment: detail.txt (text/plain), 1.25 KiB.

[19 Aug 2008 8:39] tie chen
it seems the database of mysql.com also have those problem... my comment which i sent been truncated,poor.....
[19 Aug 2008 9:34] Sveta Smirnova
Thank you for the report.

If I understood correctly problem character is 4-byte: F0A0AEB7. MySQL supports such character since version 6.0. Please upgrade.
[19 Aug 2008 9:36] Susanne Ebrecht
Many thanks for writing a bug report.

Unfortunately, this is not a bug.

MySQL only supports 3 byte characters but the character you used here is a 4 byte character.

http://dev.mysql.com/doc/refman/5.1/en/charset-unicode.html

"Currently, MySQL support for UTF-8 does not include four-byte sequences."