stephan
9e632f5512
wasm: do not build the (untested/unsupported) node-for-node build by default, to cut build time by about 15%. Adjacent cleanups in mkwasmbuilds.c.
...
FossilOrigin-Name: e4539ebebd89840b76f5a0626393299100685a38f45546a0bf7a62e4df56f863
2025-02-20 05:39:18 +00:00
stephan
b42310a6b9
wasm makefile docs: make explicit that the node.js-for-node.js builds (as opposed to the node.js-for-browser builds) are both untested and unsupported.
...
FossilOrigin-Name: e1f184889fef4603d61d306c8c0dc86df616290ccf73dbd871fa27bd99e5e5c9
2025-02-20 04:45:02 +00:00
stephan
a32ea731a0
Add the pause/unpause capability to the opfs-sahpool VFS, as discussed in [forum:fe8cdb8431c|forum thread fe8cdb8431c]. Summary: this gives clients a way to eke some degree of multi-page/tab/Worker concurrency out of this VFS but requires that coordination to be implemented client-side, e.g. via a SharedWorker or WebLocks.
...
FossilOrigin-Name: b5dbd521951e129b4dec69f191a872500dbf387b34a8479ad58b053ffcccbab9
2025-02-20 04:14:26 +00:00
dan
eb3a069fc8
Have SQLITE_FTS5_ENABLE_TEST_MI builds avoid reading the database schema from
...
within sqlite3_open().
FossilOrigin-Name: 15dc524fd4113026cc542140c39c1c8f9e052d36946f0c599f282d9ac27efdab
2025-02-18 15:11:30 +00:00
stephan
9ef8399055
Update path on the web server for test/snapshot instances of fiddle.
...
FossilOrigin-Name: 57caa3136d1bfca06e4f2285734a4977b8d3fa1f75bf87453b975867e9de38fc
2025-02-18 01:16:26 +00:00
drh
7bfa4452a3
Additional changes making it easier to prove that integer overflow does not
...
occur. No problems found.
FossilOrigin-Name: e846743a875430a5c51d41f00ac9532214f97d9925e6261113b63580f92369fc
2025-02-17 18:09:24 +00:00
stephan
18780193d5
API naming typo reported in [forum:416f2d8dec|forum post 416f2d8dec]. No functional changes.
...
FossilOrigin-Name: 0cfb9e234e116741d01b65d0abf18210e495276319fb08ec6e40d3f2e698956d
2025-02-16 13:13:19 +00:00
dan
f3e24d0875
Remove old function declaration accidentally left in sqlite3session.h.
...
FossilOrigin-Name: 0cfbe349d4b740f3d2be8c714cf679901fc2465db4c64e4c3742da700d82f4e7
2025-02-12 15:31:26 +00:00
stephan
e108f97256
wasm: add some build-time validation to ensure that the problem fixed in [65798c09a00662a3] does not recur. Ensure that files generated via mkwasmbuilds.c have the generated makefile as a dependency.
...
FossilOrigin-Name: 55e01365946b3432e93da5c08200e476e2a134c98b963b4170e4dfae8408a005
2025-02-09 04:16:01 +00:00
stephan
00bc96c05c
wasm: when building in -O0 mode (typical dev mode), use -sASSERTIONS=2, else -sASSERTIONS=0, in response [ 7e3e35cbff
|Emscripten checkin 7e3e35cbff9], which adds assertions to check for the condition reported in [ https://github.com/emscripten-core/emscripten/issues/23420 |Emscripten ticket 23420]. Update some unrelated JS-side internal docs.
...
FossilOrigin-Name: 1f554610ba5d9d474ec4570bb7ca09125fd2cdfb4976530a4227cc6ebdf3a962
2025-02-09 03:24:00 +00:00
stephan
f858182689
JS: add a mechanism to the Worker1 exec API to fetch the last_insert_rowid(), as requested in [forum:56bc35390183f5d5|forum post 56bc353901].
...
FossilOrigin-Name: c22c48360756b1c7e2f5a9c01aff799bc188e100d364931de0dc3686e5de57a9
2025-02-09 02:41:35 +00:00
stephan
d8452a9517
Reorder a piece of ext/wasm/GNUmakefile to correct the timing of various var accesses. Fixes a problem [ https://github.com/sqlite/sqlite-wasm/pull/99 |reported in the downstream npm subproject] and explains the confusion in [4aa025a943a4024094b9] (which has been reverted).
...
FossilOrigin-Name: 65798c09a00662a3598f01571d6f3a2dc750c3d0b127c344590539244afe4aa7
2025-02-07 12:33:48 +00:00
stephan
3c013479c3
Fix a dependencies/order-of-operations bug in ext/wasm/GNUmakefile which causes creation of files filtered via c-pp to fail if the ext/wasm/jswasm dir did not exist beforehand.
...
FossilOrigin-Name: 4bac76138853a89484d3ac0486a9ed5143aa671b13b4b3abb704c1487213b388
2025-02-06 13:18:49 +00:00
drh
31c3599ed0
Fix a harmless unused-parameter compiler warning introduced by [75f3d8744879].
...
FossilOrigin-Name: 9f28f6694f97d5ee0345b45f9bf81e3fdce0990ce32fb9bdbbaac079126a67c9
2025-02-05 16:08:11 +00:00
drh
e85b2cac0f
Test case for the FTS3 fix in the previous check-in.
...
FossilOrigin-Name: 459d8f695ef868d0ec09920ab2035eebd36a66051f9905e2605f4600623faa47
2025-02-03 23:27:27 +00:00
drh
51dd67080a
Fix a potential UAF in FTS3.
...
FossilOrigin-Name: 75f3d87448793fc7fd68d817874d561842e029a2d6c1ea4abcec39764cd38469
2025-02-03 23:19:42 +00:00
drh
c2b446f16a
Fix for a potential UAF in FTS5.
...
FossilOrigin-Name: e33f2fedda17b4f3678fc23c438093c256b0c125da5f1ac42ecaf3d604d54b6a
2025-02-03 18:05:54 +00:00
stephan
6e5802fc74
Improve the JS-side sqlite3_set_auxdata() test to also trigger the case that the aux data actually gets reused. Test changes only, no library code.
...
FossilOrigin-Name: 9f27379d860518e6e097a2c999da04176812260a61bf11fe495c3efd76971806
2025-02-03 18:01:42 +00:00
dan
9e639d2490
Fix a use-after-free case in fts5 provoked by fuzzdata8.db. Tcl test case pending.
...
FossilOrigin-Name: a4962df665084e423e020be9a2834b6886a8e3feb461cff5358b61398a2a20d2
2025-02-03 17:54:55 +00:00
stephan
3cd34ab981
Rework [76c8435a] to eliminate automatic JS-to-WASM function conversions of sqlite3_set_auxdata() destructors because it can leads to leaks on every call of a UDF. This feature never worked before [76c8435a] but fixing it was ill-conceived because of the memory leakage it introduces. WASM function pointers can still be used as destructors in this context.
...
FossilOrigin-Name: 3fb993af0caf041da934cea29c039b27c468be0b75bce1537a6425767cf9bf8d
2025-02-03 17:34:12 +00:00
stephan
d98689f4d3
Add a more complete test for [76c8435a] and add some commentary about (A) the inability to automatically clean up automatically-generated WASM proxy functions for sqlite3_set_auxdata() destructors and (B) how to deal with (A) to avoid leaking WASM proxy functions.
...
FossilOrigin-Name: d693c2dddbd10a2e0b77893b04b11502e30b768f1b06814105f7f35172845fb9
2025-02-03 14:55:56 +00:00
stephan
d256b56880
Correct the FuncPtrAdapter signature for the JS binding of sqlite3_set_auxdata(). Reported in [ https://github.com/sqlite/sqlite-wasm/issues/92 |the npm subproject, ticket #92 ].
...
FossilOrigin-Name: 76c8435a5f390001038b8ee94322ff478c9d5f29501ed1c5891c952a41e377aa
2025-02-03 14:04:27 +00:00
stephan
14613b1b1d
URL typo fix in code comments. No code changes.
...
FossilOrigin-Name: 002a123094e4ef14eb5ec28033adca6083ba2717e1eaa23e80595e37a947e6c2
2025-02-02 12:15:25 +00:00
drh
c49bfdbbee
Add a missing "db2 close" to the ext/session/session_gen.test test module.
...
FossilOrigin-Name: 4068f586ddadd3a818645574f7584fcee6d373dbf45805c545100883b495598a
2025-02-01 23:49:01 +00:00
stephan
fdc17e0bc8
JS doc typo fixes. No functional changes.
...
FossilOrigin-Name: e0d9c74c1cdddb2321131255b94f9cda6530be3f2a06aed4abb54dcda092481e
2025-02-01 09:44:48 +00:00
stephan
82f3052e61
Expose the new SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE/WRITE and SQLITE_DBCONFIG_ENABLE_COMMENTS (from [325e547a21955]) to JS/WASM.
...
FossilOrigin-Name: 8da1a9af66f905c683e9c3445d609b5c0e11ac912be192c468ddd79f237837f4
2025-01-31 18:45:03 +00:00
stephan
cee7609074
Minor cleanups in the opfs-sahpool pause/unpause API demo.
...
FossilOrigin-Name: e205cdc468e02eefdeb8d391d921aa2d4d28a8b7b87036d6d937a9928261a413
2025-01-31 17:47:47 +00:00
stephan
a75321d735
Add the conventional license header to sahpool-worker.js and correct the date on the header in sahpool-pausing.js.
...
FossilOrigin-Name: f7c3026b0d2e33cc4e3b906810d860b155b1ff714bbe4e1eb9ee392122217efa
2025-01-31 16:34:52 +00:00
stephan
cb0da053ed
Add a small test app demonstrating cooperative semi-concurrency of the opfs-sahpool VFS using its un/pauseVfs() APIs.
...
FossilOrigin-Name: 09570c55a23e5af76dd2153a5b28a493f498d7d4a08b0089f3074d0a2c5d3d29
2025-01-31 16:25:18 +00:00
stephan
654c94d683
Cleanups in the opfs-sahpool VFS pause/unpause feature and its tests.
...
FossilOrigin-Name: 184ba37702f63196deca91d273e798ca895fbb301938e6264bc82815a4e33149
2025-01-31 14:25:38 +00:00
stephan
d4bfa3465e
Merge trunk into opfs-sahpool-pause branch.
...
FossilOrigin-Name: 775a547eca2b0b3dbb6c03990236128a095cc34d28caec44b9a5072510c75b63
2025-01-31 12:39:07 +00:00
stephan
efbf481541
Minor wasm-specific doc touchups.
...
FossilOrigin-Name: 56b618da9073db8b8d5dafa177a3c9e4c4d927bf512e14b0e6d23937f91ce4cf
2025-01-31 12:30:37 +00:00
dan
4f8f1965f7
Fix bug in sessions handling of FK constraints introduced by [e09a0c02] (released in 3.48.0). Bug was preventing a changeset containing FK violations from being applied even when the xConflict(CHANGESET_FOREIGN_KEY) returned OMIT.
...
FossilOrigin-Name: d7c07581203a0a88456588e49e51b40a8341b0e7121809f75be0ee882d91650f
2025-01-29 18:53:19 +00:00
stephan
cb46f1bb95
Simplify how OpfsSAHPoolUtil.unpauseVfs()'s returned promise is handled.
...
FossilOrigin-Name: d651b8da5a84cd54d71f15bd34e4db685674ef73f26f5cc26b7af5321a2ec05e
2025-01-29 11:28:18 +00:00
stephan
8883deb30e
Add experimental support to pause/unpause an SAHPool OPFS VFS, as discussed in [forum:fe8cdb8431c32455|forum post fe8cdb8431c32455], the intent being enable a page to relinquish, perhaps temporarily, the VFS such that the VFS's storage can be accessed by another page/tab.
...
FossilOrigin-Name: 1d2683fe9e4be01c3137e750900f54d287e7d96185e66924d24b50f4647e7ef1
2025-01-29 11:08:11 +00:00
dan
9dcf3d08c9
Fix sessions module handling of tables with generated columns.
...
FossilOrigin-Name: 437fb316389bc3c24c5cdb4d01edfc81e2c2e9f2b399fc2a95b05d279361d8ec
2025-01-28 19:03:37 +00:00
drh
0424f255ef
Fix a copy/paste typo in the output of vfstrace for xDlClose().
...
FossilOrigin-Name: 1d57b57c85bb8cb9b8a1808b771bb91eeb8150efd14f9064a390e533e715bab7
2025-01-28 18:03:22 +00:00
drh
50637ca5c5
Apparently I got the logic of [abfe488ed67e2e35] confused, even backwards.
...
Change it so that the SQLITE_USE_W32_FOR_CONSOLE_IO macro causes Win32 APIs
to be used for console I/O and for stdio to be used otherwise. This is
reported to be necessary for builds that use a C-language runtime other than
the one provided by Microsoft. This changes if for Windows only. It is a
bug fix, though we don't have a test case that will demonstrate a malfunction.
FossilOrigin-Name: 925e97e6f4238f02259a0c95b1fc668ae32a95329242f8eeae236ef207aca112
2025-01-28 01:10:45 +00:00
drh
e097db7210
Make two private routines in FTS "static" so that they are not callable from
...
outside of SQLite itself.
FossilOrigin-Name: 9b11bed0448b95319206b413c35f23bb80f3f4c0a4394d40f2e64066400a01ed
2025-01-26 23:34:49 +00:00
stephan
8bfb186728
Replace a handful of hard tabs in string literals with \t in mkwasmbuilds.c.
...
FossilOrigin-Name: e8e4d497a7b6aae450cb93927c7583fcce3fe971cd3691f9d9cad605de3cfb1f
2025-01-24 12:54:59 +00:00
stephan
4331e6bd1d
Minor additions to ext/wasm/README.md.
...
FossilOrigin-Name: 85747ea1654c74d330614aa174ede4a989b6456eb1fc5eb0fc9f2d1418b6ef99
2025-01-24 09:21:39 +00:00
stephan
dfb5f32758
Update ext/wasm/README.md to reflect simplifications permitted by the current configure script behavior.
...
FossilOrigin-Name: 9abb56c6acb1c84c2df8534ca3ebb2894afd68bc7b8331d4d12611896c576749
2025-01-24 09:18:19 +00:00
stephan
c70631623c
Remove extraneous are-we-making-clean guards from the generated wasm build rules, as that guard is set at a higher level. Rename a makefile call()able for consistency.
...
FossilOrigin-Name: 7f9074e2a7ff62bdcf343895e80a51224de62a22afbbf82068ec5fea7eeda0bb
2025-01-24 08:58:54 +00:00
stephan
07a2e5d1ed
wasm: de-list demo-worker1-promiser-esm.html from the test pages because (per Chrome 131) "Module scripts don't support importScripts()", where "don't" means "they used to but no longer do".
...
FossilOrigin-Name: 4aa025a943a4024094b91f13abfb8945bbbb8334e3ec904dee5315852845bfe1
2025-01-23 22:23:31 +00:00
stephan
02e81f72a0
When running wasm-opt, ignore any failure because it will fail for unknown flags and the set of legal flags will change from version to version. Document the size-reduction effect (or non-effect) of a dozen-odd wasm-opt flags and retain those which demonstrate a wasm file size reduction in -Oz builds (our production build mode). Total size savings: roughly 13kb.
...
FossilOrigin-Name: c9dc581e0287e3462ac55f80ca76e7e98d31157022052c892517363c45287a7b
2025-01-23 19:44:09 +00:00
stephan
726a047a47
Remove some now-dead makefile code, rename a var for consistency, and fix a recipe bug introduced in the previous checkin in the bundler-friendly build.
...
FossilOrigin-Name: 0acd4ef3addb311476f4a670be0c4c4a0f3f88b0420886d4c1c3c3027dd51d73
2025-01-23 16:11:24 +00:00
stephan
efafde5eb4
Initial support for post-processing wasm files with wasm-opt (if it's available). This currently shaves 12kb off of the release-mode build of sqlite3.wasm but there are many dozens of wasm-opt flags left to try.
...
FossilOrigin-Name: 5d16e3f28364de2d6b6456a6fc56bf604b9106c3ae15719f2862192ae3020cc1
2025-01-23 15:58:01 +00:00
stephan
72543206e5
Move small parts of ext/wasm/GNUmakefile into ext/wasm/config.make.in and have the configure script populate that, rather than dynamically determining those values on each 'make' invocation. Add a configure-time check for the optional wasm-opt binary in prep for pending experimentation with using it to reduce the wasm file sizes.
...
FossilOrigin-Name: 0a426a549577b883e2de7cd0605041cc97b57f53ee6657bc318b0bfde7b62677
2025-01-23 14:09:02 +00:00
stephan
c9bf7ed9ad
Remove unnecessary --minify 0 emcc flag from the wasm build, as -g3 implies that capability along with other anti-minification features we rely on.
...
FossilOrigin-Name: 10c91f9cd074e8d35af1c7f8251ac18e5dd91fa14df3fe4e1fb44441c4f08c7a
2025-01-23 11:21:29 +00:00
dan
b80d01a182
Have fts5 better handle OOM errors from sqlite3_blob_close().
...
FossilOrigin-Name: f418350f3f83147bc5817a885be6e39ff9ff5722742a88d17600729c53c65010
2025-01-21 14:34:59 +00:00