Skip to content

SQLite: build with SQLITE_USE_URI=1 - #390

Merged
krlmlr merged 1 commit into
r-dbi:mainfrom
tschoonj:sqlite-use-uri
Nov 6, 2021
Merged

SQLite: build with SQLITE_USE_URI=1#390
krlmlr merged 1 commit into
r-dbi:mainfrom
tschoonj:sqlite-use-uri

Conversation

@tschoonj

@tschoonj tschoonj commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

We have seen some problems attaching to in-memory databases from RSQLite that have been created from within C code, resulting in files being created on the filesystem such as tests/testthat/file:name?mode=memory&vfs=some-stub, due to RSQLite not understanding that these are URIs.

We have managed to resolve these problems with the attached patch, which essentially enables URI support at compile-time.

It may be relevant to reviewers to note that the SQLite developers state that it is safe for most applications to enable URI processing:

Since SQLite always interprets any filename that does not begin with "file:" as an ordinary filename regardless of the URI setting, and because it is very unusual to have an actual file begin with "file:", it is safe for most applications to enable URI processing even if URI filenames are not currently being used.

CC: @jrandall

@krlmlr
krlmlr merged commit 3d26f20 into r-dbi:main Nov 6, 2021
@krlmlr

krlmlr commented Nov 6, 2021

Copy link
Copy Markdown
Member

Thanks!

@tschoonj

tschoonj commented Nov 6, 2021

Copy link
Copy Markdown
Contributor Author

Thanks!!

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants