Bug #26115 Duplicated field value on different values (UTF8 string with 'o' and 'ó')?
Submitted: 6 Feb 2007 13:51 Modified: 6 Feb 2007 17:28
Reporter: Jiri Kaderavek Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version:5.0.32 OS:Linux (Debian arge/etch)
Assigned to: CPU Architecture:Any
Tags: duplicated field, o, o, primary index, utf8

[6 Feb 2007 13:51] Jiri Kaderavek
Description:
Trying to import following sql (cat <file> | mysql --default-character-set=<utf8|binary> -p -u <user> <db>) causes an error:

ERROR 1062 (23000): Duplicate entry 'doblo cargo maxi' for key 1

Obviously, for mysql UTF8 'o' and 'ó' are the same. Even SELECT DISTINCT return only one value (if you import this sql without primary key constraints).

How to repeat:
DROP TABLE IF EXISTS `conf_plalias2`;
CREATE TABLE `conf_plalias2` (
  `f_name` varchar(19) NOT NULL default '',
  PRIMARY KEY  (`f_name`)
) ENGINE=MyISAM DEFAULT CHARACTER SET utf8 ROW_FORMAT=FIXED;

INSERT INTO `conf_plalias2` VALUES
	('dobló cargo maxi'),
	('doblo cargo maxi');
[6 Feb 2007 17:28] Jiri Kaderavek
collation utf8_bin must be used, not default utf8_general_ci