Bug #2699 UTF8 breaks primary keys for cols > 85 characters
Submitted: 10 Feb 2004 6:43 Modified: 13 Feb 2004 5:57
Reporter: Alexander Barkov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.2-bk-current OS:
Assigned to: Alexander Barkov CPU Architecture:Any

[10 Feb 2004 6:43] Alexander Barkov
Description:
PRIMARY KEY is created shorter than the field.

How to repeat:
mysql> create table t1 (a char(160) character set utf8, primary key(a)) type=myisam;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> show create table t1;
+-------+---------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `a` char(160) character set utf8 NOT NULL default '',
  PRIMARY KEY  (`a`(74))
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
[10 Feb 2004 6:46] Alexander Barkov
This should be checked with all engines
[13 Feb 2004 5:57] Alexander Barkov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html