]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
23 hours agoUse the correct wildcard character in sqlite3_strlike() in the previous master
drh [Sat, 13 Dec 2025 23:18:04 +0000 (23:18 +0000)] 
Use the correct wildcard character in sqlite3_strlike() in the previous
check-in.

FossilOrigin-Name: 87bca1250c5e660debbb29c5fabb89082c2d2059fc8b5851e1b1a519c3be7fc1

26 hours agoIn the CLI, if a command-line argument names a file and the filename ends
drh [Sat, 13 Dec 2025 21:11:49 +0000 (21:11 +0000)] 
In the CLI, if a command-line argument names a file and the filename ends
with .sql or .txt, then process that file as an SQL script.  Use this
feature for better testing.

FossilOrigin-Name: 19cc0522e2255f21f6fb6af1442c2ba122fdd4deacd9ea2c181ce9e597b88770

47 hours agoBack out the --compat option from the CLI.
drh [Sat, 13 Dec 2025 00:13:40 +0000 (00:13 +0000)] 
Back out the --compat option from the CLI.

FossilOrigin-Name: 850d5dbfb0f1eacd1e5213759810ec7e5eba4fcc0b2718dabccd5b269b126f1c

2 days agoGet the .testcase and .check commands working in the CLI.
drh [Fri, 12 Dec 2025 18:22:07 +0000 (18:22 +0000)] 
Get the .testcase and .check commands working in the CLI.

FossilOrigin-Name: 1ca31e1a297c0d53d068afb658ce6602887cda0f3eaf42cd629c4d1b7204f0b0

2 days agoAdd new assert() statements designed to detect and prevent the kind
drh [Fri, 12 Dec 2025 12:06:42 +0000 (12:06 +0000)] 
Add new assert() statements designed to detect and prevent the kind
of system interface numbering errors that happened in [108691a3cb2f296f]
and that were not fixed until [fe49703034bd23fa].

FossilOrigin-Name: 4e6e551c89c4f18299b3d60369f439e80f2fe2b0e70199f649821b1dbf20c668

2 days agoOmit unused entries in the aSysCall array for the Windows driver. Fix
drh [Fri, 12 Dec 2025 11:50:37 +0000 (11:50 +0000)] 
Omit unused entries in the aSysCall array for the Windows driver.  Fix
incorrect numbering in alter entries of that array.

FossilOrigin-Name: fe49703034bd23fa8f43ffdf0e23ec9613688d957adf96b3f1ea86fb02a8d86b

2 days agoRemove from os_win.c a reference to unused system call CreateEventExW() left over...
dan [Fri, 12 Dec 2025 11:02:18 +0000 (11:02 +0000)] 
Remove from os_win.c a reference to unused system call CreateEventExW() left over from the now removed winrt support.

FossilOrigin-Name: c68ef69ec97da0312b95375b3af159f8a06ce1a69376d042c557dcca18d3f77e

2 days agoFix an inaccuracy in the qrfRelaxable() routine in QRF when the input is
drh [Fri, 12 Dec 2025 10:21:52 +0000 (10:21 +0000)] 
Fix an inaccuracy in the qrfRelaxable() routine in QRF when the input is
an empty string.

FossilOrigin-Name: eb8a519571f7d35b81cbdbe668da45b33e5505d9a038305129df7ba2c16fd3b0

2 days agoInclude the latest Makefile.msc changes and the new "make.bat" script
drh [Fri, 12 Dec 2025 00:21:10 +0000 (00:21 +0000)] 
Include the latest Makefile.msc changes and the new "make.bat" script
in the amalgamation tarballs.

FossilOrigin-Name: 6deab75874acfa183e51b8ae8d9305e8d09072bb6c646859ed40beb46e91fe0f

2 days agoPrevent a malicious delta from causing an integer overflow in the
drh [Thu, 11 Dec 2025 23:24:05 +0000 (23:24 +0000)] 
Prevent a malicious delta from causing an integer overflow in the
fossildelta extension.  This code is not used in the SQLite core.

FossilOrigin-Name: 01409738afc2c0d5bdaa248ffb508aa5f36a66390f6b8e4834734529ee8ed2fa

3 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

3 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

3 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

5 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

6 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

6 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

6 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

7 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

7 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

9 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

9 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

9 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

9 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

9 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

9 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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