ApiQueryLinks: Avoid MySQL order-by bug
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 12 Apr 2017 15:38:20 +0000 (11:38 -0400)
committerTim Starling <tstarling@wikimedia.org>
Fri, 13 Oct 2017 00:27:01 +0000 (00:27 +0000)
commit8c36aa3373b02111b7031522273693c05d3e37e7
tree0a1fffde0b5076dfed51e835640afd8506ea0b35
parent3dc37c18c211c9a4fb9995913e35dc99e53281c1
ApiQueryLinks: Avoid MySQL order-by bug

MySQL (and MariaDB) have a strange bug where it will often get confused
and insist on filesorting if a field that is constant in the WHERE
clause is also present in ORDER BY. We've worked around this in several
places in the API, and in fact it was done in this very module in r34720
and r37250.

But when r67450 added the pltitles and tltemplates parameters, it didn't
adjust the logic for avoiding the DB bug. This does that now.

Change-Id: I9f37f8812a94cdd088d3940da43d1046ebd455d6
includes/api/ApiQueryLinks.php