API: Force straight join for prop=linkshere|transcludedin|fileusage
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 14 Sep 2016 14:13:10 +0000 (10:13 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 14 Sep 2016 14:13:10 +0000 (10:13 -0400)
commit81912c3ef943d8a702ea60aa67f4abe9e22cdabe
tree121de547161dec4226d5e9aa75faa484f667c973
parentfd4858b608db92258c304aad4da9b0c572291fff
API: Force straight join for prop=linkshere|transcludedin|fileusage

MySQL (or at least 5.5.5-10.0.23-MariaDB) chooses a really bad query plan if it
thinks there will be more matching rows in the linktable than are in page. Use
STRAIGHT_JOIN here to force it to use the intended, fast plan. See T145079 for
details.

Bug: T145079
Change-Id: I1a363450b818a049938145d0feb207c9894d2a49
includes/api/ApiQueryBacklinksprop.php