Last modified: 2007-07-07 21:53:38 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 T12496, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10496 - DISTINCT option logic incorrect in Database::makeSelectOptions
DISTINCT option logic incorrect in Database::makeSelectOptions
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.11.x
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-07 21:43 UTC by Robbie Haertel
Modified: 2007-07-07 21:53 UTC (History)
1 user (show)

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


Attachments

Description Robbie Haertel 2007-07-07 21:43:53 UTC
When using Database::select and specifying the "DISTINCT" option, DISTINCT is never added to the query. Turns out to be a logic flaw (line 1135 of Rev 23756 of Database.php):

if ( isset( $noKeyOptions['DISTINCT'] ) && isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT';

The "&&" should be change to an "||"
Comment 1 Yuri Astrakhan 2007-07-07 21:53:38 UTC
fixed in 23857

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


Navigation
Links