]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
9 months agoFix a problem building testfixture on non SQLITE_OS_WIN platforms. win-unc-fix
dan [Tue, 12 Aug 2025 18:57:02 +0000 (18:57 +0000)] 
Fix a problem building testfixture on non SQLITE_OS_WIN platforms.

FossilOrigin-Name: 9e6fa73467892eb2333c0a94ca38b66b7cc0432326de93ff131ecde4c165114e

9 months agoOn windows, when opening a UNC path, fall back to using a single file handle shared...
dan [Tue, 12 Aug 2025 17:55:34 +0000 (17:55 +0000)] 
On windows, when opening a UNC path, fall back to using a single file handle shared between all connections for locking.

FossilOrigin-Name: 5c0202d96c3a20a2cbcd38eba5e62371606894a0cbc2da4f60e10a1b5fa7bd04

9 months agoReplace some 32-bit arithmetic in fts3_write.c with 64-bit to avoid the possibility...
dan [Mon, 11 Aug 2025 10:54:39 +0000 (10:54 +0000)] 
Replace some 32-bit arithmetic in fts3_write.c with 64-bit to avoid the possibility of integer overflow.

FossilOrigin-Name: 6711110b1c7589311f012deee4d4dd5b771fa44ad328b471c9ef583960795199

9 months agoAdd an explicit call to sqlite3_initialize() to sqlite3_rsync so that it works when...
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].

FossilOrigin-Name: 8c9db6237154d1c153916ed821f576f91b353bf988182127d2a619506707d6bd

9 months agoSkip checking for dlopen() on mingw builds and those which include "windows" in their...
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().

FossilOrigin-Name: 69b87d4fa8089ef6101e976131dfd5c47dbc3d8c01a7e7d90a444b7a4794f78b

9 months agoDo not allow the number of terms in an ORDER BY or GROUP BY clause to
drh [Wed, 6 Aug 2025 19:12:10 +0000 (19:12 +0000)] 
Do not allow the number of terms in an ORDER BY or GROUP BY clause to
exceed the maximum number of columns in a table.

FossilOrigin-Name: 139e587c7b349e771d67a8b4ee02ab3ad5d5712d4ff4713dad63cb765bdee248

9 months agoFix Windows makefile breakage caused by [ae9d7c9c922bb241].
drh [Wed, 6 Aug 2025 19:05:39 +0000 (19:05 +0000)] 
Fix Windows makefile breakage caused by [ae9d7c9c922bb241].

FossilOrigin-Name: c41324139d6a75b0d37aeec2b0572c63207dd0b06e6a99e4fb221be564e73024

9 months agoAdd *.obj to the make clean target for the sake of the Unix-on-Windows environments.
stephan [Wed, 6 Aug 2025 16:51:12 +0000 (16:51 +0000)] 
Add *.obj to the make clean target for the sake of the Unix-on-Windows environments.

FossilOrigin-Name: da07e0c02fe7de7b67f2564c29f49f251ae2374c0e269d246bd13e68a9a73328

9 months agoExtend the sqlite3_rsync PATH to include /opt/local/bin, per request in [forum:ca3c1b...
stephan [Wed, 6 Aug 2025 15:57:44 +0000 (15:57 +0000)] 
Extend the sqlite3_rsync PATH to include /opt/local/bin, per request in [forum:ca3c1bb7ca8e03 | forum post ca3c1bb7ca8e03].

FossilOrigin-Name: 79a14a5ebd0e8a0aa7f7bb180fcaa348a3ecd046662e3ee05a34f2c9a7db3dd6

9 months agoMinor bug fixes in the script added by the previous check-in
drh [Wed, 6 Aug 2025 12:47:58 +0000 (12:47 +0000)] 
Minor bug fixes in the script added by the previous check-in

FossilOrigin-Name: 2e1a2db3f92b0bd484d979b422fe28e86732121594d190b76dbf46f5d7533643

9 months agoAdd a script to build ARM64EC binaries on Windows11 for ARM64.
drh [Wed, 6 Aug 2025 12:43:06 +0000 (12:43 +0000)] 
Add a script to build ARM64EC binaries on Windows11 for ARM64.

FossilOrigin-Name: 2d5b74b84a9c778183a11070623e89b553ba9cde905b779dbf115ea95aa0ca9b

9 months agoFix a possible printf() of a NULL string in fuzzcheck. (Passing a NULL to
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].

FossilOrigin-Name: 4ec69baf4f2a75585b92388cbc352836116381dce3f2d44a3b0f7d3360a17cf0

9 months agoRemove the <i>experimental</i> lsm1 extension from trunk, in as much as
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.

FossilOrigin-Name: ae9d7c9c922bb241363aa690b42b9664c4ad6e76ed5ce474daf1ab44461bc6a3

9 months agoAdd bounds checking and error messages and improved comments
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]

FossilOrigin-Name: 6bb717acf706e6ffd4671660ca78237e6a42863f344518e6d21065bf735f971e

9 months agoImproved defenses against corrupt ZIP archives in the zipfile extension.
drh [Tue, 5 Aug 2025 01:53:03 +0000 (01:53 +0000)] 
Improved defenses against corrupt ZIP archives in the zipfile extension.

FossilOrigin-Name: 642e89191deaf75db236102248c662aeef65bcd3dcbdfea694256583556be75f

9 months agoBack out a recently added NEVER().
drh [Tue, 5 Aug 2025 00:16:40 +0000 (00:16 +0000)] 
Back out a recently added NEVER().

FossilOrigin-Name: 4fcdd5bdb061d550b4a35594eb16c9a1699c76caf1d906f1781b4f9cb29ac80c

9 months agoFix a bug in the fuzzcheck.c test program introduced by [1cccea0508f5c8b8].
drh [Mon, 4 Aug 2025 23:37:48 +0000 (23:37 +0000)] 
Fix a bug in the fuzzcheck.c test program introduced by [1cccea0508f5c8b8].

FossilOrigin-Name: 90b217e11c988785d19b8efbba435250c120837492f430cf16d6d4524dd55136

9 months agoWhen doing an indexed row-value comparison using an IN operator where the
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].

FossilOrigin-Name: 8800c13deca3717c8a9bed42ef5f09752e4ca8a31adfb4ab0545e0e2b5684bd0

9 months agoAdd an assert() to verify that IN_INDEX_NOOP is not used for vector operations.
dan [Mon, 4 Aug 2025 20:48:37 +0000 (20:48 +0000)] 
Add an assert() to verify that IN_INDEX_NOOP is not used for vector operations.

FossilOrigin-Name: 49c587c6d204841a3d26f183812913ebd585006259040fdf7ba68346cc75580a

9 months agoRemove the "experimental" mark the snapshot interfaces.
drh [Mon, 4 Aug 2025 19:35:20 +0000 (19:35 +0000)] 
Remove the "experimental" mark the snapshot interfaces.

FossilOrigin-Name: 015dc43f628a6f5054152b05b20eb03b6a1153231f824c910a4416792af05272

9 months agoFix harmless compiler warnings arising from [1cccea0508f5c8b8].
drh [Mon, 4 Aug 2025 11:50:41 +0000 (11:50 +0000)] 
Fix harmless compiler warnings arising from [1cccea0508f5c8b8].

FossilOrigin-Name: d682557464a6069a93f890bb0aa983cea020ccde8261335ceeab19b9b6423863

9 months agoMinor doc typo fix in sqliteLimit.h.
stephan [Mon, 4 Aug 2025 11:20:31 +0000 (11:20 +0000)] 
Minor doc typo fix in sqliteLimit.h.

FossilOrigin-Name: 8bb315ef7429a60899f5afe878a3b1aa146b18eef2ac9f4d6eca98587a2255cd

9 months agoAdd a note to sqlite3_deserialize() that a schema name of NULL implies the main db...
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].

FossilOrigin-Name: 50234bc9e9fe58daf820ed5a1355f1d173728b5d33a7534244f1acff974baa30

9 months agoTag a condition in os_unix.c as unreachable.
drh [Sat, 2 Aug 2025 17:37:59 +0000 (17:37 +0000)] 
Tag a condition in os_unix.c as unreachable.

FossilOrigin-Name: 151844ad5451295104f18f4823d2fdaf041f22bc09099f1fa3f90898aafa7ea5

9 months agoFiddle: move the About button into the main toolbar. Extend the About text with some...
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.

FossilOrigin-Name: da524d6c61330fb004dade810c5ad84bb6d37625786c1d0fd473593f2448d904

9 months agoFiddle: make the toolbar visible in terminal mode and hide non-terminal-mode options...
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.

FossilOrigin-Name: 711bf423d213a2c468c32a48c0b09927cdfdffce36e5e4a3b35a32bfa055ff82

9 months agoFiddle: move the About button into the header bar and get it working together with...
stephan [Sat, 2 Aug 2025 13:21:07 +0000 (13:21 +0000)] 
Fiddle: move the About button into the header bar and get it working together with the optional jquery.terminal console mode.

FossilOrigin-Name: 9639382c5478115df7c1584c14a52c176fe747df73078419be4ab276374a704b

9 months agoFiddle: add an about/info/help view and a button to toggle it. Change the color schem...
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.

FossilOrigin-Name: 27d1d0100c0cb6e5c0c576be0f99209bb905f302008d8c257039adf8c5402f7d

9 months agoEnsure that stack space allocated for a flexible array has the correct
drh [Thu, 31 Jul 2025 12:25:23 +0000 (12:25 +0000)] 
Ensure that stack space allocated for a flexible array has the correct
alignment.  Fix to [d4307a0d43f42e96] to for some compilers
(DeveloperStudio) and platforms (Sparc).

FossilOrigin-Name: 1cccea0508f5c8b8ff751f407873713adc33f8642dcb6cdd495fd2d72ebcbdd3

9 months agoGeneric JS doc touchups. No functional changes.
stephan [Thu, 31 Jul 2025 09:54:09 +0000 (09:54 +0000)] 
Generic JS doc touchups. No functional changes.

FossilOrigin-Name: cc5f126ea4fa4a1abf183c95d151a7e9bd151b90c5c581d3be56db23bbe05a19

9 months agoOn MacOS, when increasing the size of files on FAT filesystems from 0 to
drh [Thu, 31 Jul 2025 09:45:20 +0000 (09:45 +0000)] 
On MacOS, when increasing the size of files on FAT filesystems from 0 to
1 byte in order to preserve their inode numbers, be sure to fsync() the file.

FossilOrigin-Name: 727efa8559852012cf3381baf5fcb1da198ff27d8856ce7b813920b99367dee5

9 months agoMinor doc and consistency improvements to [cf7163f82ca380958].
stephan [Thu, 31 Jul 2025 07:44:18 +0000 (07:44 +0000)] 
Minor doc and consistency improvements to [cf7163f82ca380958].

FossilOrigin-Name: 690a7273226df361f3eaa90f9b693ba554ed9d9456c19c5d3a12e812eca49eab

9 months agoBack out [e283d817e3a9] because further testing has proven it unnecessary. solaris-alignment
stephan [Wed, 30 Jul 2025 21:39:27 +0000 (21:39 +0000)] 
Back out [e283d817e3a9] because further testing has proven it unnecessary.

FossilOrigin-Name: 7318a00de64ec89c2a08d86e9f50c694894c4b59b07ff52b0d1f9f0ab8c4df44

9 months agoMove the flexarray union members from [527bbc1676a85a9] to the end of their respectiv...
stephan [Wed, 30 Jul 2025 21:34:47 +0000 (21:34 +0000)] 
Move the flexarray union members from [527bbc1676a85a9] to the end of their respective objects.

FossilOrigin-Name: 3082e07926695863bd5ef51c3c4803fbe267dc0d9b6ac9a717c225459f8988ba

9 months agoApply alignment-related patches suggested in [forum:41cd226375cd49c6 | forum post...
stephan [Wed, 30 Jul 2025 19:48:12 +0000 (19:48 +0000)] 
Apply alignment-related patches suggested in [forum:41cd226375cd49c6 | forum post 41cd226375].

FossilOrigin-Name: 527bbc1676a85a927352cd10a292afe041a72692ec0b1360e5a1ccaa19a32fcb

9 months agoDefault pointer size for the __SUNPRO_C compiler is 4 bytes.
drh [Wed, 30 Jul 2025 18:23:33 +0000 (18:23 +0000)] 
Default pointer size for the __SUNPRO_C compiler is 4 bytes.

FossilOrigin-Name: e283d817e3a93a3cd42c7b79e08e5fb61cb4fa4734137b92f1748dbbe8b8b919

9 months agoJS: ensure that sqlite3WorkerPromiser.v2.defaultConfig initially refers to sqlite3Wor...
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.

FossilOrigin-Name: cf7163f82ca380958a79350473b2c5a2cebda7496d6d575fa2835c362010fea1

9 months agoAdjust the previous check-in to replace the db's WASM address with yet another random...
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.

FossilOrigin-Name: f5e2a72c57e802c5042ab8343e5009ba9f22ca7138a1c78f4b8201ab9b4fd395

9 months agoJS: add a random element when assigning db IDs to Worker1 db instances. This addresse...
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.

FossilOrigin-Name: 6d2a43075fda9c4eae28f9ca4aaf459c41d305c861947a47fb2cbd513249c4b9

9 months agoEnhance the printf formatter for %#f such that the minus sign is omitted
drh [Wed, 30 Jul 2025 13:37:49 +0000 (13:37 +0000)] 
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".

FossilOrigin-Name: 09e1d7c7b4615262dd03adf1be201122f3cb8909ad381d67f51c812f07e25719

9 months agoFix SQLITE_OMIT_WAL builds on windows.
dan [Tue, 29 Jul 2025 11:04:32 +0000 (11:04 +0000)] 
Fix SQLITE_OMIT_WAL builds on windows.

FossilOrigin-Name: 575271c3ae53c64784a2aa1e9b7c6cdcb0402022967155dd176a6b1f1e560b50

9 months agoAdd new extended error codes to SQLITE_ERROR and SQLITE_IOERR, for use
drh [Sat, 26 Jul 2025 12:51:18 +0000 (12:51 +0000)] 
Add new extended error codes to SQLITE_ERROR and SQLITE_IOERR, for use
by extensions.

FossilOrigin-Name: 02b241bc4ce72d50a8d7621a663e759443b532a5ff9354fc3266ad6bb9433ed4

9 months agoDo not apply the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] if
drh [Wed, 23 Jul 2025 12:48:16 +0000 (12:48 +0000)] 
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].

FossilOrigin-Name: 314c493f273a34dff7b9f954e7553bc540bbcf5b913f779ef9ce0b9ba11acf7a

9 months agoFix a potentially uninitialized field in the WhereLoop object that is used
drh [Tue, 22 Jul 2025 15:51:41 +0000 (15:51 +0000)] 
Fix a potentially uninitialized field in the WhereLoop object that is used
as part of the skip-ahead-distinct optimization.  This fixes various
[forum:/timeline?ymd=20250722&u=yxchen&vfx|recent forum reports from yxchen].

FossilOrigin-Name: c10f9970c6a3ffacaef0f0728fc7ff11011686835dc78ca43035c0493e0af319

9 months agoApply [ebb346c5aa]'s change to sqlite3.1, as reported in [forum:bf92f78344 | forum...
stephan [Mon, 21 Jul 2025 18:00:44 +0000 (18:00 +0000)] 
Apply [ebb346c5aa]'s change to sqlite3.1, as reported in [forum:bf92f78344 | forum post bf92f78344].

FossilOrigin-Name: 477211be60cd873d078293f0dd767506c069c3dd83bc1759ae7258d4d3dff359

9 months agoEnsure that certain local files are not inadvertently carried over into the snapshot...
stephan [Sun, 20 Jul 2025 18:29:35 +0000 (18:29 +0000)] 
Ensure that certain local files are not inadvertently carried over into the snapshot tarball and causing confusing build results.

FossilOrigin-Name: 47fdf7ed2cad7ec56118cf4f77297b1178cd2104a21b19d4afad46437a944378

9 months agoTeach autoconf/tea/configure to be able to run from the canonical source tree so...
stephan [Sun, 20 Jul 2025 18:05:45 +0000 (18:05 +0000)] 
Teach autoconf/tea/configure to be able to run from the canonical source tree so that a snapshot build or appropriate symlinks are not necessary in order to test the extension.

FossilOrigin-Name: 71b9365b848d9b2bc75336ebbec815eba3a7ed5168798759753a990a1b706fc8

9 months agoFactor out the unusual encoding-change case from vdbeCompareMemString() for
drh [Sat, 19 Jul 2025 20:10:07 +0000 (20:10 +0000)] 
Factor out the unusual encoding-change case from vdbeCompareMemString() for
a performance improvement in the common case, and a small size reduction.

FossilOrigin-Name: cbd46ab8a8b4622f42dd9f87f28b812c1d6fa5ea73a4e8f1253514455f397783

9 months agoSmall performance optimization in sqlite3VdbeRecordUnpack().
drh [Sat, 19 Jul 2025 19:54:44 +0000 (19:54 +0000)] 
Small performance optimization in sqlite3VdbeRecordUnpack().

FossilOrigin-Name: eae168def2ff11f57f730f8a3bd86748b0943077e37b2709c10de0aecff664ec

9 months agoSplit the (internal) sqlite3VdbeCheckFk() routine into two variants,
drh [Sat, 19 Jul 2025 18:46:03 +0000 (18:46 +0000)] 
Split the (internal) sqlite3VdbeCheckFk() routine into two variants,
sqlite3VdbeCheckFkImmediate() and sqlite3VdbeCheckFkDeferred(), which
run faster than the combined general-purpose variant.

FossilOrigin-Name: 872b1b52ed93ef85911c2ef87b15673f9e102aef564f208e0a916af62671df93

9 months agoUse fewer CPU cycles to commit a read transaction.
drh [Sat, 19 Jul 2025 18:17:06 +0000 (18:17 +0000)] 
Use fewer CPU cycles to commit a read transaction.

FossilOrigin-Name: 861e55656abb208b4f1f2c8808c76c0454427af85a8930ab53f9c053605f39c7

10 months agoAdd SQLITE_SELFORDER1 to JS's sqlite3.capi namespace. It's only useful when built...
stephan [Fri, 18 Jul 2025 22:18:41 +0000 (22:18 +0000)] 
Add SQLITE_SELFORDER1 to JS's sqlite3.capi namespace. It's only useful when built with an sqlite3.c which itself was created with -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES, which the canonical build does not do but custom builds may.

FossilOrigin-Name: fdd15e938ccfac9e871d781d1c8fe8be6dbd9e8cbbcb8b7f0b035e5ceebb8746

10 months agoFix a minor comment inaccuracy.
drh [Fri, 18 Jul 2025 19:17:32 +0000 (19:17 +0000)] 
Fix a minor comment inaccuracy.

FossilOrigin-Name: b66fcb61a1d044fa18419ab382a8b159e9b6bb52956917d8a9de4dccf8dc9a87

10 months agoIncrease the precision of the "real time" output from the ".timer" command
drh [Fri, 18 Jul 2025 17:40:34 +0000 (17:40 +0000)] 
Increase the precision of the "real time" output from the ".timer" command
in the CLI from milliseconds to microseconds.

FossilOrigin-Name: c5dbe93114d318fea431859e388af74aeb4cb854c514c9910590441c990321f3

10 months agoEnsure that the accumulator for an aggregate always gets initialized,
drh [Fri, 18 Jul 2025 12:10:15 +0000 (12:10 +0000)] 
Ensure that the accumulator for an aggregate always gets initialized,
even when the aggregate is on the right side of a LEFT JOIN and never
gets evaluated.  This fixes a problem introduced by [663f5dd32d9db832]
and found by dbsqlfuzz.  Test cases in TH3.

FossilOrigin-Name: 235cf6586b9ac914a32bd8adfd460daae998687f02f0998a7aa3c6bfc857d1c9

10 months agoPedantic internal build doc fix.
stephan [Thu, 17 Jul 2025 19:18:01 +0000 (19:18 +0000)] 
Pedantic internal build doc fix.

FossilOrigin-Name: 9ef429a8507745e0a6fae4f0ec1dc2b142dad1357f9a7ff576e7834c8ff5c6fe

10 months agoDiverse wasm build cleanups.
stephan [Wed, 16 Jul 2025 20:50:40 +0000 (20:50 +0000)] 
Diverse wasm build cleanups.

FossilOrigin-Name: 14ca18f72a7edde7c65a6c6b23fdc3f5ed6860371795926045c987f7b2c75e1b

10 months agoFix vtabH.test so that it works on windows even if there are files that begin with...
dan [Wed, 16 Jul 2025 17:24:31 +0000 (17:24 +0000)] 
Fix vtabH.test so that it works on windows even if there are files that begin with "$" in the root directory.

FossilOrigin-Name: 19a79219a7d52272102ff09d19e6b9b87e88e0070592fd7e6040bd8ce66ad238

10 months agoRemove some stray makefile debug output.
stephan [Wed, 16 Jul 2025 16:56:33 +0000 (16:56 +0000)] 
Remove some stray makefile debug output.

FossilOrigin-Name: 7ef22c3d11088210d2267375ec188bd352b067614200394b9877f2e40dc12bb2

10 months agoIn the wasm makefiles, replace X:=Y with X=Y because := has different semantics depen...
stephan [Wed, 16 Jul 2025 14:51:23 +0000 (14:51 +0000)] 
In the wasm makefiles, replace X:=Y with X=Y because := has different semantics depending on the make impl and its use is arguably a bad muscle-memory habit worth breaking. These makefiles are very specifically for GNU make, but long-term it would be nice to eliminate that requirement.

FossilOrigin-Name: d4203311a2f39189ed8f30d519468aed8983af7772a5b247e7557d3e1936064e

10 months agowasm: remove some extraneous levels of makefile var and fix the (unsupported) wasmfs...
stephan [Wed, 16 Jul 2025 13:22:38 +0000 (13:22 +0000)] 
wasm: remove some extraneous levels of makefile var and fix the (unsupported) wasmfs speedtest1 build to account for var renaming which happened long before this.

FossilOrigin-Name: 35b2315343e22ca12c6ee3f5be8741eba889bb6461e08fad0a8ae7db033319cb

10 months agoRemove an unnecessary step from the wasm builds and account for a recent Emscripten...
stephan [Wed, 16 Jul 2025 11:56:16 +0000 (11:56 +0000)] 
Remove an unnecessary step from the wasm builds and account for a recent Emscripten-internal code-generation change which caused a post-build cleanup step to not actually clean up (harmless, but adds about 26k of useless stuff to the resulting JS).

FossilOrigin-Name: a8ed16989dcd324bd9caa09aec7979249deaf59ca13bc377379ddd83c53379cd

10 months agoFurther internal wasm build cleanups. No functional changes.
stephan [Wed, 16 Jul 2025 11:09:18 +0000 (11:09 +0000)] 
Further internal wasm build cleanups. No functional changes.

FossilOrigin-Name: 8364d89c3bc1d1dbd95b4324a41bd655251ebd2da5b9f1b9f9aceba9c3d26d3d

10 months agoInternal refactoring of the WASM build makefile rule generator, working towards paral...
stephan [Wed, 16 Jul 2025 10:34:14 +0000 (10:34 +0000)] 
Internal refactoring of the WASM build makefile rule generator, working towards parallelizing the various build modes (which is not currently possible because most modes share the same sqlite3.wasm output file name).

FossilOrigin-Name: 1062b61e9c949d76791ed7974cf6c38d1cec9797a930e9ad7ca851130f5e9a48

10 months agoTeach the sqlite3 CLI shell to look in XDG_STATE_HOME for the CLI history file before...
stephan [Wed, 16 Jul 2025 09:27:55 +0000 (09:27 +0000)] 
Teach the sqlite3 CLI shell to look in XDG_STATE_HOME for the CLI history file before falling back to its historical location in the user's home directory.

FossilOrigin-Name: 1e663374c3fcc20ab0b3250aa1ff9d5e5ac391c89808ad589aa30c8882d4b61e

10 months agoSquelch a legitimate but harmless 'discards const' warning. shell-xdg-vars
stephan [Wed, 16 Jul 2025 09:20:02 +0000 (09:20 +0000)] 
Squelch a legitimate but harmless 'discards const' warning.

FossilOrigin-Name: 73539fe0932494234b8f2293b0dbc1f0aac60a7d00fdaf4a59c2da654ce26f5b

10 months agoAvoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses...
dan [Tue, 15 Jul 2025 19:00:01 +0000 (19:00 +0000)] 
Avoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses attached to left joins from being evaluated too early. Fix for [forum:/forumpost/428ef7c468 | forum post 428ef7c468].

FossilOrigin-Name: 9f184f8dfa5ef6d57e10376adc30e0060ceda07d283c23dfdfe3dbdd6608f839

10 months agoAdd test case to between.test. vtab-leftjoin-fix
dan [Tue, 15 Jul 2025 18:51:46 +0000 (18:51 +0000)] 
Add test case to between.test.

FossilOrigin-Name: ffebbb7ae977adc6c729d30b51f2ff29d416e018d82e450d87ccd973472819c8

10 months agoOptimize allocation of large tombstone arrays in fts5.
dan [Tue, 15 Jul 2025 14:06:15 +0000 (14:06 +0000)] 
Optimize allocation of large tombstone arrays in fts5.

FossilOrigin-Name: 0fcc3cbdfa21adf97aed01fa76991cccf9380e2755b0182a9e2c94e3c8fb38d7

10 months agoAdd the snapshot-zip makefile targets for both Windows and Posix.
drh [Mon, 14 Jul 2025 18:27:32 +0000 (18:27 +0000)] 
Add the snapshot-zip makefile targets for both Windows and Posix.

FossilOrigin-Name: 8c73c0c5935431556f687556bfdb459754609f07c6366c810a55bf7583ee303d

10 months agoEnhance the "mktoolzip.tcl" script (used by the "tool-zip" makefile target) so that
drh [Mon, 14 Jul 2025 16:05:59 +0000 (16:05 +0000)] 
Enhance the "mktoolzip.tcl" script (used by the "tool-zip" makefile target) so that
it uses "fossil test-filezip" to build the ZIP archive if available, and so that
it also generates windows-dll-*.zip on Windows platforms.

FossilOrigin-Name: 63ddc215eb6106985c53d3c8d99f5445a92acf4359a6bb2681882c49583df871

10 months agoIn rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag...
dan [Mon, 14 Jul 2025 15:40:25 +0000 (15:40 +0000)] 
In rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag is cleared. Fix for [forum:/forumpost/3e45ed31d8 | forum post 3e45ed31d8].

FossilOrigin-Name: 3c0afda372cd688e9aff7be1c0a41f557c8c8819f5f47420166ce8255cd806c8

10 months agoIn rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag... rtree-aux-column-fix
dan [Mon, 14 Jul 2025 15:34:11 +0000 (15:34 +0000)] 
In rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag is cleared. Possible fix for [forum:/forumpost/3e45ed31d8 | forum post 3e45ed31d8].

FossilOrigin-Name: 1740f9a09850f6647fc1f6384353d89a1ac0b2b15c429b576b6014eada71937e

10 months agoAdd new sessions function sqlite3changeset_apply_v3() and its streaming equivalent...
dan [Mon, 14 Jul 2025 14:51:43 +0000 (14:51 +0000)] 
Add new sessions function sqlite3changeset_apply_v3() and its streaming equivalent. This allows changesets to be filtered on a per-change basis, not just per-table.

FossilOrigin-Name: 10ebd7a119ef1985755ef143a941fbaed1b5ca1c8a71e011c8bbc70e383fd337

10 months agoFix harmless compiler warnings in builds that use SQLITE_OMIT_DATETIME_FUNCS.
drh [Mon, 14 Jul 2025 09:41:59 +0000 (09:41 +0000)] 
Fix harmless compiler warnings in builds that use SQLITE_OMIT_DATETIME_FUNCS.

FossilOrigin-Name: e11fbf9fd630a7de2e0b0e4b67dded05b905b2a0ba04aa7e915ca9df2d9ebe21

10 months agoAvoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses...
dan [Sat, 12 Jul 2025 18:14:41 +0000 (18:14 +0000)] 
Avoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses attached to left joins from being evaluated too early. Possible fix for [forum:/forumpost/428ef7c468 | forum post 428ef7c468].

FossilOrigin-Name: 18ba07c152294a96d510a7851a0860f982ff1e0725afeebed9a343f550f6925a

10 months agowasm: introduce the sqlite3.oo1.DB.wrapHandle() and Stmt.wrapHandle() APIs, which...
stephan [Fri, 11 Jul 2025 19:52:36 +0000 (19:52 +0000)] 
wasm: introduce the sqlite3.oo1.DB.wrapHandle() and Stmt.wrapHandle() APIs, which enable clients to wrap (sqlite3*) resp. (sqlite3_stmt*) pointers in their oo1 API counterparts, optionally with or without taking over ownership of the pointer.

FossilOrigin-Name: e5d079549594ca44852773b8919894866394e47ad725dadc7f65242413a219d3

10 months agoClearer docs for the unowned db/stmt handle mechanism. oo1-unowned-handles
stephan [Fri, 11 Jul 2025 19:44:42 +0000 (19:44 +0000)] 
Clearer docs for the unowned db/stmt handle mechanism.

FossilOrigin-Name: 53401b5435e30c4b47b6e203976b714d616246d734b5876a34f53f6388f872f8

10 months agoCorrect a one-too-many-exclamation-points bug which caused the opposite of intended...
stephan [Fri, 11 Jul 2025 19:34:30 +0000 (19:34 +0000)] 
Correct a one-too-many-exclamation-points bug which caused the opposite of intended semantics in oo1.Stmt.pointer ownership.

FossilOrigin-Name: 91e709f36d36174534b4cf4ff548a558e66cca5e23a6c8c106bc43375fc3ce72

10 months agoAdditional header comment documentation in the ext/misc/vtablog.c test extension.
drh [Fri, 11 Jul 2025 17:02:11 +0000 (17:02 +0000)] 
Additional header comment documentation in the ext/misc/vtablog.c test extension.

FossilOrigin-Name: 3656acfaa3011321a6e17fb81e5bdedcfffeab6035f133ab89ae9589bf5bef72

10 months agospeedtest1: in WASM builds, disable the "app" test set by default because that one...
stephan [Fri, 11 Jul 2025 11:06:25 +0000 (11:06 +0000)] 
speedtest1: in WASM builds, disable the "app" test set by default because that one set is triggering file-not-found errors for the db file for reasons not yet understood.

FossilOrigin-Name: 9d68971c58261bce72b49c574cf07ad31add62bee814c58840b927fed7eb87b1

10 months agoDo not export the numerous Emscripten HEAPxy symbols and remove the last remaining...
stephan [Fri, 11 Jul 2025 10:27:06 +0000 (10:27 +0000)] 
Do not export the numerous Emscripten HEAPxy symbols and remove the last remaining JS code which references them. They have long-since been replaced by internal equivalents and a specific feature check on one of them (which is also no longer needed) is triggering an exception from Emscripten. More details are in [https://github.com/emscripten-core/emscripten/issues/24656 | Emscripten ticket #24656], noting that this is not an Emscripten bug but an Emscripten behavior change brought it to light.

FossilOrigin-Name: b9462dc1461c830466f4e1de4a4d3bf249e3f81aea363f13462ea915769878d9

10 months agoImprove the accuracy of the ETC on both devtest and releasetest.
drh [Thu, 10 Jul 2025 20:45:00 +0000 (20:45 +0000)] 
Improve the accuracy of the ETC on both devtest and releasetest.

FossilOrigin-Name: a3f96cafdc0e1f2eeccc6509f1f9c26d2c48668953550f299cf2805a0a063014

10 months agoAdd the estkey column to the jobs table of testrunner.db. The plan is to
drh [Thu, 10 Jul 2025 17:19:08 +0000 (17:19 +0000)] 
Add the estkey column to the jobs table of testrunner.db.  The plan is to
use this to collect measurements that will help generate improved ETAs for
a test run.

FossilOrigin-Name: 9eccf5267c6423c9dd4da1d61b62bbb6fbba44fb8089da79f89c84e8b77ff0f0

10 months agoMinor internal doc correction in vdbeInt.h.
stephan [Thu, 10 Jul 2025 09:27:57 +0000 (09:27 +0000)] 
Minor internal doc correction in vdbeInt.h.

FossilOrigin-Name: c3a2ef639c22255a298cbccb7fd871ec9b24929f82bf95d6982b12daf5c963d6

10 months agoMinor JS doc tweaks.
stephan [Thu, 10 Jul 2025 09:25:57 +0000 (09:25 +0000)] 
Minor JS doc tweaks.

FossilOrigin-Name: 34d893b4837be8bb679e9809befd98201dd79c8d2054f41429b18793b77e840f

10 months agoFix the empty-table optimization on INTERSECT so that it does not try to
drh [Wed, 9 Jul 2025 20:11:49 +0000 (20:11 +0000)] 
Fix the empty-table optimization on INTERSECT so that it does not try to
use an uninitialized register for LIMIT processing.

FossilOrigin-Name: 6918ada008507b4564ca0dc5f4f6818c49a42eb14a16285b2074e21dcc8f2c3f

10 months agowasm: DB.wrapHandle() no longer accepts a DB object as its first argument, as there...
stephan [Wed, 9 Jul 2025 13:43:53 +0000 (13:43 +0000)] 
wasm: DB.wrapHandle() no longer accepts a DB object as its first argument, as there's no apparent use case for proxying one DB object with another. Doc improvements for the new code.

FossilOrigin-Name: 0ee19db02a9b9320681d4393d9ba52889d149eac8ee114fc7b7f52a57271c139

10 months agowasm: add a few tests demonstrating that oo1.Stmt.paramaterCount's new impl does...
stephan [Wed, 9 Jul 2025 13:13:01 +0000 (13:13 +0000)] 
wasm: add a few tests demonstrating that oo1.Stmt.paramaterCount's new impl does not change visible behaviors. Add the c-pp-filtered files to 'make clean'.

FossilOrigin-Name: 3fe61545967f82190011edb90b1be6a448b590555c7ba5f8e96494aeea8f88ce

10 months agoFix a possible user-after free following OOM in the EXISTS-to-JOIN
drh [Tue, 8 Jul 2025 22:11:39 +0000 (22:11 +0000)] 
Fix a possible user-after free following OOM in the EXISTS-to-JOIN
optimization.

FossilOrigin-Name: 498ee8d514e64cdc93a8d68e1971b6326c6132daf25067936bec921c42494caa

10 months agoAdjustments to test/incrblob4.test so that it works on both Linux and Mac
drh [Tue, 8 Jul 2025 20:28:35 +0000 (20:28 +0000)] 
Adjustments to test/incrblob4.test so that it works on both Linux and Mac
in spite of error message differences between those platforms.  Minor change
to termIsEquivalent() to provide 100% MC/DC.

FossilOrigin-Name: 720387f8604f7cd997f1850ed62ce6ab32608155d7f02a89c695041caafc4067

10 months agoNew optimizations to detect early when queries return no rows due to
drh [Tue, 8 Jul 2025 19:53:36 +0000 (19:53 +0000)] 
New optimizations to detect early when queries return no rows due to
tables being empty.  This includes the EXISTS-to-JOIN optimization that
tries to transform EXISTS constraints into additional terms of the FROM
clause.

FossilOrigin-Name: e33da6d5dc964db817d1bc63c9083aecd93d49ee14d5198600b47eaf7c5b9331

10 months agoFix a problem with the fix in [5cb8e342e1].
dan [Tue, 8 Jul 2025 19:02:26 +0000 (19:02 +0000)] 
Fix a problem with the fix in [5cb8e342e1].

FossilOrigin-Name: 043ff54fb746c54bc6cfa6aa8c8a32c876c09d36163125916ad01024b98d447b

10 months agoFix another problem with running fts5 integrity-check in SQLITE_DEBUG builds, this...
dan [Tue, 8 Jul 2025 18:44:56 +0000 (18:44 +0000)] 
Fix another problem with running fts5 integrity-check in SQLITE_DEBUG builds, this one causing an assert() failure.

FossilOrigin-Name: 5cb8e342e1d33a0fd04fd022900eeada46a2ee23f15c6abca1b37633e77429d6

10 months agoEnable the EXISTS-to-JOIN optimization if the outer query has no empty-table-optimizations
drh [Tue, 8 Jul 2025 17:28:09 +0000 (17:28 +0000)] 
Enable the EXISTS-to-JOIN optimization if the outer query has no
FROM clause.

FossilOrigin-Name: 1b9b124f9a35ebd1ac4ea70ef1ee08a4c82c11da690d4164f6b785a6fd9730d9

10 months agoIf SQLITE_DEBUG is defined, fts5 does extra checks as part of integrity-check. Ensure...
dan [Tue, 8 Jul 2025 14:54:20 +0000 (14:54 +0000)] 
If SQLITE_DEBUG is defined, fts5 does extra checks as part of integrity-check. Ensure that errors from these extra checks are only reported if the other, normal, tests all pass. This fixes a test case in fts5corrupt3.test that was failing if SQLITE_DEBUG was defined.

FossilOrigin-Name: 98a53fb276fa1fa733da2dd3255c35ce9f6af9b9feef6e76fb577b6d142167a2

10 months agoFix test case results in FTS5 that were changed error message improvements
drh [Tue, 8 Jul 2025 12:37:25 +0000 (12:37 +0000)] 
Fix test case results in FTS5 that were changed error message improvements
in [48044a6b57c0a16c] but which were omitted from that check-in.

FossilOrigin-Name: e1f8e0240b14f1338e947634e840af785e5042a09cd365975e922a13a562f4cd

10 months agoOnly run preupdate-hook tests in incrblob4.test if the preupdate-hook is enabled...
dan [Mon, 7 Jul 2025 20:47:23 +0000 (20:47 +0000)] 
Only run preupdate-hook tests in incrblob4.test if the preupdate-hook is enabled in the build.

FossilOrigin-Name: 56314b6b53c86ae131f780e20b62bdeabccba6d62dda41becc1c4b2e87cee07b

10 months agoSmall performance optimization in the resolver.
drh [Mon, 7 Jul 2025 19:03:50 +0000 (19:03 +0000)] 
Small performance optimization in the resolver.

FossilOrigin-Name: 840646df0696706bd4dd7a04dfc8b16ad80c24cbcbc57a22c9e65a93cc17af2b

10 months agoMerge the latest trunk enhancements and fixes into the empty-table-optimizations...
drh [Mon, 7 Jul 2025 18:35:51 +0000 (18:35 +0000)] 
Merge the latest trunk  enhancements and fixes into the empty-table-optimizations branch.

FossilOrigin-Name: f15cdf07573c05276a13885d74bae21a93544766344f19ef939b7a69edd1073b