Refs #34825 -- Made SQLite backend open source database in readonly mode when using spawn.

This commit is contained in:
David Sanders 2023-09-22 19:27:58 +10:00 committed by Mariusz Felisiak
parent a5905b164d
commit 2128a73713
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ class DatabaseCreation(BaseDatabaseCreation):
f"file:memorydb_{alias}_{_worker_id}?mode=memory&cache=shared"
)
source_db = self.connection.Database.connect(
f"file:{alias}_{_worker_id}.sqlite3", uri=True
f"file:{alias}_{_worker_id}.sqlite3?mode=ro", uri=True
)
target_db = sqlite3.connect(connection_str, uri=True)
source_db.backup(target_db)