Skip to content

Allow initializing library without default VFS #221

@simolus3

Description

@simolus3

With patched SQLite sources, sqlite3_initialize() calls sqlite3mc_initialize(), which tries to install an encryption-wrapper as the default VFS.

I have a setup where I'm using SQLite in a way that doesn't have any VFS registered by the time sqlite3_initialize() completes (it's a custom wasm build where the host installs a VFS per opened database, so there is no default VFS).

So since sqlite3mc_initialize() expects a default VFS, and I should really call sqlite3_initialize() before adding my VFS implementations, it's hard for me to initialize the library properly. Since upstream SQLite works without a VFS in sqlite3_initialize(), could SQLite3MultipleCiphers be changed to also support that? I guess it would be enough if sqlite3mc_vfs_create(NULL, 1) was only called if sqlite3_vfs_find(NULL) is non-null?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions