Bug #4406 keylength 500 too small for utf8 on 5.0.0
Submitted: 5 Jul 2004 5:20 Modified: 26 Sep 2004 13:56
Reporter: Leighton Brown Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.0alpha OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[5 Jul 2004 5:20] Leighton Brown
Description:
This is supposed to have been fixed in 4.1.x but it reoccurs in 5.0.0alpha. Using utf8 the server 
reports keylength violation and states that the maximum keylength in 500. 

How to repeat:
execute the query: create table TEST_TABLE (PROJECT_ID INT NOT NULL, RESOURCE_NAME 
VARCHAR(218) NOT NULL, primary key(PROJECT_ID, RESOURCE_NAME), index 
projectresource_resource_name (RESOURCE_NAME)) 
 

Suggested fix:
Since unicode takes up to three bytes per character, set the max key length to 1500
[5 Jul 2004 9:49] Alexander Keremidarski
As you said it is fixed in 4.1.2.

Consider the release dates:
5.0.0 - 22 Dec 2003
4.1.2 - 28 May 2004

You can see why fix in 4.1.2 is not in 5.0.0.

This and all other fixes from 4.1 tree are merged into 5.0 source tree so they be included in next 5.0 release namely 5.0.1.