Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -383,6 +383,9 @@ |
384 | 384 | } |
385 | 385 | } |
386 | 386 | |
| 387 | + /** |
| 388 | + * FROM MYSQL DOCS: http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_release-lock |
| 389 | + */ |
387 | 390 | public function unlock( $lockName, $method ) { |
388 | 391 | $lockName = $this->addQuotes( $lockName ); |
389 | 392 | $result = $this->query( "SELECT RELEASE_LOCK($lockName) as lockstatus", $method ); |
— | — | @@ -410,6 +413,16 @@ |
411 | 414 | $this->query( "UNLOCK TABLES", $method ); |
412 | 415 | } |
413 | 416 | |
| 417 | + /** |
| 418 | + * Get search engine class. All subclasses of this |
| 419 | + * need to implement this if they wish to use searching. |
| 420 | + * |
| 421 | + * @return String |
| 422 | + */ |
| 423 | + public function getSearchEngine() { |
| 424 | + return 'SearchMySQL'; |
| 425 | + } |
| 426 | + |
414 | 427 | public function setBigSelects( $value = true ) { |
415 | 428 | if ( $value === 'default' ) { |
416 | 429 | if ( $this->mDefaultBigSelects === null ) { |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | * |
6 | 6 | * @file |
7 | 7 | * @ingroup Database |
8 | | - * This file deals with MySQL interface functions |
| 8 | + * This file deals with database interface functions |
9 | 9 | * and query specifics/optimisations |
10 | 10 | */ |
11 | 11 | |
— | — | @@ -2324,7 +2324,6 @@ |
2325 | 2325 | * @param $lockName String: Name of lock to release |
2326 | 2326 | * @param $method String: Name of method calling us |
2327 | 2327 | * |
2328 | | - * FROM MYSQL DOCS: http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_release-lock |
2329 | 2328 | * @return Returns 1 if the lock was released, 0 if the lock was not established |
2330 | 2329 | * by this thread (in which case the lock is not released), and NULL if the named |
2331 | 2330 | * lock did not exist |
— | — | @@ -2355,14 +2354,12 @@ |
2356 | 2355 | } |
2357 | 2356 | |
2358 | 2357 | /** |
2359 | | - * Get search engine class. All subclasses of this |
2360 | | - * need to implement this if they wish to use searching. |
| 2358 | + * Get search engine class. Subclasses that don't support a search engine |
| 2359 | + * should return 'SearchEngineDummy'. |
2361 | 2360 | * |
2362 | 2361 | * @return String |
2363 | 2362 | */ |
2364 | | - public function getSearchEngine() { |
2365 | | - return "SearchMySQL"; |
2366 | | - } |
| 2363 | + public abstract function getSearchEngine(); |
2367 | 2364 | |
2368 | 2365 | /** |
2369 | 2366 | * Allow or deny "big selects" for this session only. This is done by setting |