From: Aaron Schulz Date: Sun, 28 Jul 2019 16:38:29 +0000 (-0400) Subject: rdbms: make DatabaseSqlite::open() also check DBO_DEFAULT X-Git-Tag: 1.34.0-rc.0~849^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=f2b5cbb0bd2b2c24933b6ef7ca664a1f551530a7;p=lhc%2Fweb%2Fwiklou.git rdbms: make DatabaseSqlite::open() also check DBO_DEFAULT Change-Id: Ib21078dc9d4aa8cba6c5cb6c25868af328c1cab6 --- diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php index 83567a5971..cb1b84230a 100644 --- a/includes/libs/rdbms/database/DatabaseSqlite.php +++ b/includes/libs/rdbms/database/DatabaseSqlite.php @@ -152,8 +152,11 @@ class DatabaseSqlite extends Database { if ( $this->getFlag( self::DBO_PERSISTENT ) ) { // Persistent connections can avoid some schema index reading overhead. // On the other hand, they can cause horrible contention with DBO_TRX. - if ( $this->getFlag( self::DBO_TRX ) ) { - $this->connLogger->warning( __METHOD__ . ": DBO_PERSISTENT mixed with DBO_TRX" ); + if ( $this->getFlag( self::DBO_TRX ) || $this->getFlag( self::DBO_DEFAULT ) ) { + $this->connLogger->warning( + __METHOD__ . ": ignoring DBO_PERSISTENT due to DBO_TRX or DBO_DEFAULT", + $this->getLogContext() + ); } else { $attributes[PDO::ATTR_PERSISTENT] = true; }