diff options
Diffstat (limited to 'includes/objectcache')
-rw-r--r-- | includes/objectcache/SqlBagOStuff.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 4cc0e551e3d6..766af8cc8b0e 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -1700,9 +1700,9 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { private function getConnectionFromServerInfo( $shardIndex, array $server ) { if ( !isset( $this->conns[$shardIndex] ) ) { $server['logger'] = $this->logger; - // Make sure this handle always uses autocommit mode, even if DBO_TRX is - // configured. - $server['flags'] &= ~DBO_TRX; + // Always use autocommit mode, even if DBO_TRX is configured + $server['flags'] ??= 0; + $server['flags'] &= ~( IDatabase::DBO_TRX | IDatabase::DBO_DEFAULT ); /** @var IMaintainableDatabase $conn Auto-commit connection to the server */ $conn = MediaWikiServices::getInstance()->getDatabaseFactory() |