]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 months agoGet wasmfs build working in the new setup. Disable the custom wasm loader because...
stephan [Fri, 26 Sep 2025 12:49:41 +0000 (12:49 +0000)] 
Get wasmfs build working in the new setup. Disable the custom wasm loader because its generated makefile code is currently broken.

FossilOrigin-Name: 36bc2514f70af5608aa20903d9c38b316603e2f78f2cbf4a20c7c79b60c5b8d5

2 months agoFix harmless integer overflows caused by over-sized integer constants in
drh [Fri, 26 Sep 2025 11:53:54 +0000 (11:53 +0000)] 
Fix harmless integer overflows caused by over-sized integer constants in
the "{m,n}" syntax of the regexp extension.

FossilOrigin-Name: 8f17e1d869685b51f3368feed03dc06543ec16bc8fd81b8daad2ac2dbf99c5d6

2 months agoDocs and dead code removal in mkwasmbuilds.c.
stephan [Fri, 26 Sep 2025 11:47:13 +0000 (11:47 +0000)] 
Docs and dead code removal in mkwasmbuilds.c.

FossilOrigin-Name: d022ee167b90a7c32049a93d476e869270018017f60551185024409730d77640

2 months agoFix some integer overflow problems when handling corrupt hexdb dumps in the shell...
dan [Fri, 26 Sep 2025 11:45:13 +0000 (11:45 +0000)] 
Fix some integer overflow problems when handling corrupt hexdb dumps in the shell tool. [forum:/forumpost/82b513b116 | Forum post 82b513b116].

FossilOrigin-Name: 730323f95d126162fd2867dbee1e1f1fc1d6e05b8a905a6767c4ab1cb43dacff

2 months agoAdd new table-valued functions jsonb_each() and jsonb_tree() that work just
drh [Fri, 26 Sep 2025 11:36:10 +0000 (11:36 +0000)] 
Add new table-valued functions jsonb_each() and jsonb_tree() that work just
like json_each() and json_tree() except that the "value" column is JSONB
instead of JSON text when the "type" is 'object' or 'array'.

FossilOrigin-Name: dfc41cb3aad7fedd834baaaba0d8e3aeb55a249af4f0934397652ea9c59dc9fc

2 months agoFix a harmless compiler warning. jsonb_each
drh [Fri, 26 Sep 2025 11:28:01 +0000 (11:28 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: c50a3c45a20e5b9d48e749818bea06dfa99b729535e0617347c6ece1d277a447

2 months agoIn c-pp.c, use (void)x instead of an empty if(x){} to flag unused arguments.
stephan [Fri, 26 Sep 2025 11:14:15 +0000 (11:14 +0000)] 
In c-pp.c, use (void)x instead of an empty if(x){} to flag unused arguments.

FossilOrigin-Name: df9ab8a35517e3a2baf4b19d07d46ce3f8b48043ccdeadef22bffc12e80461c3

2 months agoOn-demand loading of JSON virtual tables.
drh [Fri, 26 Sep 2025 10:29:07 +0000 (10:29 +0000)] 
On-demand loading of JSON virtual tables.

FossilOrigin-Name: 118f97ddcd8f888715825a623c02d42b92a82737a316f7bee4cd66f570945346

2 months agoMore build docs. Add a speedtest1 64-bit build but it's not hooked up to any test...
stephan [Fri, 26 Sep 2025 02:18:28 +0000 (02:18 +0000)] 
More build docs. Add a speedtest1 64-bit build but it's not hooked up to any test apps yet. Improve invalid-arg detection in c-pp.

FossilOrigin-Name: 69086be8a155d70d9dd7b655b66809250b24fe6d5bcdc6cb5e0275446a43f51d

2 months agoBuild cleanups and dead code removal.
stephan [Fri, 26 Sep 2025 01:38:07 +0000 (01:38 +0000)] 
Build cleanups and dead code removal.

FossilOrigin-Name: b516109e5accc885b71900402c800ae855407552648861334c895f0e5dea4ee5

2 months agoAdd JSON table-valued functions jsonb_each() and jsonb_tree().
drh [Thu, 25 Sep 2025 23:32:23 +0000 (23:32 +0000)] 
Add JSON table-valued functions jsonb_each() and jsonb_tree().

FossilOrigin-Name: 2f8b461c636ce2c0e7970c00d1e6ea62cdef72273150fea6aabe4e9292724977

2 months agowasm dist: add --snapshot flag, add -64 flag to include 64-bit builds, and add module...
stephan [Thu, 25 Sep 2025 18:53:28 +0000 (18:53 +0000)] 
wasm dist: add --snapshot flag, add -64 flag to include 64-bit builds, and add module-symbols.html to the dist.

FossilOrigin-Name: e9a6391b377b6964620285192262a4dc9fe1712799f7aa8a8b37c5f718544ed2

2 months agoReplace ext/wasm/dist.make with mkdist.sh and get dist working with the new build...
stephan [Thu, 25 Sep 2025 17:29:12 +0000 (17:29 +0000)] 
Replace ext/wasm/dist.make with mkdist.sh and get dist working with the new build. Fix the preprocessing flags for tester1-esm.html.

FossilOrigin-Name: ab6eb4d3b723107da488770b1849b9f1d1c491348f1eaa544e0e07356b8fac7d

2 months agoOverhaul the wasm build to (A) support more coexisting variants, e.g. 32/64-bit of...
stephan [Thu, 25 Sep 2025 15:17:58 +0000 (15:17 +0000)] 
Overhaul the wasm build to (A) support more coexisting variants, e.g. 32/64-bit of both vanilla and esm, and (B) build each variant to its own subdir so that they can build in parallel. It can, with make -j4, now build all new variants in half the time it previously took for just the 32-bit builds. The new build logging output, though unconventional, serves two purposes: (A) improve my build-time situational awareness and (B) it help demystify some of the build steps and output files.

FossilOrigin-Name: 2f4be98614b49def2c2951887796c736269ef3bb7ba5b045cae5f748ae165a83

2 months agoFix the translation of "\v" in JSON5.
drh [Thu, 25 Sep 2025 15:06:57 +0000 (15:06 +0000)] 
Fix the translation of "\v" in JSON5.
[forum:/forumpost/28e21085f9c6a4e7|Forum post 28e21085f9].

FossilOrigin-Name: 2914e8fc7b10e8b42c9a0fbd0e71f495714cee3cae67b8c238d37b1e7ec22359

2 months agoRemove some superfluous tabs and add the mkwasmbuilds ability to emit just its prologue. wasm-rebuild-2025
stephan [Thu, 25 Sep 2025 14:44:03 +0000 (14:44 +0000)] 
Remove some superfluous tabs and add the mkwasmbuilds ability to emit just its prologue.

FossilOrigin-Name: 75079401753778e3bc2f7fa307de9217e8d1ec395079fc1009060f707be32943

2 months agoMinor logging fix for the wasm-opt build step.
stephan [Thu, 25 Sep 2025 14:39:41 +0000 (14:39 +0000)] 
Minor logging fix for the wasm-opt build step.

FossilOrigin-Name: 918eca02d162cfa98613f9d8d9b0901f9f94ae1bcb53d811b09baec6c3f06bbe

2 months agoMove fiddle.make into the main makefile. Various adjacent cleanups and docs.
stephan [Thu, 25 Sep 2025 14:29:47 +0000 (14:29 +0000)] 
Move fiddle.make into the main makefile. Various adjacent cleanups and docs.

FossilOrigin-Name: fabd6160d0c128592ce512b1160dfa0b89b1fbb03e11cd185c6a4888a85cc7fb

2 months agoAvoid an integer overflow in the shell tool when outputing hex dumps of blobs greater...
dan [Thu, 25 Sep 2025 11:10:55 +0000 (11:10 +0000)] 
Avoid an integer overflow in the shell tool when outputing hex dumps of blobs greater than 1GB in size.

FossilOrigin-Name: 4a1bb874f12adda26e91970b64e700cb904c126412989be4debac9a5647d6f69

2 months agoConvert the ShellText object in the CLI to use sqlite3_malloc64() rather than
drh [Thu, 25 Sep 2025 10:55:54 +0000 (10:55 +0000)] 
Convert the ShellText object in the CLI to use sqlite3_malloc64() rather than
plain malloc().  Avoid unnecessary quoting of table names in .dump output
and similar.  Improved detection of OOM in set_table_name().

FossilOrigin-Name: 6ce4f6dc15a575c318669051fe6590ad114b52ff3f3e260cdf7accccdd922d63

2 months agoAvoid an integer overflow ([forum:/forumpost/b3abe06121 | forum post b3abe06121]...
dan [Thu, 25 Sep 2025 10:50:11 +0000 (10:50 +0000)] 
Avoid an integer overflow ([forum:/forumpost/b3abe06121 | forum post b3abe06121]) and a compiler warning ([forum:/forumpost/3db6aa9ed6 | forum post 3db6aa9ed6]) in the shell tool code.

FossilOrigin-Name: 39925489b347ec3126389c6dba1ee719373e50c6cea6944384a212c3a3e163d2

2 months agoMinor build cleanups.
stephan [Thu, 25 Sep 2025 02:30:55 +0000 (02:30 +0000)] 
Minor build cleanups.

FossilOrigin-Name: 05e7ea021388fcac975779cd2a70e341e25670e70d1d9f372f15b823b2466750

2 months agoConsolidate the speedtest1 wasm build into the new mkwasmbuilds.c model. Remove the...
stephan [Thu, 25 Sep 2025 02:02:48 +0000 (02:02 +0000)] 
Consolidate the speedtest1 wasm build into the new mkwasmbuilds.c model. Remove the long-unused batch-runner JS tools.

FossilOrigin-Name: 980c033c05bf37c0e8f5e82486ee99ba1294cc9c9e2087aaf83b64e5d0118b5f

2 months agoWasm build deps fixes.
stephan [Thu, 25 Sep 2025 00:53:30 +0000 (00:53 +0000)] 
Wasm build deps fixes.

FossilOrigin-Name: fd0c649047f4e444ea682138a3555a973839627150e1124bb9d9ced17880a9e5

2 months agoMove the static makefile code from mkwamsbuilds.c into the makefile. Move util.make...
stephan [Wed, 24 Sep 2025 23:07:45 +0000 (23:07 +0000)] 
Move the static makefile code from mkwamsbuilds.c into the makefile. Move util.make back into the main makefile. Remove a bunch of dead makefile code and docs.

FossilOrigin-Name: 18beeb26bfa48f806866e0e330024535adabcf668071abc4b6251eb39de2701d

2 months agoCosmetic makefile tweaks.
stephan [Wed, 24 Sep 2025 20:53:19 +0000 (20:53 +0000)] 
Cosmetic makefile tweaks.

FossilOrigin-Name: 4ec7e6800e090f7e17469a77bc37b57d3e1777171a5b354dfc68345416de504f

2 months agoFix the makefile so that "<tt>test/testrunner.tcl release --buildonly</tt>"
drh [Wed, 24 Sep 2025 20:44:33 +0000 (20:44 +0000)] 
Fix the makefile so that "<tt>test/testrunner.tcl release --buildonly</tt>"
works on mac.  Apparently broken by [b7751d144330593b].

FossilOrigin-Name: 023365228f3264c53263b649365e7c133d8633010baf6e050fdee044a40454dd

2 months agoGet the tester1 worker1/promiser demos building again. Show WASM heap usage in tester...
stephan [Wed, 24 Sep 2025 20:39:08 +0000 (20:39 +0000)] 
Get the tester1 worker1/promiser demos building again. Show WASM heap usage in tester1 if.

FossilOrigin-Name: 6691a84872f823c95b0bdc3db8e12d21c9561aa1e1ce1d787a977f2c5ef8225a

2 months agoAdd an assert() to fix a harmless compiler warning in the session extension.
drh [Wed, 24 Sep 2025 20:09:48 +0000 (20:09 +0000)] 
Add an assert() to fix a harmless compiler warning in the session extension.

FossilOrigin-Name: d77b8ad96c695594668cd7019c7f607fe5efa5474dde0ece8b621051cf88a0b5

2 months agoFix a harmless compiler warning in FTS5.
drh [Wed, 24 Sep 2025 19:51:07 +0000 (19:51 +0000)] 
Fix a harmless compiler warning in FTS5.

FossilOrigin-Name: 89f8d02075a7b265b1f0226a0f878903e1dce27ff1ac2e8a2d62d450b9b4ec76

2 months agoRework the set_table_name() function in the CLI to use modern APIs.
drh [Wed, 24 Sep 2025 19:10:58 +0000 (19:10 +0000)] 
Rework the set_table_name() function in the CLI to use modern APIs.
[forum:/forumpost/2baa4acd64|Forum post 2baa4acd64].

FossilOrigin-Name: 821cc0e421bc14a68ebaee507e38a900e0c84ff6ba7ee95bf796cad387755232

2 months agoSpecial case the "decimal(-0.0)" output to show exactly 0.0, just as it
drh [Wed, 24 Sep 2025 17:49:09 +0000 (17:49 +0000)] 
Special case the "decimal(-0.0)" output to show exactly 0.0, just as it
does for positive zero.
[forum:/forumpost/adc719d88d56ab22|Forum post adc719d88].

FossilOrigin-Name: 9ca4163bd93d78be5e4daf2b5d2b920d54d038c6fa8217dd2add0be0da6cd6b0

2 months agoGenerate 64-bit variants of tester1.js/html. Enhance c-pp to accept multiple input...
stephan [Wed, 24 Sep 2025 17:46:08 +0000 (17:46 +0000)] 
Generate 64-bit variants of tester1.js/html. Enhance c-pp to accept multiple input files.

FossilOrigin-Name: ef6c55e4499957fb46b213540786e5d3928ec096eae1fe759066ed011518e7a2

2 months agoFix a harmless compiler warning in IEEE754.
drh [Wed, 24 Sep 2025 17:38:13 +0000 (17:38 +0000)] 
Fix a harmless compiler warning in IEEE754.

FossilOrigin-Name: 7f72308322cd1f238e6c725ec6bff44ed42fb2619f3f52afe38e2faad838a63f

2 months agoAdditional short-circuit optimizations for AND/OR operators. Also fix
drh [Wed, 24 Sep 2025 17:07:15 +0000 (17:07 +0000)] 
Additional short-circuit optimizations for AND/OR operators.  Also fix
bugs in prior implementations (such as [0083d5169a46104a]).

FossilOrigin-Name: 63b686fe4cb1d5d82dd3a399aaafd1dfcbda533ca83b46ed2bc2750baa7f251d

2 months agoSimplification to the AND/OR short-circuit logic. short-circuit
drh [Wed, 24 Sep 2025 16:26:44 +0000 (16:26 +0000)] 
Simplification to the AND/OR short-circuit logic.

FossilOrigin-Name: 7be555a3b8500c43c2f30171af26bcda9bcb68f41992b792228218a56315e7c4

2 months agoImprove performance of window function queries that use "BETWEEN :x FOLLOWING AND...
dan [Wed, 24 Sep 2025 16:10:46 +0000 (16:10 +0000)] 
Improve performance of window function queries that use "BETWEEN :x FOLLOWING AND :y FOLLOWING" where :y is a very large number.

FossilOrigin-Name: 1f0b7143575634929c0f77bafa888f0be2dd83f0c6c3deadd8299ac4ab8a8c01

2 months agoFixes to short-circuit AND/OR evaluation.
drh [Wed, 24 Sep 2025 14:43:42 +0000 (14:43 +0000)] 
Fixes to short-circuit AND/OR evaluation.

FossilOrigin-Name: bc4cadbd60b97d000d2e8be843acab9d82ddf10a8125fd9cc0ae101bb9850091

2 months agoAdd docs to mkwasmbuilds.c explaining the purpose of each of the builds. Remove some...
stephan [Wed, 24 Sep 2025 13:59:53 +0000 (13:59 +0000)] 
Add docs to mkwasmbuilds.c explaining the purpose of each of the builds. Remove some inadvertent copy/paste hard tabs in some C-side makefile code.

FossilOrigin-Name: a2bd965e103026ff5c722357ed9e3432172bbc19d267e718ebd4a876eca41742

2 months agoFactor out the code that handles AND and OR short-circuiting into a
drh [Wed, 24 Sep 2025 13:10:55 +0000 (13:10 +0000)] 
Factor out the code that handles AND and OR short-circuiting into a
separate subroutine, for performance and legibility.

FossilOrigin-Name: cab84a65c3825c59f3a7a750f4983563ce7ad007125cbcf35c187326289fea89

2 months agoFix incorrect buffer size computation for the base64() extension function.
drh [Wed, 24 Sep 2025 12:01:50 +0000 (12:01 +0000)] 
Fix incorrect buffer size computation for the base64() extension function.
[forum:/forumpost/b1993c858f|Forum post b1993c858f].

FossilOrigin-Name: 603efcd404f0013559ca5bd936fc39481a3aa33a10340bac27b751b6b286d0b7

2 months agoRestrict the size of the LIMIT on a generate_series() query to avoid
drh [Wed, 24 Sep 2025 11:12:26 +0000 (11:12 +0000)] 
Restrict the size of the LIMIT on a generate_series() query to avoid
an integer overflow when computing the final output value.
[forum:/forumpost/479bfb0d3b|Forum post 479bfb0d3b].

FossilOrigin-Name: 266aacb4759945f7cf7a258014620f21225261246edc08e6e71ff5292baf22f3

2 months agoCosmetic build tweaks.
stephan [Wed, 24 Sep 2025 07:31:19 +0000 (07:31 +0000)] 
Cosmetic build tweaks.

FossilOrigin-Name: 431725330d6c63575dbf3404664a7af33d4d87c569560e99c18de93eb4d73935

2 months agoFix the positioning of the wasm-bare-bones flag init.
stephan [Wed, 24 Sep 2025 07:00:37 +0000 (07:00 +0000)] 
Fix the positioning of the wasm-bare-bones flag init.

FossilOrigin-Name: f5167fb3615efc180e69333f99d82d6afc1d190e7f37b6a701895de00502d8c8

2 months agoIn speedtest1, always use fatal_error() to exit fatally, instead of an fprintf/exit...
stephan [Wed, 24 Sep 2025 06:59:47 +0000 (06:59 +0000)] 
In speedtest1, always use fatal_error() to exit fatally, instead of an fprintf/exit() pair, so that stdout/stderr get flushed consistently (which is significant for the WASM build).

FossilOrigin-Name: 1bd15cb343f6ce57f108291a8ed0f3ee2046932591d44edec133fe3ea43a2ef0

2 months agoFurther wasm build refactoring. Get speedtest1 building again.
stephan [Wed, 24 Sep 2025 06:43:24 +0000 (06:43 +0000)] 
Further wasm build refactoring. Get speedtest1 building again.

FossilOrigin-Name: 5434307dcd927686ce827da22de55020c4b431f888ac81ae3634d458ad0b563d

2 months agoMove some of the generated wasm makefile utility code out of C and into util.make.
stephan [Wed, 24 Sep 2025 04:58:14 +0000 (04:58 +0000)] 
Move some of the generated wasm makefile utility code out of C and into util.make.

FossilOrigin-Name: a2935758f534b51cac3d2e5ece74b369c806e3a994781744708e1590b9c32542

2 months agoGeneric build simplifications.
stephan [Wed, 24 Sep 2025 03:05:31 +0000 (03:05 +0000)] 
Generic build simplifications.

FossilOrigin-Name: 61648610c3e454fce77b78e6f6be1b71e27bb9587af03ae5c0e083eac7158a64

2 months agoGet fiddle building properly again and fiddle/fiddle.debug building in parallel.
stephan [Wed, 24 Sep 2025 01:50:08 +0000 (01:50 +0000)] 
Get fiddle building properly again and fiddle/fiddle.debug building in parallel.

FossilOrigin-Name: 85fe9c6155f72583cea46d38bf5e040623d71fb5317ff9373421dbfdb179b2b0

2 months agoImproved short-circuit evaluation of AND and OR. All appears to work, but
drh [Wed, 24 Sep 2025 00:13:28 +0000 (00:13 +0000)] 
Improved short-circuit evaluation of AND and OR.  All appears to work, but
there are still testing and performance issues to be worked out.

FossilOrigin-Name: 0d4447aa61848deecf9170afce031f7b353b91d58474f3f094ce34e46be7f99e

2 months agoGet fiddle/fiddle.debug building again but they're incomplete and don't run.
stephan [Tue, 23 Sep 2025 23:22:31 +0000 (23:22 +0000)] 
Get fiddle/fiddle.debug building again but they're incomplete and don't run.

FossilOrigin-Name: d725a075bc3303c5a26c4014f57162235cebc6491425083b4d80936de8f07fb0

2 months agoImprovements to short-circuit evaluation of AND and OR operators.
drh [Tue, 23 Sep 2025 17:00:53 +0000 (17:00 +0000)] 
Improvements to short-circuit evaluation of AND and OR operators.
This is a partial and incomplete response to
[forum:/forumpost/f5adeb59ff77c056|forum post f5adeb59ff77c056].

FossilOrigin-Name: cea8bf79e18d55a8658e48a967cd0b7970b6f88badb769cfbb1f66ab24fb9ec8

2 months agoIn the ieee754 extension, render -0.0 as 'ieee754(-1,-3071)' instead of
drh [Tue, 23 Sep 2025 16:01:45 +0000 (16:01 +0000)] 
In the ieee754 extension, render -0.0 as 'ieee754(-1,-3071)' instead of
'ieee754(1,-3071)' as that makes the sign clearer.  Both strings still
convert back to -0.0.  Note that negative zero
and positive zero are distinct values in ieee754.
[forum:/forumpost/1eab7e4a08|Forum post 1eab7e4a08].

FossilOrigin-Name: 136188c161a8a2d5166798fcbd341bd1d3f81da7291011f806d6b2153544832c

2 months agoGet most of the wasm build (re)working and much prettier.
stephan [Tue, 23 Sep 2025 13:49:44 +0000 (13:49 +0000)] 
Get most of the wasm build (re)working and much prettier.

FossilOrigin-Name: a5a7890c75003a637a227b700dc342f4f4a24bd368b216bdb168b4ddfbe8f015

2 months agoCosmetic wasm build tweaks. Fixed wasm-opt use, broken by this branch's refactoring.
stephan [Tue, 23 Sep 2025 10:46:17 +0000 (10:46 +0000)] 
Cosmetic wasm build tweaks. Fixed wasm-opt use, broken by this branch's refactoring.

FossilOrigin-Name: 4d7eff2afbcf023291bc1133c4413d1ea44f4096bb515e4bcd40bc8fc8d2a591

2 months agoMake it easier to pick out which parallel build messages belong to which wasm build.
stephan [Tue, 23 Sep 2025 08:44:07 +0000 (08:44 +0000)] 
Make it easier to pick out which parallel build messages belong to which wasm build.

FossilOrigin-Name: 913af3dd6a8da577ef19b0d82c8afec0c626d7fa5fddbdf418d2eb16c3050ab1

2 months agoMore build restructuring.
stephan [Tue, 23 Sep 2025 08:23:23 +0000 (08:23 +0000)] 
More build restructuring.

FossilOrigin-Name: 7bee8ee76380b2c1beb320b55042f149c22f872c70b58461652fa5bcbf6ad3c7

2 months agoCreate each distinct wasm build into its own dir, instead of all going to in jswasm...
stephan [Tue, 23 Sep 2025 06:31:24 +0000 (06:31 +0000)] 
Create each distinct wasm build into its own dir, instead of all going to in jswasm/sqlite3.wasm, so that the build can now run in parallel.

FossilOrigin-Name: 47526a75f2ad85100b1eae7ab1cf9a9dddd4430a99f7a30aa0c16548d1db9d33

2 months agoStart reworking the wasm build (again) with an eye towards simplifying it. Currently...
stephan [Tue, 23 Sep 2025 05:10:19 +0000 (05:10 +0000)] 
Start reworking the wasm build (again) with an eye towards simplifying it. Currently only the canonical and esm builds work, not fiddle, speedtest, nor the bundler stuff.

FossilOrigin-Name: 102c4a35b86405273d1f7e9e34466c9deed7831099a8207b6f48746b998193f9

2 months agoAdd makefile target '64bit' to ext/wasm/GNUmakefile to build the 64-bit bundles....
stephan [Tue, 23 Sep 2025 02:04:07 +0000 (02:04 +0000)] 
Add makefile target '64bit' to ext/wasm/GNUmakefile to build the 64-bit bundles. It does not yet generate copies of the test apps to load/test them, pending other reworking of the build.

FossilOrigin-Name: 3e2ea990ad76f9e68d514568f53eaa692a1eb11695fceb1bcc58cea00605fff9

2 months agoSlight correction to the diagram in the previous checkin.
stephan [Tue, 23 Sep 2025 00:24:58 +0000 (00:24 +0000)] 
Slight correction to the diagram in the previous checkin.

FossilOrigin-Name: 6455af2703e78fb9b6df19cf4b46873d98ec91c3302dc0093a362d03ac48da91

2 months agoAdd a high-level diagram showing how sqlite3.js gets assembled.
stephan [Mon, 22 Sep 2025 23:48:05 +0000 (23:48 +0000)] 
Add a high-level diagram showing how sqlite3.js gets assembled.

FossilOrigin-Name: e0dfa1e62ba6d71abe1f48969eb6f53c83f2c28d47b996ee223587d923cc282f

2 months agoRefactor and simplify the JS API bootstrap steps.
stephan [Mon, 22 Sep 2025 21:04:24 +0000 (21:04 +0000)] 
Refactor and simplify the JS API bootstrap steps.

FossilOrigin-Name: a4f36fd93738f985d2c757c69eddca092732ce6148af98eb2595f9abe0d4fa44

2 months agoUpdate ext/wasm/api/README.md for recent changes.
stephan [Mon, 22 Sep 2025 18:05:10 +0000 (18:05 +0000)] 
Update ext/wasm/api/README.md for recent changes.

FossilOrigin-Name: 03b70686939e5f9ad984220a31674c23a1beb19f040c6327f24e23f0378555da

2 months agoCleanups and docs in the internal parts of the JS lib bootstrapping. More tinkering...
stephan [Mon, 22 Sep 2025 17:29:52 +0000 (17:29 +0000)] 
Cleanups and docs in the internal parts of the JS lib bootstrapping. More tinkering with the custom (but still disabled) wasm file loader.

FossilOrigin-Name: 35651d9ab5529da915500fc50ca3833a004d0b7a19d98e8fbf39234d94697aec

2 months agoRevise [a4430d262b3e129d] to preserve legacy behavior of the imposter
drh [Mon, 22 Sep 2025 17:28:08 +0000 (17:28 +0000)] 
Revise [a4430d262b3e129d] to preserve legacy behavior of the imposter
test-control.  The control argument must be 2 now to get read-only behavior.
The control argument of 1 goes back to the prior read/write behavior.

FossilOrigin-Name: 3e7ede2e6dc9ac8e746dafe0ecb5379044631e753e951f9ab97ec84addbd830a

2 months agoIn wasm.ptr.coerce(), treat the undefined value the same as 0 for Number-type pointer...
stephan [Mon, 22 Sep 2025 13:13:02 +0000 (13:13 +0000)] 
In wasm.ptr.coerce(), treat the undefined value the same as 0 for Number-type pointers for consistency with the BigInt coercion. The bindings have long treated both null and undefined as === 0 for pointer operations.

FossilOrigin-Name: ef73bb1ddae28c6a0b462a2a840bfaaec3fc70d843e9ab6c53097281ffc85a78

2 months agoMinor doc updates. No functional changes.
stephan [Mon, 22 Sep 2025 11:52:06 +0000 (11:52 +0000)] 
Minor doc updates. No functional changes.

FossilOrigin-Name: 9c67299b452a2b19b5f4285feb975b30864a9415ccf62b7c7ebb1587a6545b33

2 months agoRework the JS/WASM pieces for compatibility with both 32-bit and 64-bit WASM environm...
stephan [Mon, 22 Sep 2025 11:41:15 +0000 (11:41 +0000)] 
Rework the JS/WASM pieces for compatibility with both 32-bit and 64-bit WASM environments. This affects only the browser-side components, not the --with-wasi-sdk build nor the core library.

FossilOrigin-Name: 8ac367686fecd2e3ff1f4b4565e9f206a64237744e381704693df2e6efbe235a

2 months agoFix a problem with handling of 4-byte utf-8 characters in the shell tool (not the...
dan [Mon, 22 Sep 2025 10:48:10 +0000 (10:48 +0000)] 
Fix a problem with handling of 4-byte utf-8 characters in the shell tool (not the sqlite library). Forum post [forum:/forumpost/184b372388 | 184b372388].

FossilOrigin-Name: f3e845cf38fc364bfa3f8d433b668f884d11286c823d87ee0ed124a991c94e14

2 months agoExperimenting with a custom wasm loader, but don't enable it without an explicit... wasm-64bit
stephan [Mon, 22 Sep 2025 02:40:06 +0000 (02:40 +0000)] 
Experimenting with a custom wasm loader, but don't enable it without an explicit build flag. The goal here is to make the WebAssembly.Module object available internally (the default loader hides it from us).

FossilOrigin-Name: e5f0256feab95c30a8e3e1e69963fb3e25ed2da296aff5bc6646fe96a76c0b81

2 months agoMinor internal optimizations in the wasm glue.
stephan [Sun, 21 Sep 2025 23:15:12 +0000 (23:15 +0000)] 
Minor internal optimizations in the wasm glue.

FossilOrigin-Name: fb053a27d94f9caedfddf28680e13836343745376e84c8008641df6bb517cd8b

2 months agoA minor optimization in wasm.realloc().
stephan [Sun, 21 Sep 2025 22:17:13 +0000 (22:17 +0000)] 
A minor optimization in wasm.realloc().

FossilOrigin-Name: 6a070f450ac9ee3d4d6a3e05ef8fa2071a684181ea160805e236c3bba226510a

2 months agoRemove some stale makefile comments. Add a little widget to fiddle's toolbar which...
stephan [Sun, 21 Sep 2025 22:08:05 +0000 (22:08 +0000)] 
Remove some stale makefile comments. Add a little widget to fiddle's toolbar which shows whether it's running in 32- or 64-bit mode. Reduce fiddle's starting memory to 8MB.

FossilOrigin-Name: e99730f96e13f7497a871fdcc5eaa4187835f005a759f0fc79bbfe982f454437

2 months agoImprove db-close-time cleanup in the face of WASM environments which wrap wasm.export...
stephan [Sun, 21 Sep 2025 21:37:44 +0000 (21:37 +0000)] 
Improve db-close-time cleanup in the face of WASM environments which wrap wasm.exports in nullary wrappers.

FossilOrigin-Name: fbb63634eab83fda0090fe2c38bda735b497fd6e57dd36344559962e396dbb17

2 months agoFix a Number/BigInt descrepancy in oo1.DB() when passed a WASM-string db filename...
stephan [Sun, 21 Sep 2025 21:17:41 +0000 (21:17 +0000)] 
Fix a Number/BigInt descrepancy in oo1.DB() when passed a WASM-string db filename. Consolidate some duplicated internal code and adjacent minor cleanups.

FossilOrigin-Name: d078aff7817ccd4f891024e55703519307a53815d472086bf3d42b2be28698b3

2 months agoFix a StructType.dispose()/ondispose() memleak in Jaccwabyt bindings in 64-bit builds...
stephan [Sun, 21 Sep 2025 20:26:47 +0000 (20:26 +0000)] 
Fix a StructType.dispose()/ondispose() memleak in Jaccwabyt bindings in 64-bit builds and update its docs for 64-bit additions. Remove the parts of tester1.js related to skipping specific tests in 64-bit builds.

FossilOrigin-Name: 6baea1d719b0c345fee5f32a3917ce9c507a2d8cb029eaca675daca77f297eba

2 months agoGeneral cleanups and dead code removal.
stephan [Sun, 21 Sep 2025 19:39:06 +0000 (19:39 +0000)] 
General cleanups and dead code removal.

FossilOrigin-Name: 0336fa95e15c53ac6ab8152a840163a5aac64725874ffb848ce1d95e3af90586

2 months agoRemove some dead code and stray debug output. Fix (again) the JS SQLTester for 64...
stephan [Sun, 21 Sep 2025 19:01:15 +0000 (19:01 +0000)] 
Remove some dead code and stray debug output. Fix (again) the JS SQLTester for 64-bit (the previous build was set to 32-bit).

FossilOrigin-Name: a6b9567001dad0293dc6a7fe9a7ec1a220e41d9426448e2ab91dbd551948be15

2 months agoUpdate the JS SQLTester for recent sqlite3.wasm changes.
stephan [Sun, 21 Sep 2025 18:42:25 +0000 (18:42 +0000)] 
Update the JS SQLTester for recent sqlite3.wasm changes.

FossilOrigin-Name: 0fa1830540bcb86f5c59b1a6a9ffd8727c194a64a131d9d362023c84a3b820cb

2 months agoGeneric cleanups and simplifications in JS code.
stephan [Sun, 21 Sep 2025 17:55:23 +0000 (17:55 +0000)] 
Generic cleanups and simplifications in JS code.

FossilOrigin-Name: 074cf4e6c1775900204bb0d920111ee19601d5c63690e79e988e7fe6b040a647

2 months agoRename wasm config entry pointerSizeof to pointerSize for consistency with wasm.ptr...
stephan [Sun, 21 Sep 2025 14:25:29 +0000 (14:25 +0000)] 
Rename wasm config entry pointerSizeof to pointerSize for consistency with wasm.ptr.size.

FossilOrigin-Name: 2cd8ba740f9b14dc1408b62632c603076b070dc412bf7cbfb3b525f0c4912371

2 months agoRestructure the interface for the sqlite3.wasm pointer-size-dependent details.
stephan [Sun, 21 Sep 2025 13:53:59 +0000 (13:53 +0000)] 
Restructure the interface for the sqlite3.wasm pointer-size-dependent details.

FossilOrigin-Name: 8ac12e1f5144380d4ecc8b27a1f62dcda0e5a86409ae7149f62c33caeea19a23

2 months agoReduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidE...
stephan [Sun, 21 Sep 2025 11:49:23 +0000 (11:49 +0000)] 
Reduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidEarlyAccess() wrappers.

FossilOrigin-Name: a65bd978cbc646ec687ebcfc736a968e0597062251b2155caab42bca2d36f1e9

2 months agoReduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidE...
stephan [Sun, 21 Sep 2025 11:47:06 +0000 (11:47 +0000)] 
Reduce sqlite3.js build size by about 30kb by stripping out Emscripten's makeInvalidEarlyAccess() wrappers.

FossilOrigin-Name: 9fafe075d6f4c49fca45963b142f3e0f0e60d79cb462b7e24f9ed0b9a9677f28

2 months agoRemove some dead code.
stephan [Sun, 21 Sep 2025 11:39:53 +0000 (11:39 +0000)] 
Remove some dead code.

FossilOrigin-Name: 1c2cd58d1a86d85e79ac912270e762e22f43f1d41d81a19ecd0ae6b2656c71b4

2 months agoMinor cleanup in sqlite3.wasm.ptrAdd().
stephan [Sun, 21 Sep 2025 11:15:00 +0000 (11:15 +0000)] 
Minor cleanup in sqlite3.wasm.ptrAdd().

FossilOrigin-Name: f659595d2e9e019a77d0c86803dbeb4bd728221a665825896ec29f7c0c0bdc65

2 months agoRemove some fiddle debug output.
stephan [Sun, 21 Sep 2025 01:03:16 +0000 (01:03 +0000)] 
Remove some fiddle debug output.

FossilOrigin-Name: c7cc374ff5ccd8b8f0a6cd0acada2a713626b5447cf014db12e18327fccfd36b

2 months agoResolve the non-functional 64-bit JS vtabs and VFSes. All wasm tests now pass on...
stephan [Sun, 21 Sep 2025 00:59:23 +0000 (00:59 +0000)] 
Resolve the non-functional 64-bit JS vtabs and VFSes. All wasm tests now pass on a 64-bit build. Investigation of the fiddle failure on a second db import is still pending.

FossilOrigin-Name: 7c44b48b628d3d93b13031e9fd08ed39fec35c661aca9e813a89348d6c415663

2 months agoDetermine the WASM environment's pointer size at runtime instead of baking it in...
stephan [Sat, 20 Sep 2025 23:21:24 +0000 (23:21 +0000)] 
Determine the WASM environment's pointer size at runtime instead of baking it in at build-time via the preprocessor.

FossilOrigin-Name: 21ac6aaa03517841b637924720354b9800d6e8b7bd5f6ee54a99f5f45b2ccdec

2 months agoAdd missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused...
stephan [Sat, 20 Sep 2025 22:11:19 +0000 (22:11 +0000)] 
Add missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused) xDlOpen and xDlError bindings. Disable OPFS-related tests in tester1.js in 64-bit builds.

FossilOrigin-Name: dccfa7098975d8c09eb6e7d30cd2ae30bc8234ef9a24f4a2ad5e9ffd29df72c2

2 months agoAdd missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused...
stephan [Sat, 20 Sep 2025 22:10:59 +0000 (22:10 +0000)] 
Add missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused) xDlOpen and xDlError bindings. Disable OPFS-related tests in tester1.js in 64-bit builds.

FossilOrigin-Name: a106be90a2dba7476e54dbb4bdf47d0999031dae0ca82d73e51a48dadd6bcdc0

2 months agoReinstate the working-again commit/rollback/update hook tests. The bug breaking those...
stephan [Sat, 20 Sep 2025 21:03:28 +0000 (21:03 +0000)] 
Reinstate the working-again commit/rollback/update hook tests. The bug breaking those was the one-letter change at the top of this diff.

FossilOrigin-Name: c582513a77cd1d1d9479e5a4518ddf15ef5a213bed1bfb6af9bd21bf3be41f8a

2 months agoFurther tweaks towards 64-bit wasm. Fiddle is failing intermittently from the C level...
stephan [Sat, 20 Sep 2025 20:23:59 +0000 (20:23 +0000)] 
Further tweaks towards 64-bit wasm. Fiddle is failing intermittently from the C level when importing a db and it's not yet clear what's happening there.

FossilOrigin-Name: 9fd82ebe31993c11e61a47205b7fc17a28283ec96cf278df1b6ea8a196d1fcb1

2 months agoGet speedtest1's wasm build working.
stephan [Sat, 20 Sep 2025 20:19:18 +0000 (20:19 +0000)] 
Get speedtest1's wasm build working.

FossilOrigin-Name: 2a61e3f1ccb1c2f115377d33af7d84d158b06c462e482fbbddf35c56d1fb58d8

2 months agoImprove deps handling of fiddle's gzipped output files to help avoid stale gz files...
stephan [Sat, 20 Sep 2025 20:17:17 +0000 (20:17 +0000)] 
Improve deps handling of fiddle's gzipped output files to help avoid stale gz files during development (althttpd will prefer those over the uncompressed ones). Only compress the larger files, not the small html/js pieces.

FossilOrigin-Name: bb945f52909caa2577de38711883a79ca918b3716e5e0c2fed6e6ef12e19aeef

2 months agoGet all but 3 of the tester1.js test groups running in 64-bit builds. The outliers...
stephan [Sat, 20 Sep 2025 18:51:10 +0000 (18:51 +0000)] 
Get all but 3 of the tester1.js test groups running in 64-bit builds. The outliers are virtual tables and commit/rollback/update hooks.

FossilOrigin-Name: c135d9743698b3331e56f72160e2b78840aa2c8fa1a70daea9d4a0952dbda186

2 months agoGet several hundred more lines of tester1.js running in 64-bit mode.
stephan [Sat, 20 Sep 2025 17:11:57 +0000 (17:11 +0000)] 
Get several hundred more lines of tester1.js running in 64-bit mode.

FossilOrigin-Name: f5105ee5defa042508a68a1f4e23b9fff46a1697b1a727e01c3edea3030fbcb5

2 months agoFurther work on 64-bit WASM builds. It now gets through just shy of half of tester1.js.
stephan [Sat, 20 Sep 2025 15:16:55 +0000 (15:16 +0000)] 
Further work on 64-bit WASM builds. It now gets through just shy of half of tester1.js.

FossilOrigin-Name: c8deed31365898e1379d577298fc80ef08a5531999d5b54a9f14337febed0260

2 months agoIf the file-system supports f2fs style atomic-writes, sync the directory after deleti...
dan [Sat, 20 Sep 2025 14:48:08 +0000 (14:48 +0000)] 
If the file-system supports f2fs style atomic-writes, sync the directory after deleting a journal file in journal_mode=DELETE mode in synchronous=NORMAL or synchronous=FULL modes (as well as synchronous=EXTRA).

FossilOrigin-Name: e24b21699644a5b49181f2e63961b6a3fccb85605d0b6d109a6043341c194d99