r40792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40791‎ | r40792 | r40793 >
Date:18:10, 13 September 2008
Author:catrope
Status:old
Tags:
Comment:
Reverting r40790 and fixing the filesort properly (by adding an extra ORDER BY clause).
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryDeletedrevs.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php
@@ -107,9 +107,12 @@
108108 $lb = new LinkBatch($titles);
109109 $where = $lb->constructSet('ar', $db);
110110 $this->addWhere($where);
111 - } else {
112 - $this->dieUsage('You have to specify a page title or titles');
113111 }
 112+ else
 113+ {
 114+ $dir = ($params['dir'] == 'older' ? 'DESC' : '');
 115+ $this->addOption('ORDER BY', "ar_namespace $dir, ar_title $dir");
 116+ }
114117
115118 $this->addOption('LIMIT', $limit + 1);
116119 $this->addWhereRange('ar_timestamp', $params['dir'], $params['start'], $params['end']);

Follow-up revisions

RevisionCommit summaryAuthorDate
r40798Revert r40792. Filesort is gone, but table scan is still there for time range.aaron20:41, 13 September 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40790I swear this table scan filesort was disabled before. Disabling again...thank...aaron17:56, 13 September 2008