]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
3 hours agoFix some integer overflow warnings in the base64 and base85 extensions. master
dan [Tue, 7 Oct 2025 15:14:03 +0000 (15:14 +0000)] 
Fix some integer overflow warnings in the base64 and base85 extensions.

FossilOrigin-Name: 06b4bd2aba22c57f5a5fed606c3bee225dee6fdc13bb16cc58194040ef0d7d85

22 hours agoFix a minor problem with building sqlite3.c without manifest.tags.
dan [Mon, 6 Oct 2025 20:11:18 +0000 (20:11 +0000)] 
Fix a minor problem with building sqlite3.c without manifest.tags.

FossilOrigin-Name: 140f0f9fd389c99dc6ba1fdca7658c43d8dc3f3c128484fbafa7d67c33fe1001

24 hours agoAvoid attempting to delete a file that is still open in sessionnoop2.test.
dan [Mon, 6 Oct 2025 17:52:52 +0000 (17:52 +0000)] 
Avoid attempting to delete a file that is still open in sessionnoop2.test.

FossilOrigin-Name: 56f6d6c538fd4e0da8a7c4e4c4d1bd0b8cd83ffd126ae24daaf30fdf808e1a78

25 hours agoAvoid using randomblob() in walckptnoop.test, as it produces different results for...
dan [Mon, 6 Oct 2025 17:20:26 +0000 (17:20 +0000)] 
Avoid using randomblob() in walckptnoop.test, as it produces different results for different test permutations.

FossilOrigin-Name: 94ceb0f0cfef1da89ea2a7420f508024897d9b7c19ef9be9af88d3e6f48c297c

25 hours agoChange the testrunner.tcl option from "--case" (singular) to "--cases".
drh [Mon, 6 Oct 2025 16:57:49 +0000 (16:57 +0000)] 
Change the testrunner.tcl option from "--case" (singular) to "--cases".
Allow the argument to be a glob pattern, to pick up multiple cases.

FossilOrigin-Name: e205f87f5cf97b82781af690da1a3fbf3dc75f590783074e5a72c1d7e3bebbad

25 hours agoFix typo in the previous check-in that prevented the script from running. testrunner-enhancements
drh [Mon, 6 Oct 2025 16:56:12 +0000 (16:56 +0000)] 
Fix typo in the previous check-in that prevented the script from running.

FossilOrigin-Name: 797664700701effefbf4d87a791febae3bb68544bac23470351a11bcb3a87651

25 hours agoAdd info from the SQLITE_SCM_... macros to tool/version-info.c's --json output, promp...
stephan [Mon, 6 Oct 2025 16:54:45 +0000 (16:54 +0000)] 
Add info from the SQLITE_SCM_... macros to tool/version-info.c's --json output, prompted by [forum:0c513ae3fca7d55c|forum post 0c513ae3fc].

FossilOrigin-Name: 951882aa4e1684b7b0f7e10590de81eae1ddb8c5ac21588e3f9b9cd4cb9f0f51

25 hours agoUpdate testrunner.tcl so that the new option is --cases rather than singular
drh [Mon, 6 Oct 2025 16:50:37 +0000 (16:50 +0000)] 
Update testrunner.tcl so that the new option is --cases rather than singular
--case, and so that it is a glob pattern.

FossilOrigin-Name: 9488b4f00c9278de8c03f4a3cbd4f54e48e71c1eff45de4454f8bd49c080a930

26 hours agoFix typo in the "testprefix" for walckptnoop.test
drh [Mon, 6 Oct 2025 16:23:31 +0000 (16:23 +0000)] 
Fix typo in the "testprefix" for walckptnoop.test

FossilOrigin-Name: ff205f29934417e8150b5243245fb70389717b219e35bd8d60791a8485b69b33

26 hours agoNew testrunner.tcl option "--case DISPLAYLNAME" only runs the single case
drh [Mon, 6 Oct 2025 15:53:52 +0000 (15:53 +0000)] 
New testrunner.tcl option "--case DISPLAYLNAME" only runs the single case
(and its build dependencies) that exactly matches DISPLAYNAME.

FossilOrigin-Name: 8ea2e097b731514c284f255f12b08e15f63c7f49641a698e61ee7e47cc9d3c45

28 hours agoFix testrunner.tcl so that --help output goes to stdout, not stderr.
drh [Mon, 6 Oct 2025 14:30:22 +0000 (14:30 +0000)] 
Fix testrunner.tcl so that --help output goes to stdout, not stderr.

FossilOrigin-Name: 441a759c225d4e710a693339402624e7ba52852c08aa64439ed4568c193ad529

30 hours agoFix a subtle problem with short-circuit evaluation introduced by
drh [Mon, 6 Oct 2025 11:50:35 +0000 (11:50 +0000)] 
Fix a subtle problem with short-circuit evaluation introduced by
[cea8bf79e18d55a8] and detected by the dbsqlfuzz fuzzer.  Test cases
in TH3.

FossilOrigin-Name: d71cd722c478288601c70df8cec8c242cc623d2147b30f4f68dad57c75b3ee4a

43 hours agoAnother small performance increase in the text format by using strchr() to
drh [Sun, 5 Oct 2025 22:41:32 +0000 (22:41 +0000)] 
Another small performance increase in the text format by using strchr() to
search for '%'.

FossilOrigin-Name: 59ad89ba07dd7b127f03f62a647f7328f08dbc0aa1b88b2b4529eb5b4c677775

46 hours agoFix a syntax error in the tcl script part of [199b6567bb41cd].
stephan [Sun, 5 Oct 2025 19:56:57 +0000 (19:56 +0000)] 
Fix a syntax error in the tcl script part of [199b6567bb41cd].

FossilOrigin-Name: a7ed85f27066b74263dbd3dfcefe5d378e524cc56cd3abac4032bc23f83b5d21

47 hours agoPerformance optimization in text formatter by using a hash table to look up
drh [Sun, 5 Oct 2025 19:30:05 +0000 (19:30 +0000)] 
Performance optimization in text formatter by using a hash table to look up
the operator character that follows %-subsitutions.

FossilOrigin-Name: 199b6567bb41cd41977e28b3e06e8c26c3300b3873f226a4699ec251a7bf8883

4 days agoMinor clarifications to the JSONB format documentation.
drh [Fri, 3 Oct 2025 18:17:13 +0000 (18:17 +0000)] 
Minor clarifications to the JSONB format documentation.

FossilOrigin-Name: 0fc708b41fe99b315b32e4a6ac8d48d8250195f7de1ab1d9f6eaf50290781286

4 days agoRemove the memvfs.c extension, to prevent it from being misused.
drh [Thu, 2 Oct 2025 22:48:08 +0000 (22:48 +0000)] 
Remove the memvfs.c extension, to prevent it from being misused.
See [forum:/forumpost/91811439aa|forum post 91811439aa] for the complaint
that prompted me to take down this demonstration code.  I have other things
to do rather than argue about posts such as the foregoing, so it is easier
to just take the code down.  If you need this code, you can downloading older
check-ins.  The beauty of DAG-based version control systems like Fossil
(and Git) is that nothing is ever lost; it is just stops appearing on
trunk.

FossilOrigin-Name: eb79110dcac80dde3bcca0929d67a8f8f6d2eea5695184b2b7c6788283f06902

4 days agoFix typo in the previous check-in. Remove surplus end-of-line whitespace
drh [Thu, 2 Oct 2025 19:35:58 +0000 (19:35 +0000)] 
Fix typo in the previous check-in.  Remove surplus end-of-line whitespace
from the ext/misc/fossildelta.c extension.

FossilOrigin-Name: cc87551805dc1fcb05598339e526b304401b64a4eaaa2148a9d837b1423484ce

4 days agoHarden the debugging vtab "delta_parse()" which is part of the
drh [Thu, 2 Oct 2025 19:19:40 +0000 (19:19 +0000)] 
Harden the debugging vtab "delta_parse()" which is part of the
ext/misc/fossildelta.c extension against malicious inputs.
[forum:/forumpost/be139437c3|forum post be139437c3].

FossilOrigin-Name: 4be6deee646f2c0f591ba81f902182ca9302050a7fb2729c7f64981307058b8b

5 days agoIn the ".open" command of the CLI if using the --new option with a URI
drh [Thu, 2 Oct 2025 18:31:19 +0000 (18:31 +0000)] 
In the ".open" command of the CLI if using the --new option with a URI
filename, then decode the URI to extract the actual filename prior to
trying to delete that file.

FossilOrigin-Name: 14ee3c1f03de274e5fa1efb471816a0001762623614253c24d58f41ea6af0628

5 days agoFix -DSQLITE_OS_OTHER=0 builds.
dan [Thu, 2 Oct 2025 14:48:27 +0000 (14:48 +0000)] 
Fix -DSQLITE_OS_OTHER=0 builds.

FossilOrigin-Name: 2971d7470110fcd43bdc8ad5d09d1f2f63f5a3bccda41810948a683e310ad908

5 days agoCorrection to [ae303dab2f534e2c] to use the right loop over the solver.
drh [Thu, 2 Oct 2025 11:28:27 +0000 (11:28 +0000)] 
Correction to [ae303dab2f534e2c] to use the right loop over the solver.

FossilOrigin-Name: 22b2700ac20bb8e5883d484bfd0aee7a0fbc99b92696d8ca850cd129e2ccbb43

5 days agoFix a buffer overrun in the zipfile extension that could occur while processing zip...
dan [Thu, 2 Oct 2025 11:16:22 +0000 (11:16 +0000)] 
Fix a buffer overrun in the zipfile extension that could occur while processing zip archives with extremely long file-names and comment fields.

FossilOrigin-Name: c284fda848038a61972fd1df5796f608a24ead109170aafe562a5d5787c46488

5 days agoAdd the --ifexists option to the CLI and to the ".open" command of the CLI.
drh [Wed, 1 Oct 2025 20:41:02 +0000 (20:41 +0000)] 
Add the --ifexists option to the CLI and to the ".open" command of the CLI.
Also the undocumented and unsupported --exclusive option on the same.

FossilOrigin-Name: 9a1947814d235d270dec265bb85db37e75cc077289e444d3d00f8345016c683e

5 days agoPrevent embedded 0x00 characters in the output strings from confusing
drh [Wed, 1 Oct 2025 19:01:19 +0000 (19:01 +0000)] 
Prevent embedded 0x00 characters in the output strings from confusing
the completion extension and causing it to read past the end of an array.
[forum:/forumpost/88a08b3201|Forum post 88a08b3201].

FossilOrigin-Name: 26f6d41f9d3ab656129af333d54a8645c6890314919bcae90351ba0c2240ceef

6 days agoFix a buffer overread in demo code in ext/misc/memvfs.c.
dan [Wed, 1 Oct 2025 14:28:48 +0000 (14:28 +0000)] 
Fix a buffer overread in demo code in ext/misc/memvfs.c.

FossilOrigin-Name: 90f7318308ca8372cbd9f183d88ff6cb884446f6df0695294c9a9955c5109f72

6 days agoEnable the CLI to be compiled with SQLITE_OMIT_AUTHORIZATION.
drh [Tue, 30 Sep 2025 19:11:00 +0000 (19:11 +0000)] 
Enable the CLI to be compiled with SQLITE_OMIT_AUTHORIZATION.

FossilOrigin-Name: afb2feb38043fef3c286030f9d1238c132f338e54233f2e4655323b388455c72

7 days agoFix various compiler warnings.
drh [Tue, 30 Sep 2025 17:37:18 +0000 (17:37 +0000)] 
Fix various compiler warnings.

FossilOrigin-Name: 24ee6c25b4745c8fd671d845b48b9ab98a787ccb348d560ad70f19d035e7990e

7 days agoFix the new generate_series() to correctly deal with an explicit 0 as the step.
drh [Tue, 30 Sep 2025 17:12:39 +0000 (17:12 +0000)] 
Fix the new generate_series() to correctly deal with an explicit 0 as the step.

FossilOrigin-Name: b059413c440d1b831c9a462f7165a350001ba7a8cc77ca2a0a8f2bb73c830aba

7 days agoFix another potential buffer overread in the zipfile extension.
dan [Tue, 30 Sep 2025 11:17:40 +0000 (11:17 +0000)] 
Fix another potential buffer overread in the zipfile extension.

FossilOrigin-Name: 0819fe670f9ceec79f84eb09c234dc29f6581332f86a53d6a0547697404efff1

7 days agoStrengthen the fts5_locale() function against integer overflow attacks,
drh [Tue, 30 Sep 2025 10:11:44 +0000 (10:11 +0000)] 
Strengthen the fts5_locale() function against integer overflow attacks,
even when SQLite is compiled with oversize values for
SQLITE_MAX_LENGTH.

FossilOrigin-Name: f0dbd9d22f558dd002e2132381de3c82d55a670399b3e527b5962b025141676a

7 days agoFix a buffer overread in the zipfile extension code.
dan [Mon, 29 Sep 2025 18:55:05 +0000 (18:55 +0000)] 
Fix a buffer overread in the zipfile extension code.

FossilOrigin-Name: 70c2c99b6f12a3467c23b44adcaf2d7d780ba8317b72de2f6730b1d892cf0c85

8 days agoImprove whereSolver() so that it always finds a unique solution.
drh [Mon, 29 Sep 2025 18:17:19 +0000 (18:17 +0000)] 
Improve whereSolver() so that it always finds a unique solution.

FossilOrigin-Name: ae303dab2f534e2c5132112b61fa5a097e7010fd8b652badee669fbe9df5cf53

8 days agoFix JSONB logic so that it correctly interprets large JSON5 hexadecimal
drh [Mon, 29 Sep 2025 14:09:43 +0000 (14:09 +0000)] 
Fix JSONB logic so that it correctly interprets large JSON5 hexadecimal
integer literals as positive numbers.

FossilOrigin-Name: 0ad5d77fc0a9d205cc061ee4923d885f6f28f77c1efef3cc10297036ce164e6d

8 days agoLarge JSON5 hexadecimal integer literals are positive unless preceded by json5-hex-fix
drh [Mon, 29 Sep 2025 13:43:10 +0000 (13:43 +0000)] 
Large JSON5 hexadecimal integer literals are positive unless preceded by
a negative sign.

FossilOrigin-Name: 5a93d9dce2d134ca450955bb272baba43dfc76beb540b643bf4bd31f7eb9e0b9

8 days agoBack out check-in [9abaa0ac2b304934] as the code removed there is necessary
drh [Sun, 28 Sep 2025 23:10:54 +0000 (23:10 +0000)] 
Back out check-in [9abaa0ac2b304934] as the code removed there is necessary
after all.

FossilOrigin-Name: 27ae98629406bbaee2857f75c069b2ccd4757b247f0742e51b9e619e96b6dc45

9 days agoRevamp the implementation of generate_series to simplify and improve
drh [Sun, 28 Sep 2025 18:25:59 +0000 (18:25 +0000)] 
Revamp the implementation of generate_series to simplify and improve
long-term maintainability.

FossilOrigin-Name: 9041ca8543ff3d2a617ce4df696aa53269a7803716caaf55a8e61e59ee667040

9 days agoRemove the long-defunct wasmfs build of speedtest1 from index.html and re-enable...
stephan [Sun, 28 Sep 2025 18:03:29 +0000 (18:03 +0000)] 
Remove the long-defunct wasmfs build of speedtest1 from index.html and re-enable the wasmfs scratchpad app (which still works). Fix the CFLAGS for the wasmfs build and the path to the wasm file for one of the JS.

FossilOrigin-Name: acaaf8cce9e780bf937436b4c987ed284aa0bba6f5ca9508d9dbad598af2991d

9 days agoMinor bug fixes. Many new test cases. series-refactor
drh [Sun, 28 Sep 2025 17:24:42 +0000 (17:24 +0000)] 
Minor bug fixes.  Many new test cases.

FossilOrigin-Name: 86dcc68d1816d970d8d5fb158696c3fe6c5ddcac2c255823110d656372503885

9 days agoUse new c-pp features to simplify generation of the tester1 family of files.
stephan [Sun, 28 Sep 2025 12:47:09 +0000 (12:47 +0000)] 
Use new c-pp features to simplify generation of the tester1 family of files.

FossilOrigin-Name: f7cab028c97b2c9ac9b561a4c33475aadd3f71cbd48ec4dd6e09c1bb19ec00cb

9 days agoAll legacy tests are passing. Want to add new test cases before merging.
drh [Sun, 28 Sep 2025 11:01:05 +0000 (11:01 +0000)] 
All legacy tests are passing.  Want to add new test cases before merging.

FossilOrigin-Name: adb80761d2319e16b6db2b5e35fedc239fad0ed5d26d629a5ea659c90881f76a

9 days agoThe generate_series rewrite is working better now, but is still not
drh [Sun, 28 Sep 2025 10:36:23 +0000 (10:36 +0000)] 
The generate_series rewrite is working better now, but is still not
completely correct.

FossilOrigin-Name: 6c41d14707e6890ca6d0460c72178ccb710d7f41dead76f222f1382c5cbd5a9a

9 days agoRefactor the generate_series extension. Compiles but does not yet work.
drh [Sun, 28 Sep 2025 09:25:07 +0000 (09:25 +0000)] 
Refactor the generate_series extension.  Compiles but does not yet work.

FossilOrigin-Name: 25e395a82f14513bf23c1e913fe24be77ad74fec1540f524e709f9cdfeb3dc56

9 days agoFix harmless typo in a comment.
drh [Sun, 28 Sep 2025 08:59:16 +0000 (08:59 +0000)] 
Fix harmless typo in a comment.

FossilOrigin-Name: 1f6deabfff2fc2fed5fbff48d2637b48245e5a946a442c4bcc9b9ecb7c4848b9

9 days agoInternal js/wasm tooling doc updates.
stephan [Sun, 28 Sep 2025 02:30:25 +0000 (02:30 +0000)] 
Internal js/wasm tooling doc updates.

FossilOrigin-Name: 0d6ed44278a513b062539f32da49fa43952fcdf0bc1bba7b24ef3749bc4525a5

9 days agoImprove #if support in, and add #assert to, c-pp. Rename target=... preprocessor...
stephan [Sun, 28 Sep 2025 00:53:00 +0000 (00:53 +0000)] 
Improve #if support in, and add #assert to, c-pp. Rename target=... preprocessor symbols to target:... because changes in the semantics for symbols which have an '=' makes some of those #if blocks mutually exclusive (which we won't want in rare cases involving the bundler-friendly builds).

FossilOrigin-Name: 54287487793d48f6dde919446ab7476aea0cc0aba3835c80f060a7b84221881a

10 days agoRework the bounds calculations on generate_series() in an attempt to
drh [Sat, 27 Sep 2025 15:03:11 +0000 (15:03 +0000)] 
Rework the bounds calculations on generate_series() in an attempt to
avoid signed integer overflow when the bounds are ridiculous values.

FossilOrigin-Name: 3d9148c7d7379a34a0c2a33a1eb2562234868bc0b14c3d16990b33e52fd4ebc5

10 days agoext/wasm/c-pp.c: add #savepoint support. Consolidate how the diverse sqlite3_stmt...
stephan [Sat, 27 Sep 2025 13:34:02 +0000 (13:34 +0000)] 
ext/wasm/c-pp.c: add #savepoint support. Consolidate how the diverse sqlite3_stmt handles are managed.

FossilOrigin-Name: b44650f907e9cb4ec908bb7525488e309946fac9d84cdac4cdde730527a440a9

10 days agoUse sqlite3_malloc64() and sqlite3_realloc64() everywhere in the CLI.
drh [Sat, 27 Sep 2025 13:00:37 +0000 (13:00 +0000)] 
Use sqlite3_malloc64() and sqlite3_realloc64() everywhere in the CLI.

FossilOrigin-Name: b05c47009120840f74955114082f3a9c1206a81bd935a503fc359b5bde61c996

10 days agoFix a bug in the ".dbtotxt" command of the CLI that causes a NULL pointer
drh [Sat, 27 Sep 2025 12:35:25 +0000 (12:35 +0000)] 
Fix a bug in the ".dbtotxt" command of the CLI that causes a NULL pointer
dereference if run on an in-memory database.

FossilOrigin-Name: 865352499223c3bdc5cb01a2f984d6e3fe74a028ab6a0cf2d92fec49383633f6

10 days agoAvoid integer overflow in memory allocation for the
drh [Sat, 27 Sep 2025 12:29:28 +0000 (12:29 +0000)] 
Avoid integer overflow in memory allocation for the
".import --csv" command in the CLI.

FossilOrigin-Name: a8093d45e0f59fd55ea4cba515e9e2eb3683bb0a4f4c062747cfb4074ae3db73

10 days agoAdditional cleanup and refinement of the regexp.c extension.
drh [Sat, 27 Sep 2025 11:54:49 +0000 (11:54 +0000)] 
Additional cleanup and refinement of the regexp.c extension.

FossilOrigin-Name: 2b34b750b5528b6dda195bc1a3895dc3fe46e70cbf992a78111316e2726c1ade

10 days agoTeach c-pp how to replace configure-script-like @tokens@, giving us a much simpler...
stephan [Sat, 27 Sep 2025 11:38:35 +0000 (11:38 +0000)] 
Teach c-pp how to replace configure-script-like @tokens@, giving us a much simpler way to get the proper WASM file name injected into each JS build.

FossilOrigin-Name: ffd5c8eaa89250a043b573c3eb66693dfec087a5b5eef184ae6d7bfbcf61235a

10 days agoRemove and edit some comments.
stephan [Sat, 27 Sep 2025 00:07:25 +0000 (00:07 +0000)] 
Remove and edit some comments.

FossilOrigin-Name: 1fa7e32d264f8329a8c9b0b5b469f1fc7ccadee86696d65e05df7fa3868af158

10 days agoAdd wasm.ptr to the module-symbols.html output.
stephan [Sat, 27 Sep 2025 00:05:13 +0000 (00:05 +0000)] 
Add wasm.ptr to the module-symbols.html output.

FossilOrigin-Name: dced5a7c434b83553ede533f71e3133450795c12fc67acd1a55fdedfa8fed76c

10 days agoLatest upstream c-pp.c for the ability to process multiple inputs and outputs in...
stephan [Sat, 27 Sep 2025 00:04:28 +0000 (00:04 +0000)] 
Latest upstream c-pp.c for the ability to process multiple inputs and outputs in a single invocation.

FossilOrigin-Name: c7633373046ceb94f293b8fbd4f436a1eb281c2744d97334c6e7e3a803d8eac2

10 days agoDelay replacing the wasm file name strings until they're needed. Add target b-all...
stephan [Fri, 26 Sep 2025 19:41:07 +0000 (19:41 +0000)] 
Delay replacing the wasm file name strings until they're needed. Add target b-all to run all known wasm builds.

FossilOrigin-Name: a4edaecc9b0b649df53a99e05d9abfbc5bdb40d45c7c6940a50b24fa30dca158

10 days agoConsolidate some duplicate code in mkwasmbuilds.c.
stephan [Fri, 26 Sep 2025 19:30:34 +0000 (19:30 +0000)] 
Consolidate some duplicate code in mkwasmbuilds.c.

FossilOrigin-Name: 1078aa4f1e5685d45e31eea622865ddd077f367f1cec90fc267e8ba50cbe2ee9

10 days agoClean up how the speedtest1 64-bit test/demo files are generated. Make log output...
stephan [Fri, 26 Sep 2025 19:19:35 +0000 (19:19 +0000)] 
Clean up how the speedtest1 64-bit test/demo files are generated. Make log output very slightly less verbose.

FossilOrigin-Name: 64715e92708e4f8c5b82c1f4ed71b75f418bf741f7f05516eab309582fbfad2b

11 days agoGet 64-bit builds of speedtest1.wasm running in order to better compare 32-/64-bit...
stephan [Fri, 26 Sep 2025 18:29:00 +0000 (18:29 +0000)] 
Get 64-bit builds of speedtest1.wasm running in order to better compare 32-/64-bit performance (spoiler alert: the latter is consistently roughly 10% slower). Add WASM heap usage info to speedtest1.

FossilOrigin-Name: 70b944cc0189309c2265b184381f2f050bced7b83f204d57b912def6e203982a

11 days agoReinstate the Module.instantiateWasm() override and simplify how the wasm filename...
stephan [Fri, 26 Sep 2025 17:11:39 +0000 (17:11 +0000)] 
Reinstate the Module.instantiateWasm() override and simplify how the wasm filename gets injected into the JS files.

FossilOrigin-Name: e878ffd2eaa87e2978c44fcd03a1eb6114a9ae31e31101898d682f43cf81000f

11 days agoLimit the complexity of a REGEXP pattern using SQLITE_LIMIT_LIKE_PATTERN_LENGTH
drh [Fri, 26 Sep 2025 15:38:52 +0000 (15:38 +0000)] 
Limit the complexity of a REGEXP pattern using SQLITE_LIMIT_LIKE_PATTERN_LENGTH

FossilOrigin-Name: 869c968569b09d05a5b7d587d8fddb3b4611daf7467dc157701e5dc6c9608606

11 days agoIn the regexp extension, limit the maximum value of integers in the
drh [Fri, 26 Sep 2025 13:14:20 +0000 (13:14 +0000)] 
In the regexp extension, limit the maximum value of integers in the
"{p,q}" syntax, as performance of the NFA used to do pattern matching
is linear in the maximum such integer.  The limit is SQLITE_MAX_REGEXP_REPEAT
which defaults to 999.  This helps to prevent DoS attacks in systems that
make use of the regexp extension.

FossilOrigin-Name: 911c745f88c0ee8569e67bbcbbab034264f8c981b505aadac3ce7289486a1a68

11 days 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

11 days 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

11 days 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

11 days 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

11 days 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

11 days 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

11 days 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

11 days 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

11 days 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

11 days 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

11 days 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

11 days 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

12 days 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

12 days 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

12 days 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

12 days 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

12 days 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

12 days 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

12 days 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

12 days 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

12 days 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

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

FossilOrigin-Name: 05e7ea021388fcac975779cd2a70e341e25670e70d1d9f372f15b823b2466750

12 days 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

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

FossilOrigin-Name: fd0c649047f4e444ea682138a3555a973839627150e1124bb9d9ced17880a9e5

12 days 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

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

FossilOrigin-Name: 4ec7e6800e090f7e17469a77bc37b57d3e1777171a5b354dfc68345416de504f

12 days 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

12 days 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

12 days 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

12 days 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

12 days 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

13 days 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

13 days 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

13 days 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

13 days 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

13 days 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

13 days 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