From a8b28dbeab47006be50ef03ecc052c4947079f98 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 30 Jul 2019 11:37:34 -0400 Subject: [PATCH] filebackend: avoid use of IDatabase::clearFlags() in DBLockManager Change-Id: I143533790363d8bb9b9038cf320b251131602d4a --- includes/libs/lockmanager/DBLockManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. -- 2.20.1