]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
7 days agoUpdate build instructions for Windows to explain how to link against
drh [Thu, 11 Dec 2025 18:16:39 +0000 (18:16 +0000)] 
Update build instructions for Windows to explain how to link against
ZLIB.

FossilOrigin-Name: e785a80e4100c368dca8d73cb662cff4d0fd76734fa0f3fa9b5754a380f7c746

7 days agoAdjust the MSVC Makefile so that when it invokes the zlib makefile, it
drh [Thu, 11 Dec 2025 17:49:17 +0000 (17:49 +0000)] 
Adjust the MSVC Makefile so that when it invokes the zlib makefile, it
changes CFLAGS to use the correct -M compiler option to match SQLite.

FossilOrigin-Name: ba003c7c74fb4dd665a8ec6dea7d030f1e7e9cbb13e60bb728860ebffdff5aaf

7 days agoFix calls to sqlite3_wal_checkpoint_v2(SQLITE_CHECKPOINT_NOOP) so that they do not...
dan [Thu, 11 Dec 2025 11:05:26 +0000 (11:05 +0000)] 
Fix calls to sqlite3_wal_checkpoint_v2(SQLITE_CHECKPOINT_NOOP) so that they do not return SQLITE_MISUSE.

FossilOrigin-Name: 117f4093f08e0abbde2041f70898220e237e250664f6ede6d4eb2a8a44050466

8 days agoUse macros for the default values for QRF limits in the CLI, rather than
drh [Wed, 10 Dec 2025 19:43:06 +0000 (19:43 +0000)] 
Use macros for the default values for QRF limits in the CLI, rather than
hard-coded magic numbers.

FossilOrigin-Name: 4ef66da15bfe69d940cfbeff2be2b7e13da156495b349b453d68e70f4dcca36a

8 days agoVarious improvements to the .mode command of the CLI, and especially to how
drh [Wed, 10 Dec 2025 19:04:49 +0000 (19:04 +0000)] 
Various improvements to the .mode command of the CLI, and especially to how
it handles the --limits option.

FossilOrigin-Name: f883b854976d2aa679c87edce3b577f38b5fa518f707706320d1ddb38365e2dd

8 days agoIn fiddle, remove the default .dot-commands it runs, as they do not reflect current...
stephan [Wed, 10 Dec 2025 16:20:44 +0000 (16:20 +0000)] 
In fiddle, remove the default .dot-commands it runs, as they do not reflect current shell defaults.

FossilOrigin-Name: 27b6aeda5d70e3480b1448b06277a19395b30a205f3f3bac5ce0e4102e3849ed

8 days agoAdd the --titlelimit option to CLI, defaulting to 20. In "line" mode of
drh [Wed, 10 Dec 2025 16:10:26 +0000 (16:10 +0000)] 
Add the --titlelimit option to CLI, defaulting to 20.  In "line" mode of
the CLI, the default seperator is changed from " = " to ": ".  This can be
overridden using the --colsep option.

FossilOrigin-Name: 291677ebb3e5c2fe00e4340d8d3661fde6bd18494f1d4e56da1efcf613ab21b6

8 days agoDo not show the --titlelimit setting in ".mode" setting output unless -v title-limit
drh [Wed, 10 Dec 2025 15:55:44 +0000 (15:55 +0000)] 
Do not show the --titlelimit setting in ".mode" setting output unless -v
is used or unless the current style is tabular or line.

FossilOrigin-Name: a9b0a3ce043fc910465d676c72bcf44c2ff6fbc1b0a832106cd2d3f97c7fb16a

8 days agoTest cases and documentation tweaks.
drh [Wed, 10 Dec 2025 15:50:23 +0000 (15:50 +0000)] 
Test cases and documentation tweaks.

FossilOrigin-Name: cc9e47a205883aedf24b5e85e8e0499567f514780e3e6ec58069a39ea6270133

8 days agoAdd the nTitleLimit option to QRF. Also change "line" style so that it
drh [Wed, 10 Dec 2025 15:24:46 +0000 (15:24 +0000)] 
Add the nTitleLimit option to QRF.  Also change "line" style so that it
uses zColumnSep as the divider between the title and the value.

FossilOrigin-Name: d67a299c86ff80ed67857d2546b0edaf852cb23dbfbc15e24793d1c4860a2e50

9 days agoIn fts5, avoid holding an open blob handle after an INSERT/UPDATE/DELETE statement...
dan [Tue, 9 Dec 2025 13:41:01 +0000 (13:41 +0000)] 
In fts5, avoid holding an open blob handle after an INSERT/UPDATE/DELETE statement, as this can interfere with sqlite3_interrupt(). Forum post [forum:/forumpost/95413eb410 | 95413eb410].

FossilOrigin-Name: f88e1d03573f394fc7caf60704c96152717b3fe8be4eef0caeb64737054f0fd2

10 days agoUpdate the added-in-version stamp to some kvvfs JS APIs.
stephan [Mon, 8 Dec 2025 13:11:17 +0000 (13:11 +0000)] 
Update the added-in-version stamp to some kvvfs JS APIs.

FossilOrigin-Name: 939275c6c574a3354e0626164aab1a005998f811c53a66b078249d6b2fcbd68e

10 days agoIntroducing kvvfs v2 for the JS bindings. Summary: no longer hard-coded to session...
stephan [Mon, 8 Dec 2025 13:06:27 +0000 (13:06 +0000)] 
Introducing kvvfs v2 for the JS bindings. Summary: no longer hard-coded to session/localStorage, available outside of the main UI thread (non-persistently), a simpler-to-use import/export API, and adds an asynchronous event interface intended for creating page-by-page db backups.

FossilOrigin-Name: ec866b04d088e53b09764d00f5403902785328fd8f3cbf80d3affa166477711d

10 days agoReplace some double-quotes with single quotes an SQL doc snippet in the csv example... kvvfs-v2
stephan [Mon, 8 Dec 2025 12:24:23 +0000 (12:24 +0000)] 
Replace some double-quotes with single quotes an SQL doc snippet in the csv example virtual table.

FossilOrigin-Name: 1781e5e8d0cd2b508f7992987257416bd48841ea7e30bc9294784a7c1a402be7

11 days agoMinor tweaks to the QRF documentation. No changes to code.
drh [Sun, 7 Dec 2025 18:19:22 +0000 (18:19 +0000)] 
Minor tweaks to the QRF documentation.  No changes to code.

FossilOrigin-Name: b2517d01e65b34ea4ca52c9149d7b255a36a45a50b332cb8ccfdacf22e629be2

12 days agoDo not return too many bytes from the zipfile extension given a malformed
drh [Sat, 6 Dec 2025 23:58:09 +0000 (23:58 +0000)] 
Do not return too many bytes from the zipfile extension given a malformed
ZIP file.

FossilOrigin-Name: 9766b47beb9ec72f55bfe9fa6e4dadf1829848389388aa30e97094a325de17fa

12 days agoIn the zipfile extension, only return as many bytes as Inflate actually zipfile-fix
drh [Sat, 6 Dec 2025 20:41:24 +0000 (20:41 +0000)] 
In the zipfile extension, only return as many bytes as Inflate actually
generated.  [forum:/forumpost/761eac3c82|Forum post 761eac3c82].
Adjust ./configure so that it builds zipfile into testfixture if ZLIB
is available, so that tests get run on unix platforms.

FossilOrigin-Name: 3d459f1fb1bd1b5e723629c463ab392af7b206ece3388bda216c6a4c26160909

12 days agoRemove #ifdefs intended to make SQLite compatible with Windows RT. WinRT
drh [Sat, 6 Dec 2025 19:56:40 +0000 (19:56 +0000)] 
Remove #ifdefs intended to make SQLite compatible with Windows RT.  WinRT
was short-lived and has been discontinued for a long time.

FossilOrigin-Name: 108691a3cb2f296f0ede06c34271ee185f299bfd76e97a1bd06c730a28d94ff4

12 days agoFix a harmless compiler warning inside an assert() in FTS3.
drh [Sat, 6 Dec 2025 18:40:14 +0000 (18:40 +0000)] 
Fix a harmless compiler warning inside an assert() in FTS3.

FossilOrigin-Name: 005e176b4e5b3a28865b08c23d6ecd2c76c036b9c6b2075e6d7bfc584d3c433e

12 days agoFox the "box" format, use rounded corners and use a double-line to separate
drh [Sat, 6 Dec 2025 11:54:43 +0000 (11:54 +0000)] 
Fox the "box" format, use rounded corners and use a double-line to separate
the header from the content.  Add the "-quote relaxed" text rendering mode
and make it the default for TTYs.

FossilOrigin-Name: b3da6a8728641a0c9ca2f3b20c9817c0a2be6c5bf05f020590547480d2aff0e0

12 days agoFix typos and harmless compiler warnings. Omit the use of ctypes.h in QRF. qrf-box-enhancements
drh [Sat, 6 Dec 2025 11:50:36 +0000 (11:50 +0000)] 
Fix typos and harmless compiler warnings.  Omit the use of ctypes.h in QRF.

FossilOrigin-Name: 4f7edadbdeeb4baee2e4a4703def6e258ce00f54684343b73380e7c69165892e

12 days agoNew test cases to cover the "--quote relaxed" feature.
drh [Sat, 6 Dec 2025 11:35:30 +0000 (11:35 +0000)] 
New test cases to cover the "--quote relaxed" feature.

FossilOrigin-Name: d00d9556edc198d49cf9aa2f14e46bb5b1021ef0622aee1fa4ae585ed9a13a98

12 days agoUpdate test cases to work with the new box format and with --quote relaxed.
drh [Sat, 6 Dec 2025 11:02:14 +0000 (11:02 +0000)] 
Update test cases to work with the new box format and with --quote relaxed.

FossilOrigin-Name: e3f442d08f455e0aa260cc8db4922a5f611e17afe71b0bb251328ab4b3ad46ca

12 days agoNew text rendering style of QRF_TEXT_Relaxed.
drh [Sat, 6 Dec 2025 10:07:15 +0000 (10:07 +0000)] 
New text rendering style of QRF_TEXT_Relaxed.

FossilOrigin-Name: d2049bffe6674b8840663b0e5f404a040b715640c87f022517cf11546548fda3

13 days agoWhen drawing boxes using QRF, use rounded corners and use a double-line to
drh [Fri, 5 Dec 2025 22:04:49 +0000 (22:04 +0000)] 
When drawing boxes using QRF, use rounded corners and use a double-line to
separate column headers from the content.

FossilOrigin-Name: 8c1ca30707c36f074dad29556df4176a74aa573491bb4aad973789aee5ad80da

13 days agoIn the Windows Makefile.msc, never set -DNDEBUG. And add the "env" target
drh [Fri, 5 Dec 2025 19:45:43 +0000 (19:45 +0000)] 
In the Windows Makefile.msc, never set -DNDEBUG.  And add the "env" target
which prints out the value of all 127 configuration variables that
Makefile.msc uses.

FossilOrigin-Name: f82376f080ca5cb316b8eb2e48a128b1838eb376b9e903c7af611b398cfe9b1f

13 days agoFix a memory leak in the fileio extension on windows.
dan [Fri, 5 Dec 2025 19:23:20 +0000 (19:23 +0000)] 
Fix a memory leak in the fileio extension on windows.

FossilOrigin-Name: 19e5ae6e20a1e2f41c5bc77b7bb99211b22d6fabf21e5f2f7f82028615eb791e

13 days agoOmit obsolete features (Ex: Windows Phone support) from the Windows
drh [Fri, 5 Dec 2025 16:06:34 +0000 (16:06 +0000)] 
Omit obsolete features (Ex: Windows Phone support) from the Windows
Makefile.msc.  More of this kind of thing is pending...

FossilOrigin-Name: c320c5585833e5e6460c61f88ba4d784613c4317b1e50eae0d58d8ce002c5732

13 days agoMinor adjustment to the zipfile.test script so that it works on Windows.
drh [Fri, 5 Dec 2025 15:09:42 +0000 (15:09 +0000)] 
Minor adjustment to the zipfile.test script so that it works on Windows.

FossilOrigin-Name: 7bb633df97678b98515e603c5154ffc5b54055cff187d74a2c5d010e5b3720d1

13 days agoEnhance the unixIsSharingShmNode() code (check-in [6385a1962c69c69c])
drh [Fri, 5 Dec 2025 12:22:23 +0000 (12:22 +0000)] 
Enhance the unixIsSharingShmNode() code (check-in [6385a1962c69c69c])
so that it more understandable by humans, and so that it does not trigger
false positive deadlock warnings in TSAN.

FossilOrigin-Name: aa0a28776bbeafb71b2db20ac8c16377ba07b7d3d58e46cfd11f60c694759a90

2 weeks agoAnother fix to [e33da6d5dc964db8]: Ensure that the EXISTS-to-JOIN break
drh [Fri, 5 Dec 2025 01:33:23 +0000 (01:33 +0000)] 
Another fix to [e33da6d5dc964db8]: Ensure that the EXISTS-to-JOIN break
happens even if the inner loop is a "no-op" loop that never executes more
than once because it is controlled by a UNIQUE index.  This resolves the
error reported in [forum:/forumpost/7992838ba2|forum post 7992838ba2].
Test cases are in TH3.

FossilOrigin-Name: bbded6477020af4d52253c5af2d33ec9b9cd619d33f744206f7420458bd84f12

2 weeks agoUpdate the autoconf Makefile.msc based on the Makefile.msc changes in the
drh [Fri, 5 Dec 2025 00:56:51 +0000 (00:56 +0000)] 
Update the autoconf Makefile.msc based on the Makefile.msc changes in the
previous check-in.

FossilOrigin-Name: 8dce36698949f2e3a9948afc7c2b6c06f575d12033148e8c55fa79c03a73e2b4

2 weeks agoAutomatically add the /NODEFAULTLIB:msvcrt flag to the Makefile.msc so that
drh [Thu, 4 Dec 2025 21:16:12 +0000 (21:16 +0000)] 
Automatically add the /NODEFAULTLIB:msvcrt flag to the Makefile.msc so that
Windows builds are able to link against zlib.lib by default.

FossilOrigin-Name: 0b75057d61ccd57fca19d49679f0ff99231595f619aa0c4310aa3180b8de08b7

2 weeks agoMake the shell_exec() routine in the CLI robust against NULL SQL text.
drh [Thu, 4 Dec 2025 20:22:36 +0000 (20:22 +0000)] 
Make the shell_exec() routine in the CLI robust against NULL SQL text.
Fix harmless compiler warnings in ext/misc/zipfile.c.

FossilOrigin-Name: 2ecba7dfd10c7d6a7a34b0ec01a387c9f1426c0504c8f20edc03e29bb9aa93c3

2 weeks agoLimit compile time value SQLITE_MAX_SQL_LENGTH to 1024 less than 2^31, or 2147482624...
dan [Thu, 4 Dec 2025 16:44:11 +0000 (16:44 +0000)] 
Limit compile time value SQLITE_MAX_SQL_LENGTH to 1024 less than 2^31, or 2147482624. This is to avoid having to deal with edge cases related to 32-bit integer overflow that can only occur in custom builds.

FossilOrigin-Name: d73364555d213e443d8400ed69b134006f4e2fe0054d74fe0828ff01effe5cd2

2 weeks agoEnable TEMP triggers to reference tables in the main schema.
drh [Thu, 4 Dec 2025 13:42:53 +0000 (13:42 +0000)] 
Enable TEMP triggers to reference tables in the main schema.

FossilOrigin-Name: 307a500aa6a1f3ac8b154d2e981bb30c90236be26a8c9a8f318d5982c62440dd

2 weeks agoMark an always-true conditional as such. temp-trigger-refs
drh [Thu, 4 Dec 2025 13:28:25 +0000 (13:28 +0000)] 
Mark an always-true conditional as such.

FossilOrigin-Name: 4f79434f5b52470291dcd09e31fdefba708d0243a2b60966536c6cb91451d203

2 weeks agoFix an error introduced by the previous check-in.
drh [Thu, 4 Dec 2025 13:08:59 +0000 (13:08 +0000)] 
Fix an error introduced by the previous check-in.

FossilOrigin-Name: 948e24ae3816d650be66bbe6b880bea74da643af37c4349e6cf2e207e6cf9b28

2 weeks agoPerformance optimization in the language grammar.
drh [Thu, 4 Dec 2025 11:59:11 +0000 (11:59 +0000)] 
Performance optimization in the language grammar.

FossilOrigin-Name: 1c1ad5e39cb379250f10db5ef61f42e0bd56ace308f8e41f9bf5e08d92075521

2 weeks agoMerge all the latest trunk enhancements and fixes into the temp-trigger-refs
drh [Thu, 4 Dec 2025 11:20:01 +0000 (11:20 +0000)] 
Merge all the latest trunk enhancements and fixes into the temp-trigger-refs
branch.

FossilOrigin-Name: 8e8a27c77aa0ea5891968231e13a8caeade48b817419bbf6eda18ad217f1df63

2 weeks agoFix an incorrect answer that might arise if a scalar query is both
drh [Thu, 4 Dec 2025 00:05:49 +0000 (00:05 +0000)] 
Fix an incorrect answer that might arise if a scalar query is both
DISTINCT and contains an OFFSET clause.
[forum:/forumpost/2025-12-03T09:25:59Z|Forum post 2025-12-03T09:25:59Z].

FossilOrigin-Name: aef5397569d65d2971367b0278fe3a6f42544cf771572e7d046e2472f052364d

2 weeks agoMore aggressive optimization of IS NULL and IS NOT NULL operators in
drh [Wed, 3 Dec 2025 21:31:53 +0000 (21:31 +0000)] 
More aggressive optimization of IS NULL and IS NOT NULL operators in
the parser.  New sqlite3ExprInt32() internal interface for creating
integer nodes in an expression tree.

FossilOrigin-Name: 560082d61f5b73ae68a86ce4d7e96d072d4f0996d82ec62d639847353bb8bf15

2 weeks agoMore aggressive optimization of IS NULL and IS NOT NULL operators. expr-opt
drh [Wed, 3 Dec 2025 18:18:29 +0000 (18:18 +0000)] 
More aggressive optimization of IS NULL and IS NOT NULL operators.

FossilOrigin-Name: c69eec9909af40e1e22d44a6859ef52378ebe06a587373f332f9d379cb39a84d

2 weeks agoCreate a new internal subroutine specifically designed to allocate
drh [Wed, 3 Dec 2025 16:54:48 +0000 (16:54 +0000)] 
Create a new internal subroutine specifically designed to allocate
Expr nodes that hold a 32-bit integer.

FossilOrigin-Name: 38d06f69e516dd13becbfb735a2a0035c2f3c50ea5d661a668b109a996656523

2 weeks agoFix a problem that could occur when a scalar subquery had both a DISTINCT and OFFSET... distinct-offset-subquery-fix
dan [Wed, 3 Dec 2025 14:39:25 +0000 (14:39 +0000)] 
Fix a problem that could occur when a scalar subquery had both a DISTINCT and OFFSET clause. First reported by [forum:41bd7af485 | forum post 41bd7af485].

FossilOrigin-Name: 496bbff910b73775b16c1ccb95dadf37416d3f3032722a1140f2a9134666d7f1

2 weeks agoClarification of comment text in expr.c. No changes to code.
drh [Wed, 3 Dec 2025 12:07:35 +0000 (12:07 +0000)] 
Clarification of comment text in expr.c.  No changes to code.

FossilOrigin-Name: afe5ee64f1cde4945c878220b029f2a22578c2bccda4fddc005c4e6a4718c6cd

2 weeks agoFix recently added test cases for Windows.
drh [Wed, 3 Dec 2025 02:48:36 +0000 (02:48 +0000)] 
Fix recently added test cases for Windows.

FossilOrigin-Name: bccc0d65b0fb617f6c8eb111b6717d3ad419f80d3495dc5c6a69ccd0771b3d9d

2 weeks agoImprovements to the ".schema indent" logic.
drh [Tue, 2 Dec 2025 19:55:39 +0000 (19:55 +0000)] 
Improvements to the ".schema indent" logic.
[forum:/forumpost/c8136b1bd0|Forum post 2025-12-02T19:04:04Z].

FossilOrigin-Name: 71ea7f38ffd0648c58713d8be5d2f5536f926ec21a0adc3c2a8a9a7ba8ea3826

2 weeks agoNew test cases for QRF
drh [Tue, 2 Dec 2025 18:37:49 +0000 (18:37 +0000)] 
New test cases for QRF

FossilOrigin-Name: e49c63e31888c6787ab13f736d58ff985a24c3f98b475e05c30e8b244afffb80

2 weeks agokvvfs: make the filename suffixes -wal and -shm illegal and teach xAccess() to silent...
stephan [Tue, 2 Dec 2025 18:28:22 +0000 (18:28 +0000)] 
kvvfs: make the filename suffixes -wal and -shm illegal and teach xAccess() to silently not fail for illegal names (else it breaks things when a -wal file is checked for).

FossilOrigin-Name: 2ea29c77a85236ca4126c05c7fd1d45a80dfe3f653af9b3ed86d6e62877ec5af

2 weeks agoGet kvvfs::xAccess() fleshed out.
stephan [Tue, 2 Dec 2025 18:10:53 +0000 (18:10 +0000)] 
Get kvvfs::xAccess() fleshed out.

FossilOrigin-Name: d947e9bed5affee3f6e54b0fe3e2b1a0ac3771865b93c06a4087318f26d87f7f

2 weeks agoConsolidate kvvfs's page size workaround into a central flag and add some logging...
stephan [Tue, 2 Dec 2025 16:29:28 +0000 (16:29 +0000)] 
Consolidate kvvfs's page size workaround into a central flag and add some logging to facilitate testing and debugging.

FossilOrigin-Name: 8d683130d2f2aaf6300a8c858802eb671e831ed520621af59c9e830e87a9d753

2 weeks agoAdd more logging to kvvfs to try to trace down why it cannot recover from a page...
stephan [Tue, 2 Dec 2025 15:47:32 +0000 (15:47 +0000)] 
Add more logging to kvvfs to try to trace down why it cannot recover from a page size change.

FossilOrigin-Name: 0bf0b8a98a2cc5128aa0e510ef2fe411a6859ce807d6159175f5eaf3bc14183b

2 weeks agoFix a harmless compiler warning in the previous check-in.
drh [Tue, 2 Dec 2025 15:01:29 +0000 (15:01 +0000)] 
Fix a harmless compiler warning in the previous check-in.

FossilOrigin-Name: 601c40a1d9e1bcd9c453210c275001543d1533af25b4ccf399d5ef4ea1328950

2 weeks agoFix a problem with ALTER TABLE DROP COLUMN commands where the column being dropped...
dan [Tue, 2 Dec 2025 14:43:59 +0000 (14:43 +0000)] 
Fix a problem with ALTER TABLE DROP COLUMN commands where the column being dropped is the rightmost in table and is immediately preceded by a comment containing a "," character.

FossilOrigin-Name: c872bd1ee7b219e055f40e43766e4ed6bc2d2ca8cb92577cd3560f4173b1f257

2 weeks agoAdd developer note on how to measure coverage of QRF.
drh [Tue, 2 Dec 2025 12:23:24 +0000 (12:23 +0000)] 
Add developer note on how to measure coverage of QRF.

FossilOrigin-Name: 0fdd453c03addb8f5c1e546f7513e3498bccd61266174ce99a61ceebf04e97cf

2 weeks agoBegrudingly allow sqlite3_js_kvvfs_clear() to work for opened storage only for the...
stephan [Mon, 1 Dec 2025 22:20:54 +0000 (22:20 +0000)] 
Begrudingly allow sqlite3_js_kvvfs_clear() to work for opened storage only for the local/session storage cases and only (one of the demo apps reminds me) for backwards compatiblity. Likewise, the JsStorageDb.clearStorage() inherited method is now deprecated because it requires an opened db (but continues to work for those two stores), whereas its 'static' method of the same name is unaffected. Rename kvvfs.size() to kvvfs.estimateSize().

FossilOrigin-Name: 09e9255828ed6a7ccbe18f701f4a88b859cfdbd1ddca7ac5dac09744542c25fa

2 weeks agoHarden a change to SqliteTestUtil.assert() in the previous checkin to handle a null...
stephan [Mon, 1 Dec 2025 21:14:11 +0000 (21:14 +0000)] 
Harden a change to SqliteTestUtil.assert() in the previous checkin to handle a null second argument.

FossilOrigin-Name: 9cbd5be803aba28916440cfa70c54588e7891d2073caebfa2b4dfcdd434b5c49

2 weeks agoMinor JS docs and cleanups. Add some #if'd-out kvvfs and oo1 pieces to experiment...
stephan [Mon, 1 Dec 2025 21:10:16 +0000 (21:10 +0000)] 
Minor JS docs and cleanups. Add some #if'd-out kvvfs and oo1 pieces to experiment with later.

FossilOrigin-Name: 3db29b00db8d75c6b6a909a46a5c71515d3407af27ff9cb79091f293e4005ce3

2 weeks agoFix a potential UAF in sqlite3.oo1.DB.exec()'s teardown pieces.
stephan [Mon, 1 Dec 2025 19:19:06 +0000 (19:19 +0000)] 
Fix a potential UAF in sqlite3.oo1.DB.exec()'s teardown pieces.

FossilOrigin-Name: 7e99e93cddeba555836206a278c5dcfd8565cc2a486a83cffab64dad168e9464

2 weeks agoFix a memory leak that could follow an OOM on this branch.
dan [Mon, 1 Dec 2025 18:11:08 +0000 (18:11 +0000)] 
Fix a memory leak that could follow an OOM on this branch.

FossilOrigin-Name: 3223fee0b93bbbe277b955a98c13bb583ded78109f8e601c9ec0a7bd3749fd55

2 weeks agoFix another crash on this branch that could follow an OOM.
dan [Mon, 1 Dec 2025 17:39:04 +0000 (17:39 +0000)] 
Fix another crash on this branch that could follow an OOM.

FossilOrigin-Name: 75c49267ec6b84c8aad0e264c34506e4b24f69475ae5def0ee7530ba3822c15d

2 weeks agoMerge latest trunk changes into this branch.
dan [Mon, 1 Dec 2025 17:22:35 +0000 (17:22 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: 230fd5533e07ec36f1938f34153c9ef97a7acd6604d023b56dfc5269ca6173c2

2 weeks agoFix a crash that could occur following a parse error on this branch.
dan [Mon, 1 Dec 2025 17:22:15 +0000 (17:22 +0000)] 
Fix a crash that could occur following a parse error on this branch.

FossilOrigin-Name: 951b4533509fae971e252be3ecd3623ac2bdce16220e0ce372e600f728f80f69

2 weeks agoRelax the name limits on kvvfs dbs.
stephan [Mon, 1 Dec 2025 16:28:55 +0000 (16:28 +0000)] 
Relax the name limits on kvvfs dbs.

FossilOrigin-Name: 9901cf8e4a00ea9a199a3fb54bd58bd66cff4d02c55433d55f2b417e188e49e0

2 weeks agoReformulate sqlite3-wasm.c's exports so that they export properly with the wask-sdk...
stephan [Mon, 1 Dec 2025 16:25:53 +0000 (16:25 +0000)] 
Reformulate sqlite3-wasm.c's exports so that they export properly with the wask-sdk compiler.

FossilOrigin-Name: d71849958aabdb05225be18d6bc46699cfda9de67c7105b11c3f79d1d01f47d4

2 weeks agoTeach kvvfs to handle a NULL db file name by generating a random name, and to honor...
stephan [Mon, 1 Dec 2025 15:49:31 +0000 (15:49 +0000)] 
Teach kvvfs to handle a NULL db file name by generating a random name, and to honor the SQLITE_OPEN_CREATE flag.

FossilOrigin-Name: 104291469169bef0c2ec5aee9c1cc505447541801bc822e6d5fe5360aef6a2e4

2 weeks agoDisallow the undocumented -recovery-db option on the ".recover" command
drh [Mon, 1 Dec 2025 11:07:31 +0000 (11:07 +0000)] 
Disallow the undocumented -recovery-db option on the ".recover" command
of the CLI when in --safe mode.

FossilOrigin-Name: 65202440874a7fea5aba262e8e78b97c833147d47837a99f301eca968f9a78b1

2 weeks agoTweaks to the wcwidth() algorithm in QRF, for better agreement with
drh [Sun, 30 Nov 2025 23:09:24 +0000 (23:09 +0000)] 
Tweaks to the wcwidth() algorithm in QRF, for better agreement with
the Terminal on Ubuntu.  There is no perfect solution, as different
ttys do things differently, but we should try to get as close as we
can.

FossilOrigin-Name: 35f39f7cb1030b1a57f2921f50ab600496fc1e774593717845e87f2e47dc49ba

2 weeks agoFix filtering of the 64-bit speedtest1 wasm test pages to again load the 64-bit wasm...
stephan [Sun, 30 Nov 2025 18:59:44 +0000 (18:59 +0000)] 
Fix filtering of the 64-bit speedtest1 wasm test pages to again load the 64-bit wasm files.

FossilOrigin-Name: f507a8af41228d4ca332ab27e842767016ca18adda92e27a1e02e78f12c9be79

2 weeks agokvvfs docs and 64-bit fixes.
stephan [Sun, 30 Nov 2025 18:43:59 +0000 (18:43 +0000)] 
kvvfs docs and 64-bit fixes.

FossilOrigin-Name: cf58e17fa2dc2e183a6ea1d41795c701efb303c9b378aa9b90953c9b568c621a

2 weeks agoImprovement implementation of the previous check-in: runs faster.
drh [Sun, 30 Nov 2025 17:47:27 +0000 (17:47 +0000)] 
Improvement implementation of the previous check-in: runs faster.

FossilOrigin-Name: 484d1fd2a240c8fd006e7794936d6678b8db792a8b2b30d2ae5baf5a1b19463a

2 weeks agoBlock injection of hyper-oversized SQL inputs into the parser.
drh [Sun, 30 Nov 2025 17:26:53 +0000 (17:26 +0000)] 
Block injection of hyper-oversized SQL inputs into the parser.

FossilOrigin-Name: 42b6dab92464833eeae5fb261ed689e4b632132d7c8e1ea920aeeb5d50091ab7

2 weeks agoOptimize out a kvvfs event notification call in the common case where there are no...
stephan [Sun, 30 Nov 2025 16:37:47 +0000 (16:37 +0000)] 
Optimize out a kvvfs event notification call in the common case where there are no listeners.

FossilOrigin-Name: 8405c19d32f1e8b7273953a038f8bdfd4ea1a6548300bac5421cdf6fc6840285

2 weeks agoMore tweaks to the README.md file.
drh [Sun, 30 Nov 2025 11:12:37 +0000 (11:12 +0000)] 
More tweaks to the README.md file.

FossilOrigin-Name: 1d79220ac9f6ad783dee48d341ebc9bb58f357b585baf1612b5aebbf8ad0cccb

2 weeks agoCorrect to the README.md file.
drh [Sun, 30 Nov 2025 10:49:09 +0000 (10:49 +0000)] 
Correct to the README.md file.

FossilOrigin-Name: 3cd3256c7c595f54c8c12fafd1fb60349db82f69eb54fd9896b24db46a8b00d0

2 weeks agoRename kvvfs's 'localThread' storage object to '.'. Swap kvvfs.listen()'s elideJourna...
stephan [Sun, 30 Nov 2025 08:32:52 +0000 (08:32 +0000)] 
Rename kvvfs's 'localThread' storage object to '.'. Swap kvvfs.listen()'s elideJournal(=false) option with includeJournal(=false) (i.e. opt in instead of opt out).

FossilOrigin-Name: 7f0eca9d0aeb49c86a785ae930d235902bbd0f15877cc8f6083daac8efb2d1c1

2 weeks agoDoc typo fix.
stephan [Sun, 30 Nov 2025 07:56:40 +0000 (07:56 +0000)] 
Doc typo fix.

FossilOrigin-Name: a2b53a71e9354260c7fd0ada093cebd56a20a04add12ff2a2d788c386bf8964f

2 weeks agoAdd sqlite3_db_handle() to the list of functions which are guaranteed to preserve...
stephan [Sun, 30 Nov 2025 07:25:59 +0000 (07:25 +0000)] 
Add sqlite3_db_handle() to the list of functions which are guaranteed to preserve the current error state, per request in [forum:8e79e8ddd5|forum post 8e79e8ddd5].

FossilOrigin-Name: 78bdc766330c35dbfa8b187854c48c3aff66a9d58796c9c20f3a5701e1ee4351

2 weeks agoAdd sync events to kvvfs.listen() so that streaming can maybe get a better sense...
stephan [Sun, 30 Nov 2025 07:08:45 +0000 (07:08 +0000)] 
Add sync events to kvvfs.listen() so that streaming can maybe get a better sense of when it's okay to process the stream.

FossilOrigin-Name: a4b6dadffa1b43aadebfa06a1de14d763efd18b16c4a3e87f1bd039fbff2524d

2 weeks agoMore work on the kvvfs events. Demonstrate re-importing a streamed-out set of db...
stephan [Sun, 30 Nov 2025 06:20:28 +0000 (06:20 +0000)] 
More work on the kvvfs events. Demonstrate re-importing a streamed-out set of db pages.

FossilOrigin-Name: b8fee839b0199d1d2714c99612ea4b4d943d8b0033d742eaa66e1575ce46f0d2

2 weeks agoGive kvvfs.unlisten() a useful result value.
stephan [Sun, 30 Nov 2025 05:25:44 +0000 (05:25 +0000)] 
Give kvvfs.unlisten() a useful result value.

FossilOrigin-Name: bbd08b67ceeaae2a3a82655da5a3983f4e9057424de4223f1505ba74c36238af

2 weeks agoExtend the kvvfs.listen() config to enable posting of raw binary db pages instead...
stephan [Sun, 30 Nov 2025 05:20:17 +0000 (05:20 +0000)] 
Extend the kvvfs.listen() config to enable posting of raw binary db pages instead of the kvvfs-encoding. This is much more expensive but was added to... Demonstrate basic async streaming of kvvfs db page-level changes via logging of kvvfs write/delete ops.

FossilOrigin-Name: 0f2bad285577c26f1185dcafd3b8ca2f16e74aa9dc40e6e23867150bccee4602

2 weeks agoExtend kvvfs export to optionally export the raw binary db pages as a list of Uint8Ar...
stephan [Sun, 30 Nov 2025 03:02:06 +0000 (03:02 +0000)] 
Extend kvvfs export to optionally export the raw binary db pages as a list of Uint8Array instead of kvvfs-encoded strings. This is typically much larger but the pages can then be used as-is.

FossilOrigin-Name: a4f59496a53a079f8f73e4cde68f47dbd13d2d74de2ad11bc716e7e5c00f1ec0

2 weeks agoAdd a comment explaining the new kvvfsDecode() return -1 from [cd81cb70525e].
stephan [Sat, 29 Nov 2025 23:41:34 +0000 (23:41 +0000)] 
Add a comment explaining the new kvvfsDecode() return -1 from [cd81cb70525e].

FossilOrigin-Name: ed9ab366d1c1880d3c06edce6c0c33ad30c7ae59725c1ec1fe3f620be1835630

2 weeks agoFix kvvfs event notification to notify _all_ listeners and optimize better for the...
stephan [Sat, 29 Nov 2025 23:29:30 +0000 (23:29 +0000)] 
Fix kvvfs event notification to notify _all_ listeners and optimize better for the common case of no listeners. Squelch some debug output.

FossilOrigin-Name: 989d097b1324cf712107bb81697fa8e9044aea0e7feacf0e6b6561e216f07989

2 weeks agoAdd a WASM-side export for kvvfsDecode() for pending private use in the kvvfs export...
stephan [Sat, 29 Nov 2025 23:29:07 +0000 (23:29 +0000)] 
Add a WASM-side export for kvvfsDecode() for pending private use in the kvvfs export bits and ensure that it consistently returns -1 for malformed input.

FossilOrigin-Name: cd81cb70525edeb25c4ab287cd5fd03db08ec45fd9e4001cad5c3eadf11505ae

2 weeks agoMore tests for the kvvfs vtab.
stephan [Sat, 29 Nov 2025 21:19:35 +0000 (21:19 +0000)] 
More tests for the kvvfs vtab.

FossilOrigin-Name: 0358a99eedb503aaf8eff32a3143a2591081dfd3fd9eeecc51c601c98c714d6f

2 weeks agoAdditional defenses against using the ".open" command of the CLI in --safe
drh [Sat, 29 Nov 2025 18:59:58 +0000 (18:59 +0000)] 
Additional defenses against using the ".open" command of the CLI in --safe
mode.

FossilOrigin-Name: eec0b80e53bb54ee05a4903cfb967cc2914cdcc735f1218922a0f9c80399c3e8

2 weeks agoUpdate the documentation to sqlite3_str_finish(). That function might
drh [Sat, 29 Nov 2025 18:32:25 +0000 (18:32 +0000)] 
Update the documentation to sqlite3_str_finish().  That function might
not return NULL on an empty string now, if the empty string is created
through the use of sqlite3_str_truncate().

FossilOrigin-Name: b2e980ede581625e37701f54833e5615d31a1b821ddaf52a26798494f847e640

2 weeks agoHandle empty string values in columnar modes without NULL pointer
drh [Sat, 29 Nov 2025 18:18:15 +0000 (18:18 +0000)] 
Handle empty string values in columnar modes without NULL pointer
dereferences.

FossilOrigin-Name: 7927dbc5ebc76233325e45bd24181dbc5c3636e271f9352cf530f41dad6ba66d

2 weeks agoAdd a kvvfs vtab for inspecting the storage state. This is for testing and my own...
stephan [Sat, 29 Nov 2025 16:41:27 +0000 (16:41 +0000)] 
Add a kvvfs vtab for inspecting the storage state. This is for testing and my own edification, not part of the public API.

FossilOrigin-Name: eaff2e8b7f63575e85fb9be800a2c59163e402d6a25fc6a955b9df15afe13b92

2 weeks agoFix an assertion fault in sqlite3Dequote() that can occur with
drh [Sat, 29 Nov 2025 12:06:12 +0000 (12:06 +0000)] 
Fix an assertion fault in sqlite3Dequote() that can occur with
ALTER TABLE DROP CONSTRAINT on a corrupt schema.
dbsqlfuzz 509a778e8a0c21a6448003feb773a1e55ed751e7.  Test case in TH3.

FossilOrigin-Name: 2dc73eb2d215178c448b182ebb227bc4753ad7baf46c8bd58f20a2b22e998726

2 weeks agoMerge trunk into the kvvfs-v2 branch.
stephan [Fri, 28 Nov 2025 22:17:02 +0000 (22:17 +0000)] 
Merge trunk into the kvvfs-v2 branch.

FossilOrigin-Name: 0e1a6ca0f1123da680918027b16608bf87593a9d91f7b1f3fc0c3a454185740d

2 weeks agoCorrect a doc falsehood - jquery.terminal does not require pre-building.
stephan [Fri, 28 Nov 2025 17:56:22 +0000 (17:56 +0000)] 
Correct a doc falsehood - jquery.terminal does not require pre-building.

FossilOrigin-Name: 4384c9a108b58a0b8c38c51678aad871f088358b9bff3922299cc7ddb3d247ce

2 weeks agoFiddle build: if JQTERM is set to the dir name of a built jquery.terminal checkout...
stephan [Fri, 28 Nov 2025 17:50:29 +0000 (17:50 +0000)] 
Fiddle build: if JQTERM is set to the dir name of a built jquery.terminal checkout then copy the pieces fiddle needs to enable that input mode. By default it looks in ~/src/jquery.terminal.

FossilOrigin-Name: 9dd16f8e3b8e181ff138b4061c9dbc116cbc6f85ee867a97cd8af6e9e874c7d1

2 weeks agoMinor doc updates.
stephan [Fri, 28 Nov 2025 16:23:24 +0000 (16:23 +0000)] 
Minor doc updates.

FossilOrigin-Name: 66b0f28958311204270053ef1d5e66c0ad04e3a52f2570c543b6d319d75798fa

2 weeks agoFix a problem in the xFilter() method of the fts5_vocab virtual table causing it...
dan [Fri, 28 Nov 2025 11:52:40 +0000 (11:52 +0000)] 
Fix a problem in the xFilter() method of the fts5_vocab virtual table causing it to omit some result rows in some cases where a virtual cursor is used more than once by SQLite.

FossilOrigin-Name: 6c99e81e6c49c078f1b00952774a7007c60dc1b4ba8a8fc11357efe9c9233212

2 weeks agoRename c-pp::ARGV to c-pp::argv and remove its use from the license header (where...
stephan [Fri, 28 Nov 2025 02:34:08 +0000 (02:34 +0000)] 
Rename c-pp::ARGV to c-pp::argv and remove its use from the license header (where it doesn't get applied).

FossilOrigin-Name: a2e18d299c8fd7360de246fdc3a2f92025bf321e06c5baf6032ba98854733e60

3 weeks agoEnsure that the CLI always jumps to the code that frees memory allocations
drh [Thu, 27 Nov 2025 12:15:22 +0000 (12:15 +0000)] 
Ensure that the CLI always jumps to the code that frees memory allocations
prior to exiting when it encounters errors on the command line - just so
that fuzzers won't call that memory leak, even though it is not.

FossilOrigin-Name: 50eaf4266f184963e85ad6235fb3410bf4992db8b3dc7c92be23a2f143c12a6b