Bug #7420 | Incorrect Error an index would be > 1024 chars (InnoDB), > 1000 chars (MyISAM) | ||
---|---|---|---|
Submitted: | 20 Dec 2004 4:12 | Modified: | 20 Dec 2004 6:58 |
Reporter: | B Jones | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.7 | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[20 Dec 2004 4:12]
B Jones
[20 Dec 2004 6:10]
Heikki Tuuri
Hi! In UTF-8, every character can take up to 3 bytes, and the maximum key value length for a MySQL index is 1024 bytes. The error message shuld be fixed if it talks about characters instead of bytes.
[20 Dec 2004 6:58]
Hartmut Holzgraefe
the error message says bytes, not characters, just fine: ERROR 1071 (42000): Specified key was too long; max key length is 1024 bytes
[20 Dec 2004 7:45]
B Jones
My mistake. I had expected UTF8 to store characters in an 8-bit format, so hadn't factored that in. Locally we're reverting to latin1 to reduce the storage overhead. Heikki, thanks as always for your quick response. cheers bj