Bug #27600 utf8 - Duplicate entry
Submitted: 2 Apr 2007 22:39 Modified: 2 Apr 2007 23:32
Reporter: flobee (c) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.2.0-8+etch1 OS:Linux (debian/windowsXP)
Assigned to: CPU Architecture:Any
Tags: utf8 charset

[2 Apr 2007 22:39] flobee (c)
Description:
-- Server Version: 5.0.32
-- PHP-Version: 5.2.0-8+etch1

CREATE TABLE `utf8test` (
  `id` int(11) NOT NULL auto_increment,
  `testtext` varchar(255) character set utf8 collate utf8_bin NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `testtext` (`testtext`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

How to repeat:

INSERT INTO `utf8test` ( `id` , `testtext` ) VALUES ('1', 'Özgur Can');
INSERT INTO `utf8test` ( `id` , `testtext` ) VALUES ('2', 'Ozgur Can');

------------ result: -------------------

#1062 - Duplicate entry 'Ozgur Can' for key 2

--- whats wrong?

kind regards
flobee
[2 Apr 2007 23:32] MySQL Verification Team
Thank you for the bug report. I was not able to repeat with current
source server, pleas upgrade for the latest released version or wait
until the version 5.0.40 will be released. Thanks in advance.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.40-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> CREATE TABLE `utf8test` (
    ->   `id` int(11) NOT NULL auto_increment,
    ->   `testtext` varchar(255) character set utf8 collate utf8_bin NOT NULL,
    ->   PRIMARY KEY  (`id`),
    ->   UNIQUE KEY `testtext` (`testtext`)
    -> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> 
mysql> INSERT INTO `utf8test` ( `id` , `testtext` ) VALUES ('1', 'Özgur Can');
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO `utf8test` ( `id` , `testtext` ) VALUES ('2', 'Ozgur Can');
Query OK, 1 row affected (0.00 sec)

mysql> select * from utf8test;
+----+-----------+
| id | testtext  |
+----+-----------+
|  1 | Özgur Can | 
|  2 | Ozgur Can | 
+----+-----------+
2 rows in set (0.00 sec)

mysql>