wasm: drop SQLITE_OMIT_WAL flag#60
Merged
penberg merged 1 commit intotursodatabase:mainfrom Nov 7, 2022
Merged
Conversation
We want to be able to use WAL journaling from the browser eventually, so the flag is hereby dropped.
Contributor
Author
|
Alright, I verified it's fine to compile-in WAL. The reason it does not work out-of-the-box now is that WAL is only enabled if libsql detects that it's supported, which is currently done via the following heuristics:
This heuristics will not be sufficient for us once #53 comes in, because it would be up to the WAL implementation whether it needs locks or not. So, as a workaround for playing with the fiddle app, it's enough to simply turn on exclusive mode in order to enable WAL: .open file:name?vfs=opfs
PRAGMA main.locking_mode=exclusive;
PRAGMA journal_mode=wal; -- it works!
CREATE TABLE IF NOT EXISTS t1(id);
INSERT INTO t1(id) VALUES (42);
INSERT INTO t1(id) VALUES (43);
SELECT * FROM t1; |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want to be able to use WAL journaling from the browser eventually, so the flag is hereby dropped.
Draft, because it only makes sense to drop this commit after thoroughly checking that WAL can be enabled in the fiddle application and work just fine (and I didn't manage to do that with this change alone).