Bug #68352 | Error 1071 (Key too long) is being incorrectly reported. | ||
---|---|---|---|
Submitted: | 12 Feb 2013 19:34 | Modified: | 12 Feb 2013 19:42 |
Reporter: | Van Stokes | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.6.10 | OS: | Linux (Ubuntu 12.04 x86_64) |
Assigned to: | CPU Architecture: | Any | |
Tags: | INDEX, innodb, key |
[12 Feb 2013 19:34]
Van Stokes
[12 Feb 2013 19:42]
MySQL Verification Team
Since utf8 characters may be up to 3 bytes each, this error message is correct. However dynamic/compressed innodb tables do not have this limitation; See: http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_large_prefix On a server started with: --innodb_large_prefix=1 --innodb-file-format=barracuda --innodb-file-per-table mysql> show create table oc_pictures_images_cache\G *************************** 1. row *************************** Table: oc_pictures_images_cache Create Table: CREATE TABLE `oc_pictures_images_cache` ( `uid_owner` varchar(64) NOT NULL DEFAULT '', `path` varchar(256) NOT NULL DEFAULT '', `width` int(11) NOT NULL DEFAULT '0', `height` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`uid_owner`,`path`), KEY `oc_pictures_images_cache_idx1` (`uid_owner`,`path`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC 1 row in set (0.00 sec)