Last modified: 2014-02-12 23:35:46 UTC
In tables.sql there're already these lines: -- We always sort within a given category, and within a given type. FIXME: -- Formerly this index didn't cover cl_type (since that didn't exist), so old -- callers won't be using an index: fix this? CREATE INDEX /*i*/cl_sortkey ON /*_*/categorylinks (cl_to,cl_type,cl_sortkey,cl_from); but can we really call another part of core "old caller"?
Everything in core should have been changed in 1.17...
Guess it must have been missed when the schema change was made. In any case its a trivial fix (change the order by to be cl_type, cl_sortkey)
The method in question is totally unusable. To be safely usable, you would have to be able to set the continue parameter. However, the caller is not given where the query left off, so would be unable to issue a valid continue. At best the method could be used for getting the first X articles out of a category.
(In reply to comment #3) > The method in question is totally unusable. > > To be safely usable, you would have to be able to set the continue parameter. > However, the caller is not given where the query left off, so would be unable > to issue a valid continue. > > At best the method could be used for getting the first X articles out of a > category. That function declares it just returns a TitleArray, which is just an Iterator. If someone is interested, an iterator returning Titles spanning multiple continued queries may be written, and can be used here. (Unluckily Title::getLinksFrom() and friends return an array of Titles, so they can't benefit from this)