Page MenuHomePhabricator

Key too long for the 'job' table during install/update when using UTF-8
Closed, ResolvedPublic

Description

When using so-called Experimental MySQL 4.1/5.0 UTF-8 support, the creation or
update of the job table fails with the "Specified key was too long; max key
length is 1024 bytes" error message.

I have fixed that locally by explicitly stating the character set to be latin1
for both varchar columns (they should probably never contain some fancy Unicode
text, anyway):

...
job_cmd varchar(255) CHARACTER SET latin1 NOT NULL default '',
...


Version: 1.6.x
Severity: critical
OS: Linux
Platform: PC

Details

Reference
bz5489

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:10 PM
bzimport set Reference to bz5489.
bzimport added a subscriber: Unknown Object (MLST).

norman wrote:

Got a very similar error message:

Creating job table...Query "CREATE TABLE job (
job_id int(9) unsigned NOT NULL auto_increment,
job_cmd varchar(255) NOT NULL default '',
job_namespace int NOT NULL,
job_title varchar(255) binary NOT NULL,
job_params blob NOT NULL default '',
PRIMARY KEY job_id (job_id),
KEY (job_cmd, job_namespace, job_title)
) TYPE=InnoDB
" failed with error code "Specified key was too long. Max key length is 500
(localhost)".

tried it with the "hot fix" 'CHARACTER SET latin1', but it doen't work for me.

PHP 5.1.2 - MySQL 4.0.18 - MediaWiki 1.5.7 -> 1.6.3

norman wrote:

*** This bug has been marked as a duplicate of 4445 ***