From: stephan Date: Fri, 1 Sep 2023 11:05:22 +0000 (+0000) Subject: In the OPFS VFS' importDb() methods, overwrite the header bytes 18 and 19 with 1... X-Git-Tag: version-3.44.0~233 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f551aa4e8013e65a9c248510e8724e15f952607c;p=thirdparty%2Fsqlite.git 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 --- 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 8e874f7282..1d2b395898 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 ca2fde985e..4525ef5480 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(); diff --git a/manifest b/manifest index e94ef2a2df..1330f51baa 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Do\snot\sdisable\sunused\scolumns\sin\sa\sUNION\sALL\ssub-query\sif\sany\scomponent\sof\sthe\ssub-query\sis\sDISTINCT. -D 2023-08-31T18:00:10.037 +C In\sthe\sOPFS\sVFS'\simportDb()\smethods,\soverwrite\sthe\sheader\sbytes\s18\sand\s19\swith\s1\sinstead\sof\s0.\sBoth\sseem\sto\swork,\sbut\s1\sis\scorrect. +D 2023-09-01T11:05:22.303 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -570,8 +570,8 @@ F ext/wasm/api/sqlite3-api-worker1.js 9f32af64df1a031071912eea7a201557fe39b17386 F ext/wasm/api/sqlite3-license-version-header.js 0c807a421f0187e778dc1078f10d2994b915123c1223fe752b60afdcd1263f89 F ext/wasm/api/sqlite3-opfs-async-proxy.js 8cf8a897726f14071fae6be6648125162b256dfb4f96555b865dbb7a6b65e379 F ext/wasm/api/sqlite3-v-helper.js 7daa0eab0a513a25b05e9abae7b5beaaa39209b3ed12f86aeae9ef8d2719ed25 -F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 561463ac5380e4ccf1839a1922e6d7a5585660f32e3b9701a270b78cd35566cf -F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js d9e62d42b86f7bb3143eb071628b24e2ba7dcc749e41a0e9d3e2451bfea1a6b6 +F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 68eba2cad7f6faacc43fd975f7026c412894e97d918356c27f4945e03a7c8635 +F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b9495ca5c340727ab0e8ad117cb5e1338674b31c6ed9bc6fc2d9792b8752b934 F ext/wasm/api/sqlite3-wasm.c 65d60439671e24d50d9119ca805ac1c68fb36129e164377eb46f8d037bd88b07 F ext/wasm/api/sqlite3-worker1-promiser.c-pp.js bc06df0d599e625bde6a10a394e326dc68da9ff07fa5404354580f81566e591f F ext/wasm/api/sqlite3-worker1.c-pp.js da509469755035e919c015deea41b4514b5e84c12a1332e6cc8d42cb2cc1fb75 @@ -2115,8 +2115,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 69a635958a4a14187e88dd297df8978a4805b1b0c7bff3ec29d5632c0f68d889 -R d2f762ea2bd6c854c7390f15c4dca4b3 -U dan -Z fa3e59f3f8f5f13ff2286fb3bd2052e6 +P c84d5602ac9bfb4f12c3cf62033af616e51913c26877d1a0761363a625295f53 +R d393015268be28fc1355683e6913223c +U stephan +Z c28c4275ac315083bb6f7d8804535a98 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index a313b6ea4c..03104086e5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c84d5602ac9bfb4f12c3cf62033af616e51913c26877d1a0761363a625295f53 \ No newline at end of file +1c532e807bf8466b67d9600ab9630a6736de77259e9a71ac435641715ee0e04b \ No newline at end of file