From: Greg Sabino Mullane Date: Wed, 2 May 2007 17:35:50 +0000 (+0000) Subject: Ignore USE INDEX option. X-Git-Tag: 1.31.0-rc.0~53118 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=6230a0863feb5bca50e9cc2784b4f83ac3da4536;p=lhc%2Fweb%2Fwiklou.git Ignore USE INDEX option. --- diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index 7158e2d161..2892d952ac 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -1077,8 +1077,7 @@ END; } /** - * Returns an optional USE INDEX clause to go after the table, and a - * string to go at the end of the query + * Various select options * * @private * @@ -1088,7 +1087,7 @@ END; */ function makeSelectOptions( $options ) { $preLimitTail = $postLimitTail = ''; - $startOpts = ''; + $startOpts = $useIndex = ''; $noKeyOptions = array(); foreach ( $options as $key => $option ) { @@ -1109,12 +1108,6 @@ END; if ( isset( $noKeyOptions['FOR UPDATE'] ) ) $postLimitTail .= ' FOR UPDATE'; if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) $postLimitTail .= ' LOCK IN SHARE MODE'; if ( isset( $noKeyOptions['DISTINCT'] ) && isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT'; - - if ( isset( $options['USE INDEX'] ) && ! is_array( $options['USE INDEX'] ) ) { - $useIndex = $this->useIndexClause( $options['USE INDEX'] ); - } else { - $useIndex = ''; - } return array( $startOpts, $useIndex, $preLimitTail, $postLimitTail ); }