Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -706,15 +706,5 @@ |
707 | 707 | function getServer() { |
708 | 708 | return $this->mServer; |
709 | 709 | } |
710 | | - |
711 | | - /** |
712 | | - * No-op lock functions |
713 | | - */ |
714 | | - public function lock( $lockName, $method ) { |
715 | | - return true; |
716 | | - } |
717 | | - public function unlock( $lockName, $method ) { |
718 | | - return true; |
719 | | - } |
720 | 710 | |
721 | 711 | } // end DatabaseOracle class |
Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -1327,13 +1327,4 @@ |
1328 | 1328 | return implode( ' || ', $stringList ); |
1329 | 1329 | } |
1330 | 1330 | |
1331 | | - /* These are not used yet, but we know we don't want the default version */ |
1332 | | - |
1333 | | - public function lock( $lockName, $method ) { |
1334 | | - return true; |
1335 | | - } |
1336 | | - public function unlock( $lockName, $method ) { |
1337 | | - return true; |
1338 | | - } |
1339 | | - |
1340 | 1331 | } // end DatabasePostgres class |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -2236,6 +2236,32 @@ |
2237 | 2237 | } |
2238 | 2238 | |
2239 | 2239 | /** |
| 2240 | + * Acquire a lock, no-op to be overridden |
| 2241 | + * by subclasses as needed. |
| 2242 | + */ |
| 2243 | + public function lock( $lockName, $method ) { |
| 2244 | + return true; |
| 2245 | + } |
| 2246 | + /** |
| 2247 | + * Release a lock, no-op to be overridden |
| 2248 | + * by subclasses as needed. |
| 2249 | + */ |
| 2250 | + public function unlock( $lockName, $method ) { |
| 2251 | + return true; |
| 2252 | + } |
| 2253 | +} |
| 2254 | + |
| 2255 | +/** |
| 2256 | + * Database abstraction object for mySQL |
| 2257 | + * Inherit all methods and properties of Database::Database(), |
| 2258 | + * except for locking. |
| 2259 | + * |
| 2260 | + * @ingroup Database |
| 2261 | + * @see Database |
| 2262 | + */ |
| 2263 | +class DatabaseMysql extends Database { |
| 2264 | + |
| 2265 | + /** |
2240 | 2266 | * Acquire a lock |
2241 | 2267 | * |
2242 | 2268 | * Abstracted from Filestore::lock() so child classes can implement for |
— | — | @@ -2258,6 +2284,7 @@ |
2259 | 2285 | return false; |
2260 | 2286 | } |
2261 | 2287 | } |
| 2288 | + |
2262 | 2289 | /** |
2263 | 2290 | * Release a lock. |
2264 | 2291 | * |
— | — | @@ -2274,17 +2301,6 @@ |
2275 | 2302 | } |
2276 | 2303 | } |
2277 | 2304 | |
2278 | | -/** |
2279 | | - * Database abstraction object for mySQL |
2280 | | - * Inherit all methods and properties of Database::Database() |
2281 | | - * |
2282 | | - * @ingroup Database |
2283 | | - * @see Database |
2284 | | - */ |
2285 | | -class DatabaseMysql extends Database { |
2286 | | - # Inherit all |
2287 | | -} |
2288 | | - |
2289 | 2305 | /****************************************************************************** |
2290 | 2306 | * Utility classes |
2291 | 2307 | *****************************************************************************/ |
Index: trunk/phase3/includes/db/DatabaseMssql.php |
— | — | @@ -997,16 +997,6 @@ |
998 | 998 | $this->query("$sql $matches[1],$matches[2])"); |
999 | 999 | } |
1000 | 1000 | } |
1001 | | - |
1002 | | - /** |
1003 | | - * No-op lock functions |
1004 | | - */ |
1005 | | - public function lock( $lockName, $method ) { |
1006 | | - return true; |
1007 | | - } |
1008 | | - public function unlock( $lockName, $method ) { |
1009 | | - return true; |
1010 | | - } |
1011 | 1001 | |
1012 | 1002 | } |
1013 | 1003 | |
Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -373,16 +373,6 @@ |
374 | 374 | $this->query("$sql $matches[1],$matches[2])"); |
375 | 375 | } |
376 | 376 | } |
377 | | - |
378 | | - /** |
379 | | - * No-op lock functions |
380 | | - */ |
381 | | - public function lock( $lockName, $method ) { |
382 | | - return true; |
383 | | - } |
384 | | - public function unlock( $lockName, $method ) { |
385 | | - return true; |
386 | | - } |
387 | 377 | |
388 | 378 | } |
389 | 379 | |