Removed $options from RecentChange::newFromConds
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 29 Sep 2015 17:31:55 +0000 (10:31 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 29 Sep 2015 17:31:55 +0000 (10:31 -0700)
* The FORCE INDEX statements are not needed

Change-Id: Ia6f386140e88ad01fc35a10b00dbcb0d1eb934ea

includes/changes/RecentChange.php
includes/diff/DifferenceEngine.php
includes/page/Article.php

index 5c884a5..60c9182 100644 (file)
@@ -171,12 +171,11 @@ class RecentChange {
         *
         * @param array $conds Array of conditions
         * @param mixed $fname Override the method name in profiling/logs
-        * @param array $options Query options
         * @return RecentChange|null
         */
-       public static function newFromConds( $conds, $fname = __METHOD__, $options = array() ) {
+       public static function newFromConds( $conds, $fname = __METHOD__ ) {
                $dbr = wfGetDB( DB_SLAVE );
-               $row = $dbr->selectRow( 'recentchanges', self::selectFields(), $conds, $fname, $options );
+               $row = $dbr->selectRow( 'recentchanges', self::selectFields(), $conds, $fname );
                if ( $row !== false ) {
                        return self::newFromRow( $row );
                } else {
index c138eec..6544078 100644 (file)
@@ -487,8 +487,7 @@ class DifferenceEngine extends ContextSource {
                                                'rc_this_oldid' => $this->mNewid,
                                                'rc_patrolled' => 0
                                        ),
-                                       __METHOD__,
-                                       array( 'USE INDEX' => 'rc_timestamp' )
+                                       __METHOD__
                                );
 
                                if ( $change && !$change->getPerformer()->equals( $user ) ) {
index defd029..4fdaea1 100644 (file)
@@ -1124,8 +1124,7 @@ class Article implements Page {
                                        'rc_namespace' => $this->getTitle()->getNamespace(),
                                        'rc_cur_id' => $this->getTitle()->getArticleID()
                                ),
-                               __METHOD__,
-                               array( 'USE INDEX' => 'new_name_timestamp' )
+                               __METHOD__
                        );
                } else {
                        // Cache the information we gathered above in case we can't patrol