Page MenuHomePhabricator

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

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

Details

Reference
bz10496

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:52 PM
bzimport set Reference to bz10496.
bzimport added a subscriber: Unknown Object (MLST).