r87606 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87605‎ | r87606 | r87607 >
Date:23:44, 6 May 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Follow-up r86179: Updated and commented out two USE INDEX statements. This *has* to be done before the schema change. The new index hints can be added after all DBs are updated.
Modified paths:
  • /trunk/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/presentation/specialpages/reports/ReviewedVersions_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php
@@ -62,7 +62,7 @@
6363 'fr_rev_id' => array_keys( $revids ) ), LIST_AND );
6464 }
6565 $module->addWhere( $db->makeList( $where, LIST_OR ) );
66 - $module->addOption( 'USE INDEX', array( 'flaggedrevs' => 'PRIMARY' ) );
 66+ //$module->addOption( 'USE INDEX', array( 'flaggedrevs' => 'page_rev' ) );
6767
6868 $res = $module->select( __METHOD__ );
6969
Index: trunk/extensions/FlaggedRevs/presentation/specialpages/reports/ReviewedVersions_body.php
@@ -93,15 +93,15 @@
9494 if ( !in_array( $this->namespace, $namespaces ) ) {
9595 $conds[] = "1 = 0";
9696 }
97 - $conds["fr_page_id"] = $this->pageID;
98 - $conds[] = "fr_rev_id = rev_id";
99 - $conds[] = "fr_user = user_id";
 97+ $conds['fr_page_id'] = $this->pageID;
 98+ $conds[] = 'fr_rev_id = rev_id';
10099 $conds[] = 'rev_deleted & ' . Revision::DELETED_TEXT . ' = 0';
 100+ $conds[] = 'fr_user = user_id';
101101 return array(
102102 'tables' => array( 'flaggedrevs', 'revision', 'user' ),
103103 'fields' => 'fr_rev_id,fr_timestamp,rev_timestamp,fr_quality,fr_user,user_name',
104104 'conds' => $conds,
105 - 'options' => array( 'USE INDEX' => array( 'flaggedrevs' => 'PRIMARY' ) )
 105+ //'options' => array( 'USE INDEX' => array( 'flaggedrevs' => 'page_rev' ) )
106106 );
107107 }
108108

Follow-up revisions

RevisionCommit summaryAuthorDate
r92317REL1_18 FR: r87606, r87617, r87669, r87690, r87700, r90388, r90419, r90741, r...reedy21:53, 15 July 2011
r97331MFT changes from r87606aaron20:37, 16 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86179Overdue changes to `flaggedrevs` table:...aaron03:39, 16 April 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   20:51, 16 September 2011

These FORCE statements were defensive and probably not really useful.

Status & tagging log