MediaWiki  REL1_19
MySqlLockManager Class Reference

MySQL version of DBLockManager that supports shared locks. More...

Inheritance diagram for MySqlLockManager:
Collaboration diagram for MySqlLockManager:

List of all members.

Protected Member Functions

 doLockingQuery ($lockDb, array $paths, $type)
 Get a connection to a lock DB and acquire locks on $paths.
 initConnection ($lockDb, DatabaseBase $db)
 Do additional initialization for new lock DB connection.

Protected Attributes

 $lockTypeMap

Detailed Description

MySQL version of DBLockManager that supports shared locks.

All locks are non-blocking, which avoids deadlocks.

Definition at line 408 of file DBLockManager.php.


Member Function Documentation

MySqlLockManager::doLockingQuery ( lockDb,
array $  paths,
type 
) [protected]

Get a connection to a lock DB and acquire locks on $paths.

This does not use GET_LOCK() per http://bugs.mysql.com/bug.php?id=1118.

Parameters:
$lockDbstring
$pathsArray
$typeinteger LockManager::LOCK_EX or LockManager::LOCK_SH
Returns:
bool Resources able to be locked
Exceptions:
DBError

Reimplemented from DBLockManager.

Definition at line 421 of file DBLockManager.php.

References $keys, and DBLockManager\getConnection().

Here is the call graph for this function:

MySqlLockManager::initConnection ( lockDb,
DatabaseBase db 
) [protected]

Do additional initialization for new lock DB connection.

Parameters:
$lockDbstring
$dbDatabaseBase
Returns:
void
Exceptions:
DBError

Reimplemented from DBLockManager.

Definition at line 416 of file DBLockManager.php.

References DatabaseBase\query().

Here is the call graph for this function:


Member Data Documentation

MySqlLockManager::$lockTypeMap [protected]
Initial value:
 array(
                self::LOCK_SH => self::LOCK_SH,
                self::LOCK_UW => self::LOCK_SH,
                self::LOCK_EX => self::LOCK_EX
        )

Reimplemented from LockManager.

Definition at line 410 of file DBLockManager.php.


The documentation for this class was generated from the following file: