r113364 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113363‎ | r113364 | r113365 >
Date:13:28, 8 March 2012
Author:saper
Status:reverted
Tags:1.19, gerritmigration 
Comment:
Fix bug 23600: column "recentchanges.rc_timestamp" should be in GROUP BY

PostgreSQL error:

Query: SELECT rc_namespace,rc_title,rc_timestamp,COUNT(*) AS edits FROM recentchanges WHERE rc_user_text = 'Dnessett' AND ((rc_new = 1) OR (rc_log_type = 'upload' AND rc_log_action = 'upload')) GROUP BY rc_namespace, rc_title ORDER BY rc_timestamp DESC Function: SpecialNuke::getNewPages Error: 1 ERROR: column "recentchanges.rc_timestamp" must appear in the GROUP BY clause or be used in an aggregate function

Backtrace:

#0 /usr/local/src/mediawiki/MW_1_13_2/phase3/includes/db/Database.php(561): DatabasePostgres->reportQueryError('ERROR: column ...', 1, 'SELECT rc_name...', 'SpecialNuke::ge...', false)
#1 /usr/local/src/mediawiki/MW_1_13_2/phase3/includes/db/Database.php(969): Database->query('SELECT rc_name...', 'SpecialNuke::ge...')
#2 /usr/local/src/mediawiki/MW_1_13_2/phase3/extensions/Nuke/Nuke_body.php(132): Database->select('recentchanges', Array, Array, 'SpecialNuke::ge...', Array)
#3 /usr/local/src/mediawiki/MW_1_13_2/phase3/extensions/Nuke/Nuke_body.php(68): SpecialNuke->getNewPages('Dnessett')
#4 /usr/local/src/mediawiki/MW_1_13_2/phase3/extensions/Nuke/Nuke_body.php(42): SpecialNuke->listForm('Dnessett', 'Mass removal of...')
#5 /usr/local/src/mediawiki/MW_1_13_2/phase3/includes/SpecialPage.php(534): SpecialNuke->execute(NULL)
#6 /usr/local/src/mediawiki/MW_1_13_2/phase3/includes/Wiki.php(224): SpecialPage::executePath(Object(Title))
#7 /usr/local/src/mediawiki/MW_1_13_2/phase3/includes/Wiki.php(55): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
#8 /usr/local/src/mediawiki/MW_1_13_2/phase3/index.php(93): MediaWiki->initialize(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
#9 {main}

Thanks-To:

13:15 [freenode] -!- Tuju [~tuju@176.75.219.213.sta.estpak.ee]
13:15 [freenode] -!- ircname : Juha Tuomala
13:15 [freenode] -!- channels : #mediawiki
13:15 [freenode] -!- server : kornbluth.freenode.net [Frankfurt, Germany]
13:15 [freenode] -!- account : Tuju
13:15 [freenode] -!- End of WHOIS
Modified paths:
  • /trunk/extensions/Nuke/Nuke_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Nuke/Nuke_body.php
@@ -229,7 +229,7 @@
230230 __METHOD__,
231231 array(
232232 'ORDER BY' => 'rc_timestamp DESC',
233 - 'GROUP BY' => 'rc_namespace, rc_title',
 233+ 'GROUP BY' => 'rc_namespace, rc_timestamp, rc_title',
234234 'LIMIT' => $limit
235235 )
236236 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r113598Followup to rr113364: Sometimessaper22:58, 11 March 2012
r114394Revert r113364, r113598, r113604, r113793, r113795. Unreviewed changes in Nuke....catrope19:25, 21 March 2012

Status & tagging log