Add ar_ prefix back to usertext_timestamp USE INDEX
authorReedy <reedy@wikimedia.org>
Thu, 30 Mar 2017 12:30:07 +0000 (13:30 +0100)
committerReedy <reedy@wikimedia.org>
Wed, 5 Apr 2017 23:40:03 +0000 (23:40 +0000)
This is the correct/canonical index name. For usages on mysql it will
map to the unprefixed version.

Bug: T154872
Change-Id: Ie2daf7b33428855ac59c85bf04a99a9bca7feba1

includes/api/ApiQueryDeletedrevs.php
includes/specials/pagers/DeletedContribsPager.php

index 2bb4d03..b68a868 100644 (file)
@@ -250,7 +250,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                $this->addOption( 'LIMIT', $limit + 1 );
                $this->addOption(
                        'USE INDEX',
                $this->addOption( 'LIMIT', $limit + 1 );
                $this->addOption(
                        'USE INDEX',
-                       [ 'archive' => ( $mode == 'user' ? 'usertext_timestamp' : 'name_title_timestamp' ) ]
+                       [ 'archive' => ( $mode == 'user' ? 'ar_usertext_timestamp' : 'name_title_timestamp' ) ]
                );
                if ( $mode == 'all' ) {
                        if ( $params['unique'] ) {
                );
                if ( $mode == 'all' ) {
                        if ( $params['unique'] ) {
index a1f6b84..78e1092 100644 (file)
@@ -129,7 +129,7 @@ class DeletedContribsPager extends IndexPager {
                $condition = [];
 
                $condition['ar_user_text'] = $this->target;
                $condition = [];
 
                $condition['ar_user_text'] = $this->target;
-               $index = 'usertext_timestamp';
+               $index = 'ar_usertext_timestamp';
 
                return [ $index, $condition ];
        }
 
                return [ $index, $condition ];
        }