Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -331,6 +331,21 @@ |
332 | 332 | public function unlockTables( $method ) { |
333 | 333 | $this->query( "UNLOCK TABLES", $method ); |
334 | 334 | } |
| 335 | + |
| 336 | + public function setBigSelects( $value = true ) { |
| 337 | + if ( $value === 'default' ) { |
| 338 | + if ( $this->mDefaultBigSelects === null ) { |
| 339 | + # Function hasn't been called before so it must already be set to the default |
| 340 | + return; |
| 341 | + } else { |
| 342 | + $value = $this->mDefaultBigSelects; |
| 343 | + } |
| 344 | + } elseif ( $this->mDefaultBigSelects === null ) { |
| 345 | + $this->mDefaultBigSelects = (bool)$this->selectField( false, '@@sql_big_selects' ); |
| 346 | + } |
| 347 | + $encValue = $value ? '1' : '0'; |
| 348 | + $this->query( "SET sql_big_selects=$encValue", __METHOD__ ); |
| 349 | + } |
335 | 350 | } |
336 | 351 | |
337 | 352 | /** |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -2235,18 +2235,7 @@ |
2236 | 2236 | * @param mixed $value true for allow, false for deny, or "default" to restore the initial value |
2237 | 2237 | */ |
2238 | 2238 | public function setBigSelects( $value = true ) { |
2239 | | - if ( $value === 'default' ) { |
2240 | | - if ( $this->mDefaultBigSelects === null ) { |
2241 | | - # Function hasn't been called before so it must already be set to the default |
2242 | | - return; |
2243 | | - } else { |
2244 | | - $value = $this->mDefaultBigSelects; |
2245 | | - } |
2246 | | - } elseif ( $this->mDefaultBigSelects === null ) { |
2247 | | - $this->mDefaultBigSelects = (bool)$this->selectField( false, '@@sql_big_selects' ); |
2248 | | - } |
2249 | | - $encValue = $value ? '1' : '0'; |
2250 | | - $this->query( "SET sql_big_selects=$encValue", __METHOD__ ); |
| 2239 | + // no-op |
2251 | 2240 | } |
2252 | 2241 | } |
2253 | 2242 | |