mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
_memory database should not be mutable, closes #1917
This commit is contained in:
parent
9f5321ff1e
commit
6b47734c04
2 changed files with 4 additions and 2 deletions
|
|
@ -278,7 +278,9 @@ class Datasette:
|
|||
self.crossdb = crossdb
|
||||
self.nolock = nolock
|
||||
if memory or crossdb or not self.files:
|
||||
self.add_database(Database(self, is_memory=True), name="_memory")
|
||||
self.add_database(
|
||||
Database(self, is_mutable=False, is_memory=True), name="_memory"
|
||||
)
|
||||
# memory_name is a random string so that each Datasette instance gets its own
|
||||
# unique in-memory named database - otherwise unit tests can fail with weird
|
||||
# errors when different instances accidentally share an in-memory database
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue