From: Aaron Schulz Date: Tue, 30 Jul 2019 15:37:34 +0000 (-0400) Subject: filebackend: avoid use of IDatabase::clearFlags() in DBLockManager X-Git-Tag: 1.34.0-rc.0~815^2 X-Git-Url: http://git.cyclocoop.org//%27http:/ie7-js.googlecode.com/svn/test/index.html/%27?a=commitdiff_plain;h=a8b28dbeab47006be50ef03ecc052c4947079f98;p=lhc%2Fweb%2Fwiklou.git filebackend: avoid use of IDatabase::clearFlags() in DBLockManager Change-Id: I143533790363d8bb9b9038cf320b251131602d4a --- diff --git a/includes/libs/lockmanager/DBLockManager.php b/includes/libs/lockmanager/DBLockManager.php index 5e8c22bc43..37d53e2bf0 100644 --- a/includes/libs/lockmanager/DBLockManager.php +++ b/includes/libs/lockmanager/DBLockManager.php @@ -150,12 +150,12 @@ abstract class DBLockManager extends QuorumLockManager { } elseif ( is_array( $this->dbServers[$lockDb] ) ) { // Parameters to construct a new database connection $config = $this->dbServers[$lockDb]; + $config['flags'] = ( $config['flags'] ?? 0 ); + $config['flags'] &= ~( IDatabase::DBO_TRX | IDatabase::DBO_DEFAULT ); $db = Database::factory( $config['type'], $config ); } else { throw new UnexpectedValueException( "No server called '$lockDb'." ); } - - $db->clearFlag( DBO_TRX ); # If the connection drops, try to avoid letting the DB rollback # and release the locks before the file operations are finished. # This won't handle the case of DB server restarts however.