DISTINCT option logic incorrect in Database::makeSelectOptions
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
bzimport
Subscribers
Yurik, wikibugs-l
Projects
Reference
bz10496
Description

Author: rhaertel80

Description:
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 "||"


Version: 1.11.x
Severity: trivial

bzimport added a project: MediaWiki-API.Via ConduitNov 21 2014, 9:52 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz10496.
bzimport created this task.Via LegacyJul 7 2007, 9:43 PM
Yurik added a comment.Via ConduitJul 7 2007, 9:53 PM

fixed in 23857

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.