From b59bacc74eb456e074cc51b30d5b700c2ae973ca Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 2 Jul 2005 11:16:26 +0000 Subject: [PATCH] fixed key lengths, as per tables.sql --- maintenance/archives/patch-categorylinks.sql | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/maintenance/archives/patch-categorylinks.sql b/maintenance/archives/patch-categorylinks.sql index 11542d5bb4..53c82fc0db 100644 --- a/maintenance/archives/patch-categorylinks.sql +++ b/maintenance/archives/patch-categorylinks.sql @@ -11,12 +11,17 @@ CREATE TABLE /*$wgDBprefix*/categorylinks ( -- This is also the page_title of the category's description page; -- all such pages are in namespace 14 (NS_CATEGORY). cl_to varchar(255) binary NOT NULL default '', - + -- The title of the linking page, or an optional override -- to determine sort order. Sorting is by binary order, which -- isn't always ideal, but collations seem to be an exciting -- and dangerous new world in MySQL... - cl_sortkey varchar(255) binary NOT NULL default '', + -- + -- For MySQL 4.1+ with charset set to utf8, the sort key *index* + -- needs cut to be smaller than 1024 bytes (at 3 bytes per char). + -- To sort properly on the shorter key, this field needs to be + -- the same shortness. + cl_sortkey varchar(86) binary NOT NULL default '', -- This isn't really used at present. Provided for an optional -- sorting method by approximate addition time. @@ -26,7 +31,7 @@ CREATE TABLE /*$wgDBprefix*/categorylinks ( -- This key is trouble. It's incomplete, AND it's too big -- when collation is set to UTF-8. Bleeeacch! - KEY cl_sortkey(cl_to,cl_sortkey(128)), + KEY cl_sortkey(cl_to,cl_sortkey), -- Not really used? KEY cl_timestamp(cl_to,cl_timestamp) -- 2.20.1