Last modified: 2007-07-07 21:53:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10496 - DISTINCT option logic incorrect in Database::makeSelectOptions
DISTINCT option logic incorrect in Database::makeSelectOptions
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  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: ---


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.