From 97041a612ebe4ac76c25c9ca838541f8f89b9cfa Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 4 Dec 2013 12:26:24 -0500 Subject: [PATCH] Remove change_tag_tag_id index forcing from API too 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 | 1 - includes/api/ApiQueryRecentChanges.php | 1 - includes/api/ApiQueryRevisions.php | 5 ----- includes/api/ApiQueryUserContributions.php | 1 - 4 files changed, 8 deletions(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 0d2f47568e..14364cbaa8 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -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'] ) ) { diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 653feab741..02a05e8e5d 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -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']; diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 86351c0a32..ea992b3a07 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -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__ ); diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index 6c7a57d55d..1c9a93c216 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -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'] ) { -- 2.20.1