When updating a MySQL database table to use UTF-8 I came across an error:
Initial research indicates that the maximum key size in MySQL is 1000 bytes. Given that latin1 uses one (1) byte per character and UTF-8 uses three (3) bytes per character some indexes will exceed the 1000 byte limit. This accounts for the generated error when converting tables with large or compound indexes from latin1 to UTF8 encoding.
According to the MySQL bug tracker this issue has yet to be resolved. Currently the only solution is to limit indexing on UTF-8 encoded tables or use latin1 instead. Not the best of choices to say the least.
MySQL Bugs: #4541: "Specified key was too long; max key length is 1000 bytes" with utf8
Character encoding
Comments
Post new comment