Remove change_tag_tag_id index forcing from API too
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 4 Dec 2013 17:26:24 +0000 (12:26 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 4 Dec 2013 17:26:24 +0000 (12:26 -0500)
Change I6b8f35bd removed the forcing of the change_tag_tag_id index in
the UI code paths, but didn't do the same for the API like it probably
should have.

Change-Id: Ie3a00b3a0ad194169a026370510f3e21c3abc079

includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQueryUserContributions.php

index 0d2f475..14364cb 100644 (file)
@@ -102,7 +102,6 @@ class ApiQueryLogEvents extends ApiQueryBase {
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN',
                                array( 'log_id=ct_log_id' ) ) ) );
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
-                       $index['change_tag'] = 'change_tag_tag_id';
                }
 
                if ( !is_null( $params['action'] ) ) {
index 653feab..02a05e8 100644 (file)
@@ -324,7 +324,6 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rc_id=ct_rc_id' ) ) ) );
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
-                       $index['change_tag'] = 'change_tag_tag_id';
                }
 
                $this->token = $params['token'];
index 86351c0..ea992b3 100644 (file)
@@ -180,9 +180,6 @@ class ApiQueryRevisions extends ApiQueryBase {
                        $this->contentFormat = $params['contentformat'];
                }
 
-               // Possible indexes used
-               $index = array();
-
                $userMax = ( $this->fld_content ? ApiBase::LIMIT_SML1 : ApiBase::LIMIT_BIG1 );
                $botMax = ( $this->fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2 );
                $limit = $params['limit'];
@@ -210,7 +207,6 @@ class ApiQueryRevisions extends ApiQueryBase {
                                array( 'change_tag' => array( 'INNER JOIN', array( 'rev_id=ct_rev_id' ) ) )
                        );
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
-                       $index['change_tag'] = 'change_tag_tag_id';
                }
 
                if ( isset( $prop['content'] ) || !is_null( $this->difftotext ) ) {
@@ -379,7 +375,6 @@ class ApiQueryRevisions extends ApiQueryBase {
                }
 
                $this->addOption( 'LIMIT', $limit + 1 );
-               $this->addOption( 'USE INDEX', $index );
 
                $count = 0;
                $res = $this->select( __METHOD__ );
index 6c7a57d..1c9a93c 100644 (file)
@@ -282,7 +282,6 @@ class ApiQueryContributions extends ApiQueryBase {
                                array( 'change_tag' => array( 'INNER JOIN', array( 'rev_id=ct_rev_id' ) ) )
                        );
                        $this->addWhereFld( 'ct_tag', $this->params['tag'] );
-                       $index['change_tag'] = 'change_tag_tag_id';
                }
 
                if ( $this->params['toponly'] ) {