Page MenuHomePhabricator

Getting IPs of User fails with PostgreSQL
Closed, ResolvedPublic

Description

Author: overlordq

Description:
When performing a lookup to find the IPs of a given user, the following database error occurs:

A database error has occurred Query: SELECT cuc_ip,cuc_ip_hex, COUNT(*) AS count, MIN(cuc_timestamp) AS first, MAX(cuc_timestamp) AS last FROM cu_changes WHERE cuc_user = 1 GROUP BY cuc_ip ORDER BY last DESC Function: CheckUser::doUserIPsRequest Error: 1 ERROR: column "cu_changes.cuc_ip_hex" must appear in the GROUP BY clause or be used in an aggregate function

Backtrace:

#0 /home/wiki/includes/db/Database.php(562): DatabasePostgres->reportQueryError('ERROR: column ...', 1, 'SELECT cuc_ip,c...', 'CheckUser::doUs...', false)
#1 /home/wiki/extensions/CheckUser/CheckUser_body.php(658): Database->query('SELECT cuc_ip,c...', 'CheckUser::doUs...')
#2 /home/wiki/extensions/CheckUser/CheckUser_body.php(83): CheckUser->doUserIPsRequest('OverlordQ', 'Test')
#3 /home/wiki/includes/SpecialPage.php(533): CheckUser->execute(NULL)
#4 /home/wiki/includes/Wiki.php(224): SpecialPage::executePath(Object(Title))
#5 /home/wiki/includes/Wiki.php(55): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
#6 /home/wiki/index.php(92): MediaWiki->initialize(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
#7 {main}


Version: unspecified
Severity: major

Details

Reference
bz14577

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
InvalidNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:12 PM
bzimport added a project: CheckUser.
bzimport set Reference to bz14577.
bzimport added a subscriber: Unknown Object (MLST).
Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.