diff options
author | stephan <stephan@noemail.net> | 2022-10-03 13:03:41 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-10-03 13:03:41 +0000 |
commit | 4f5bbedb3aad0095caef387dc66e884bfc1f1675 (patch) | |
tree | 58445002e5c48f8151a1ea20dbed5d8f29ebf8cb /ext/wasm/sqlite3-opfs-async-proxy.js | |
parent | a4c357f94c8c5408c18e1f020a6267985c889254 (diff) | |
download | sqlite-4f5bbedb3aad0095caef387dc66e884bfc1f1675.tar.gz sqlite-4f5bbedb3aad0095caef387dc66e884bfc1f1675.zip |
Export sqlite3_trace_v2() to wasm and use it to ensure that the new per-VFS post-open SQL support in the DB ctor works. Default opfs vfs to journal_mode=truncate, as it's faster in that mode. Add 't' DB open-mode flag to enable SQL tracing to console.log().
FossilOrigin-Name: 508f7f6d63e52f61fae5abe817579a4e130fa7fbd18733d741d521a5bdabb7ce
Diffstat (limited to 'ext/wasm/sqlite3-opfs-async-proxy.js')
-rw-r--r-- | ext/wasm/sqlite3-opfs-async-proxy.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/wasm/sqlite3-opfs-async-proxy.js b/ext/wasm/sqlite3-opfs-async-proxy.js index b951873ea..0abc3ee23 100644 --- a/ext/wasm/sqlite3-opfs-async-proxy.js +++ b/ext/wasm/sqlite3-opfs-async-proxy.js @@ -609,7 +609,11 @@ const waitLoop = async function f(){ now - relinquishTime >= fh.syncHandleTime )){ //warn("Relinquishing for timeout:",fh.filenameAbs); - closeSyncHandle(fh)/*async!*/; + await closeSyncHandle(fh) + /* Testing shows that we have to wait on this async + op to finish, else we might try to re-open it + before the close has run. The FS layer does not + retain the order those operations, apparently. */; } } } |