Index: trunk/phase3/includes/DatabasePostgres.php |
— | — | @@ -1195,7 +1195,7 @@ |
1196 | 1196 | |
1197 | 1197 | if ( isset( $noKeyOptions['FOR UPDATE'] ) ) $postLimitTail .= ' FOR UPDATE'; |
1198 | 1198 | if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) $postLimitTail .= ' LOCK IN SHARE MODE'; |
1199 | | - if ( isset( $noKeyOptions['DISTINCT'] ) && isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT'; |
| 1199 | + if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT'; |
1200 | 1200 | |
1201 | 1201 | return array( $startOpts, $useIndex, $preLimitTail, $postLimitTail ); |
1202 | 1202 | } |
Index: trunk/phase3/includes/Database.php |
— | — | @@ -1132,7 +1132,7 @@ |
1133 | 1133 | |
1134 | 1134 | if ( isset( $noKeyOptions['FOR UPDATE'] ) ) $postLimitTail .= ' FOR UPDATE'; |
1135 | 1135 | if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) $postLimitTail .= ' LOCK IN SHARE MODE'; |
1136 | | - if ( isset( $noKeyOptions['DISTINCT'] ) && isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT'; |
| 1136 | + if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT'; |
1137 | 1137 | |
1138 | 1138 | # Various MySQL extensions |
1139 | 1139 | if ( isset( $noKeyOptions['STRAIGHT_JOIN'] ) ) $startOpts .= ' /*! STRAIGHT_JOIN */'; |
Index: trunk/phase3/includes/DatabaseOracle.php |
— | — | @@ -659,7 +659,7 @@ |
660 | 660 | |
661 | 661 | #if ( isset( $noKeyOptions['FOR UPDATE'] ) ) $tailOpts .= ' FOR UPDATE'; |
662 | 662 | #if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) $tailOpts .= ' LOCK IN SHARE MODE'; |
663 | | - if ( isset( $noKeyOptions['DISTINCT'] ) && isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT'; |
| 663 | + if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT'; |
664 | 664 | |
665 | 665 | if ( isset( $options['USE INDEX'] ) && ! is_array( $options['USE INDEX'] ) ) { |
666 | 666 | $useIndex = $this->useIndexClause( $options['USE INDEX'] ); |