force index, per domas
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 10 Apr 2008 17:55:12 +0000 (17:55 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 10 Apr 2008 17:55:12 +0000 (17:55 +0000)
includes/Title.php

index 673ee16..73b7ea5 100644 (file)
@@ -2852,6 +2852,7 @@ class Title {
 
        /**
         * Get the number of revisions between the given revision IDs.
+        * Used for diffs and other things that really need it.
         *
         * @param integer $old  Revision ID.
         * @param integer $new  Revision ID.
@@ -2863,7 +2864,8 @@ class Title {
                        'rev_page = ' . intval( $this->getArticleId() ) .
                        ' AND rev_id > ' . intval( $old ) .
                        ' AND rev_id < ' . intval( $new ),
-                       __METHOD__ );
+                       __METHOD__,
+                       array( 'USE INDEX' => 'PRIMARY' ) );
        }
 
        /**