public function doQuery( $db ) {
$ids = array_map( 'intval', $this->ids );
$queryInfo = [
- 'tables' => [ 'revision', 'user' ],
+ 'tables' => [ 'revision', 'page', 'user' ],
'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
'conds' => [
'rev_page' => $this->title->getArticleID(),
'rev_id' => $ids,
],
- 'options' => [ 'ORDER BY' => 'rev_id DESC' ],
+ 'options' => [
+ 'ORDER BY' => 'rev_id DESC',
+ 'USE INDEX' => [ 'revision' => 'PRIMARY' ] // workaround for MySQL bug (T104313)
+ ],
'join_conds' => [
'page' => Revision::pageJoinCond(),
'user' => Revision::userJoinCond(),