<?php
+
+use Wikimedia\Rdbms\IDatabase;
+
/**
* MySQL version of DBLockManager that supports shared locks.
*
self::LOCK_EX => self::LOCK_EX
];
+ public function __construct( array $config ) {
+ parent::__construct( $config );
+
+ $this->session = substr( $this->session, 0, 31 ); // fit to field
+ }
+
protected function initConnection( $lockDb, IDatabase $db ) {
# Let this transaction see lock rows from other transactions
$db->query( "SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;" );
/**
* 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.
+ * This does not use GET_LOCK() per https://bugs.mysql.com/bug.php?id=1118.
*
* @see DBLockManager::getLocksOnServer()
* @param string $lockSrv