stephan [Fri, 19 Sep 2025 19:28:13 +0000 (19:28 +0000)]
Initial build-side tweaks to pave the way for a 64-bit WASM build. Such a build does not yet work for reasons given in the makefile comments, but is an eventual goal.
Improve imposter tables: (1) Read-only unless writeable_schema=ON
(2) --unsafe-testing no longer required (3) Does not interfere with
PRAGMA integrity_check.
stephan [Fri, 19 Sep 2025 17:24:47 +0000 (17:24 +0000)]
Diverse cleanups and docs in the JS and kvvfs pieces. Functional changes: (A) ensure that the 'i32' JS/WASM func arg/result conversion works properly with a 64-bit-memory WASM build (which we neither use nor test but [https://webassembly.org/news/2025-09-17-wasm-3.0/ | the newly-ratified WASM 3.0] brings within potential reach). (B) Fix sqlite3_js_posix_create_file() to not deallocate its input array if the client passes in raw memory (the library has never used it that way but the API permits it).
Improvements to imposter tables: (1) They are read-only unless writable-schema
is enabled. (2) Because they are now read-only, the ".imposter" command
in the CLI no longer requires the --unsafe-testing command-line option.
(3) Imposter tables do not participate in a PRAGMA integrity_check and hence
do not cause false-positive errors. However, you can still do an
integrity_check on the the imposter table itself by naming the imposter
table as the argument to integrity_check.
stephan [Fri, 19 Sep 2025 14:21:09 +0000 (14:21 +0000)]
Wasm: (A) diverse internal doc updates. (B) when generating automated JS-to-WASM function proxies for converters which require an additional middle-man proxy, e.g. sqlite3_exec(), use the client-provided function, not the proxy function, as the cache key, to keep from re-generating the conversion in some common use patterns.
In the date/time functions, a timezone suffix of "+00:00" should work
the same as "Z".
[forum:/forumpost/2025-09-17T10:12:14z|Forum post 2025-09-17T10:12:14z].
stephan [Mon, 15 Sep 2025 14:11:55 +0000 (14:11 +0000)]
Diverse internal cleanups in the JS/WASM pieces. A potential fix for a hypothetical db-close-time resource leak of a subset of automated JS-to-WASM function conversions in Safari. That browser exposes WASM-exported functions via nullary wrappers, which causes a handful of them to misbehave (not clean up) at sqlite3_close_v2()-time.
stephan [Sun, 14 Sep 2025 12:14:42 +0000 (12:14 +0000)]
Expose the new sqlite3_set_errmsg() to wasm. Refactor JS's sqlite3__wasm_db_error() to wrap that instead of the WASM-specific routine which previously did that job. This resolves the TODO added in [ead8a3a94e].
Add --enable-dbstat and --enable-dbpage options to configure. Fix the
".dbtotxt" command in the CLI so that it uses the correct filename of
the database it is rendering as text.
Enhance the integerValue() routine in the CLI so that when its text input
specifies an out-of-range integer, the routine returns the nearest integer
that is representable as 64-bit twos-complement.
Fix a harmless compiler warning in the CLI. Gcc generates identical
machine code before and after this change.
[forum:/forumpost/8bda0d896f|Forum post 8bda0d896f].
stephan [Thu, 11 Sep 2025 10:08:19 +0000 (10:08 +0000)]
In mkautoconfamal.sh use $MAKE if it's set so that it can be made to work on platforms where 'make' from the PATH is not usable, e.g. HP-UX's standard make. This means that 'make snapshot-tarball' will inherit that value from the outer makefile and set it appropriate when the in-use make is named gmake.
Do not allow the local_getline() function in the CLI to allocate more
memory than can be counted using a 32-bit integer, thus limiting the
length of an input line to about one gigabyte.
[forum:/forumpost/c83b9affa2|Forum post c83b9affa2].
Add the ability to compile with -DOS_VXWORKS=1 on Linux systems, in an
effort to debug the VxWorks capabilities without actually having to
run VxWorks.
stephan [Fri, 5 Sep 2025 12:14:22 +0000 (12:14 +0000)]
Build portability fixes for HP-UX, reported in [forum:d80ecdaddd885149 | forum post d80ecdaddd8]. The full fix also requires a patch to autosetup/cc-shared.tcl, but that's pending because it's upstream code.
Use Pgno instead of int for the pgno field in the DbpageCursor object.
The same machine code is generated, but using an unsigned value seems
safer in the long run.
[forum:/forumpost/ccec20a858|Forum post ccec20a858].
stephan [Mon, 1 Sep 2025 00:32:43 +0000 (00:32 +0000)]
Fix a line-wrap change made in [50234bc9e9fe58da] which broke the docsrc build by splitting a link reference across two lines, which the doc processor does not like. Problem reported in [forum:ea1fe5f421549899 | forum post ea1fe5f4215].
stephan [Thu, 28 Aug 2025 15:04:52 +0000 (15:04 +0000)]
Remove sqlite3expert.h from the compiler invocation for that tool, as it (A) doesn't need to be there and (B) it causes some compilers problems (as reported in [forum:a1085109e7db4cf3 | forum post a1085109e7]). This bug was faithfully carried over from the legacy build.
dan [Mon, 25 Aug 2025 14:27:31 +0000 (14:27 +0000)]
Check that certain ON clauses do not refer to tables to their right as a separate step after parsing a SELECT statement, instead of as part of the planner stage. For for [forum:ccfb3b5052 | forum post ccfb3b5052].
drh [Fri, 22 Aug 2025 19:17:44 +0000 (19:17 +0000)]
Remember if a SELECT statement contains an ON clause. If it does, then after
name resolution, scan the WHERE clause to verify that the ON clause does not
reference tables to its right.
drh [Fri, 22 Aug 2025 18:19:26 +0000 (18:19 +0000)]
Enhance treeview so that it shows the contents of ON clauses while
they are still attached to the SrcItem object and before they are
moved into the WHERE clause.
stephan [Thu, 21 Aug 2025 17:59:28 +0000 (17:59 +0000)]
Add config as an alias for the reconfigure makefile target. Minor makefile doc tweaks. Random typo fixes in shell.c.in and tclsqlite.h pointed out by the misspell makefile target. No code changes.
dan [Wed, 20 Aug 2025 15:42:23 +0000 (15:42 +0000)]
Avoid returning SQLITE_ERROR_RETRY if collation sequences associated with the table's PK cannot be found when creating an index. Possible fix for [forum:aa61ab56ad | forum post aa61ab56ad].
dan [Wed, 20 Aug 2025 11:21:35 +0000 (11:21 +0000)]
Fix a problem with SQLITE_CHANGESET_CONFLICT conflicts caused by DELETE triggers within a call to sqlite3changset_apply_v2() with SQLITE_CHANGESETAPPLY_IGNORENOOP specified.
stephan [Wed, 20 Aug 2025 09:43:15 +0000 (09:43 +0000)]
In builds without HAVE_FCHMOD (e.g. WASI), make the chmod() of temp files a no-op, analog to how lack of HAVE_FCHOWN is handled, as discussed in [forum:98d5158d3fdd7a41 | forum post 98d5158d3f].
dan [Tue, 19 Aug 2025 21:35:23 +0000 (21:35 +0000)]
Fix a problem causing an SQLITE_CHANGESET_DATA conflict of a DELETE operation to be incorrectly ignored if the SQLITE_CHANGESETAPPLY_IGNORENOOP is specified.