Last modified: 2012-08-04 20:48:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22822, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20822 - Special:Listusers gives postgresql query error about ipblocks.ipb_deleted
Special:Listusers gives postgresql query error about ipblocks.ipb_deleted
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.16.x
PC Linux
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2009-09-26 10:29 UTC by zbyszek
Modified: 2012-08-04 20:48 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
This makes the Special:Listusers page work correctly. (603 bytes, patch)
2009-09-26 10:29 UTC, zbyszek
Details

Description zbyszek 2009-09-26 10:29:50 UTC
Created attachment 6585 [details]
This makes the Special:Listusers page work correctly.

Opening the page gives the following backtrace:

A database error has occurred
 Query: SELECT user_name,MAX(user_id) AS user_id,MAX(user_editcount) AS edits,COUNT(ug_group) AS numgroups,MAX(ug_group) AS singlegroup,MIN(user_registration) AS creation,ipb_deleted FROM mwuser LEFT JOIN user_groups ON user_id=ug_user
 LEFT JOIN ipblocks ON user_id=ipb_user AND ipb_deleted=1 AND ipb_auto=0 WHERE (ipb_deleted IS NULL) GROUP BY user_name ORDER BY user_name LIMIT 51 
 Function: IndexPager::reallyDoQuery (UsersPager)
 Error: 1 ERROR: column "ipblocks.ipb_deleted" must appear in the GROUP BY clause or be used in an aggregate function
 
Backtrace:
#0 /usr/local/mediawiki-r56872/includes/db/Database.php(533): DatabasePostgres->reportQueryError('ERROR: column ...', 1, 'SELECT user_na...', 'IndexPager::rea...', false)
 #1 /usr/local/mediawiki-r56872/includes/db/Database.php(869): DatabaseBase->query('SELECT user_na...', 'IndexPager::rea...')
 #2 /usr/local/mediawiki-r56872/includes/Pager.php(259): DatabaseBase->select(' mwuser LEFT J...', Array, Array, 'IndexPager::rea...', Array, Array)
 #3 /usr/local/mediawiki-r56872/includes/Pager.php(151): IndexPager->reallyDoQuery('', 51, true)
 #4 /usr/local/mediawiki-r56872/includes/specials/SpecialListusers.php(165): IndexPager->doQuery()
 #5 /usr/local/mediawiki-r56872/includes/specials/SpecialListusers.php(277): UsersPager->getBody()
 #6 [internal function]: wfSpecialListusers(NULL, Object(SpecialPage))
 #7 /usr/local/mediawiki-r56872/includes/SpecialPage.php(790): call_user_func('wfSpecialListus...', NULL, Object(SpecialPage))
 #8 /usr/local/mediawiki-r56872/includes/SpecialPage.php(559): SpecialPage->execute(NULL)
 #9 /usr/local/mediawiki-r56872/includes/Wiki.php(236): SpecialPage::executePath(Object(Title))
 #10 /usr/local/mediawiki-r56872/includes/Wiki.php(63): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
 #11 /usr/local/mediawiki-r56872/index.php(117): MediaWiki->performRequestForTitle(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
 #12 /usr/local/mediawiki-r56872/index.php5(1): require('/usr/local/medi...')
 #13 {main}

Software versions installed:
MediaWiki  1.16alpha-wmf
PHP  5.2.9 (apache2handler)
PostgreSQL  8.2.13

Below I'll attach a simple patch which fixes the query (the fix isn't very elegant, but works).
Comment 1 Alexandre Emsenhuber [IAlex] 2009-09-27 10:38:25 UTC
This was fixed in r56311.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links