From 20c756ac0b4fc4096db72600bd0e9aea0fc4ff9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Cie=C5=9Blak?= Date: Thu, 8 Mar 2012 13:28:01 +0000 Subject: [PATCH] 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 --- Nuke_body.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nuke_body.php b/Nuke_body.php index e288d99b..2068d9d6 100644 --- a/Nuke_body.php +++ b/Nuke_body.php @@ -229,7 +229,7 @@ class SpecialNuke extends SpecialPage { __METHOD__, array( 'ORDER BY' => 'rc_timestamp DESC', - 'GROUP BY' => 'rc_namespace, rc_title', + 'GROUP BY' => 'rc_namespace, rc_timestamp, rc_title', 'LIMIT' => $limit ) );