]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
3 hours agoThe sqlite3_prepare() and similar interfaces should not return master
drh [Wed, 20 Aug 2025 23:29:59 +0000 (23:29 +0000)] 
The sqlite3_prepare() and similar interfaces should not return
SQLITE_ERROR_RETRY.
[forum:/forumpost/aa61ab56adb56159|Forum post aa61ab56].

FossilOrigin-Name: 4e473cf0c21dd78d457f5728086372464e82de95c5431a2587efd580f5076291

4 hours agoAdd an assert() to prove that sqlite3_prepare() does not return create-index-error-retry-fix
drh [Wed, 20 Aug 2025 23:13:49 +0000 (23:13 +0000)] 
Add an assert() to prove that sqlite3_prepare() does not return
SQLITE_ERROR_RETRY.

FossilOrigin-Name: 6c6a8a596f5d578cc7d35c577608492c0314cdb84ed67b9f068d90fb0b42f4de

6 hours agoChange a newly unreachable branch into an ALWAYS().
drh [Wed, 20 Aug 2025 21:12:40 +0000 (21:12 +0000)] 
Change a newly unreachable branch into an ALWAYS().

FossilOrigin-Name: 99556be3fd99e6b7c520b0ae2090f59c6f58375750f9d571f9f586bce0a21504

11 hours agoAvoid returning SQLITE_ERROR_RETRY if collation sequences associated with the table...
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].

FossilOrigin-Name: ac649e5b9ca9b8f7729defa8d646df8c0cb57977a5eedcfa2cf1147d109a17f1

15 hours agoFix a problem with SQLITE_CHANGESET_CONFLICT conflicts caused by DELETE triggers...
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.

FossilOrigin-Name: 138e2aab43ac07aaf8c5389105ff6d3e107ff2d35badcb48233664fcb9661471

17 hours agoIn builds without HAVE_FCHMOD (e.g. WASI), make the chmod() of temp files a no-op...
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].

FossilOrigin-Name: 7d13e8e403ba00d37b950caa359d74452319247495284d252efa6473bad15b64

29 hours agoFix a problem causing an SQLITE_CHANGESET_DATA conflict of a DELETE operation to...
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.

FossilOrigin-Name: 78b543f85ac6643f3b69bf1250c6362f00e030f93f460ef7d04902682ef64ee9

4 days agoAdd a doc sentence about sqlite3_set_clientdata()'s result value, per request in...
stephan [Sat, 16 Aug 2025 10:17:04 +0000 (10:17 +0000)] 
Add a doc sentence about sqlite3_set_clientdata()'s result value, per request in [forum:bda6c22b6a | forum post bda6c22b6a]. No code changes.

FossilOrigin-Name: c664cee321fc449283ecfc073c45057c078299be33dc0c170b156d81a6698b55

6 days agoAvoid depending on HAVE_STDINT_H and SQLITE_PTRSIZE and other things in non-amalgamat...
dan [Thu, 14 Aug 2025 19:36:59 +0000 (19:36 +0000)] 
Avoid depending on HAVE_STDINT_H and SQLITE_PTRSIZE and other things in non-amalgamation builds of fts5.

FossilOrigin-Name: 309fdd496673bf58984fb16aef3d4cc2ad8c9f6dad7687509f4d708fed5ba41b

7 days agoMinor internal cleanups in the configure script. No behavioral changes.
stephan [Wed, 13 Aug 2025 19:59:37 +0000 (19:59 +0000)] 
Minor internal cleanups in the configure script. No behavioral changes.

FossilOrigin-Name: c42269e5ce3688fccee16cf35e1101f36afc3ccc19bef57b177d46c84db2435a

7 days agoHave cksumvfs write checksums to the database file only, not the wal file. Writing...
dan [Wed, 13 Aug 2025 19:13:16 +0000 (19:13 +0000)] 
Have cksumvfs write checksums to the database file only, not the wal file. Writing them to the wal file breaks wal file recovery.

FossilOrigin-Name: e3bd1feccaee8ff2f68b7b863769dd739e8a434fd32fed73deeeec885628311c

7 days agoIn cksumvfs, do not write checksums to the wal file, as this prevents recovery from... cksumvfs-wal-fix
dan [Wed, 13 Aug 2025 18:37:41 +0000 (18:37 +0000)] 
In cksumvfs, do not write checksums to the wal file, as this prevents recovery from working.

FossilOrigin-Name: 5bf48c7e31904f1f7048499c630801846df89f262b32ea1e49fb6e039eaad11a

7 days agoMinor autosetup/README.md tweaks.
stephan [Wed, 13 Aug 2025 18:30:42 +0000 (18:30 +0000)] 
Minor autosetup/README.md tweaks.

FossilOrigin-Name: bd7530bf6afdad391b223651632e1b4d59ab5ec806c7a94daadc7f09091321f4

7 days agoMove the forced NDEBUG in fts3Int.h up above the #include of assert.h, as reported...
stephan [Wed, 13 Aug 2025 17:58:47 +0000 (17:58 +0000)] 
Move the forced NDEBUG in fts3Int.h up above the #include of assert.h, as reported in [forum:8f16dd9480aad85f | forum post 8f16dd9480aad85f].

FossilOrigin-Name: 3b06d1c9b6c03f38029a8b98fef6253647878c0f8b05447ec0c8122f189c90dc

7 days agoDoc updates in the configure script. No functional changes.
stephan [Wed, 13 Aug 2025 16:49:55 +0000 (16:49 +0000)] 
Doc updates in the configure script. No functional changes.

FossilOrigin-Name: 47c4a2ddd1966aa8564e105fc1f2ba3c9c1668b44d4979424f65148d7976064c

7 days agoFix a problem with the checksum-vfs and direct-overflow-reads. Forum post [forum...
dan [Wed, 13 Aug 2025 14:40:24 +0000 (14:40 +0000)] 
Fix a problem with the checksum-vfs and direct-overflow-reads. Forum post [forum:350e147cd1 | 350e147cd1].

FossilOrigin-Name: 7b7ce5f17fd63932a050b917b4356c23eec6040d1c4f51136393d7c6e3d40a63

7 days agoFix a problem with the checksum-vfs and direct-overflow-reads. cksum-direct-ovfl-fix
dan [Wed, 13 Aug 2025 14:35:14 +0000 (14:35 +0000)] 
Fix a problem with the checksum-vfs and direct-overflow-reads.

FossilOrigin-Name: 8288edb9f930206f117823cf1d18af632dc6adbd7c4c3b9bcfc252e1a5e5b9cd

7 days agoDoc cleanups in main.mk. No functional changes.
stephan [Wed, 13 Aug 2025 11:46:05 +0000 (11:46 +0000)] 
Doc cleanups in main.mk. No functional changes.

FossilOrigin-Name: 839c998443880161af06b9f7470ebfc828251c3c1accdae5f0fbbcc13408474c

8 days agoFix a problem with reading wal mode databases from UNC shares on windows introduced...
dan [Tue, 12 Aug 2025 19:02:48 +0000 (19:02 +0000)] 
Fix a problem with reading wal mode databases from UNC shares on windows introduced by [e88212b10a7829ff].

FossilOrigin-Name: f341e7812984b41acd7dd2dd795a1716a8826af4326578dcdf7d7fdd55124ceb

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

8 days 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 days agoThe off-by-one fix at [3e627d66ebdef8df] is insufficient. An index
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.

FossilOrigin-Name: a836126bbec5c14432ed7fc7e9e6f8ebcd5dd1116d3ac8a9a0d25c8f62cc51fe

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

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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

2 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

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

FossilOrigin-Name: 14ca18f72a7edde7c65a6c6b23fdc3f5ed6860371795926045c987f7b2c75e1b

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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