Skip to content

fix: Load the default extensions on HTTP VFS connections - #840

Merged
krlmlr merged 1 commit into
claude/httpvfs-no-header-outputfrom
claude/httpvfs-load-extensions
Nov 27, 2026
Merged

krlmlr merged 1 commit into
claude/httpvfs-no-header-outputfrom
claude/httpvfs-load-extensions

Conversation

@krlmlr

@krlmlr krlmlr commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

sqlite3_load_extension() loads through the connection's VFS, and the HTTP VFS returned NULL from xDlOpen(), so dbConnect() with the default extensions failed with an empty "Failed to load extension:" message on any remote database. The VFS now delegates xDlOpen(), xDlError(), xDlSym() and xDlClose() to the default VFS, as it already does for randomness, sleep and time. loadable.extensions = FALSE still refuses load_extension(), since SQLite checks that setting before it calls xDlOpen(), and a view in a remote database that calls load_extension() still fails as unsafe.

The first HTTP VFS test now opens through dbConnect() with the default extensions, which #832 had to switch off; against the layer below, it fails with "Failed to load extension:".

Part of the stack that splits the earlier combined #832 into scoped pull requests, as the maintainer asked there. This code was reviewed as part of #832, in three clean reviews of the combined version; a clean review of the split found nothing in this layer, and what remains is under Accepted limitations.


Generated by Claude Code

krlmlr commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Accepted limitations

The clean review of the split found nothing in this pull request, and none of the limitations that the reviews of the combined version left concern it. None remain.


Generated by Claude Code

`sqlite3_load_extension()` loads through the connection's VFS,
and the HTTP VFS returned no handle from `xDlOpen()`,
so `dbConnect()` with the default extensions failed on any remote database
with an empty "Failed to load extension:" message.
The VFS now delegates `xDlOpen()`, `xDlError()`, `xDlSym()` and `xDlClose()` to the default VFS,
as it already does for randomness, sleep and time.

The test that opens a remote database with `dbConnect()` no longer passes `default.extensions = FALSE`,
so it fails without this fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
@krlmlr
krlmlr force-pushed the claude/httpvfs-load-extensions branch from a8a25db to 78deb0a Compare November 13, 2026 15:42
@krlmlr krlmlr mentioned this pull request Nov 27, 2026
16 of 22 tasks
@krlmlr
krlmlr merged commit 9d22865 into main Nov 27, 2026
8 checks passed
@krlmlr
krlmlr deleted the claude/httpvfs-load-extensions branch November 27, 2026 20:33
krlmlr pushed a commit that referenced this pull request Nov 27, 2026
Brings in #832, #839, #840, #841 and the workflow sync #912; adds the HTTP VFS fixes to NEWS,
and declares rmarkdown as a vignette builder, as #915 does on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd6znpbaJUu6TJLjgQC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants