(bug 36400) API: Fix sorting for iwlinks, langlinks
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 11 Jan 2013 00:22:03 +0000 (19:22 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 3 Apr 2013 17:22:20 +0000 (13:22 -0400)
commitc013ec02b9219941b29030ae6ff9f7052df646ef
tree53ac79f08b97d8a7c282e19864fe2f367da0ca5b
parentcdb562b09e654d1b06474a7d7c39d8f239b719ea
(bug 36400) API: Fix sorting for iwlinks, langlinks

The iwlinks and langlinks modules continue parameters imply ordering by
page then prefix then title. But in certain modes, the actual queries
use a different ordering, which may result in skipped or repeated
results.

This changeset fixes that. To do so, it needs to re-add an index
iwl_prefix_from_title which was mistakenly removed in 2010 (r69721). And
while it's doing that, it cleans up errors in the sqlite and postgresql
handling of the iwlinks indexes too.

Also, per Asher, make the iwl_prefix_from_title and
iwl_prefix_title_from indexes non-UNIQUE.

Change-Id: I607e8bf9183a2d8152a6127a81c83a0b5bba0c61
14 files changed:
includes/api/ApiQueryIWLinks.php
includes/api/ApiQueryLangLinks.php
includes/installer/MysqlUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/SqliteUpdater.php
maintenance/archives/patch-iwl_prefix_title_from-non-unique.sql [new file with mode: 0644]
maintenance/archives/patch-iwlinks-from-title-index.sql [new file with mode: 0644]
maintenance/archives/patch-kill-iwl_pft.sql [deleted file]
maintenance/postgres/archives/patch-kill-iwl_pft.sql [deleted file]
maintenance/postgres/archives/patch-rename-iwl_prefix.sql
maintenance/postgres/tables.sql
maintenance/sqlite/archives/patch-kill-iwl_pft.sql [deleted file]
maintenance/sqlite/archives/patch-rename-iwl_prefix.sql
maintenance/tables.sql