r97999 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97998‎ | r97999 | r98000 >
Date:12:56, 24 September 2011
Author:catrope
Status:ok
Tags:
Comment:
Use the indexes added in r97998 to do ORDER BY mbf_timestamp, mbf_id
Modified paths:
  • /trunk/extensions/MoodBar/ApiQueryMoodBarComments.php (modified) (history)
  • /trunk/extensions/MoodBar/SpecialMoodBarFeedback.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/ApiQueryMoodBarComments.php
@@ -31,8 +31,9 @@
3232 $this->applyContinue( $params['continue'], $params['dir'] == 'older' );
3333 }
3434
35 - // Add ORDER BY mbf_timestamp {ASC|DESC}
 35+ // Add ORDER BY mbf_timestamp {ASC|DESC}, mbf_id {ASC|DESC}
3636 $this->addWhereRange( 'mbf_timestamp', $params['dir'], null, null );
 37+ $this->addWhereRange( 'mbf_id', $params['dir'], null, null );
3738 $this->addOption( 'LIMIT', $params['limit'] + 1 );
3839
3940 $res = $this->select( __METHOD__ );
Index: trunk/extensions/MoodBar/SpecialMoodBarFeedback.php
@@ -180,7 +180,7 @@
181181 ),
182182 $conds,
183183 __METHOD__,
184 - array( 'LIMIT' => $limit, 'ORDER BY' => 'mbf_timestamp DESC' ),
 184+ array( 'LIMIT' => $limit, 'ORDER BY' => 'mbf_timestamp DESC, mbf_id DESC' ),
185185 array( 'user' => array( 'LEFT JOIN', 'user_id=mbf_user_id' ) )
186186 );
187187 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97998MoodBar: Add mbf_id to the end of all indexes so we can do proper, indexed, s...catrope12:50, 24 September 2011

Status & tagging log