Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabaseSqlite.php
index 7049df5..82a7e35 100644 (file)
@@ -216,6 +216,11 @@ class DatabaseSqlite extends Database {
                        # Enforce LIKE to be case sensitive, just like MySQL
                        $this->query( 'PRAGMA case_sensitive_like = 1' );
 
+                       $sync = $this->sessionVars['synchronous'] ?? null;
+                       if ( in_array( $sync, [ 'EXTRA', 'FULL', 'NORMAL' ], true ) ) {
+                               $this->query( "PRAGMA synchronous = $sync" );
+                       }
+
                        return $this->conn;
                }
 
@@ -1013,7 +1018,7 @@ class DatabaseSqlite extends Database {
                        }
                }
 
-               $res = $this->query( $sql, $fname );
+               $res = $this->query( $sql, $fname, self::QUERY_PSEUDO_PERMANENT );
 
                // Take over indexes
                $indexList = $this->query( 'PRAGMA INDEX_LIST(' . $this->addQuotes( $oldName ) . ')' );