On Fri, Jul 23, 2010 at 1:24 PM, Aryeh Gregor
<Simetrical+wikilist(a)gmail.com> wrote:
Okay, so I think I have enough feedback to write up an
initial
implementation. I'll start on that now. To begin with I'll probably
just stick in a dummy collation function, like use "convert everything
to uppercase" and test it with $wgCapitalLinks false. Outline of my
initial implementation plans:
* Add $wgExperimentalCategorySort, default to false, for testing, so
that I can commit this to trunk (I don't like using branches).
* Add unindexed varchar(255) NULL cl_raw_sortkey column, to serve the
same function as the current cl_sortkey, except it will be NULL if the
raw sortkey is identical to the one retrieved from the name.
* Add cl_collation tinyint column to track collation revisions, with
an index. Add a $wgCollationVersion variable, initially set to 0 (for
no collation).
* Add cl_type column, an ENUM of ('page', 'subcat', 'file').
ENUMs
are somewhat evil to change in MySQL, but this isn't likely to change.
* Change existing indexes appropriately.
* Write code to keep the new columns populated and use them on
category page display.
* Write a script to populate the new columns.
* Write some trivial collation function and try to migrate to it.
I'm aiming to be done with this on Monday. There are still some
outstanding issues I'm not sure about that I've outlined here, but
they won't be much work to change later.
I've made my first commit now:
<http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69810>. Please
comment on the direction I'm taking here, as well as telling me if it
causes any problems with $wgExperimentalCategorySort off. I'll keep
working on this for a while longer today, then pick up work again on
Sunday or Monday.