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.
drh [Mon, 11 Aug 2025 13:17:10 +0000 (13:17 +0000)]
The off-by-one fix at [3e627d66ebdef8df] is insufficient. An index
can hold twice as many columns as a table, if the table is a WITHOUT ROWID
table. The limit should be twice the maximum, not just one more than the
maximum. Problem discovered by OSSFuzz.
stephan [Thu, 7 Aug 2025 20:20:22 +0000 (20:20 +0000)]
Add an explicit call to sqlite3_initialize() to sqlite3_rsync so that it works when built with SQLITE_OMIT_AUTOINIT, as suggested in [forum:c4ec6b33097b8536 | forum post c4ec6b33097b8536].
stephan [Wed, 6 Aug 2025 19:16:16 +0000 (19:16 +0000)]
Skip checking for dlopen() on mingw builds and those which include "windows" in their host tuple, as suggested in [forum:2436c8ffed | forum post 2436c8ffed]. Those environments identify as Windows for SQLite's purposes so use LoadLibrary().
drh [Tue, 5 Aug 2025 23:01:31 +0000 (23:01 +0000)]
Fix a possible printf() of a NULL string in fuzzcheck. (Passing a NULL to
"%s" in SQLite's internal printf() prints the text
"NULL", but it apparently segfaults glibc. Whatever.)
[forum:/forumpost/e07d56579b|Forum post e07d56579b].
drh [Tue, 5 Aug 2025 12:01:43 +0000 (12:01 +0000)]
Remove the <i>experimental</i> lsm1 extension from trunk, in as much as
readers were thinking that this was a supported extension and were reporting
bugs against it.
drh [Tue, 5 Aug 2025 10:54:56 +0000 (10:54 +0000)]
Add bounds checking and error messages and improved comments
to the (unused) zorder extension function.
[forum:/forumpost/e3f1ede174|Forum post e3f1ede174]
drh [Mon, 4 Aug 2025 23:05:35 +0000 (23:05 +0000)]
When doing an indexed row-value comparison using an IN operator where the
order of the columns in the row-value need to be rearranged in order to match
the index, be sure to make affinity conversions before the rearranging of
columns so that the correct affinity is applied. Fix for the bug
reported by [forum:/forumpost/eab63506cf|forum post eab63506cf]. This
problem goes back almost nine years to [ddb5f0558c445699].
stephan [Sun, 3 Aug 2025 08:56:16 +0000 (08:56 +0000)]
Add a note to sqlite3_deserialize() that a schema name of NULL implies the main db, a former shortcoming pointed out in [forum:0543d8aa8e|forum post 0543d8aa8e].
stephan [Sat, 2 Aug 2025 15:04:50 +0000 (15:04 +0000)]
Fiddle: move the About button into the main toolbar. Extend the About text with some info which only shows up (or is only hidden) when terminal mode is available.
stephan [Sat, 2 Aug 2025 14:50:01 +0000 (14:50 +0000)]
Fiddle: make the toolbar visible in terminal mode and hide non-terminal-mode options when in terminal mode. Move the terminal/split-view toggle button into the toolbar. Improve the view-switching handling.
stephan [Sat, 2 Aug 2025 12:06:37 +0000 (12:06 +0000)]
Fiddle: add an about/info/help view and a button to toggle it. Change the color schema to a more conventional black/white. Force imported databases out of WAL mode, which doesn't work in fiddle.
Ensure that stack space allocated for a flexible array has the correct
alignment. Fix to [d4307a0d43f42e96] to for some compilers
(DeveloperStudio) and platforms (Sparc).
stephan [Wed, 30 Jul 2025 16:17:14 +0000 (16:17 +0000)]
JS: ensure that sqlite3WorkerPromiser.v2.defaultConfig initially refers to sqlite3WorkerPromiser.defaultConfig. This fixes a longstanding oversight rather than a known in-the-wild problem.
stephan [Wed, 30 Jul 2025 15:02:32 +0000 (15:02 +0000)]
Adjust the previous check-in to replace the db's WASM address with yet another random number, and increase the range of random numbers, reducing the chance of cross-worker db ID collision to 1 in many billions.
stephan [Wed, 30 Jul 2025 14:50:44 +0000 (14:50 +0000)]
JS: add a random element when assigning db IDs to Worker1 db instances. This addresses [https://github.com/sqlite/sqlite-wasm/issues/113 | the npm project's ticket #113], which demonstrates that two independent workers can end up generating non-globally-unique IDs. That's not a bug, per se, but it makes the IDs useless for client-side mapping of db connection IDs to client-side state, so we add some randomness to them.
Enhance the printf formatter for %#f such that the minus sign is omitted
if the '+' is missing and all digits shown in the rendering are zero.
Thus, for example, '%#.2f' renders -0.004 as "0.00" instead of "-0.00".
Do not apply the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] if
the subquery contains a LIMIT clause.
[forum:/forumpost/2025-07-23T10:59:14z|forum post 2025-07-23T10:59:14z].