Commit Graph

  • 974b8d7df0 Fix a problem with the merge at [cb604efdb40da95a]. drh 2025-09-29 20:40:50 +00:00
  • 8f6b797a1b Change the name to SQLITE_DBSTATUS_TEMPBUF_SPILL. drh 2025-09-29 19:57:43 +00:00
  • 3eccaa7915 Fix a buffer overread in the zipfile extension code. dan 2025-09-29 18:55:05 +00:00
  • c49ff175ef Merge the latest trunk enhancements into the dbstatus-spill branch drh 2025-09-29 18:48:00 +00:00
  • e6197c0d1d Improve whereSolver() so that it always finds a unique solution. drh 2025-09-29 18:17:19 +00:00
  • d7330b571d Add further tests for the new ALTER TABLE commands on this branch. dan 2025-09-29 16:49:55 +00:00
  • 7e38287da4 Fix JSONB logic so that it correctly interprets large JSON5 hexadecimal integer literals as positive numbers. drh 2025-09-29 14:09:43 +00:00
  • 381df874f0 Large JSON5 hexadecimal integer literals are positive unless preceded by a negative sign. json5-hex-fix drh 2025-09-29 13:43:10 +00:00
  • b7f5885b3e Back out check-in [9abaa0ac2b304934] as the code removed there is necessary after all. drh 2025-09-28 23:10:54 +00:00
  • 36ba76010c Revamp the implementation of generate_series to simplify and improve long-term maintainability. drh 2025-09-28 18:25:59 +00:00
  • 436c8e5026 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. stephan 2025-09-28 18:03:29 +00:00
  • 1bf80f2dce Minor bug fixes. Many new test cases. series-refactor drh 2025-09-28 17:24:42 +00:00
  • 39bffbcd32 Use new c-pp features to simplify generation of the tester1 family of files. stephan 2025-09-28 12:47:09 +00:00
  • d3cd2a25b4 All legacy tests are passing. Want to add new test cases before merging. drh 2025-09-28 11:01:05 +00:00
  • 9ffb344ed9 The generate_series rewrite is working better now, but is still not completely correct. drh 2025-09-28 10:36:23 +00:00
  • 5b047a8ec6 Refactor the generate_series extension. Compiles but does not yet work. drh 2025-09-28 09:25:07 +00:00
  • c2f7be11bb Fix harmless typo in a comment. drh 2025-09-28 08:59:16 +00:00
  • 1d592e0d62 Internal js/wasm tooling doc updates. stephan 2025-09-28 02:30:25 +00:00
  • 0b0c8734f3 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). stephan 2025-09-28 00:53:00 +00:00
  • fc66c6380f Add test cases for ALTER TABLE and attached databases. dan 2025-09-27 19:17:08 +00:00
  • eceff127ea Add OOM injection tests for new commands on this branch. dan 2025-09-27 18:25:27 +00:00
  • d47220c190 Add tests for ALTER TABLE authorization callbacks and other things. dan 2025-09-27 18:08:19 +00:00
  • 32c49bd6e6 Fix authorization callbacks for the new commands on this branch. dan 2025-09-27 16:13:56 +00:00
  • 54f296389c Rework the bounds calculations on generate_series() in an attempt to avoid signed integer overflow when the bounds are ridiculous values. drh 2025-09-27 15:03:11 +00:00
  • ba1ee803ee Add experimental implementations of ALTER TABLE commands to add and drop CHECK and NOT NULL constraints. dan 2025-09-27 14:59:21 +00:00
  • 41549103ac ext/wasm/c-pp.c: add #savepoint support. Consolidate how the diverse sqlite3_stmt handles are managed. stephan 2025-09-27 13:34:02 +00:00
  • c090488133 Use sqlite3_malloc64() and sqlite3_realloc64() everywhere in the CLI. drh 2025-09-27 13:00:37 +00:00
  • 943324c80d Fix a bug in the ".dbtotxt" command of the CLI that causes a NULL pointer dereference if run on an in-memory database. drh 2025-09-27 12:35:25 +00:00
  • 18af487597 Avoid integer overflow in memory allocation for the ".import --csv" command in the CLI. drh 2025-09-27 12:29:28 +00:00
  • 15e4074084 Additional cleanup and refinement of the regexp.c extension. drh 2025-09-27 11:54:49 +00:00
  • 4ac2118c5d 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. stephan 2025-09-27 11:38:35 +00:00
  • 4bdfae9d40 Remove and edit some comments. stephan 2025-09-27 00:07:25 +00:00
  • 5d0d30ae2d Add wasm.ptr to the module-symbols.html output. stephan 2025-09-27 00:05:13 +00:00
  • 836e895f9e Latest upstream c-pp.c for the ability to process multiple inputs and outputs in a single invocation. stephan 2025-09-27 00:04:28 +00:00
  • 879066a0a2 Delay replacing the wasm file name strings until they're needed. Add target b-all to run all known wasm builds. stephan 2025-09-26 19:41:07 +00:00
  • e309de27f9 Consolidate some duplicate code in mkwasmbuilds.c. stephan 2025-09-26 19:30:34 +00:00
  • a34f87d25a Clean up how the speedtest1 64-bit test/demo files are generated. Make log output very slightly less verbose. stephan 2025-09-26 19:19:35 +00:00
  • 42f9273da2 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. stephan 2025-09-26 18:29:00 +00:00
  • 96c753ec56 Reinstate the Module.instantiateWasm() override and simplify how the wasm filename gets injected into the JS files. stephan 2025-09-26 17:11:39 +00:00
  • b62c26d999 Limit the complexity of a REGEXP pattern using SQLITE_LIMIT_LIKE_PATTERN_LENGTH drh 2025-09-26 15:38:52 +00:00
  • 80d74f0934 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. drh 2025-09-26 13:14:20 +00:00
  • 3a94a00768 Get wasmfs build working in the new setup. Disable the custom wasm loader because its generated makefile code is currently broken. stephan 2025-09-26 12:49:41 +00:00
  • 8d2f3a1f82 Fix harmless integer overflows caused by over-sized integer constants in the "{m,n}" syntax of the regexp extension. drh 2025-09-26 11:53:54 +00:00
  • c839ea5d94 Docs and dead code removal in mkwasmbuilds.c. stephan 2025-09-26 11:47:13 +00:00
  • 6553a5d6a6 Fix some integer overflow problems when handling corrupt hexdb dumps in the shell tool. [forum:/forumpost/82b513b116 | Forum post 82b513b116]. dan 2025-09-26 11:45:13 +00:00
  • c9f1759c94 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'. drh 2025-09-26 11:36:10 +00:00
  • a7a8d7fa87 Fix a harmless compiler warning. jsonb_each drh 2025-09-26 11:28:01 +00:00
  • e040128ecd In c-pp.c, use (void)x instead of an empty if(x){} to flag unused arguments. stephan 2025-09-26 11:14:15 +00:00
  • 92f93556e5 On-demand loading of JSON virtual tables. drh 2025-09-26 10:29:07 +00:00
  • 5ace5e0a38 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. stephan 2025-09-26 02:18:28 +00:00
  • c1254430d8 Build cleanups and dead code removal. stephan 2025-09-26 01:38:07 +00:00
  • 3574ec40a6 Add JSON table-valued functions jsonb_each() and jsonb_tree(). drh 2025-09-25 23:32:23 +00:00
  • 51e3a140c9 Include writes to temp files by sort operations in the SQLITE_DBSTATUS_SPILL values. dan 2025-09-25 19:32:29 +00:00
  • ae48a2463b wasm dist: add --snapshot flag, add -64 flag to include 64-bit builds, and add module-symbols.html to the dist. stephan 2025-09-25 18:53:28 +00:00
  • 3e7fe489e2 Replace ext/wasm/dist.make with mkdist.sh and get dist working with the new build. Fix the preprocessing flags for tester1-esm.html. stephan 2025-09-25 17:29:12 +00:00
  • a4476ea1fa 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. stephan 2025-09-25 15:17:58 +00:00
  • 5ad6e7b0e0 Fix the translation of "\v" in JSON5. [forum:/forumpost/28e21085f9c6a4e7|Forum post 28e21085f9]. drh 2025-09-25 15:06:57 +00:00
  • 5dbbbf4923 Remove some superfluous tabs and add the mkwasmbuilds ability to emit just its prologue. wasm-rebuild-2025 stephan 2025-09-25 14:44:03 +00:00
  • 96d39ce7d2 Minor logging fix for the wasm-opt build step. stephan 2025-09-25 14:39:41 +00:00
  • 653e32e9a1 Move fiddle.make into the main makefile. Various adjacent cleanups and docs. stephan 2025-09-25 14:29:47 +00:00
  • 31efe5a0f2 Avoid an integer overflow in the shell tool when outputing hex dumps of blobs greater than 1GB in size. dan 2025-09-25 11:10:55 +00:00
  • dc868ef879 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(). drh 2025-09-25 10:55:54 +00:00
  • 4d488bd341 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. dan 2025-09-25 10:50:11 +00:00
  • 3ed76ca35b Minor build cleanups. stephan 2025-09-25 02:30:55 +00:00
  • 99cb0049ee Consolidate the speedtest1 wasm build into the new mkwasmbuilds.c model. Remove the long-unused batch-runner JS tools. stephan 2025-09-25 02:02:48 +00:00
  • ef565295f5 Wasm build deps fixes. stephan 2025-09-25 00:53:30 +00:00
  • 9daf58ee8d 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. stephan 2025-09-24 23:07:45 +00:00
  • 3675a69f1d Cosmetic makefile tweaks. stephan 2025-09-24 20:53:19 +00:00
  • 9444c29094 Fix the makefile so that "<tt>test/testrunner.tcl release --buildonly</tt>" works on mac. Apparently broken by [b7751d144330593b]. drh 2025-09-24 20:44:33 +00:00
  • 6d3ae03f1e Get the tester1 worker1/promiser demos building again. Show WASM heap usage in tester1 if. stephan 2025-09-24 20:39:08 +00:00
  • b8a62d9da7 Add an assert() to fix a harmless compiler warning in the session extension. drh 2025-09-24 20:09:48 +00:00
  • 1ecc36a2b0 Fix a harmless compiler warning in FTS5. drh 2025-09-24 19:51:07 +00:00
  • 2c88a2ffb5 Rework the set_table_name() function in the CLI to use modern APIs. [forum:/forumpost/2baa4acd64|Forum post 2baa4acd64]. drh 2025-09-24 19:10:58 +00:00
  • 96bb92e70c 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]. drh 2025-09-24 17:49:09 +00:00
  • 892109542b Generate 64-bit variants of tester1.js/html. Enhance c-pp to accept multiple input files. stephan 2025-09-24 17:46:08 +00:00
  • 68353d0531 Fix a harmless compiler warning in IEEE754. drh 2025-09-24 17:38:13 +00:00
  • 2abc502ebc Additional short-circuit optimizations for AND/OR operators. Also fix bugs in prior implementations (such as [0083d5169a46104a]). drh 2025-09-24 17:07:15 +00:00
  • dc90d7055c Simplification to the AND/OR short-circuit logic. short-circuit drh 2025-09-24 16:26:44 +00:00
  • 2364fe3b38 Improve performance of window function queries that use "BETWEEN :x FOLLOWING AND :y FOLLOWING" where :y is a very large number. dan 2025-09-24 16:10:46 +00:00
  • 1f030eac9f Fixes to short-circuit AND/OR evaluation. drh 2025-09-24 14:43:42 +00:00
  • 36baed3e2e 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. stephan 2025-09-24 13:59:53 +00:00
  • ca574fa1d5 Factor out the code that handles AND and OR short-circuiting into a separate subroutine, for performance and legibility. drh 2025-09-24 13:10:55 +00:00
  • feeacfb897 Fix incorrect buffer size computation for the base64() extension function. [forum:/forumpost/b1993c858f|Forum post b1993c858f]. drh 2025-09-24 12:01:50 +00:00
  • b927708437 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]. drh 2025-09-24 11:12:26 +00:00
  • 8d93e83461 Cosmetic build tweaks. stephan 2025-09-24 07:31:19 +00:00
  • 205257791c Fix the positioning of the wasm-bare-bones flag init. stephan 2025-09-24 07:00:37 +00:00
  • 4500a87c95 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). stephan 2025-09-24 06:59:47 +00:00
  • 5c01f3fb83 Further wasm build refactoring. Get speedtest1 building again. stephan 2025-09-24 06:43:24 +00:00
  • e779baa099 Move some of the generated wasm makefile utility code out of C and into util.make. stephan 2025-09-24 04:58:14 +00:00
  • 3b56f296e9 Generic build simplifications. stephan 2025-09-24 03:05:31 +00:00
  • 0dee14a559 Get fiddle building properly again and fiddle/fiddle.debug building in parallel. stephan 2025-09-24 01:50:08 +00:00
  • 9300c4a13c Improved short-circuit evaluation of AND and OR. All appears to work, but there are still testing and performance issues to be worked out. drh 2025-09-24 00:13:28 +00:00
  • ac37661a16 Get fiddle/fiddle.debug building again but they're incomplete and don't run. stephan 2025-09-23 23:22:31 +00:00
  • cac1ef709f Improvements to short-circuit evaluation of AND and OR operators. This is a partial and incomplete response to [forum:/forumpost/f5adeb59ff77c056|forum post f5adeb59ff77c056]. drh 2025-09-23 17:00:53 +00:00
  • 611ffbc981 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]. drh 2025-09-23 16:01:45 +00:00
  • cfce9b6a11 Get most of the wasm build (re)working and much prettier. stephan 2025-09-23 13:49:44 +00:00
  • a07871d332 Cosmetic wasm build tweaks. Fixed wasm-opt use, broken by this branch's refactoring. stephan 2025-09-23 10:46:17 +00:00
  • 5c0850f8b8 Make it easier to pick out which parallel build messages belong to which wasm build. stephan 2025-09-23 08:44:07 +00:00
  • ebb99967c2 More build restructuring. stephan 2025-09-23 08:23:23 +00:00
  • aa5b8f9d47 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. stephan 2025-09-23 06:31:24 +00:00