Fix PK length error when upgrading jivePrivate in MySQL using utf8

Description

When using MySQL 4.1.* and character set UTF-8 then the following error is generated when trying to increase the username field to 64:

[localhost] ERROR 1071: Specified key was too long; max key length is 1024 bytes

Environment

None

Activity

Show:

Gaston Dombiak June 22, 2006 at 9:46 AM

The fix was to change the PK to only index the first 100 chars of the namespace field.

ALTER TABLE jivePrivate DROP PRIMARY KEY
ALTER TABLE jivePrivate MODIFY username VARCHAR(64);
ALTER TABLE jivePrivate ADD PRIMARY KEY (username, name, namespace(100));

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created June 22, 2006 at 9:40 AM
Updated June 22, 2006 at 9:46 AM
Resolved June 22, 2006 at 9:46 AM