I have a small problem:
CREATE TABLE `first_names2` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
`results` int(11) DEFAULT NULL,
`active` tinyint(4) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `name_results` (`name`,`results`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
mysql> select * from first_names3;
+---------+-------+---------+--------+
| id | name | results | active |
+---------+-------+---------+--------+
| 16893 | dora | 29077 | 0 |
| 2126209 | dóra | 1 | 0 |
+---------+-------+---------+--------+
2 rows in set (0.06 sec)
mysql> create Unique index un_n on first_names3 (name);
ERROR 1062 (23000): Duplicate entry 'dóra' for key 'un_n'
Is there some kind of workaround for this ?
CREATE TABLE `first_names2` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
`results` int(11) DEFAULT NULL,
`active` tinyint(4) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `name_results` (`name`,`results`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
mysql> select * from first_names3;
+---------+-------+---------+--------+
| id | name | results | active |
+---------+-------+---------+--------+
| 16893 | dora | 29077 | 0 |
| 2126209 | dóra | 1 | 0 |
+---------+-------+---------+--------+
2 rows in set (0.06 sec)
mysql> create Unique index un_n on first_names3 (name);
ERROR 1062 (23000): Duplicate entry 'dóra' for key 'un_n'
Is there some kind of workaround for this ?