mirror of
https://github.com/simonw/datasette.git
synced 2026-10-26 02:07:01 +01:00
Correct the explanation in a memory-database test comment
Commit 6f87527 said SQLite 3.53 refuses VACUUM INTO an existing in-memory
database. That was wrong: the test ran VACUUM INTO from a connection opened
without uri=True, and SQLite builds without SQLITE_USE_URI (the uv/
python-build-standalone 3.14 builds) treat the target as a plain file name,
so the first run created a file literally named
"file:review_fixes_copy?mode=memory&cache=shared" and later runs failed with
"output file already exists". The test already uses a plain connection; only
the comment changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwkLo2rJWidpkDVT3HkvNv
This commit is contained in:
parent
7ac1033b95
commit
74244c9f41
1 changed files with 4 additions and 3 deletions
|
|
@ -619,9 +619,10 @@ async def test_new_memory_database_is_not_scanned_at_registration():
|
|||
state = memory._watch_state
|
||||
assert state.scan_future is None
|
||||
assert state in watcher._pending
|
||||
# Fill it from a connection of its own, as the plugin does (it uses
|
||||
# VACUUM INTO, which newer SQLite versions refuse for an existing
|
||||
# in-memory database, so a plain connection here)
|
||||
# Fill it from a connection of its own, as the plugin does. (The plugin
|
||||
# uses VACUUM INTO from a connection opened with uri=True; a plain
|
||||
# connection is simpler and does not depend on whether the SQLite build
|
||||
# treats URI file names as URIs without that flag)
|
||||
conn = sqlite3.connect("file:review_fixes_copy?mode=memory&cache=shared", uri=True)
|
||||
conn.execute("create table copied (id integer)")
|
||||
conn.commit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue