Page MenuHomePhabricator

Database Error with Special:Recentchangeslinked
Closed, ResolvedPublic

Description

Author: Andreas.Walter

Description:
System: AIX 5.3, Technical Level 5
DB: Postgesql 8.1.5
Webserver: Apache 2.2.3 with PHP 5.1.6
Mediawiki: Version 1.9.2, German language

The wiki uses German Language as Default. The actual used link is:
Spezial:%C3%84nderungen_an_verlinkten_Seiten/Hauptseite

For better understanding I set the language of the user English
with the same result.

Interner Fehler (Engl.: internal error)

A database error has occurred Query: SELECT /* wfSpecialRecentchangeslinked */
rc_id, rc_cur_id, rc_namespace, rc_title, rc_user, rc_comment, rc_user_text,
rc_this_oldid, rc_last_oldid, rc_timestamp, rc_minor, rc_bot, rc_new,
rc_patrolled, rc_type, rc_old_len, rc_new_len ,wl_user FROM pagelinks,
recentchanges LEFT OUTER JOIN watchlist ON wl_user=2 AND wl_title=rc_title AND
wl_namespace=rc_namespace WHERE rc_timestamp > '2007-02-07 14:03:00 GMT' AND
pl_namespace=rc_namespace AND pl_title=rc_title AND pl_from=2055 GROUP BY
rc_cur_id,rc_namespace,rc_title,
rc_user,rc_comment,rc_user_text,rc_timestamp,rc_minor, rc_new, rc_id,
rc_this_oldid, rc_last_oldid, rc_bot, rc_patrolled, rc_type ,wl_user ORDER BY
rc_timestamp DESC LIMIT 50 Function: wfSpecialRecentchangeslinked Error: 1
ERROR: column "recentchanges.rc_old_len" must appear in the GROUP BY clause or
be used in an aggregate function

Backtrace:

#0 /data/httpd/ux48prmue76/mediawiki-leitstand/includes/Database.php(665):
DatabasePostgres->reportQueryError('ERROR: column ...', 1, 'SELECT /* wfSpe...',
'wfSpecialRecent...', false)
#1
/data/httpd/ux48prmue76/mediawiki-leitstand/includes/SpecialRecentchangeslinked.php(142):
Database->query('SELECT /* wfSpe...', 'wfSpecialRecent...')
#2 /data/httpd/ux48prmue76/mediawiki-leitstand/includes/SpecialPage.php(625):
wfSpecialRecentchangeslinked('Aktuelle_Ereign...', Object(UnlistedSpecialPage))
#3 /data/httpd/ux48prmue76/mediawiki-leitstand/includes/SpecialPage.php(431):
SpecialPage->execute('Aktuelle_Ereign...')
#4 /data/httpd/ux48prmue76/mediawiki-leitstand/includes/Wiki.php(182):
SpecialPage::executePath(Object(Title))
#5 /data/httpd/ux48prmue76/mediawiki-leitstand/includes/Wiki.php(47):
MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage),
Object(WebRequest))
#6 /data/httpd/ux48prmue76/mediawiki-leitstand/index.php(48):
MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User),
Object(WebRequest))
#7 {main}


Version: 1.9.x
Severity: normal
OS: other
Platform: Other

Details

Reference
bz8984

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:33 PM
bzimport set Reference to bz8984.
bzimport added a subscriber: Unknown Object (MLST).

rc_old_len should be added in the GROUP BY condition.

Looks like it got fixed in r19177. You can apply the patch
to your local file. I added a comment in trunk as r19977.

The fix is back ported in 1.9 branch with r19978, should be
in 1.9.3.