Author: hsw
Description:
I install MediaWiki v1.8.2 on MySQL v5.0.27 with
option "Experimental MySQL 4.1/5.0 UTF-8" enabled and have error:
ERROR 1089 (HY000): Incorrect sub part key; the used key part isn't a string,
the used length is longer than the key part, or the storage engine doesn't
support unique sub keys
on query:
CREATE TABLE ipblocks (
...
ipb_address varchar(40) binary NOT NULL default '',
...
UNIQUE INDEX ipb_address (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only),
...
)
Fix:
change maintenance/mysql5/tables.sql from
UNIQUE INDEX ipb_address (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only),
to
UNIQUE INDEX ipb_address (ipb_address(40), ipb_user, ipb_auto, ipb_anon_only),
Version: 1.8.x
Severity: trivial
OS: FreeBSD
Platform: PC