From f2b5cbb0bd2b2c24933b6ef7ca664a1f551530a7 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 28 Jul 2019 12:38:29 -0400 Subject: [PATCH] rdbms: make DatabaseSqlite::open() also check DBO_DEFAULT Change-Id: Ib21078dc9d4aa8cba6c5cb6c25868af328c1cab6 --- includes/libs/rdbms/database/DatabaseSqlite.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.20.1