Force the use of the PRIMARY key rather than the name_title in the second query.
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 8 Jan 2009 22:02:16 +0000 (22:02 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 8 Jan 2009 22:02:16 +0000 (22:02 +0000)
includes/api/ApiQueryBacklinks.php

index f60e824..83f8c5b 100644 (file)
@@ -169,6 +169,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                        $this->addWhereFld('page_is_redirect', 0);
                $this->addOption('LIMIT', $this->params['limit'] + 1);
                $this->addOption('ORDER BY', $this->bl_sort);
+               $this->addOption('USE INDEX', array('page' => 'PRIMARY'));
        }
 
        private function run($resultPageSet = null) {