diff options
author | stephan <stephan@noemail.net> | 2023-09-01 11:05:22 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2023-09-01 11:05:22 +0000 |
commit | f551aa4e8013e65a9c248510e8724e15f952607c (patch) | |
tree | 7b17f3e4a4150e18a13ea9721f02bf3cefee70e2 /ext/wasm/api | |
parent | 8628c10e2701a2e7538bcc201cb1f1e0f9f5caf3 (diff) | |
download | sqlite-f551aa4e8013e65a9c248510e8724e15f952607c.tar.gz sqlite-f551aa4e8013e65a9c248510e8724e15f952607c.zip |
In the OPFS VFS' importDb() methods, overwrite the header bytes 18 and 19 with 1 instead of 0. Both seem to work, but 1 is correct.
FossilOrigin-Name: 1c532e807bf8466b67d9600ab9630a6736de77259e9a71ac435641715ee0e04b
Diffstat (limited to 'ext/wasm/api')
-rw-r--r-- | ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js | 2 | ||||
-rw-r--r-- | ext/wasm/api/sqlite3-vfs-opfs.c-pp.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js index 8e874f728..1d2b39589 100644 --- a/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js +++ b/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js @@ -895,7 +895,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ sah.read( header, {at: 0} ); util.affirmDbHeader( header ); } - sah.write(new Uint8Array(2), { + sah.write(new Uint8Array([1,1]), { at: HEADER_OFFSET_DATA + 18 }/*force db out of WAL mode*/); }catch(e){ diff --git a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js index ca2fde985..4525ef548 100644 --- a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js +++ b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js @@ -1197,7 +1197,7 @@ const installOpfsVfs = function callee(options){ sah.read( header, {at: 0} ); util.affirmDbHeader( header ); } - sah.write(new Uint8Array(2), {at: 18}/*force db out of WAL mode*/); + sah.write(new Uint8Array([1,1]), {at: 18}/*force db out of WAL mode*/); return nWrote; }catch(e){ await sah.close(); |