Make Title::getFirstRevision() ignore the rev_timestamp index
[lhc/web/wiklou.git] / includes / Title.php
index e45994c..0c5835c 100644 (file)
@@ -4028,7 +4028,11 @@ class Title implements LinkTarget {
                        $row = $db->selectRow( 'revision', Revision::selectFields(),
                                [ 'rev_page' => $pageId ],
                                __METHOD__,
-                               [ 'ORDER BY' => 'rev_timestamp ASC', 'LIMIT' => 1 ]
+                               [
+                                       'ORDER BY' => 'rev_timestamp ASC',
+                                       'LIMIT' => 1,
+                                       'IGNORE INDEX' => 'rev_timestamp'
+                               ]
                        );
                        if ( $row ) {
                                return new Revision( $row );