From 8f1bdc0f73af1b80989c1624bef6633cf9259180 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 4 Jan 2025 14:10:45 +0000
Subject: [PATCH 01/35] Add new tcl-extension-testing.md document. The Windows
side is not yet working.
FossilOrigin-Name: 9dc805df1b1c26196ca53baa6b1b8c2f7e59e0150d02ead53228c77a63ad40f4
---
doc/tcl-extension-testing.md | 142 +++++++++++++++++++++++++++++++++++
manifest | 14 ++--
manifest.uuid | 2 +-
3 files changed, 152 insertions(+), 6 deletions(-)
create mode 100644 doc/tcl-extension-testing.md
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
new file mode 100644
index 0000000000..7dab3eafbd
--- /dev/null
+++ b/doc/tcl-extension-testing.md
@@ -0,0 +1,142 @@
+# Test Procedures For The SQLite TCL Extension
+
+
+## 1.0 Testing On Unix-like Systems (Including Mac)
+
+### 1.1 Setup
+
+
+-
+ [Fossil](https://fossil-scm.org/) installed.
+
-
+ A Fossil check-out of the TCL source tree. Let the directory
+ of this check-out be called **$TCLCO** (mnemonic: "TCL Check-Out").
+
-
+ A Fossil check-out of the SQLite source tree. Let the directory
+ of this check-out be called **$SRCCO** (mnemonic: "SouRCe Check-Out").
+
-
+ Let **$TCLTD** (mnemonic: "TCL Test Directory") be the name of a directory
+ that does not exist at the start of the test, and which will be
+ deleted at the end of the test, that will contain the test builds
+ of the TCL libraries and the SQLite TCL Extensions.
+
+
+### 1.2 Building the TCL libraries and tclsh executables
+
+
+- `mkdir $TCLTD $TCLTD/tcl86 $TCLTD/tcl90`
+
- `cd $TCLCO/unix`
+
- `fossil up core-8-6-16` ← or some other version of Tcl8.6.
+
- `fossil clean -x`
+
- `./configure --prefix=$TCLTD/tcl86`
+
- `make install`
+
- `fossil up core-9-0-0` ← or some other version of Tcl9
+
- `fossil clean -x`
+
- `./configure --prefix=$TCLTD/tcl90`
+
- `make install`
+
+
+### 1.3 Building the SQLite TCL extension
+
+
+- `cd $SRCCO`
+
- `fossil clean -x`
+
- `./configure --with-tclsh=$TCLTD/tcl86/bin/tclsh8.6`
+
- `make tclextension-install`
+
- → Verify extension installed at $TCLTD/tcl86/lib/tcl8.6/sqlite3.*
+
- `fossil clean -x`
+
- `./configure --with-tclsh=$TCLTD/tcl90/bin/tclsh9.0`
+
- `make tclextension-install`
+
- → Verify extension installed at $TCLTD/tcl90/lib/sqlite3.*
+
+
+### 1.4 Testing the extension
+
+
+-
+ `$TCLTD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
+
- ↑ Verify thousands of lines of output with no errors
+
- `$TCLTD/tcl90/bin/tclsh9.0 test/testrunner.tcl release --explain`
+
- ↑ Verify thousands of lines of output with no errors
+
+
+### 1.5 Cleanup
+
+
+- `rm -rf $TCLTD`
+
+
+## 2.0 Testing On Windows
+
+### 2.1 Setup for Windows
+
+
+-
+ [Fossil](https://fossil-scm.org/) installed.
+
-
+ A Fossil check-out of the TCL source tree. Let the directory
+ of this check-out be called **%TCLCO%** (mnemonic: "TCL Check-Out").
+
-
+ A Fossil check-out of the SQLite source tree. Let the directory
+ of this check-out be called **%SRCCO%** (mnemonic: "SouRCe Check-Out").
+
-
+ Let **%TCLTD%** (mnemonic: "TCL Test Directory") be the name of a directory
+ that does not exist at the start of the test, and which will be
+ deleted at the end of the test, that will contain the test builds
+ of the TCL libraries and the SQLite TCL Extensions.
+
-
+ Unix-like command-line tools installed. Example:
+ [unxutils](https://unxutils.sourceforge.net/)
+
- [Visual Studio](https://visualstudio.microsoft.com/vs/community/)
+ installed. VS2015 or later required.
+
- `set ORIGINALPATH=%PATH%` ← remember the original %PATH% value
+
+
+### 2.2 Building the TCL libraries and tclsh.exe executables on Windows
+
+
+- `mkdir %TCLTD% %TCLTD%\tcl86 %TCLTD%\tcl90`
+
- `cd %TCLCO%\win`
+
- `fossil up core-8-6-16` ← or some other version of Tcl8.6.
+
- `fossil clean -x`
+
- `nmake /f makefile.vc INSTALLDIR=%TCLTD%\tcl86 release install`
+
- `fossil up core-9-0-0` ← or some other version of Tcl9
+
- `fossil clean -x`
+
- `nmake /f makefile.vc INSTALLDIR=%TCLTD%\tcl86 release install`
+
+
+### 2.3 Building the SQLite TCL extension on Windows
+
+
+- `cd %SRCCO%`
+
- `fossil clean -x`
+
- `set TCLDIR=%TCLTD%\tcl86`
+
- `set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
+
- `set TCLSH_CMD=%TCLTD%\tcl86\bin\tclsh86t.exe`
+
- `nmake /f Makefile.msc tclextension-install`
+
- → Verify extension installed at %TCLTD%\tcl86\lib\tcl8.6\sqlite3.*
+
- `fossil clean -x`
+
- `set TCLDIR=%TCLTD%\tcl90`
+
- `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
+
- `set TCLSH_CMD=%TCLTD%\tcl90\bin\tclsh90.exe`
+
- `nmake /f Makefile.msc tclextension-install`
+
- → Verify extension installed at %TCLTD%\tcl906\lib\sqlite3.*
+
+
+### 2.4 Testing on Windows
+
+
+-
+ `set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
+
- `tclsh86t test/testrunner.tcl release --explain`
+
- ↑ Verify thousands of lines of output with no errors
+
- `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
+
- `tclsh90 test/testrunner.tcl release --explain`
+
- ↑ Verify thousands of lines of output with no errors
+
+
+### 2.5 Cleanup
+
+
+- `rm -rf %TCLTD%`
+
diff --git a/manifest b/manifest
index dbe9f57581..ceadd6eb7b 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\scomment\sto\sthe\scolumnIsGoodIndexCandidate()\sroutine\sto\srecord\sthe\sresults\nof\sa\sfailed\sexperiment.\s\sNo\schanges\sto\scode.
-D 2025-01-03T11:51:50.103
+C Add\snew\stcl-extension-testing.md\sdocument.\s\sThe\sWindows\sside\sis\snot\syet\nworking.
+D 2025-01-04T14:10:45.730
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,6 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
+F doc/tcl-extension-testing.md e7ce7dbd7394c411d5d3c1d29b86455e81203d750af1765304d603fd12973a27
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2204,8 +2205,11 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 1291b013a8c93e7001fe25783bc98d12f5f7c341d1f728e6852632e18a38af58
-R 0507e66ed59bfa5a55bc14583a9d765f
+P 9ee57a30a49d9813bf2669a5d8346f7e018e3fbf1792739951311a8d3a249d45
+R 33caf2e9f23e286037be195e768a7a16
+T *branch * test-procedures
+T *sym-test-procedures *
+T -sym-trunk *
U drh
-Z 3304d535a779543ccf066c65753e6b08
+Z a6ccc4c86b9da5c35c8534fa7413feee
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index d506d57c15..ce9315f27f 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-9ee57a30a49d9813bf2669a5d8346f7e018e3fbf1792739951311a8d3a249d45
+9dc805df1b1c26196ca53baa6b1b8c2f7e59e0150d02ead53228c77a63ad40f4
From 8272128211e195e46eb3470156d50cf6f1e7dca8 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 4 Jan 2025 15:51:30 +0000
Subject: [PATCH 02/35] Adjust the Windows Makefile.msc so that it can build
the tclextension with Tcl8.6 successfully. Updates to the tcl-extension test
procedure document.
FossilOrigin-Name: 0c2cdc632f26d6acac2d508def4ecfcc97462ebcddc20c84f8847e02e42b3a1d
---
Makefile.msc | 10 ++++--
doc/tcl-extension-testing.md | 69 ++++++++++++++++++++++--------------
manifest | 17 ++++-----
manifest.uuid | 2 +-
4 files changed, 57 insertions(+), 41 deletions(-)
diff --git a/Makefile.msc b/Makefile.msc
index 942f759eed..7ebfcc8a32 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -984,10 +984,14 @@ TCLLIBS =
!ENDIF
!IFNDEF LIBTCLSTUB
-!IF EXISTS("$(TCLLIBDIR)\tclstub$(TCLSUFFIX).lib")
-LIBTCLSTUB = tclstub$(TCLSUFFIX).lib
-!ELSE
+!IF EXISTS("$(TCLLIBDIR)\tclstub$(TCLVERSION)$(TCLSUFFIX).lib")
LIBTCLSTUB = tclstub$(TCLVERSION)$(TCLSUFFIX).lib
+!ELSEIF EXISTS("$(TCLLIBDIR)\tclstub$(TCLSUFFIX).lib")
+LIBTCLSTUB = tclstub$(TCLSUFFIX).lib
+!ELSEIF EXISTS("$(TCLLIBDIR)\tclstub$(TCLVERSION).lib")
+LIBTCLSTUB = tclstub$(TCLVERSION).lib
+!ELSE
+LIBTCLSTUB = tclstub.lib
!ENDIF
!ENDIF
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index 7dab3eafbd..0b81b922c9 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -26,11 +26,13 @@
- `mkdir $TCLTD $TCLTD/tcl86 $TCLTD/tcl90`
- `cd $TCLCO/unix`
-
- `fossil up core-8-6-16` ← or some other version of Tcl8.6.
+
- `fossil up core-8-6-16`
+ ↑ Or some other version of Tcl8.6.
- `fossil clean -x`
- `./configure --prefix=$TCLTD/tcl86`
- `make install`
-
- `fossil up core-9-0-0` ← or some other version of Tcl9
+
- `fossil up core-9-0-0`
+ ↑ Or some other version of Tcl9
- `fossil clean -x`
- `./configure --prefix=$TCLTD/tcl90`
- `make install`
@@ -42,28 +44,28 @@
- `cd $SRCCO`
- `fossil clean -x`
- `./configure --with-tclsh=$TCLTD/tcl86/bin/tclsh8.6`
-
- `make tclextension-install`
-
- → Verify extension installed at $TCLTD/tcl86/lib/tcl8.6/sqlite3.*
+
- `make tclextension-install`
+ ↑ Verify extension installed at $TCLTD/tcl86/lib/tcl8.6/sqlite3.*
- `fossil clean -x`
- `./configure --with-tclsh=$TCLTD/tcl90/bin/tclsh9.0`
-
- `make tclextension-install`
-
- → Verify extension installed at $TCLTD/tcl90/lib/sqlite3.*
+
- `make tclextension-install`
+ ↑ Verify extension installed at $TCLTD/tcl90/lib/sqlite3.*
### 1.4 Testing the extension
--
- `$TCLTD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
-
- ↑ Verify thousands of lines of output with no errors
-
- `$TCLTD/tcl90/bin/tclsh9.0 test/testrunner.tcl release --explain`
-
- ↑ Verify thousands of lines of output with no errors
+
-
+ `$TCLTD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
+ ↑ Verify thousands of lines of output with no errors
+ - `$TCLTD/tcl90/bin/tclsh9.0 test/testrunner.tcl release --explain`
+ ↑ Verify thousands of lines of output with no errors
### 1.5 Cleanup
-- `rm -rf $TCLTD`
+
- `rm -rf $TCLTD`
## 2.0 Testing On Windows
@@ -89,7 +91,8 @@
[unxutils](https://unxutils.sourceforge.net/)
[Visual Studio](https://visualstudio.microsoft.com/vs/community/)
installed. VS2015 or later required.
- `set ORIGINALPATH=%PATH%` ← remember the original %PATH% value
+ `set ORIGINALPATH=%PATH%`
+ ↑ remember the original %PATH% value
### 2.2 Building the TCL libraries and tclsh.exe executables on Windows
@@ -97,42 +100,54 @@
- `mkdir %TCLTD% %TCLTD%\tcl86 %TCLTD%\tcl90`
- `cd %TCLCO%\win`
-
- `fossil up core-8-6-16` ← or some other version of Tcl8.6.
+
- `fossil up core-8-6-16`
+ ↑ Or some other version of Tcl8.6.
- `fossil clean -x`
-
- `nmake /f makefile.vc INSTALLDIR=%TCLTD%\tcl86 release install`
-
- `fossil up core-9-0-0` ← or some other version of Tcl9
+
- `set INSTALLDIR=%TCLTD%\tcl86`
+
- `nmake /f makefile.vc release`
+ ⇅ You *must* invoke the "release" and "install" targets
+ using separate invocations of "nmake" or tclsh86t.exe won't be
+ installed.
+ - `nmake /f makefile.vc install`
+
- `fossil up core-9-0-0`
+ ↑ Or some other version of Tcl9
- `fossil clean -x`
-
- `nmake /f makefile.vc INSTALLDIR=%TCLTD%\tcl86 release install`
+
- `set INSTALLDIR=%TCLTD%\tcl90`
+
- `nmake /f makefile.vc release`
+ ⇅ You *must* invoke the "release" and "install" targets
+ using separate invocations of "nmake" or tclsh90.exe won't be
+ installed.
+ - `nmake /f makefile.vc install`
### 2.3 Building the SQLite TCL extension on Windows
-- `cd %SRCCO%`
+
- `cd %SRCCO%`
- `fossil clean -x`
- `set TCLDIR=%TCLTD%\tcl86`
- `set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
- `set TCLSH_CMD=%TCLTD%\tcl86\bin\tclsh86t.exe`
-
- `nmake /f Makefile.msc tclextension-install`
-
- → Verify extension installed at %TCLTD%\tcl86\lib\tcl8.6\sqlite3.*
+
- `nmake /f Makefile.msc tclextension-install`
+ ↑ Verify extension installed at %TCLTD%\\tcl86\\lib\\tcl8.6\\sqlite3.*
- `fossil clean -x`
- `set TCLDIR=%TCLTD%\tcl90`
- `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
- `set TCLSH_CMD=%TCLTD%\tcl90\bin\tclsh90.exe`
-
- `nmake /f Makefile.msc tclextension-install`
-
- → Verify extension installed at %TCLTD%\tcl906\lib\sqlite3.*
+
- `nmake /f Makefile.msc tclextension-install`
+ ↑ Verify extension installed at %TCLTD%\\tcl90\\lib\\sqlite3.*
### 2.4 Testing on Windows
--
+
-
`set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
-
- `tclsh86t test/testrunner.tcl release --explain`
-
- ↑ Verify thousands of lines of output with no errors
+
- `tclsh86t test/testrunner.tcl release --explain`
+ ↑ Verify thousands of lines of output with no errors
- `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
-
- `tclsh90 test/testrunner.tcl release --explain`
-
- ↑ Verify thousands of lines of output with no errors
+
- `tclsh90 test/testrunner.tcl release --explain`
+ ↑ Verify thousands of lines of output with no errors
### 2.5 Cleanup
diff --git a/manifest b/manifest
index ceadd6eb7b..81708d8dda 100644
--- a/manifest
+++ b/manifest
@@ -1,11 +1,11 @@
-C Add\snew\stcl-extension-testing.md\sdocument.\s\sThe\sWindows\sside\sis\snot\syet\nworking.
-D 2025-01-04T14:10:45.730
+C Adjust\sthe\sWindows\sMakefile.msc\sso\sthat\sit\scan\sbuild\sthe\stclextension\swith\nTcl8.6\ssuccessfully.\s\sUpdates\sto\sthe\stcl-extension\stest\sprocedure\sdocument.
+D 2025-01-04T15:51:30.848
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
F Makefile.in ad349acf91b3569033439fe498fa197aa530cafaa01362eb7daad2f84e43d265
F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
-F Makefile.msc eed0c40c365d100f3329e8fb7d0e18bad09a6f0c026aa1e4dc7f88270378929d
+F Makefile.msc a62f84e521a23168c61018420c6844a9fbb424950010dc6a3e084ffd8618312e
F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
F VERSION 8dc0c3df15fd5ff0622f88fc483533fce990b1cbb2f5fb9fdfb4dbd71eef2889
F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md e7ce7dbd7394c411d5d3c1d29b86455e81203d750af1765304d603fd12973a27
+F doc/tcl-extension-testing.md 1c7225115cede8dadd8fb173d5a1ada31d0ac566d53dcbec2013bbf97464933d
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,11 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 9ee57a30a49d9813bf2669a5d8346f7e018e3fbf1792739951311a8d3a249d45
-R 33caf2e9f23e286037be195e768a7a16
-T *branch * test-procedures
-T *sym-test-procedures *
-T -sym-trunk *
+P 9dc805df1b1c26196ca53baa6b1b8c2f7e59e0150d02ead53228c77a63ad40f4
+R c39856b8b1c55486d94efa9f4d6e65f7
U drh
-Z a6ccc4c86b9da5c35c8534fa7413feee
+Z 7ec4aefc8fdf87ac85e59e4d4ae3a188
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index ce9315f27f..aaa74e46f9 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-9dc805df1b1c26196ca53baa6b1b8c2f7e59e0150d02ead53228c77a63ad40f4
+0c2cdc632f26d6acac2d508def4ecfcc97462ebcddc20c84f8847e02e42b3a1d
From 7a3d03b1fd8241899ab6fadce5a8e9d605f73537 Mon Sep 17 00:00:00 2001
From: dan
Date: Sat, 4 Jan 2025 16:30:05 +0000
Subject: [PATCH 03/35] Fix a problem in the sessions extension allowing
changesets containing foreign key violations to be committed under some
circumstances.
FossilOrigin-Name: e09a0c022903d88d5d6de34b2527565ef60c6bb049f2fb42f037e1520abf0f93
---
ext/session/session1.test | 6 +++--
ext/session/session9.test | 20 ++++++++++------
ext/session/sessionnoact.test | 44 ++++++++++++++++++++++++++++++++++-
ext/session/sqlite3session.c | 4 ++--
manifest | 23 +++++++++---------
manifest.uuid | 2 +-
test/fkey6.test | 27 +++++++++++++++++++++
7 files changed, 101 insertions(+), 25 deletions(-)
diff --git a/ext/session/session1.test b/ext/session/session1.test
index bcd7b03d5c..dfc1aa8957 100644
--- a/ext/session/session1.test
+++ b/ext/session/session1.test
@@ -204,7 +204,9 @@ proc do_conflict_test {tn args} {
foreach t $O(-tables) { S attach $t }
execsql $O(-sql)
set ::xConflict [list]
- sqlite3changeset_apply db2 [S changeset] xConflict
+ catch {
+ sqlite3changeset_apply db2 [S changeset] xConflict
+ }
set conflicts [list]
foreach c $O(-conflicts) {
@@ -283,7 +285,7 @@ do_conflict_test $tn.3.2.3 -tables t2 -sql {
{FOREIGN_KEY 1}
}
do_execsql_test $tn.3.2.4 "SELECT * FROM t2" {}
-do_db2_test $tn.3.2.5 "SELECT * FROM t2" {4 five}
+do_db2_test $tn.3.2.5 "SELECT * FROM t2" {1 one 2 two 4 five}
# Test UPDATE changesets.
#
diff --git a/ext/session/session9.test b/ext/session/session9.test
index ebb88ffade..6b7d1648b2 100644
--- a/ext/session/session9.test
+++ b/ext/session/session9.test
@@ -80,8 +80,10 @@ foreach {tn delrow trans conflictargs conflictret} {
8 3 1 {FOREIGN_KEY 1} ABORT
} {
- set A(OMIT) {0 {}}
- set A(ABORT) {1 SQLITE_CONSTRAINT}
+ set A(OMIT,0) {1 SQLITE_CONSTRAINT}
+ set A(OMIT,1) {0 {}}
+ set A(ABORT,0) {1 SQLITE_CONSTRAINT}
+ set A(ABORT,1) {1 SQLITE_CONSTRAINT}
do_test 1.2.$tn.1 {
populate_db
execsql { DELETE FROM p1 WHERE a=($delrow+0) }
@@ -89,20 +91,24 @@ foreach {tn delrow trans conflictargs conflictret} {
set ::xConflict [list]
list [catch {sqlite3changeset_apply db $::cc xConflict} msg] $msg
- } $A($conflictret)
+ } $A($conflictret,$trans)
do_test 1.2.$tn.2 { set ::xConflict } $conflictargs
- set A(OMIT) {1 1}
- set A(ABORT) {0 0}
+ set A(OMIT,0) {0 0}
+ set A(OMIT,1) {1 1}
+ set A(ABORT,0) {0 0}
+ set A(ABORT,1) {0 0}
+
do_test 1.2.$tn.3 {
execsql { SELECT count(*) FROM c1 UNION ALL SELECT count(*) FROM c2 }
- } $A($conflictret)
+ } $A($conflictret,$trans)
do_test 1.2.$tn.4 { expr ![sqlite3_get_autocommit db] } $trans
do_test 1.2.$tn.5 {
- if { $trans } { execsql COMMIT }
+ if { $trans && $conflictret=="ABORT" } { execsql COMMIT }
} {}
+ catchsql ROLLBACK
}
#--------------------------------------------------------------------
diff --git a/ext/session/sessionnoact.test b/ext/session/sessionnoact.test
index aa1cde4749..f605e6108e 100644
--- a/ext/session/sessionnoact.test
+++ b/ext/session/sessionnoact.test
@@ -82,7 +82,6 @@ do_execsql_test 1.5 {
UPDATE p1 SET c=12345 WHERE a = 45;
}
-breakpoint
sqlite3changeset_apply_v2 -noaction db $C conflict
do_execsql_test 1.6 {
SELECT * FROM c1
@@ -108,4 +107,47 @@ do_execsql_test 1.8 {
PRAGMA foreign_key_check
}
+#-------------------------------------------------------------------------
+# Check that a changeset that causes an FK violation may not be applied,
+# even if SQLITE_CHANGESETAPPLY_FKNOACTION is specified.
+#
+reset_db
+do_execsql_test 2.0 {
+ CREATE TABLE p1(a INTEGER PRIMARY KEY, b, c UNIQUE);
+ INSERT INTO p1 VALUES(1, 1, 'one');
+ INSERT INTO p1 VALUES(2, 2, 'two');
+
+ CREATE TABLE c1(x REFERENCES p1(c) ON DELETE CASCADE);
+ INSERT INTO c1 VALUES('two');
+}
+
+db_save
+
+set C [changeset_from_sql {
+ DELETE FROM p1 WHERE a=2;
+}]
+
+db_restore_and_reopen
+
+do_test 2.1 {
+ sqlite3changeset_apply_v2 -noaction db $C conflict
+} {}
+do_execsql_test 2.2 {
+ SELECT * FROM p1
+} {1 1 one}
+
+db_restore_and_reopen
+db eval { PRAGMA foreign_keys = 1 }
+
+do_test 2.3 {
+ list [catch { sqlite3changeset_apply_v2 -noaction db $C conflict } msg] $msg
+} {1 SQLITE_CONSTRAINT}
+do_execsql_test 2.4 {
+ SELECT * FROM p1;
+} {1 1 one 2 2 two}
+do_execsql_test 2.5 {
+ SELECT * FROM c1;
+} {two}
+
finish_test
+
diff --git a/ext/session/sqlite3session.c b/ext/session/sqlite3session.c
index f2eb942e68..a3f132add8 100644
--- a/ext/session/sqlite3session.c
+++ b/ext/session/sqlite3session.c
@@ -5283,12 +5283,12 @@ static int sessionChangesetApply(
}
}
}
- sqlite3_exec(db, "PRAGMA defer_foreign_keys = 0", 0, 0, 0);
if( (flags & SQLITE_CHANGESETAPPLY_NOSAVEPOINT)==0 ){
if( rc==SQLITE_OK ){
rc = sqlite3_exec(db, "RELEASE changeset_apply", 0, 0, 0);
- }else{
+ }
+ if( rc!=SQLITE_OK ){
sqlite3_exec(db, "ROLLBACK TO changeset_apply", 0, 0, 0);
sqlite3_exec(db, "RELEASE changeset_apply", 0, 0, 0);
}
diff --git a/manifest b/manifest
index 3cdc3c3865..1063bced5f 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sthe\sdocument\sdescribing\stest\sprocedures\sfor\sthe\sTCL\sextension\sbuild\nprocess.\s\sUpdate\sthe\sWindows\smakefile\sso\sthat\sit\sbuilds\sthe\sTCL\sextensions\nsuccessfully\swith\sa\sdefault\sinstallation\sof\sTcl8.6.
-D 2025-01-04T15:52:40.069
+C Fix\sa\sproblem\sin\sthe\ssessions\sextension\sallowing\schangesets\scontaining\sforeign\skey\sviolations\sto\sbe\scommitted\sunder\ssome\scircumstances.
+D 2025-01-04T16:30:05.359
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -576,14 +576,14 @@ F ext/rtree/visual01.txt e9c2564083bcd30ec51b07f881bffbf0e12b50a3f6fced0c222c5c1
F ext/session/changeset.c 7a1e6a14c7e92d36ca177e92e88b5281acd709f3b726298dc34ec0fb58869cb5
F ext/session/changesetfuzz.c 227076ab0ae4447d742c01ee88a564da6478bbf26b65108bf8fac9cd8b0b24aa
F ext/session/changesetfuzz1.test 15b629004e58d5ffcc852e6842a603775bb64b1ce51254831f3d12b113b616cd
-F ext/session/session1.test e94f764fbfb672147c0ef7026b195988133b371dc8cf9e52423eba6cad69717e
+F ext/session/session1.test 8d0509cd3fcfdee6a33422d5fe5c95a9770d62a0b8588adb0177ecdf79b2c345
F ext/session/session2.test ee83bb973b9ce17ccce4db931cdcdae65eb40bbb22089b2fe6aa4f6be3b9303f
F ext/session/session3.test 2cc1629cfb880243aec1a7251145e07b78411d851b39b2aa1390704550db8e6a
F ext/session/session4.test 823f6f018fcbb8dacf61e2960f8b3b848d492b094f8b495eae1d9407d9ab7219
F ext/session/session5.test 716bc6fafd625ce60dfa62ae128971628c1a1169
F ext/session/session6.test 35279f2ec45448cd2e24a61688219dc6cf7871757716063acf4a8b5455e1e926
F ext/session/session8.test 326f3273abf9d5d2d7d559eee8f5994c4ea74a5d935562454605e6607ee29904
-F ext/session/session9.test 5409d90d8141881d08285ed1c2c0d8d10fb92069
+F ext/session/session9.test be090b1420f3824a573da9e56ff542b1e1c2a4f772118e9ab2f75774e66d25d0
F ext/session/sessionA.test 1feeab0b8e03527f08f2f1defb442da25480138f
F ext/session/sessionB.test c4fb7f8a688787111606e123a555f18ee04f65bb9f2a4bb2aa71d55ce4e6d02c
F ext/session/sessionC.test f8a5508bc059ae646e5ec9bdbca66ad24bc92fe99fda5790ac57e1f59fce2fdf
@@ -606,7 +606,7 @@ F ext/session/sessionfault2.test b0d6a7c1d7398a7e800d84657404909c7d385965ea8576d
F ext/session/sessionfault3.test ce0b5d182133935c224d72507dbf1c5be1a1febf7e85d0b0fbd6d2f724b32b96
F ext/session/sessioninvert.test 04075517a9497a80d39c495ba6b44f3982c7371129b89e2c52219819bc105a25
F ext/session/sessionmem.test f2a735db84a3e9e19f571033b725b0b2daf847f3f28b1da55a0c1a4e74f1de09
-F ext/session/sessionnoact.test 2563dff62a2a80dc7c88002241b2fd1578c3e5438735e180fb7e941ebbc66214
+F ext/session/sessionnoact.test 1ea34324b7be2fa9d63870d44969e6bb5290a6d1603ddfd4151c51df73fad291
F ext/session/sessionnoop.test a9366a36a95ef85f8a3687856ebef46983df399541174cb1ede2ee53b8011bc7
F ext/session/sessionnoop2.test de4672dce88464396ec9f30ed08c6c01643a69c53ae540fadbbf6d30642d64e8
F ext/session/sessionrebase.test 702378bdcb5062f1106e74457beca8797d09c113a81768734a58b197b5b334e2
@@ -614,7 +614,7 @@ F ext/session/sessionrowid.test 85187c2f1b38861a5844868126f69f9ec62223a03449a98a
F ext/session/sessionsize.test 8fcf4685993c3dbaa46a24183940ab9f5aa9ed0d23e5fb63bfffbdb56134b795
F ext/session/sessionstat1.test 5e718d5888c0c49bbb33a7a4f816366db85f59f6a4f97544a806421b85dc2dec
F ext/session/sessionwor.test 6fd9a2256442cebde5b2284936ae9e0d54bde692d0f5fd009ecef8511f4cf3fc
-F ext/session/sqlite3session.c 3d0a7f0f7a1c946e01818c716a55a40ae30542a29a9045cb05daf7fb658cdafa
+F ext/session/sqlite3session.c d6f5e3e83b9b0bbc4a8db4837284f0ecc6af5321d4c8e7136380b456b278c46a
F ext/session/sqlite3session.h 683ccbf16e2c2521661fc4c1cf918ce57002039efbcabcd8097fa4bca569104b
F ext/session/test_session.c aa29abdcc9011ac02f4fa38e8ede226106eaeee7c3ea7d8b2b999a124e0c368c
F ext/wasm/EXPORTED_FUNCTIONS.fiddle.in 27450c8b8c70875a260aca55435ec927068b34cef801a96205adb81bdcefc65c
@@ -1153,7 +1153,7 @@ F test/fkey2.test 1063d65e5923c054cfb8f0555a92a3ae0fa8c067275a33ee1715bd856cdb30
F test/fkey3.test 76d475c80b84ee7a5d062e56ccb6ea68882e2b49
F test/fkey4.test 86446017011273aad8f9a99c1a65019e7bd9ca9d
F test/fkey5.test 6727452e163a427147e84e739da18713da553d79f9783559b04fdcd36d5c7421
-F test/fkey6.test d078a1e323a740062bed38df32b8a736fd320dc0
+F test/fkey6.test bdb9c808349a149575b87cf4bfd82d4c81612f0c4d954d27b3f42f043a385396
F test/fkey7.test 64fb28da03da5dfe3cdef5967aa7e832c2507bf7fb8f0780cacbca1f2338d031
F test/fkey8.test 51deda7f1a1448bca95875e4a6e1a3a75b4bd7215e924e845bd60de60e4d84bf
F test/fkey_malloc.test 594a7ea1fbab553c036c70813cd8bd9407d63749
@@ -2205,9 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 9ee57a30a49d9813bf2669a5d8346f7e018e3fbf1792739951311a8d3a249d45 0c2cdc632f26d6acac2d508def4ecfcc97462ebcddc20c84f8847e02e42b3a1d
-R c39856b8b1c55486d94efa9f4d6e65f7
-T +closed 0c2cdc632f26d6acac2d508def4ecfcc97462ebcddc20c84f8847e02e42b3a1d
-U drh
-Z 0b107a7817bd289dd55ee148db24c6d9
+P 3263db9249444203b7a9a9f2b0be309c74944315dde7ed192366b709fff93f1b
+R dd67c57d38ae3918a7498e739dc242d4
+U dan
+Z 0beeea9f83c0978752782d269e0f987a
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index f286bc29e1..613d99cd96 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-3263db9249444203b7a9a9f2b0be309c74944315dde7ed192366b709fff93f1b
+e09a0c022903d88d5d6de34b2527565ef60c6bb049f2fb42f037e1520abf0f93
diff --git a/test/fkey6.test b/test/fkey6.test
index b658f20fea..8658759523 100644
--- a/test/fkey6.test
+++ b/test/fkey6.test
@@ -225,5 +225,32 @@ do_execsql_test 3.3.4 {
SELECT * FROM p2;
} {0 one 1 deleted!}
+#-------------------------------------------------------------------------
+# Verify that, even with "PRAGMA defer_foreign_keys", a transaction cannot
+# be committed if there are outstanding foreign key violations.
+#
+reset_db
+do_execsql_test 4.0 {
+ CREATE TABLE p1(a INTEGER PRIMARY KEY, b UNIQUE);
+ CREATE TABLE c1(x REFERENCES p1(b));
+
+ INSERT INTO p1 VALUES(1, 'one'), (2, 'two'), (3, 'three');
+ INSERT INTO c1 VALUES('two');
+
+ PRAGMA foreign_keys = 1;
+ PRAGMA defer_foreign_keys = 1;
+}
+
+do_execsql_test 4.1 {
+ BEGIN;
+ DELETE FROM p1 WHERE a=2;
+}
+
+do_catchsql_test 4.2 {
+ COMMIT;
+} {1 {FOREIGN KEY constraint failed}}
+
+
+
finish_test
From 1388a716908e2ca8beffe7a7abc8e3321800d7ea Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 4 Jan 2025 19:50:44 +0000
Subject: [PATCH 04/35] Allow the 2nd argument to ".param set" to use
previously bound parameters, as suggested by
[forum:/forumpost/823e1bd746|forum post 823e1bd746].
FossilOrigin-Name: 13a35ad792dc0afe1f7b60230aef392ae01e702972b963d732e332f21848f38b
---
manifest | 14 +++++++-------
manifest.uuid | 2 +-
src/shell.c.in | 1 +
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/manifest b/manifest
index 1063bced5f..cc01879f7d 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sproblem\sin\sthe\ssessions\sextension\sallowing\schangesets\scontaining\sforeign\skey\sviolations\sto\sbe\scommitted\sunder\ssome\scircumstances.
-D 2025-01-04T16:30:05.359
+C Allow\sthe\s2nd\sargument\sto\s".param\sset"\sto\suse\spreviously\sbound\sparameters,\nas\ssuggested\sby\s[forum:/forumpost/823e1bd746|forum\spost\s823e1bd746].
+D 2025-01-04T19:50:44.608
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -779,7 +779,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c c8a5372b97b2a2e972a280676f06ddb5b74e885d3b1f5ce383f839907b57ef68
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 83e88fbb36f89b6703b348777491619554f0fd6f917c9fdf51e4c2e9cda6c04e
-F src/shell.c.in ee54de10e9bd5572f689a6bc0c8e6fa58a8870e1670978ded44412d2715fd908
+F src/shell.c.in a9c0f8066eac40f1f97b8554bb0462b07263d5c02380cc1ef74734c5d1c67637
F src/sqlite.h.in 6afbcaae44140216704a6c82e4c4ea4118c46d5f6573d6c5fa4fc901ed9d369e
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 3263db9249444203b7a9a9f2b0be309c74944315dde7ed192366b709fff93f1b
-R dd67c57d38ae3918a7498e739dc242d4
-U dan
-Z 0beeea9f83c0978752782d269e0f987a
+P e09a0c022903d88d5d6de34b2527565ef60c6bb049f2fb42f037e1520abf0f93
+R 364f6f3884762438edb0a3db4be13b55
+U drh
+Z 24b57e7db6ae465e4c0bb8fa905414ba
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 613d99cd96..c7e903bba5 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-e09a0c022903d88d5d6de34b2527565ef60c6bb049f2fb42f037e1520abf0f93
+13a35ad792dc0afe1f7b60230aef392ae01e702972b963d732e332f21848f38b
diff --git a/src/shell.c.in b/src/shell.c.in
index cad8c92c57..27028ccb0f 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -10237,6 +10237,7 @@ static int do_meta_command(char *zLine, ShellState *p){
rc = 1;
}
}
+ bind_prepared_stmt(p, pStmt);
sqlite3_step(pStmt);
sqlite3_finalize(pStmt);
}else
From 1c1b3a0f2db572bff16f66fcb07fd990b0425552 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 4 Jan 2025 20:13:54 +0000
Subject: [PATCH 05/35] Show the values of $(JIM_TCLSH) and
$(VISUALSTUDIOVERSION) in the output of "nmake tcl-env".
FossilOrigin-Name: 4270abc071ced9e7ec1fed3c387262cc1912e321e37e45e547a1088dbb022702
---
Makefile.msc | 2 ++
manifest | 12 ++++++------
manifest.uuid | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Makefile.msc b/Makefile.msc
index 7ebfcc8a32..a1c6ea8e18 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -2796,6 +2796,8 @@ tcl-env:
@echo LIBTCL = $(LIBTCL)
@echo LIBTCLSTUB = $(LIBTCLSTUB)
@echo TCLSH_CMD = $(TCLSH_CMD)
+ @echo JIM_TCLSH = $(JIM_TCLSH)
+ @echo VISUALSTUDIOVERSION = $(VISUALSTUDIOVERSION)
LSMDIR=$(TOP)\ext\lsm1
!INCLUDE $(LSMDIR)\Makefile.msc
diff --git a/manifest b/manifest
index cc01879f7d..01871cbabd 100644
--- a/manifest
+++ b/manifest
@@ -1,11 +1,11 @@
-C Allow\sthe\s2nd\sargument\sto\s".param\sset"\sto\suse\spreviously\sbound\sparameters,\nas\ssuggested\sby\s[forum:/forumpost/823e1bd746|forum\spost\s823e1bd746].
-D 2025-01-04T19:50:44.608
+C Show\sthe\svalues\sof\s$(JIM_TCLSH)\sand\s$(VISUALSTUDIOVERSION)\sin\sthe\s\noutput\sof\s"nmake\stcl-env".
+D 2025-01-04T20:13:54.343
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
F Makefile.in ad349acf91b3569033439fe498fa197aa530cafaa01362eb7daad2f84e43d265
F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
-F Makefile.msc a62f84e521a23168c61018420c6844a9fbb424950010dc6a3e084ffd8618312e
+F Makefile.msc fd49fbfca5077436a4e7e9f38ec0f1ed900c3e5dc627a8ee00ff15d18649c00c
F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
F VERSION 8dc0c3df15fd5ff0622f88fc483533fce990b1cbb2f5fb9fdfb4dbd71eef2889
F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P e09a0c022903d88d5d6de34b2527565ef60c6bb049f2fb42f037e1520abf0f93
-R 364f6f3884762438edb0a3db4be13b55
+P 13a35ad792dc0afe1f7b60230aef392ae01e702972b963d732e332f21848f38b
+R b249c902701d086f7fc1e9c45b94a036
U drh
-Z 24b57e7db6ae465e4c0bb8fa905414ba
+Z aade41f2b6bccecf69fadf6f2f547775
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index c7e903bba5..3e076d8a56 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-13a35ad792dc0afe1f7b60230aef392ae01e702972b963d732e332f21848f38b
+4270abc071ced9e7ec1fed3c387262cc1912e321e37e45e547a1088dbb022702
From 1e03bd8a89e57c465a1975c0a17408448cc56985 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 4 Jan 2025 20:50:21 +0000
Subject: [PATCH 06/35] Improvements to testing and validation of the SQLite
TCL extension.
FossilOrigin-Name: 9d7597cad4a167aef7688e85513d8695e8d919e41f5cd44909aefee5ddf13345
---
Makefile.msc | 3 +++
doc/tcl-extension-testing.md | 16 ++++++++++------
main.mk | 7 +++++++
manifest | 18 +++++++++---------
manifest.uuid | 2 +-
tool/buildtclext.tcl | 36 ++++++++++++++++++++++++++++++++++++
6 files changed, 66 insertions(+), 16 deletions(-)
diff --git a/Makefile.msc b/Makefile.msc
index a1c6ea8e18..5d3d4c01d0 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -1894,6 +1894,9 @@ tclextension-uninstall:
tclextension-list:
$(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --info
+tclextension-verify: sqlite3.h
+ $(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --version-check
+
# <>
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index 0b81b922c9..10c57b7c36 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -46,16 +46,18 @@
`./configure --with-tclsh=$TCLTD/tcl86/bin/tclsh8.6`
`make tclextension-install`
↑ Verify extension installed at $TCLTD/tcl86/lib/tcl8.6/sqlite3.*
+ `make tclextension-verify`
`fossil clean -x`
`./configure --with-tclsh=$TCLTD/tcl90/bin/tclsh9.0`
`make tclextension-install`
↑ Verify extension installed at $TCLTD/tcl90/lib/sqlite3.*
+ `make tclextension-verify`
-### 1.4 Testing the extension
+### 1.4 Additional sanity tests
--
+
-
`$TCLTD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
↑ Verify thousands of lines of output with no errors
- `$TCLTD/tcl90/bin/tclsh9.0 test/testrunner.tcl release --explain`
@@ -65,7 +67,7 @@
### 1.5 Cleanup
-- `rm -rf $TCLTD`
+
- `rm -rf $TCLTD`
## 2.0 Testing On Windows
@@ -130,18 +132,20 @@
- `set TCLSH_CMD=%TCLTD%\tcl86\bin\tclsh86t.exe`
- `nmake /f Makefile.msc tclextension-install`
↑ Verify extension installed at %TCLTD%\\tcl86\\lib\\tcl8.6\\sqlite3.*
+ - `nmake /f Makefile.msc tclextension-verify`
- `fossil clean -x`
- `set TCLDIR=%TCLTD%\tcl90`
- `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
- `set TCLSH_CMD=%TCLTD%\tcl90\bin\tclsh90.exe`
- `nmake /f Makefile.msc tclextension-install`
↑ Verify extension installed at %TCLTD%\\tcl90\\lib\\sqlite3.*
+ - `nmake /f Makefile.msc tclextension-verify`
-### 2.4 Testing on Windows
+### 2.4 Additional sanity tests for Windows
--
+
-
`set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
- `tclsh86t test/testrunner.tcl release --explain`
↑ Verify thousands of lines of output with no errors
@@ -153,5 +157,5 @@
### 2.5 Cleanup
-- `rm -rf %TCLTD%`
+
- `rm -rf %TCLTD%`
diff --git a/main.mk b/main.mk
index 660cf54bd3..28c4245aab 100644
--- a/main.mk
+++ b/main.mk
@@ -1574,6 +1574,13 @@ tclextension-uninstall:
tclextension-list:
$(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --info
+# Verify that the SQLite TCL extension that is loaded by default
+# in $(TCLSH_CMD) is the same as the version of SQLite for the
+# current source tree
+#
+tclextension-verify: sqlite3.h
+ $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --version-check
+
#
# FTS5 things
#
diff --git a/manifest b/manifest
index 01871cbabd..28f03fcd38 100644
--- a/manifest
+++ b/manifest
@@ -1,11 +1,11 @@
-C Show\sthe\svalues\sof\s$(JIM_TCLSH)\sand\s$(VISUALSTUDIOVERSION)\sin\sthe\s\noutput\sof\s"nmake\stcl-env".
-D 2025-01-04T20:13:54.343
+C Improvements\sto\stesting\sand\svalidation\sof\sthe\sSQLite\sTCL\sextension.
+D 2025-01-04T20:50:21.155
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
F Makefile.in ad349acf91b3569033439fe498fa197aa530cafaa01362eb7daad2f84e43d265
F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
-F Makefile.msc fd49fbfca5077436a4e7e9f38ec0f1ed900c3e5dc627a8ee00ff15d18649c00c
+F Makefile.msc 9180dae8de9534393c8a7c7d3b660deb6de5d29910471991738eed1b19c1aaa1
F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
F VERSION 8dc0c3df15fd5ff0622f88fc483533fce990b1cbb2f5fb9fdfb4dbd71eef2889
F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md 1c7225115cede8dadd8fb173d5a1ada31d0ac566d53dcbec2013bbf97464933d
+F doc/tcl-extension-testing.md ab39979265fd0e0aa1d31dfb9d468761470d8d84a285d49f11b3ed748224e2f4
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -700,7 +700,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a
F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2
F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
-F main.mk fde6ef9167ab1972f6273c0cc06a7d2d776f562d06f44f4987868335910f3803
+F main.mk 566aff71e11c52e10f81548e60f79c48cc267cb4b9971e71720047105da4304b
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
@@ -2110,7 +2110,7 @@ F tool/GetTclKit.bat d84033c6a93dfe735d247f48ba00292a1cc284dcf69963e5e672444e045
F tool/Replace.cs 02c67258801c2fb5f63231e0ac0f220b4b36ba91
F tool/build-all-msvc.bat c817b716e0edeecaf265a6775b63e5f45c34a6544f1d4114a222701ed5ac79ab x
F tool/build-shell.sh 369c4b171cc877ad974fef691e4da782b4c1e99fe8f4361316c735f64d49280f
-F tool/buildtclext.tcl 5e1f1aa843e635c8b7480c7d1ec1f149a5e52136ae2fca1226304053a1a60587
+F tool/buildtclext.tcl e82120d672b34b507e1d9cb220ce18c5c36c3ee0ff0328e35f1806ce74ed2266
F tool/cg_anno.tcl c1f875f5a4c9caca3d59937b16aff716f8b1883935f1b4c9ae23124705bc8099 x
F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
F tool/cktclsh.sh 6075eef9c6b9ba4b38fef2ca2a66d25f2311bd3c610498d18a9b01f861629cca
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 13a35ad792dc0afe1f7b60230aef392ae01e702972b963d732e332f21848f38b
-R b249c902701d086f7fc1e9c45b94a036
+P 4270abc071ced9e7ec1fed3c387262cc1912e321e37e45e547a1088dbb022702
+R e76bc68f8d16f2d1c5c9148746df5950
U drh
-Z aade41f2b6bccecf69fadf6f2f547775
+Z 3470080ccfb271429f7dd29c45e9a752
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 3e076d8a56..8f0477bff4 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-4270abc071ced9e7ec1fed3c387262cc1912e321e37e45e547a1088dbb022702
+9d7597cad4a167aef7688e85513d8695e8d919e41f5cd44909aefee5ddf13345
diff --git a/tool/buildtclext.tcl b/tool/buildtclext.tcl
index c74540c9ea..26f9b6dcc9 100644
--- a/tool/buildtclext.tcl
+++ b/tool/buildtclext.tcl
@@ -15,6 +15,7 @@ Options:
--info Show info on existing SQLite TCL extension installs
--install-only Install an extension previously build
--uninstall Uninstall the extension
+ --version-check Check extension version against this source tree
--destdir DIR Installation root (used by "make install DESTDIR=...")
Other options are retained and passed through into the compiler.}
@@ -24,6 +25,7 @@ set build 1
set install 1
set uninstall 0
set infoonly 0
+set versioncheck 0
set CC {}
set OPTS {}
set DESTDIR ""; # --destdir "$(DESTDIR)"
@@ -36,11 +38,18 @@ for {set ii 0} {$ii<[llength $argv]} {incr ii} {
} elseif {$a0=="--uninstall"} {
set build 0
set install 0
+ set versioncheck 0
set uninstall 1
} elseif {$a0=="--info"} {
set build 0
set install 0
+ set versioncheck 0
set infoonly 1
+ } elseif {$a0=="--version-check"} {
+ set build 0
+ set install 0
+ set infoonly 0
+ set versioncheck 1
} elseif {$a0=="--cc" && $ii+1<[llength $argv]} {
incr ii
set CC [lindex $argv $ii]
@@ -156,6 +165,33 @@ if {$tcl_platform(platform)=="windows"} {
set CMD [subst $cmd]
}
+# Check the SQLite TCL extension that is loaded by default by this running
+# TCL interpreter to see if it has the same SQLITE_SOURCE_ID as the source
+# code in the directory holding this script.
+#
+if {$versioncheck} {
+ if {[catch {package require sqlite3} msg]} {
+ puts stderr "No SQLite TCL extension available: $msg"
+ exit 1
+ }
+ sqlite3 db :memory:
+ set extvers [db one {SELECT sqlite_source_id()}]
+ db close
+ set fd [open sqlite3.h rb]
+ set sqlite3h [read $fd]
+ close $fd
+ regexp {#define SQLITE_SOURCE_ID +"([^"]+)"} $sqlite3h all srcvers
+ set srcvers [string range $srcvers 0 78]
+ set extvers [string range $extvers 0 78]
+ if {$srcvers==$extvers} {
+ puts "source code and extension versions aligned:\n$extvers"
+ exit 0
+ }
+ puts stderr "source code and extension versions differ"
+ puts stderr "source: $srcvers\nextension: $extvers"
+ exit 1
+}
+
# Show information about prior installs
#
if {$infoonly} {
From 8b53358f8f2179e920bbe58d2e8f257d50dcfaac Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sun, 5 Jan 2025 11:19:32 +0000
Subject: [PATCH 07/35] Improvements to TCL extension test procedure
description. Improvements to the tclextension-list and tclextension-verify
makefile targets to suppress unnecessary output.
FossilOrigin-Name: 3e92fea09af13259d61afd2953fe5f3fc16e3cedfef09e350903aa5299b8e469
---
Makefile.msc | 4 ++--
doc/tcl-extension-testing.md | 37 ++++++++++++++++++++++++------------
main.mk | 4 ++--
manifest | 16 ++++++++--------
manifest.uuid | 2 +-
5 files changed, 38 insertions(+), 25 deletions(-)
diff --git a/Makefile.msc b/Makefile.msc
index 5d3d4c01d0..33c5ef107e 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -1892,10 +1892,10 @@ tclextension-uninstall:
$(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --uninstall
tclextension-list:
- $(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --info
+ @ $(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --info
tclextension-verify: sqlite3.h
- $(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --version-check
+ @ $(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --version-check
# <>
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index 10c57b7c36..4835fe1be9 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -1,9 +1,22 @@
# Test Procedures For The SQLite TCL Extension
+## 1.0 Background
-## 1.0 Testing On Unix-like Systems (Including Mac)
+The SQLite TCL extension logic (in the
+"[tclsqlite.c](/file/src/tclsqlite3.c)" source
+file) is statically linked into "textfixture" executable
+which is the program used to do more of the testing
+associated with "make test", "make devtest", and/or
+"make releasetest". So the functionality of the SQLite
+TCL extension is thoroughly vetted during normal testing. The
+procedures below are designed to test the loadable extension
+aspect of the SQLite TCL extension, and in particular to verify
+that the "make tclextension-install" build target works and that
+an ordinary tclsh can subsequently run "package require sqlite3".
-### 1.1 Setup
+## 2.0 Testing On Unix-like Systems (Including Mac)
+
+### 2.1 Setup
-
@@ -21,7 +34,7 @@
of the TCL libraries and the SQLite TCL Extensions.
-### 1.2 Building the TCL libraries and tclsh executables
+### 2.2 Building the TCL libraries and tclsh executables
- `mkdir $TCLTD $TCLTD/tcl86 $TCLTD/tcl90`
@@ -38,7 +51,7 @@
- `make install`
-### 1.3 Building the SQLite TCL extension
+### 2.3 Building the SQLite TCL extension
- `cd $SRCCO`
@@ -54,7 +67,7 @@
- `make tclextension-verify`
-### 1.4 Additional sanity tests
+### 2.4 Additional sanity tests
-
@@ -64,15 +77,15 @@
↑ Verify thousands of lines of output with no errors
-### 1.5 Cleanup
+### 2.5 Cleanup
- `rm -rf $TCLTD`
-## 2.0 Testing On Windows
+## 3.0 Testing On Windows
-### 2.1 Setup for Windows
+### 3.1 Setup for Windows
-
@@ -97,7 +110,7 @@
↑ remember the original %PATH% value
-### 2.2 Building the TCL libraries and tclsh.exe executables on Windows
+### 3.2 Building the TCL libraries and tclsh.exe executables on Windows
- `mkdir %TCLTD% %TCLTD%\tcl86 %TCLTD%\tcl90`
@@ -122,7 +135,7 @@
- `nmake /f makefile.vc install`
-### 2.3 Building the SQLite TCL extension on Windows
+### 3.3 Building the SQLite TCL extension on Windows
- `cd %SRCCO%`
@@ -142,7 +155,7 @@
- `nmake /f Makefile.msc tclextension-verify`
-### 2.4 Additional sanity tests for Windows
+### 3.4 Additional sanity tests for Windows
-
@@ -154,7 +167,7 @@
↑ Verify thousands of lines of output with no errors
-### 2.5 Cleanup
+### 3.5 Cleanup
- `rm -rf %TCLTD%`
diff --git a/main.mk b/main.mk
index 28c4245aab..a22b0dfcdf 100644
--- a/main.mk
+++ b/main.mk
@@ -1572,14 +1572,14 @@ tclextension-uninstall:
# by $TCLSH_CMD, including prior versions.
#
tclextension-list:
- $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --info
+ @ $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --info
# Verify that the SQLite TCL extension that is loaded by default
# in $(TCLSH_CMD) is the same as the version of SQLite for the
# current source tree
#
tclextension-verify: sqlite3.h
- $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --version-check
+ @ $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --version-check
#
# FTS5 things
diff --git a/manifest b/manifest
index 28f03fcd38..57402835e3 100644
--- a/manifest
+++ b/manifest
@@ -1,11 +1,11 @@
-C Improvements\sto\stesting\sand\svalidation\sof\sthe\sSQLite\sTCL\sextension.
-D 2025-01-04T20:50:21.155
+C Improvements\sto\sTCL\sextension\stest\sprocedure\sdescription.\s\sImprovements\sto\nthe\stclextension-list\sand\stclextension-verify\smakefile\stargets\sto\ssuppress\nunnecessary\soutput.
+D 2025-01-05T11:19:32.428
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
F Makefile.in ad349acf91b3569033439fe498fa197aa530cafaa01362eb7daad2f84e43d265
F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
-F Makefile.msc 9180dae8de9534393c8a7c7d3b660deb6de5d29910471991738eed1b19c1aaa1
+F Makefile.msc 39785ec45f9ae0311e49094eff2ee079562246fed6be3b9f632a99d4df20056a
F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
F VERSION 8dc0c3df15fd5ff0622f88fc483533fce990b1cbb2f5fb9fdfb4dbd71eef2889
F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md ab39979265fd0e0aa1d31dfb9d468761470d8d84a285d49f11b3ed748224e2f4
+F doc/tcl-extension-testing.md 2d9c2b443ff978c679266cc77c505bc750ad41cad95c7ff57bcd261894db7685
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -700,7 +700,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a
F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2
F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
-F main.mk 566aff71e11c52e10f81548e60f79c48cc267cb4b9971e71720047105da4304b
+F main.mk fe86d83158b547e02f8d08aa6af2130540746a4a61de7c61ea8b9d09eb06acd4
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 4270abc071ced9e7ec1fed3c387262cc1912e321e37e45e547a1088dbb022702
-R e76bc68f8d16f2d1c5c9148746df5950
+P 9d7597cad4a167aef7688e85513d8695e8d919e41f5cd44909aefee5ddf13345
+R dea89f80d3d0e645bc0886ea1ea08414
U drh
-Z 3470080ccfb271429f7dd29c45e9a752
+Z 5cb00fd50654015e2128f97c99b05bfe
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 8f0477bff4..cd948c9ac2 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-9d7597cad4a167aef7688e85513d8695e8d919e41f5cd44909aefee5ddf13345
+3e92fea09af13259d61afd2953fe5f3fc16e3cedfef09e350903aa5299b8e469
From 85900c04b01f28ae8b3b352dc58c124d32dbf7d9 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sun, 5 Jan 2025 11:40:15 +0000
Subject: [PATCH 08/35] Fix typo in the tcl-extension-testing.md document.
FossilOrigin-Name: 28150c615cb601dfc9e4f660627228d6a8a715d64c65f7bc77931c9daf8a0dd7
---
doc/tcl-extension-testing.md | 2 +-
manifest | 12 ++++++------
manifest.uuid | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index 4835fe1be9..3371d514bb 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -3,7 +3,7 @@
## 1.0 Background
The SQLite TCL extension logic (in the
-"[tclsqlite.c](/file/src/tclsqlite3.c)" source
+"[tclsqlite.c](/file/src/tclsqlite.c)" source
file) is statically linked into "textfixture" executable
which is the program used to do more of the testing
associated with "make test", "make devtest", and/or
diff --git a/manifest b/manifest
index 57402835e3..ae7e6830ec 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Improvements\sto\sTCL\sextension\stest\sprocedure\sdescription.\s\sImprovements\sto\nthe\stclextension-list\sand\stclextension-verify\smakefile\stargets\sto\ssuppress\nunnecessary\soutput.
-D 2025-01-05T11:19:32.428
+C Fix\stypo\sin\sthe\stcl-extension-testing.md\sdocument.
+D 2025-01-05T11:40:15.277
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md 2d9c2b443ff978c679266cc77c505bc750ad41cad95c7ff57bcd261894db7685
+F doc/tcl-extension-testing.md 97f90ebaac1569c77395f715a4074ddf8b40984d1dae3af7ab693ec256e43853
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 9d7597cad4a167aef7688e85513d8695e8d919e41f5cd44909aefee5ddf13345
-R dea89f80d3d0e645bc0886ea1ea08414
+P 3e92fea09af13259d61afd2953fe5f3fc16e3cedfef09e350903aa5299b8e469
+R 62604835e027bab1689bab4a8c0e956a
U drh
-Z 5cb00fd50654015e2128f97c99b05bfe
+Z adbf7e41d03db62cbc628242472f462e
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index cd948c9ac2..63309c3c39 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-3e92fea09af13259d61afd2953fe5f3fc16e3cedfef09e350903aa5299b8e469
+28150c615cb601dfc9e4f660627228d6a8a715d64c65f7bc77931c9daf8a0dd7
From 15e388d91057ca381510ace3e094210b33626452 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sun, 5 Jan 2025 17:16:33 +0000
Subject: [PATCH 09/35] Refactor the TCL extension test procedure to deal with
TCL8.6 and TCL9.0 separately, to simplify the procedures and reduce cognative
stress on the tester.
FossilOrigin-Name: 5281536327d244ba9507548f7ed607e86e59b98a003e63f6da767471411c8ffc
---
doc/tcl-extension-testing.md | 104 +++++++++++++++++------------------
manifest | 12 ++--
manifest.uuid | 2 +-
3 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index 3371d514bb..65baa15469 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -34,53 +34,56 @@ an ordinary tclsh can subsequently run "package require sqlite3".
of the TCL libraries and the SQLite TCL Extensions.
-### 2.2 Building the TCL libraries and tclsh executables
+### 2.2 Testing TCL 8.6 on unix
-- `mkdir $TCLTD $TCLTD/tcl86 $TCLTD/tcl90`
+
- `mkdir $TCLTD/tcl86`
- `cd $TCLCO/unix`
- `fossil up core-8-6-16`
↑ Or some other version of Tcl8.6.
- `fossil clean -x`
- `./configure --prefix=$TCLTD/tcl86`
- `make install`
+
- `cd $SRCCO`
+
- `fossil clean -x`
+
- `./configure --with-tclsh=$TCLTD/tcl86/bin/tclsh8.6`
+
- `make tclextension-install`
+ ↑ Verify extension installed at $TCLTD/tcl86/lib/tcl8.6/sqlite3.*
+ - `makek tclextension-list`
+ ↑ Verify TCL extension correctly installed.
+ - `make tclextension-verify`
+ ↑ Verify that the correct version is installed.
+ - `$TCLTD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
+ ↑ Verify thousands of lines of output with no errors. Or
+ consider running "devtest" without --explain instead of "release".
+
+
+### 2.3 Testing TCL 9.0 on unix
+
+
+- `mkdir $TCLTD/tcl90`
- `fossil up core-9-0-0`
↑ Or some other version of Tcl9
- `fossil clean -x`
- `./configure --prefix=$TCLTD/tcl90`
- `make install`
-
-
-### 2.3 Building the SQLite TCL extension
-
-
-- `cd $SRCCO`
-
- `fossil clean -x`
-
- `./configure --with-tclsh=$TCLTD/tcl86/bin/tclsh8.6`
-
- `make tclextension-install`
- ↑ Verify extension installed at $TCLTD/tcl86/lib/tcl8.6/sqlite3.*
- - `make tclextension-verify`
+
- `cd $SRCCO`
- `fossil clean -x`
- `./configure --with-tclsh=$TCLTD/tcl90/bin/tclsh9.0`
- `make tclextension-install`
↑ Verify extension installed at $TCLTD/tcl90/lib/sqlite3.*
+ - `makek tclextension-list`
+ ↑ Verify TCL extension correctly installed.
- `make tclextension-verify`
-
-
-### 2.4 Additional sanity tests
-
-
--
- `$TCLTD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
- ↑ Verify thousands of lines of output with no errors
- `$TCLTD/tcl90/bin/tclsh9.0 test/testrunner.tcl release --explain`
- ↑ Verify thousands of lines of output with no errors
+ ↑ Verify thousands of lines of output with no errors. Or
+ consider running "devtest" without --explain instead of "release".
-### 2.5 Cleanup
+### 2.4 Cleanup
-- `rm -rf $TCLTD`
+
- `rm -rf $TCLTD`
## 3.0 Testing On Windows
@@ -110,10 +113,10 @@ an ordinary tclsh can subsequently run "package require sqlite3".
↑ remember the original %PATH% value
-### 3.2 Building the TCL libraries and tclsh.exe executables on Windows
+### 3.2 Testing TCL 8.6 on Windows
-- `mkdir %TCLTD% %TCLTD%\tcl86 %TCLTD%\tcl90`
+
- `mkdir %TCLTD%\tcl86`
- `cd %TCLCO%\win`
- `fossil up core-8-6-16`
↑ Or some other version of Tcl8.6.
@@ -124,6 +127,24 @@ an ordinary tclsh can subsequently run "package require sqlite3".
using separate invocations of "nmake" or tclsh86t.exe won't be
installed.
- `nmake /f makefile.vc install`
+
- `cd %SRCCO%`
+
- `fossil clean -x`
+
- `set TCLDIR=%TCLTD%\tcl86`
+
- `set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
+
- `set TCLSH_CMD=%TCLTD%\tcl86\bin\tclsh86t.exe`
+
- `nmake /f Makefile.msc tclextension-install`
+ ↑ Verify extension installed at %TCLTD%\\tcl86\\lib\\tcl8.6\\sqlite3.*
+ - `nmake /f Makefile.msc tclextension-verify`
+
- `tclsh86t test/testrunner.tcl release --explain`
+ ↑ Verify thousands of lines of output with no errors. Or
+ consider running "devtest" without --explain instead of "release".
+
+
+### 3.3 Testing TCL 9.0 on Windows
+
+
+- `mkdir %TCLTD%\tcl90`
+
- `cd %TCLCO%\win`
- `fossil up core-9-0-0`
↑ Or some other version of Tcl9
- `fossil clean -x`
@@ -133,19 +154,7 @@ an ordinary tclsh can subsequently run "package require sqlite3".
using separate invocations of "nmake" or tclsh90.exe won't be
installed.
- `nmake /f makefile.vc install`
-
-
-### 3.3 Building the SQLite TCL extension on Windows
-
-
-- `cd %SRCCO%`
-
- `fossil clean -x`
-
- `set TCLDIR=%TCLTD%\tcl86`
-
- `set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
-
- `set TCLSH_CMD=%TCLTD%\tcl86\bin\tclsh86t.exe`
-
- `nmake /f Makefile.msc tclextension-install`
- ↑ Verify extension installed at %TCLTD%\\tcl86\\lib\\tcl8.6\\sqlite3.*
- - `nmake /f Makefile.msc tclextension-verify`
+
- `cd %SRCCO%`
- `fossil clean -x`
- `set TCLDIR=%TCLTD%\tcl90`
- `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
@@ -153,22 +162,13 @@ an ordinary tclsh can subsequently run "package require sqlite3".
- `nmake /f Makefile.msc tclextension-install`
↑ Verify extension installed at %TCLTD%\\tcl90\\lib\\sqlite3.*
- `nmake /f Makefile.msc tclextension-verify`
-
-
-### 3.4 Additional sanity tests for Windows
-
-
--
- `set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
-
- `tclsh86t test/testrunner.tcl release --explain`
- ↑ Verify thousands of lines of output with no errors
- - `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
- `tclsh90 test/testrunner.tcl release --explain`
- ↑ Verify thousands of lines of output with no errors
+ ↑ Verify thousands of lines of output with no errors. Or
+ consider running "devtest" without --explain instead of "release".
-### 3.5 Cleanup
+### 3.4 Cleanup
-- `rm -rf %TCLTD%`
+
- `rm -rf %TCLTD%`
diff --git a/manifest b/manifest
index ae7e6830ec..06e0e02351 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\stypo\sin\sthe\stcl-extension-testing.md\sdocument.
-D 2025-01-05T11:40:15.277
+C Refactor\sthe\sTCL\sextension\stest\sprocedure\sto\sdeal\swith\sTCL8.6\sand\sTCL9.0\nseparately,\sto\ssimplify\sthe\sprocedures\sand\sreduce\scognative\sstress\son\sthe\ntester.
+D 2025-01-05T17:16:33.231
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md 97f90ebaac1569c77395f715a4074ddf8b40984d1dae3af7ab693ec256e43853
+F doc/tcl-extension-testing.md 37722ac070d15ed687fbde2c444b97fd1b423b631a89897142f708594aafba47
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 3e92fea09af13259d61afd2953fe5f3fc16e3cedfef09e350903aa5299b8e469
-R 62604835e027bab1689bab4a8c0e956a
+P 28150c615cb601dfc9e4f660627228d6a8a715d64c65f7bc77931c9daf8a0dd7
+R 866ce61f7bd1663ef897c7b2791f707c
U drh
-Z adbf7e41d03db62cbc628242472f462e
+Z c10b13ae5e892d2f5ddbaa1f9222567d
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 63309c3c39..f10a9cf7e3 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-28150c615cb601dfc9e4f660627228d6a8a715d64c65f7bc77931c9daf8a0dd7
+5281536327d244ba9507548f7ed607e86e59b98a003e63f6da767471411c8ffc
From f19d7b4de163f56f4cbe7298e3b347e0caefa540 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sun, 5 Jan 2025 19:58:30 +0000
Subject: [PATCH 10/35] Further refactoring of the TCL extension test procedure
document, for improved clarity and usability.
FossilOrigin-Name: bcdaef434142973a0805117495e561b2dcd1ec1465cacc9b944a3707291afc0d
---
doc/tcl-extension-testing.md | 121 ++++++++++++++++++-----------------
manifest | 12 ++--
manifest.uuid | 2 +-
3 files changed, 68 insertions(+), 67 deletions(-)
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index 65baa15469..ec624ceb5b 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -5,7 +5,7 @@
The SQLite TCL extension logic (in the
"[tclsqlite.c](/file/src/tclsqlite.c)" source
file) is statically linked into "textfixture" executable
-which is the program used to do more of the testing
+which is the program used to do most of the testing
associated with "make test", "make devtest", and/or
"make releasetest". So the functionality of the SQLite
TCL extension is thoroughly vetted during normal testing. The
@@ -21,39 +21,39 @@ an ordinary tclsh can subsequently run "package require sqlite3".
-
[Fossil](https://fossil-scm.org/) installed.
-
-
- A Fossil check-out of the TCL source tree. Let the directory
- of this check-out be called **$TCLCO** (mnemonic: "TCL Check-Out").
-
-
- A Fossil check-out of the SQLite source tree. Let the directory
- of this check-out be called **$SRCCO** (mnemonic: "SouRCe Check-Out").
-
-
- Let **$TCLTD** (mnemonic: "TCL Test Directory") be the name of a directory
- that does not exist at the start of the test, and which will be
- deleted at the end of the test, that will contain the test builds
- of the TCL libraries and the SQLite TCL Extensions.
+
- Check out source code and set environment variables:
+
+ - **TCLSOURCE** →
+ The top-level directory of a Fossil check-out of the TCL source tree.
+
- **SQLITESOURCE** →
+ A Fossil check-out of the SQLite source tree.
+
- **TCLBUILD** →
+ A directory that does not exist at the start of the test and which
+ will be deleted at the end of the test, and that will contain the
+ test builds of the TCL libraries and the SQLite TCL Extensions.
+
### 2.2 Testing TCL 8.6 on unix
-- `mkdir $TCLTD/tcl86`
-
- `cd $TCLCO/unix`
+
- `mkdir -p $TCLBUILD/tcl86`
+
- `cd $TCLSOURCE/unix`
- `fossil up core-8-6-16`
↑ Or some other version of Tcl8.6.
- `fossil clean -x`
-
- `./configure --prefix=$TCLTD/tcl86`
+
- `./configure --prefix=$TCLBUILD/tcl86`
- `make install`
-
- `cd $SRCCO`
+
- `cd $SQLITESOURCE`
- `fossil clean -x`
-
- `./configure --with-tclsh=$TCLTD/tcl86/bin/tclsh8.6`
+
- `./configure --with-tclsh=$TCLBUILD/tcl86/bin/tclsh8.6`
- `make tclextension-install`
- ↑ Verify extension installed at $TCLTD/tcl86/lib/tcl8.6/sqlite3.*
- - `makek tclextension-list`
+ ↑ Verify extension installed at $TCLBUILD/tcl86/lib/tcl8.6/sqlite3.*
+ - `make tclextension-list`
↑ Verify TCL extension correctly installed.
- `make tclextension-verify`
↑ Verify that the correct version is installed.
- - `$TCLTD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
+ - `$TCLBUILD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
↑ Verify thousands of lines of output with no errors. Or
consider running "devtest" without --explain instead of "release".
@@ -61,21 +61,21 @@ an ordinary tclsh can subsequently run "package require sqlite3".
### 2.3 Testing TCL 9.0 on unix
-- `mkdir $TCLTD/tcl90`
+
- `mkdir -p $TCLBUILD/tcl90`
- `fossil up core-9-0-0`
↑ Or some other version of Tcl9
- `fossil clean -x`
-
- `./configure --prefix=$TCLTD/tcl90`
+
- `./configure --prefix=$TCLBUILD/tcl90`
- `make install`
-
- `cd $SRCCO`
+
- `cd $SQLITESOURCE`
- `fossil clean -x`
-
- `./configure --with-tclsh=$TCLTD/tcl90/bin/tclsh9.0`
+
- `./configure --with-tclsh=$TCLBUILD/tcl90/bin/tclsh9.0`
- `make tclextension-install`
- ↑ Verify extension installed at $TCLTD/tcl90/lib/sqlite3.*
- - `makek tclextension-list`
+ ↑ Verify extension installed at $TCLBUILD/tcl90/lib/sqlite3.*
+ - `make tclextension-list`
↑ Verify TCL extension correctly installed.
- `make tclextension-verify`
-
- `$TCLTD/tcl90/bin/tclsh9.0 test/testrunner.tcl release --explain`
+ - `$TCLBUILD/tcl90/bin/tclsh9.0 test/testrunner.tcl release --explain`
↑ Verify thousands of lines of output with no errors. Or
consider running "devtest" without --explain instead of "release".
@@ -83,7 +83,7 @@ an ordinary tclsh can subsequently run "package require sqlite3".
### 2.4 Cleanup
-- `rm -rf $TCLTD`
+
- `rm -rf $TCLBUILD`
## 3.0 Testing On Windows
@@ -93,47 +93,48 @@ an ordinary tclsh can subsequently run "package require sqlite3".
-
[Fossil](https://fossil-scm.org/) installed.
-
-
- A Fossil check-out of the TCL source tree. Let the directory
- of this check-out be called **%TCLCO%** (mnemonic: "TCL Check-Out").
-
-
- A Fossil check-out of the SQLite source tree. Let the directory
- of this check-out be called **%SRCCO%** (mnemonic: "SouRCe Check-Out").
-
-
- Let **%TCLTD%** (mnemonic: "TCL Test Directory") be the name of a directory
- that does not exist at the start of the test, and which will be
- deleted at the end of the test, that will contain the test builds
- of the TCL libraries and the SQLite TCL Extensions.
-
Unix-like command-line tools installed. Example:
[unxutils](https://unxutils.sourceforge.net/)
- [Visual Studio](https://visualstudio.microsoft.com/vs/community/)
installed. VS2015 or later required.
-
- `set ORIGINALPATH=%PATH%`
- ↑ remember the original %PATH% value
+ - Check out source code and set environment variables.
+
+ - **TCLSOURCE** →
+ The top-level directory of a Fossil check-out of the TCL source tree.
+
- **SQLITESOURCE** →
+ A Fossil check-out of the SQLite source tree.
+
- **TCLBUILD** →
+ A directory that does not exist at the start of the test and which
+ will be deleted at the end of the test, and that will contain the
+ test builds of the TCL libraries and the SQLite TCL Extensions.
+
- **ORIGINALPATH** →
+ The original value of %PATH%. In other words, set as follows:
+ `set ORIGINALPATH %PATH%`
+
### 3.2 Testing TCL 8.6 on Windows
-- `mkdir %TCLTD%\tcl86`
-
- `cd %TCLCO%\win`
+
- `mkdir %TCLBUILD%\tcl86`
+
- `cd %TCLSOURCE%\win`
- `fossil up core-8-6-16`
↑ Or some other version of Tcl8.6.
- `fossil clean -x`
-
- `set INSTALLDIR=%TCLTD%\tcl86`
+
- `set INSTALLDIR=%TCLBUILD%\tcl86`
- `nmake /f makefile.vc release`
⇅ You *must* invoke the "release" and "install" targets
- using separate invocations of "nmake" or tclsh86t.exe won't be
+ using separate "nmake" commands or tclsh86t.exe won't be
installed.
- `nmake /f makefile.vc install`
-
- `cd %SRCCO%`
+
- `cd %SQLITESOURCE%`
- `fossil clean -x`
-
- `set TCLDIR=%TCLTD%\tcl86`
-
- `set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
-
- `set TCLSH_CMD=%TCLTD%\tcl86\bin\tclsh86t.exe`
+
- `set TCLDIR=%TCLBUILD%\tcl86`
+
- `set PATH=%TCLBUILD%\tcl86\bin;%ORIGINALPATH%`
+
- `set TCLSH_CMD=%TCLBUILD%\tcl86\bin\tclsh86t.exe`
- `nmake /f Makefile.msc tclextension-install`
- ↑ Verify extension installed at %TCLTD%\\tcl86\\lib\\tcl8.6\\sqlite3.*
+ ↑ Verify extension installed at %TCLBUILD%\\tcl86\\lib\\tcl8.6\\sqlite3.*
- `nmake /f Makefile.msc tclextension-verify`
- `tclsh86t test/testrunner.tcl release --explain`
↑ Verify thousands of lines of output with no errors. Or
@@ -143,24 +144,24 @@ an ordinary tclsh can subsequently run "package require sqlite3".
### 3.3 Testing TCL 9.0 on Windows
-- `mkdir %TCLTD%\tcl90`
-
- `cd %TCLCO%\win`
+
- `mkdir %TCLBUILD%\tcl90`
+
- `cd %TCLSOURCE%\win`
- `fossil up core-9-0-0`
↑ Or some other version of Tcl9
- `fossil clean -x`
-
- `set INSTALLDIR=%TCLTD%\tcl90`
+
- `set INSTALLDIR=%TCLBUILD%\tcl90`
- `nmake /f makefile.vc release`
⇅ You *must* invoke the "release" and "install" targets
- using separate invocations of "nmake" or tclsh90.exe won't be
+ using separate "nmake" commands or tclsh90.exe won't be
installed.
- `nmake /f makefile.vc install`
-
- `cd %SRCCO%`
+
- `cd %SQLITESOURCE%`
- `fossil clean -x`
-
- `set TCLDIR=%TCLTD%\tcl90`
-
- `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
-
- `set TCLSH_CMD=%TCLTD%\tcl90\bin\tclsh90.exe`
+
- `set TCLDIR=%TCLBUILD%\tcl90`
+
- `set PATH=%TCLBUILD%\tcl90\bin;%ORIGINALPATH%`
+
- `set TCLSH_CMD=%TCLBUILD%\tcl90\bin\tclsh90.exe`
- `nmake /f Makefile.msc tclextension-install`
- ↑ Verify extension installed at %TCLTD%\\tcl90\\lib\\sqlite3.*
+ ↑ Verify extension installed at %TCLBUILD%\\tcl90\\lib\\sqlite3.*
- `nmake /f Makefile.msc tclextension-verify`
- `tclsh90 test/testrunner.tcl release --explain`
↑ Verify thousands of lines of output with no errors. Or
@@ -170,5 +171,5 @@ an ordinary tclsh can subsequently run "package require sqlite3".
### 3.4 Cleanup
-- `rm -rf %TCLTD%`
+
- `rm -rf %TCLBUILD%`
diff --git a/manifest b/manifest
index 06e0e02351..73825f1a17 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Refactor\sthe\sTCL\sextension\stest\sprocedure\sto\sdeal\swith\sTCL8.6\sand\sTCL9.0\nseparately,\sto\ssimplify\sthe\sprocedures\sand\sreduce\scognative\sstress\son\sthe\ntester.
-D 2025-01-05T17:16:33.231
+C Further\srefactoring\sof\sthe\sTCL\sextension\stest\sprocedure\sdocument,\sfor\nimproved\sclarity\sand\susability.
+D 2025-01-05T19:58:30.967
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md 37722ac070d15ed687fbde2c444b97fd1b423b631a89897142f708594aafba47
+F doc/tcl-extension-testing.md fca7b123e6f6c94f87c5e9285342fa08d17f118d47bea22c0b045485755fe9c3
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 28150c615cb601dfc9e4f660627228d6a8a715d64c65f7bc77931c9daf8a0dd7
-R 866ce61f7bd1663ef897c7b2791f707c
+P 5281536327d244ba9507548f7ed607e86e59b98a003e63f6da767471411c8ffc
+R 789a42abc3bc046ab3689d41ea48cbbd
U drh
-Z c10b13ae5e892d2f5ddbaa1f9222567d
+Z a57fb295edbde74d3aaadaf4afebbd36
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index f10a9cf7e3..1a4dca11c7 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-5281536327d244ba9507548f7ed607e86e59b98a003e63f6da767471411c8ffc
+bcdaef434142973a0805117495e561b2dcd1ec1465cacc9b944a3707291afc0d
From cee8b04d33e78b2227fdb6007b9991f998469a7d Mon Sep 17 00:00:00 2001
From: dan
Date: Mon, 6 Jan 2025 17:01:35 +0000
Subject: [PATCH 11/35] Add test case for using both
SQLITE_CHANGESETAPPLY_IGNORENOOP and SQLITE_CHANGESETAPPLY_FKNOACTION.
FossilOrigin-Name: b1cc53fa3fb2ac3abeadd3282d8751f4d533315754159f16ca7f7f300ccdd8c8
---
ext/session/sessionnoact.test | 15 +++++++++++++++
manifest | 14 +++++++-------
manifest.uuid | 2 +-
3 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/ext/session/sessionnoact.test b/ext/session/sessionnoact.test
index f605e6108e..e447bc8a16 100644
--- a/ext/session/sessionnoact.test
+++ b/ext/session/sessionnoact.test
@@ -149,5 +149,20 @@ do_execsql_test 2.5 {
SELECT * FROM c1;
} {two}
+db_restore_and_reopen
+db eval { PRAGMA foreign_keys = 1 }
+
+do_test 2.6 {
+ list [catch {
+ sqlite3changeset_apply_v2 -ignorenoop -noaction db $C conflict
+ } msg] $msg
+} {1 SQLITE_CONSTRAINT}
+do_execsql_test 2.7 {
+ SELECT * FROM p1;
+} {1 1 one 2 2 two}
+do_execsql_test 2.8 {
+ SELECT * FROM c1;
+} {two}
+
finish_test
diff --git a/manifest b/manifest
index 73825f1a17..cedab9b504 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Further\srefactoring\sof\sthe\sTCL\sextension\stest\sprocedure\sdocument,\sfor\nimproved\sclarity\sand\susability.
-D 2025-01-05T19:58:30.967
+C Add\stest\scase\sfor\susing\sboth\sSQLITE_CHANGESETAPPLY_IGNORENOOP\sand\sSQLITE_CHANGESETAPPLY_FKNOACTION.
+D 2025-01-06T17:01:35.295
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -606,7 +606,7 @@ F ext/session/sessionfault2.test b0d6a7c1d7398a7e800d84657404909c7d385965ea8576d
F ext/session/sessionfault3.test ce0b5d182133935c224d72507dbf1c5be1a1febf7e85d0b0fbd6d2f724b32b96
F ext/session/sessioninvert.test 04075517a9497a80d39c495ba6b44f3982c7371129b89e2c52219819bc105a25
F ext/session/sessionmem.test f2a735db84a3e9e19f571033b725b0b2daf847f3f28b1da55a0c1a4e74f1de09
-F ext/session/sessionnoact.test 1ea34324b7be2fa9d63870d44969e6bb5290a6d1603ddfd4151c51df73fad291
+F ext/session/sessionnoact.test 0f552bd318b764bbc5b2cd6f3518435254a1c830fdaa5aab9c688f507ebc301e
F ext/session/sessionnoop.test a9366a36a95ef85f8a3687856ebef46983df399541174cb1ede2ee53b8011bc7
F ext/session/sessionnoop2.test de4672dce88464396ec9f30ed08c6c01643a69c53ae540fadbbf6d30642d64e8
F ext/session/sessionrebase.test 702378bdcb5062f1106e74457beca8797d09c113a81768734a58b197b5b334e2
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 5281536327d244ba9507548f7ed607e86e59b98a003e63f6da767471411c8ffc
-R 789a42abc3bc046ab3689d41ea48cbbd
-U drh
-Z a57fb295edbde74d3aaadaf4afebbd36
+P bcdaef434142973a0805117495e561b2dcd1ec1465cacc9b944a3707291afc0d
+R 39da0f1150c2b7d20d41e16df982bdbc
+U dan
+Z 0e33be44116920d8dfb3948dc71a5c16
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 1a4dca11c7..5d5632f5c9 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-bcdaef434142973a0805117495e561b2dcd1ec1465cacc9b944a3707291afc0d
+b1cc53fa3fb2ac3abeadd3282d8751f4d533315754159f16ca7f7f300ccdd8c8
From a5dbae3781a21ea91c210c41402e1213b97df649 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Mon, 6 Jan 2025 18:32:53 +0000
Subject: [PATCH 12/35] Fix a minor problem with the sqlite3_get_table_printf()
test interface. No core changes.
FossilOrigin-Name: a0df29c7a3eb4f558aba00598d827643830591def3101a4d5464543527b8d13c
---
manifest | 14 +++++++-------
manifest.uuid | 2 +-
src/test1.c | 1 +
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/manifest b/manifest
index cedab9b504..dfe068dcb6 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\stest\scase\sfor\susing\sboth\sSQLITE_CHANGESETAPPLY_IGNORENOOP\sand\sSQLITE_CHANGESETAPPLY_FKNOACTION.
-D 2025-01-06T17:01:35.295
+C Fix\sa\sminor\sproblem\swith\sthe\ssqlite3_get_table_printf()\stest\sinterface.\nNo\score\schanges.
+D 2025-01-06T18:32:53.875
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -789,7 +789,7 @@ F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
F src/tclsqlite.c 90441d3cc16f966a23499d9096a3d2d971e5e8fddb4d1413b096b79c2b2cff07
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
-F src/test1.c 2d507751bfb4aa254dc22588ef1e3c5c5cfcb2e636d0e6e1fa0bbd307669c2a8
+F src/test1.c 7f5579f2786c11cf4391ec2abb7b5b5b234ca1408599d7a0d6dd32360e5f58d8
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
F src/test3.c e7573aa0f78ee4e070a4bc8c3493941c1aa64d5c66d4825c74c0f055451f432b
F src/test4.c 13e57ae7ec7a959ee180970aef09deed141252fe9bb07c61054f0dfa4f1dfd5d
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P bcdaef434142973a0805117495e561b2dcd1ec1465cacc9b944a3707291afc0d
-R 39da0f1150c2b7d20d41e16df982bdbc
-U dan
-Z 0e33be44116920d8dfb3948dc71a5c16
+P b1cc53fa3fb2ac3abeadd3282d8751f4d533315754159f16ca7f7f300ccdd8c8
+R b841ee7b12f689b8a9384b533ea34d09
+U drh
+Z b3de29be7899c08cf5113466b37b5222
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 5d5632f5c9..c9d8176551 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-b1cc53fa3fb2ac3abeadd3282d8751f4d533315754159f16ca7f7f300ccdd8c8
+a0df29c7a3eb4f558aba00598d827643830591def3101a4d5464543527b8d13c
diff --git a/src/test1.c b/src/test1.c
index cf5d484e9e..a1a96d2b3c 100644
--- a/src/test1.c
+++ b/src/test1.c
@@ -600,6 +600,7 @@ static int SQLITE_TCLAPI test_get_table_printf(
}
sqlite3_free(zSql);
sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", rc);
+ Tcl_ResetResult(interp);
Tcl_AppendElement(interp, zBuf);
if( rc==SQLITE_OK ){
if( argc==4 ){
From 885f546f97374e9aaabb202bb4935bee56081ad5 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Mon, 6 Jan 2025 21:36:16 +0000
Subject: [PATCH 13/35] Fix a problem with tool/mksqlite3h.tcl that prevents it
from running out of a read-only check-out.
FossilOrigin-Name: cb54f0063edd284996b225183b8e35d71ffcd3c0fb4f56a0e316181f1a186d46
---
manifest | 12 ++++++------
manifest.uuid | 2 +-
tool/mksqlite3h.tcl | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/manifest b/manifest
index dfe068dcb6..466d999e03 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sminor\sproblem\swith\sthe\ssqlite3_get_table_printf()\stest\sinterface.\nNo\score\schanges.
-D 2025-01-06T18:32:53.875
+C Fix\sa\sproblem\swith\stool/mksqlite3h.tcl\sthat\sprevents\sit\sfrom\srunning\sout\sof\na\sread-only\scheck-out.
+D 2025-01-06T21:36:16.287
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -2154,7 +2154,7 @@ F tool/mksourceid.c 36aa8020014aed0836fd13c51d6dc9219b0df1761d6b5f58ff5b616211b0
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
F tool/mksqlite3c-noext.tcl 4f7cfef5152b0c91920355cbfc1d608a4ad242cb819f1aea07f6d0274f584a7f
F tool/mksqlite3c.tcl 9e88a30981280e33489fe4782f4ab1e5349ba1866603fba7f1a948d5599b9124
-F tool/mksqlite3h.tcl 7a4648fef5efb33308d575c7775eb242855d71d5bf89065df3f006b9a634a0a1
+F tool/mksqlite3h.tcl 5a8d23f35462bfcf74324a19465abd0ad6717b92a404d177160963c292df5d04
F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b
F tool/mksrczip.tcl 81efd9974dbb36005383f2cd655520057a2ae5aa85ac2441a80c7c28f803ac52
F tool/mktoolzip.tcl 34b4e92be544f820e2cc26f143f7d5aec511e826ec394cc82969a5dcf7c7a27c
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P b1cc53fa3fb2ac3abeadd3282d8751f4d533315754159f16ca7f7f300ccdd8c8
-R b841ee7b12f689b8a9384b533ea34d09
+P a0df29c7a3eb4f558aba00598d827643830591def3101a4d5464543527b8d13c
+R a69cbcd64a4b6b9f51efe8537d38ddcf
U drh
-Z b3de29be7899c08cf5113466b37b5222
+Z c3ef709b705fad2b3868091e66557171
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index c9d8176551..eb6e9849fd 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-a0df29c7a3eb4f558aba00598d827643830591def3101a4d5464543527b8d13c
+cb54f0063edd284996b225183b8e35d71ffcd3c0fb4f56a0e316181f1a186d46
diff --git a/tool/mksqlite3h.tcl b/tool/mksqlite3h.tcl
index c242005a07..b409d306b2 100644
--- a/tool/mksqlite3h.tcl
+++ b/tool/mksqlite3h.tcl
@@ -62,7 +62,7 @@ set nVersion [eval format "%d%03d%03d" [split $zVersion .]]
#
set PWD [pwd]
cd $TOP
-set tmpfile tmp-[clock millisec]-[expr {int(rand()*100000000000)}].txt
+set tmpfile $PWD/tmp-[clock millisec]-[expr {int(rand()*100000000000)}].txt
exec $PWD/mksourceid manifest > $tmpfile
set fd [open $tmpfile rb]
set zSourceId [string trim [read $fd]]
From fbbe26282092d2d1cb980cad9a90aa73748fd16b Mon Sep 17 00:00:00 2001
From: drh <>
Date: Mon, 6 Jan 2025 23:33:45 +0000
Subject: [PATCH 14/35] Enhance the makefile to make it easier to build from a
read-only source tree.
FossilOrigin-Name: f99a70eca2fd8a54be3a6629dabd62efc623488706eed5e5a1bd0be577ac1acb
---
main.mk | 4 ++--
manifest | 12 ++++++------
manifest.uuid | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/main.mk b/main.mk
index a22b0dfcdf..a0b08e5773 100644
--- a/main.mk
+++ b/main.mk
@@ -1043,9 +1043,9 @@ T.link.tcl = $(T.tcl.env.source); $(T.link)
rm -rf tsrc
mkdir tsrc
cp -f $(SRC) tsrc
- rm tsrc/sqlite.h.in tsrc/parse.y
+ rm -f tsrc/sqlite.h.in tsrc/parse.y
$(B.tclsh) $(TOP)/tool/vdbe-compress.tcl $(OPTS) vdbe.new
- mv vdbe.new tsrc/vdbe.c
+ mv -f vdbe.new tsrc/vdbe.c
cp fts5.c fts5.h tsrc
touch .target_source
diff --git a/manifest b/manifest
index 466d999e03..877d0877f2 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sproblem\swith\stool/mksqlite3h.tcl\sthat\sprevents\sit\sfrom\srunning\sout\sof\na\sread-only\scheck-out.
-D 2025-01-06T21:36:16.287
+C Enhance\sthe\smakefile\sto\smake\sit\seasier\sto\sbuild\sfrom\sa\sread-only\ssource\stree.
+D 2025-01-06T23:33:45.755
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -700,7 +700,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a
F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2
F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
-F main.mk fe86d83158b547e02f8d08aa6af2130540746a4a61de7c61ea8b9d09eb06acd4
+F main.mk 0b62344246f8a3e920edb8a52b0c3296dde829d7eb450f67b89c63d79536de85
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P a0df29c7a3eb4f558aba00598d827643830591def3101a4d5464543527b8d13c
-R a69cbcd64a4b6b9f51efe8537d38ddcf
+P cb54f0063edd284996b225183b8e35d71ffcd3c0fb4f56a0e316181f1a186d46
+R 5feebefef2332c303303ce808be74cd6
U drh
-Z c3ef709b705fad2b3868091e66557171
+Z 96dcc4cb8c6c1962175be17c438abbe8
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index eb6e9849fd..80e347be0c 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-cb54f0063edd284996b225183b8e35d71ffcd3c0fb4f56a0e316181f1a186d46
+f99a70eca2fd8a54be3a6629dabd62efc623488706eed5e5a1bd0be577ac1acb
From 4a6896379f8e45b04804e2606fa12371f02b1151 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 7 Jan 2025 00:17:54 +0000
Subject: [PATCH 15/35] Minor fixes to tclsqlite.c to promote portability.
FossilOrigin-Name: dd934f032fa6fc790a951006512e3ed76a5f2930858932918eafdbe3ceec4620
---
manifest | 12 ++++++------
manifest.uuid | 2 +-
src/tclsqlite.c | 5 +++--
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/manifest b/manifest
index 877d0877f2..c1482a11b0 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Enhance\sthe\smakefile\sto\smake\sit\seasier\sto\sbuild\sfrom\sa\sread-only\ssource\stree.
-D 2025-01-06T23:33:45.755
+C Minor\sfixes\sto\stclsqlite.c\sto\spromote\sportability.
+D 2025-01-07T00:17:54.439
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -787,7 +787,7 @@ F src/sqliteInt.h 3f20dfb5ae54e787b2643edc0b5bae0cecddfb89988e28afdc3c0b05892e25
F src/sqliteLimit.h 1bbdbf72bd0411d003267ffebc59a262f061df5653027a75627d03f48ca30523
F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
-F src/tclsqlite.c 90441d3cc16f966a23499d9096a3d2d971e5e8fddb4d1413b096b79c2b2cff07
+F src/tclsqlite.c ada7d3ffeabcec94776693c841dae28cdee93a256989ce024c8227134d733958
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
F src/test1.c 7f5579f2786c11cf4391ec2abb7b5b5b234ca1408599d7a0d6dd32360e5f58d8
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P cb54f0063edd284996b225183b8e35d71ffcd3c0fb4f56a0e316181f1a186d46
-R 5feebefef2332c303303ce808be74cd6
+P f99a70eca2fd8a54be3a6629dabd62efc623488706eed5e5a1bd0be577ac1acb
+R 5a83df004b6c0337f81b894fe038a2a2
U drh
-Z 96dcc4cb8c6c1962175be17c438abbe8
+Z 202998befd372783ac123e095ab97a9d
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 80e347be0c..070063b5ed 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-f99a70eca2fd8a54be3a6629dabd62efc623488706eed5e5a1bd0be577ac1acb
+dd934f032fa6fc790a951006512e3ed76a5f2930858932918eafdbe3ceec4620
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index f0b5c3e814..ea9d468a99 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -341,7 +341,7 @@ static int SQLITE_TCLAPI incrblobInput(
*/
static int SQLITE_TCLAPI incrblobOutput(
ClientData instanceData,
- CONST char *buf,
+ const char *buf,
int toWrite,
int *errorCodePtr
){
@@ -1843,7 +1843,8 @@ static Tcl_Obj *dbEvalColumnValue(DbEvalContext *p, int iCol){
** are 8.6 or newer, the code still tests the Tcl version at runtime.
** This allows stubs-enabled builds to be used with older Tcl libraries.
*/
-#if TCL_MAJOR_VERSION>8 || (TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION>=6)
+#if TCL_MAJOR_VERSION>8 || !defined(TCL_MINOR_VERSION) \
+ || TCL_MAJOR_VERSION>=6
# define SQLITE_TCL_NRE 1
static int DbUseNre(void){
int major, minor;
From e53393250ae446f97d3d8ad37ffa1a25d857b7fb Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 7 Jan 2025 11:54:43 +0000
Subject: [PATCH 16/35] Fix a typo in the previous check-in.
FossilOrigin-Name: 7d41885e85b0e2ef28bac34d663af07c35b21ee3e8b14481d2371f623bce681d
---
manifest | 12 ++++++------
manifest.uuid | 2 +-
src/tclsqlite.c | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/manifest b/manifest
index c1482a11b0..ecfcaef04e 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Minor\sfixes\sto\stclsqlite.c\sto\spromote\sportability.
-D 2025-01-07T00:17:54.439
+C Fix\sa\stypo\sin\sthe\sprevious\scheck-in.
+D 2025-01-07T11:54:43.065
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -787,7 +787,7 @@ F src/sqliteInt.h 3f20dfb5ae54e787b2643edc0b5bae0cecddfb89988e28afdc3c0b05892e25
F src/sqliteLimit.h 1bbdbf72bd0411d003267ffebc59a262f061df5653027a75627d03f48ca30523
F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
-F src/tclsqlite.c ada7d3ffeabcec94776693c841dae28cdee93a256989ce024c8227134d733958
+F src/tclsqlite.c 9004ed7a517e106087f70d2ec54a2a6819e55765151fa53d0d2cd408e698f99e
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
F src/test1.c 7f5579f2786c11cf4391ec2abb7b5b5b234ca1408599d7a0d6dd32360e5f58d8
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P f99a70eca2fd8a54be3a6629dabd62efc623488706eed5e5a1bd0be577ac1acb
-R 5a83df004b6c0337f81b894fe038a2a2
+P dd934f032fa6fc790a951006512e3ed76a5f2930858932918eafdbe3ceec4620
+R 1ccf02cc09665431fcc21407330e398e
U drh
-Z 202998befd372783ac123e095ab97a9d
+Z c9e32c83a7281ddac240e198b5bce057
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 070063b5ed..c4fbf1e0c3 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-dd934f032fa6fc790a951006512e3ed76a5f2930858932918eafdbe3ceec4620
+7d41885e85b0e2ef28bac34d663af07c35b21ee3e8b14481d2371f623bce681d
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index ea9d468a99..21437909ba 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -1844,7 +1844,7 @@ static Tcl_Obj *dbEvalColumnValue(DbEvalContext *p, int iCol){
** This allows stubs-enabled builds to be used with older Tcl libraries.
*/
#if TCL_MAJOR_VERSION>8 || !defined(TCL_MINOR_VERSION) \
- || TCL_MAJOR_VERSION>=6
+ || TCL_MINOR_VERSION>=6
# define SQLITE_TCL_NRE 1
static int DbUseNre(void){
int major, minor;
From 4717d573e44db999b305902a68c4bd83bd14f713 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 7 Jan 2025 12:14:32 +0000
Subject: [PATCH 17/35] Make the TCL extension aware of the booleanString type
within TCL.
FossilOrigin-Name: 14b38ae6ab86a314a63ca9513850b43fcc670864f94d03a2706eff469980da88
---
manifest | 12 ++++++------
manifest.uuid | 2 +-
src/tclsqlite.c | 5 ++++-
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/manifest b/manifest
index ecfcaef04e..8e3fb1f0fe 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\stypo\sin\sthe\sprevious\scheck-in.
-D 2025-01-07T11:54:43.065
+C Make\sthe\sTCL\sextension\saware\sof\sthe\sbooleanString\stype\swithin\sTCL.
+D 2025-01-07T12:14:32.905
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -787,7 +787,7 @@ F src/sqliteInt.h 3f20dfb5ae54e787b2643edc0b5bae0cecddfb89988e28afdc3c0b05892e25
F src/sqliteLimit.h 1bbdbf72bd0411d003267ffebc59a262f061df5653027a75627d03f48ca30523
F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
-F src/tclsqlite.c 9004ed7a517e106087f70d2ec54a2a6819e55765151fa53d0d2cd408e698f99e
+F src/tclsqlite.c 6e25a72d3f3769f779b05b2c618ae0388639d8e27d6434c2ff3926f3267342fe
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
F src/test1.c 7f5579f2786c11cf4391ec2abb7b5b5b234ca1408599d7a0d6dd32360e5f58d8
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P dd934f032fa6fc790a951006512e3ed76a5f2930858932918eafdbe3ceec4620
-R 1ccf02cc09665431fcc21407330e398e
+P 7d41885e85b0e2ef28bac34d663af07c35b21ee3e8b14481d2371f623bce681d
+R 7defba456aa3fec0b02242de054d2a9a
U drh
-Z c9e32c83a7281ddac240e198b5bce057
+Z 915ad0926614914c31505681a5658ee7
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index c4fbf1e0c3..4f85e88e04 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-7d41885e85b0e2ef28bac34d663af07c35b21ee3e8b14481d2371f623bce681d
+14b38ae6ab86a314a63ca9513850b43fcc670864f94d03a2706eff469980da88
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index 21437909ba..344b3e07c7 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -1098,6 +1098,7 @@ static void tclSqlFunc(sqlite3_context *context, int argc, sqlite3_value**argv){
** has no string representation. */
eType = SQLITE_BLOB;
}else if( (c=='b' && strcmp(zType,"boolean")==0)
+ || (c=='b' && strcmp(zType,"booleanString")==0 && pVar->bytes==0)
|| (c=='w' && strcmp(zType,"wideInt")==0)
|| (c=='i' && strcmp(zType,"int")==0)
){
@@ -1505,7 +1506,9 @@ static int dbPrepareAndBind(
sqlite3_bind_blob(pStmt, i, data, n, SQLITE_STATIC);
Tcl_IncrRefCount(pVar);
pPreStmt->apParm[iParm++] = pVar;
- }else if( c=='b' && strcmp(zType,"boolean")==0 ){
+ }else if( (c=='b' && strcmp(zType,"boolean")==0)
+ || (c=='b' && strcmp(zType,"booleanString")==0
+ && pVar->bytes==0) ){
int nn;
Tcl_GetIntFromObj(interp, pVar, &nn);
sqlite3_bind_int(pStmt, i, nn);
From 311990d74ed31b3622000d5e1ca85f31be6a0af7 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 7 Jan 2025 14:55:49 +0000
Subject: [PATCH 18/35] Enhancements to the Tcl SQLite extension testing
procedures so that they install a full-featured SQLite and so that Tcl is
build statically so that there is no need to worry with LD_LIBRARY_PATH.
FossilOrigin-Name: c8972e652ebe62a8583904b5bc1d96b2d598222c037a714c8ff114ca84b52c7a
---
doc/tcl-extension-testing.md | 12 ++++++++----
manifest | 12 ++++++------
manifest.uuid | 2 +-
3 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index ec624ceb5b..dfe47922e0 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -42,11 +42,13 @@ an ordinary tclsh can subsequently run "package require sqlite3".
- `fossil up core-8-6-16`
↑ Or some other version of Tcl8.6.
- `fossil clean -x`
-
- `./configure --prefix=$TCLBUILD/tcl86`
+
- `./configure --prefix=$TCLBUILD/tcl86 --disable-shared`
+ ↑ The --disable-shared is to avoid the need to set LD_LIBRARY_PATH
+ when using this Tcl build.
- `make install`
- `cd $SQLITESOURCE`
- `fossil clean -x`
-
- `./configure --with-tclsh=$TCLBUILD/tcl86/bin/tclsh8.6`
+
- `./configure --with-tclsh=$TCLBUILD/tcl86/bin/tclsh8.6 --all`
- `make tclextension-install`
↑ Verify extension installed at $TCLBUILD/tcl86/lib/tcl8.6/sqlite3.*
- `make tclextension-list`
@@ -65,11 +67,13 @@ an ordinary tclsh can subsequently run "package require sqlite3".
- `fossil up core-9-0-0`
↑ Or some other version of Tcl9
- `fossil clean -x`
-
- `./configure --prefix=$TCLBUILD/tcl90`
+
- `./configure --prefix=$TCLBUILD/tcl90 --disable-shared`
+ ↑ The --disable-shared is to avoid the need to set LD_LIBRARY_PATH
+ when using this Tcl build.
- `make install`
- `cd $SQLITESOURCE`
- `fossil clean -x`
-
- `./configure --with-tclsh=$TCLBUILD/tcl90/bin/tclsh9.0`
+
- `./configure --with-tclsh=$TCLBUILD/tcl90/bin/tclsh9.0 --all`
- `make tclextension-install`
↑ Verify extension installed at $TCLBUILD/tcl90/lib/sqlite3.*
- `make tclextension-list`
diff --git a/manifest b/manifest
index 8e3fb1f0fe..c5215c7f12 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Make\sthe\sTCL\sextension\saware\sof\sthe\sbooleanString\stype\swithin\sTCL.
-D 2025-01-07T12:14:32.905
+C Enhancements\sto\sthe\sTcl\sSQLite\sextension\stesting\sprocedures\sso\sthat\sthey\ninstall\sa\sfull-featured\sSQLite\sand\sso\sthat\sTcl\sis\sbuild\sstatically\sso\sthat\nthere\sis\sno\sneed\sto\sworry\swith\sLD_LIBRARY_PATH.
+D 2025-01-07T14:55:49.344
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md fca7b123e6f6c94f87c5e9285342fa08d17f118d47bea22c0b045485755fe9c3
+F doc/tcl-extension-testing.md 059992abc132fcec1a0c811b7d0f8c4fb08763e9833247b60b411e60a7e6128d
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 7d41885e85b0e2ef28bac34d663af07c35b21ee3e8b14481d2371f623bce681d
-R 7defba456aa3fec0b02242de054d2a9a
+P 14b38ae6ab86a314a63ca9513850b43fcc670864f94d03a2706eff469980da88
+R 811d0a9276e161f39f1993aa5a481734
U drh
-Z 915ad0926614914c31505681a5658ee7
+Z c4fb188a31a7551b0e4fe1e776f9db48
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 4f85e88e04..3d4d8f52f4 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-14b38ae6ab86a314a63ca9513850b43fcc670864f94d03a2706eff469980da88
+c8972e652ebe62a8583904b5bc1d96b2d598222c037a714c8ff114ca84b52c7a
From 4a833113706cc8a26f749f837e6492ac2ea79c6a Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 7 Jan 2025 15:00:00 +0000
Subject: [PATCH 19/35] Typo in the previous check-in.
FossilOrigin-Name: 5872d7a0a7d4959562e1218bbba1115df8b292d980234273d0d38749edf19822
---
doc/tcl-extension-testing.md | 2 +-
manifest | 12 ++++++------
manifest.uuid | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index dfe47922e0..e2edf2ef1c 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -67,7 +67,7 @@ an ordinary tclsh can subsequently run "package require sqlite3".
- `fossil up core-9-0-0`
↑ Or some other version of Tcl9
- `fossil clean -x`
-
- `./configure --prefix=$TCLBUILD/tcl90 --disable-shared`
+
- `./configure --prefix=$TCLBUILD/tcl90 --disable-shared`
↑ The --disable-shared is to avoid the need to set LD_LIBRARY_PATH
when using this Tcl build.
- `make install`
diff --git a/manifest b/manifest
index c5215c7f12..732add5baf 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Enhancements\sto\sthe\sTcl\sSQLite\sextension\stesting\sprocedures\sso\sthat\sthey\ninstall\sa\sfull-featured\sSQLite\sand\sso\sthat\sTcl\sis\sbuild\sstatically\sso\sthat\nthere\sis\sno\sneed\sto\sworry\swith\sLD_LIBRARY_PATH.
-D 2025-01-07T14:55:49.344
+C Typo\sin\sthe\sprevious\scheck-in.
+D 2025-01-07T15:00:00.521
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md 059992abc132fcec1a0c811b7d0f8c4fb08763e9833247b60b411e60a7e6128d
+F doc/tcl-extension-testing.md b6e9180a86aa65b53b5ced9c88b22e369e31fb779011c94435b6368d9e18d43d
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 14b38ae6ab86a314a63ca9513850b43fcc670864f94d03a2706eff469980da88
-R 811d0a9276e161f39f1993aa5a481734
+P c8972e652ebe62a8583904b5bc1d96b2d598222c037a714c8ff114ca84b52c7a
+R 48f035d8ef2866d48331e5816d8b1a78
U drh
-Z c4fb188a31a7551b0e4fe1e776f9db48
+Z 152a8e1b3ff1b7672d585ac11e0307c5
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 3d4d8f52f4..895b83beaa 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-c8972e652ebe62a8583904b5bc1d96b2d598222c037a714c8ff114ca84b52c7a
+5872d7a0a7d4959562e1218bbba1115df8b292d980234273d0d38749edf19822
From ece17299582b7766d26422e91019fcc535ca93c9 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 7 Jan 2025 15:39:57 +0000
Subject: [PATCH 20/35] Fix a memory error in test logic introduced by
[8704034254938662].
FossilOrigin-Name: 8a56e98d257e280d308b9fdc26e17e202f00a70fb9a780e30924e87a189fc7f4
---
manifest | 14 +++++++-------
manifest.uuid | 2 +-
src/test1.c | 6 +++++-
test/pragma4.test | 2 +-
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/manifest b/manifest
index 732add5baf..ba5fcdfbf6 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Typo\sin\sthe\sprevious\scheck-in.
-D 2025-01-07T15:00:00.521
+C Fix\sa\smemory\serror\sin\stest\slogic\sintroduced\sby\s[8704034254938662].
+D 2025-01-07T15:39:57.880
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -789,7 +789,7 @@ F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
F src/tclsqlite.c 6e25a72d3f3769f779b05b2c618ae0388639d8e27d6434c2ff3926f3267342fe
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
-F src/test1.c 7f5579f2786c11cf4391ec2abb7b5b5b234ca1408599d7a0d6dd32360e5f58d8
+F src/test1.c 07c9b523f90b96f6e9a701476602fa1f82075da19955823316b3fe13eaaa52cc
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
F src/test3.c e7573aa0f78ee4e070a4bc8c3493941c1aa64d5c66d4825c74c0f055451f432b
F src/test4.c 13e57ae7ec7a959ee180970aef09deed141252fe9bb07c61054f0dfa4f1dfd5d
@@ -1533,7 +1533,7 @@ F test/pg_common.tcl 3b27542224db1e713ae387459b5d117c836a5f6e328846922993b6d2b76
F test/pragma.test 11cb9310c42f921918f7f563e3c0b6e70f9f9c3a6a1cf12af8fccb6c574f3882
F test/pragma2.test e5d5c176360c321344249354c0c16aec46214c9f
F test/pragma3.test 92a46bbea12322dd94a404f49edcfbfc913a2c98115f0d030a7459bb4712ef31
-F test/pragma4.test 336b99c2a9fd35af3cc6da94f794b4cba09bbdb18f0ecbd3f734bb6bb8e1c15c
+F test/pragma4.test 396ef9bff1fb966d41721545ad4b12bfc26aae315f5fe51d9b917828d49e6f8e
F test/pragma5.test 7b33fc43e2e41abf17f35fb73f71b49671a380ea92a6c94b6ce530a25f8d9102
F test/pragma6.test c5ec577ba087954b4dfa619a3cbe97b155b60a0af487527abe89b10fc17e6512
F test/pragmafault.test 275edaf3161771d37de60e5c2b412627ac94cef11739236bec12ed1258b240f8
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c8972e652ebe62a8583904b5bc1d96b2d598222c037a714c8ff114ca84b52c7a
-R 48f035d8ef2866d48331e5816d8b1a78
+P 5872d7a0a7d4959562e1218bbba1115df8b292d980234273d0d38749edf19822
+R 2dc5969771af2d8527fa6ca2001dd4f3
U drh
-Z 152a8e1b3ff1b7672d585ac11e0307c5
+Z 0fbc54108ea801128f403bfa92cfd727
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 895b83beaa..77e363b6bd 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-5872d7a0a7d4959562e1218bbba1115df8b292d980234273d0d38749edf19822
+8a56e98d257e280d308b9fdc26e17e202f00a70fb9a780e30924e87a189fc7f4
diff --git a/src/test1.c b/src/test1.c
index a1a96d2b3c..4212c73232 100644
--- a/src/test1.c
+++ b/src/test1.c
@@ -7553,6 +7553,10 @@ static int SQLITE_TCLAPI test_wal_autocheckpoint(
/*
** tclcmd: test_sqlite3_log ?SCRIPT?
+**
+** Caution: If you register a log callback, you must deregister it (by
+** invoking test_sqlite3_log with no arguments) prior to closing the
+** Tcl interpreter or else a memory error will occur.
*/
static struct LogCallback {
Tcl_Interp *pInterp;
@@ -7584,7 +7588,7 @@ static int SQLITE_TCLAPI test_sqlite3_log(
logcallback.pInterp = 0;
sqlite3_config(SQLITE_CONFIG_LOG, (void*)0, (void*)0);
}
- if( objc>1 ){
+ if( objc>1 && Tcl_GetString(objv[1])[0]!=0 ){
logcallback.pObj = objv[1];
Tcl_IncrRefCount(logcallback.pObj);
logcallback.pInterp = interp;
diff --git a/test/pragma4.test b/test/pragma4.test
index 0466960cab..2ba87c0c60 100644
--- a/test/pragma4.test
+++ b/test/pragma4.test
@@ -301,7 +301,7 @@ ifcapable vtab {
do_test 6.3 {
set ::log
} {}
- test_sqlite3_log {}
+ test_sqlite3_log
}
# 2024-05-08 https://sqlite.org/forum/forumpost/cf29a33e94
From fd11e5c082e98d865c46a4a0d1069f55a484537f Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 7 Jan 2025 16:36:47 +0000
Subject: [PATCH 21/35] Improvements to [14b38ae6ab86a314] so that the Tcl
interface is better able to work with boolean values in both Tcl86 and Tcl90.
FossilOrigin-Name: 4e85343d6107a46682b549667410c296d7f4d17e3ac04ded7357afcbbfbe3e6d
---
manifest | 12 ++++++------
manifest.uuid | 2 +-
src/tclsqlite.c | 13 +++++++------
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/manifest b/manifest
index ba5fcdfbf6..bceb3b8591 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\smemory\serror\sin\stest\slogic\sintroduced\sby\s[8704034254938662].
-D 2025-01-07T15:39:57.880
+C Improvements\sto\s[14b38ae6ab86a314]\sso\sthat\sthe\sTcl\sinterface\sis\sbetter\sable\nto\swork\swith\sboolean\svalues\sin\sboth\sTcl86\sand\sTcl90.
+D 2025-01-07T16:36:47.331
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -787,7 +787,7 @@ F src/sqliteInt.h 3f20dfb5ae54e787b2643edc0b5bae0cecddfb89988e28afdc3c0b05892e25
F src/sqliteLimit.h 1bbdbf72bd0411d003267ffebc59a262f061df5653027a75627d03f48ca30523
F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
-F src/tclsqlite.c 6e25a72d3f3769f779b05b2c618ae0388639d8e27d6434c2ff3926f3267342fe
+F src/tclsqlite.c c6b9d3a0b1100e1e028460c418c41ca180dac5958e96bef79f6799b552522a37
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
F src/test1.c 07c9b523f90b96f6e9a701476602fa1f82075da19955823316b3fe13eaaa52cc
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 5872d7a0a7d4959562e1218bbba1115df8b292d980234273d0d38749edf19822
-R 2dc5969771af2d8527fa6ca2001dd4f3
+P 8a56e98d257e280d308b9fdc26e17e202f00a70fb9a780e30924e87a189fc7f4
+R 9f37d9e0a5a710d92c078118174ed306
U drh
-Z 0fbc54108ea801128f403bfa92cfd727
+Z 1267df4caaf383b5de45df3c7a06eba4
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 77e363b6bd..f17f9bb53b 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-8a56e98d257e280d308b9fdc26e17e202f00a70fb9a780e30924e87a189fc7f4
+4e85343d6107a46682b549667410c296d7f4d17e3ac04ded7357afcbbfbe3e6d
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index 344b3e07c7..598c9355ff 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -1097,8 +1097,8 @@ static void tclSqlFunc(sqlite3_context *context, int argc, sqlite3_value**argv){
/* Only return a BLOB type if the Tcl variable is a bytearray and
** has no string representation. */
eType = SQLITE_BLOB;
- }else if( (c=='b' && strcmp(zType,"boolean")==0)
- || (c=='b' && strcmp(zType,"booleanString")==0 && pVar->bytes==0)
+ }else if( (c=='b' && pVar->bytes==0 && strcmp(zType,"boolean")==0 )
+ || (c=='b' && pVar->bytes==0 && strcmp(zType,"booleanString")==0 )
|| (c=='w' && strcmp(zType,"wideInt")==0)
|| (c=='i' && strcmp(zType,"int")==0)
){
@@ -1506,11 +1506,12 @@ static int dbPrepareAndBind(
sqlite3_bind_blob(pStmt, i, data, n, SQLITE_STATIC);
Tcl_IncrRefCount(pVar);
pPreStmt->apParm[iParm++] = pVar;
- }else if( (c=='b' && strcmp(zType,"boolean")==0)
- || (c=='b' && strcmp(zType,"booleanString")==0
- && pVar->bytes==0) ){
+ }else if( c=='b' && pVar->bytes==0
+ && (strcmp(zType,"booleanString")==0
+ || strcmp(zType,"boolean")==0)
+ ){
int nn;
- Tcl_GetIntFromObj(interp, pVar, &nn);
+ Tcl_GetBooleanFromObj(interp, pVar, &nn);
sqlite3_bind_int(pStmt, i, nn);
}else if( c=='d' && strcmp(zType,"double")==0 ){
double r;
From 6962f3d8144a4aba8f19961381593f20874f5776 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 7 Jan 2025 18:50:19 +0000
Subject: [PATCH 22/35] Further refinement to the Tcl extension testing
procedure.
FossilOrigin-Name: 32b8b078d16b8931afa56e587cf840412c65b68da0bc6fd6280ac773295116cf
---
doc/tcl-extension-testing.md | 17 ++++++++++++++++-
manifest | 12 ++++++------
manifest.uuid | 2 +-
3 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index e2edf2ef1c..c82d336a25 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -14,6 +14,18 @@ aspect of the SQLite TCL extension, and in particular to verify
that the "make tclextension-install" build target works and that
an ordinary tclsh can subsequently run "package require sqlite3".
+This procedure can also be used as a template for how to set up
+a local TCL+SQLite development environment. In other words, it
+can be be used as a guide on how to compile per-user copies of
+Tcl that are used to develop, test, and debug SQLite. In that
+case, perhaps make minor changes to the procedure such as:
+
+ * Make TCLBUILD directory is permanent.
+ * Enable debugging symbols on the Tcl library build.
+ * Reduce the optimization level to -O0 for easier debugging.
+ * Also compile "wish" to go with each "tclsh".
+
+
## 2.0 Testing On Unix-like Systems (Including Mac)
### 2.1 Setup
@@ -71,6 +83,9 @@ an ordinary tclsh can subsequently run "package require sqlite3".
↑ The --disable-shared is to avoid the need to set LD_LIBRARY_PATH
when using this Tcl build.
- `make install`
+
- `cp -r ../library $TCLBUILD/tcl90/lib/tcl9.0`
+ ↑ The Tcl library is not installed in the expected place by
+ "make install" in Tcl9.0. This step is not required when building Tcl8.6.
- `cd $SQLITESOURCE`
- `fossil clean -x`
- `./configure --with-tclsh=$TCLBUILD/tcl90/bin/tclsh9.0 --all`
@@ -87,7 +102,7 @@ an ordinary tclsh can subsequently run "package require sqlite3".
### 2.4 Cleanup
-- `rm -rf $TCLBUILD`
+
- `rm -rf $TCLBUILD`
## 3.0 Testing On Windows
diff --git a/manifest b/manifest
index bceb3b8591..ea9d0e4fd4 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Improvements\sto\s[14b38ae6ab86a314]\sso\sthat\sthe\sTcl\sinterface\sis\sbetter\sable\nto\swork\swith\sboolean\svalues\sin\sboth\sTcl86\sand\sTcl90.
-D 2025-01-07T16:36:47.331
+C Further\srefinement\sto\sthe\sTcl\sextension\stesting\sprocedure.
+D 2025-01-07T18:50:19.567
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md b6e9180a86aa65b53b5ced9c88b22e369e31fb779011c94435b6368d9e18d43d
+F doc/tcl-extension-testing.md 4c0f45c9d9923b120573a006f71f1558a18aecc71bd66e5b1a182c49a2ee8c65
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 8a56e98d257e280d308b9fdc26e17e202f00a70fb9a780e30924e87a189fc7f4
-R 9f37d9e0a5a710d92c078118174ed306
+P 4e85343d6107a46682b549667410c296d7f4d17e3ac04ded7357afcbbfbe3e6d
+R 28cb3fd95e62d91bdc02718299c22dad
U drh
-Z 1267df4caaf383b5de45df3c7a06eba4
+Z 6cf3497825f1341be717f1a079f18695
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index f17f9bb53b..cf808db214 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-4e85343d6107a46682b549667410c296d7f4d17e3ac04ded7357afcbbfbe3e6d
+32b8b078d16b8931afa56e587cf840412c65b68da0bc6fd6280ac773295116cf
From 45d19952c394d32e67789929242185a57f4390a7 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Wed, 8 Jan 2025 12:25:33 +0000
Subject: [PATCH 23/35] In the doc/tcl-extension-testing.md document, provide
enhanced explanation for why the tcl library needs to be copied into the
install directory.
FossilOrigin-Name: cff70c859fff37f886fd622b7335a73836ff8cf15e6cb7aabcff449a7e427fa8
---
doc/tcl-extension-testing.md | 10 ++++++++--
manifest | 12 ++++++------
manifest.uuid | 2 +-
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index c82d336a25..e5ae6dc731 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -84,8 +84,14 @@ case, perhaps make minor changes to the procedure such as:
when using this Tcl build.
- `make install`
- `cp -r ../library $TCLBUILD/tcl90/lib/tcl9.0`
- ↑ The Tcl library is not installed in the expected place by
- "make install" in Tcl9.0. This step is not required when building Tcl8.6.
+ ↑ The Tcl library is not installed by "make install" for Tcl9.0 unless
+ you also include the --disable-zipfs to ./configure. But if you do that
+ then the generated tclsh9.0 is no longer stand-alone. On the other hand,
+ if you don't install the Tcl library, other programs like testfixture
+ won't be able to find the Tcl library and hence won't work. This
+ extra installation step resolves the dilemma.
+ This step is not required when building Tcl8.6, which lacks support for
+ zipfs and hence always installs its Tcl library.
- `cd $SQLITESOURCE`
- `fossil clean -x`
- `./configure --with-tclsh=$TCLBUILD/tcl90/bin/tclsh9.0 --all`
diff --git a/manifest b/manifest
index ea9d0e4fd4..4fea8ee35a 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Further\srefinement\sto\sthe\sTcl\sextension\stesting\sprocedure.
-D 2025-01-07T18:50:19.567
+C In\sthe\sdoc/tcl-extension-testing.md\sdocument,\sprovide\senhanced\sexplanation\sfor\nwhy\sthe\stcl\slibrary\sneeds\sto\sbe\scopied\sinto\sthe\sinstall\sdirectory.
+D 2025-01-08T12:25:33.217
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,7 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md 4c0f45c9d9923b120573a006f71f1558a18aecc71bd66e5b1a182c49a2ee8c65
+F doc/tcl-extension-testing.md 45dfc22b414d0b928f9c45aef2c8ae0a2f1d31b38c5582fe6283258a86d7e45f
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 4e85343d6107a46682b549667410c296d7f4d17e3ac04ded7357afcbbfbe3e6d
-R 28cb3fd95e62d91bdc02718299c22dad
+P 32b8b078d16b8931afa56e587cf840412c65b68da0bc6fd6280ac773295116cf
+R 52cb466101bde28f58c7d46df96d4072
U drh
-Z 6cf3497825f1341be717f1a079f18695
+Z cbebb7dddd96cd0f0ae4da260aa15c99
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index cf808db214..0080029df3 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-32b8b078d16b8931afa56e587cf840412c65b68da0bc6fd6280ac773295116cf
+cff70c859fff37f886fd622b7335a73836ff8cf15e6cb7aabcff449a7e427fa8
From af8af121ab77bb761ccd975d97d216c932a9ba08 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Wed, 8 Jan 2025 12:51:28 +0000
Subject: [PATCH 24/35] Cross-link and otherwise improve the various
how-to-compile documents. No code changes.
FossilOrigin-Name: 5e6ede92afae77ce6023f3b294dc565651631c7976d898d800988f1b3ff2e83f
---
doc/compile-for-unix.md | 6 +++++-
doc/compile-for-windows.md | 10 ++++++----
doc/tcl-extension-testing.md | 8 ++++++++
manifest | 16 ++++++++--------
manifest.uuid | 2 +-
5 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/doc/compile-for-unix.md b/doc/compile-for-unix.md
index 7e3784d695..ce76b97bae 100644
--- a/doc/compile-for-unix.md
+++ b/doc/compile-for-unix.md
@@ -4,6 +4,8 @@ Here are step-by-step instructions on how to build SQLite from
canonical source on any modern machine that isn't Windows. These
notes are tested (on 2024-10-11) on Ubuntu and on MacOS, but they
are general and should work on most any modern unix platform.
+See the companion document ([](./compile-for-windows.md>)) for
+guidance on building for Windows.
1. Install a C-compiler. GCC or Clang both work fine. If you are
reading this document, you've probably already done that.
@@ -12,6 +14,8 @@ are general and should work on most any modern unix platform.
we'll do a private install in the $HOME/local directory,
but you can make adjustments to install TCL wherever you like.
This document assumes you are working with TCL version 9.0.
+ See also the [](./tcl-extension-testing.md) document that contains
+ more details on compiling Tcl for use with SQLite.
- Get the TCL source archive, perhaps from
@@ -45,7 +49,7 @@ are general and should work on most any modern unix platform.
- `make sqldiff`
- `make sqlite3_rsync`
-
None of the targets above require TCL. TCL is only needed
+
None of the targets above require TCL. TCL is needed
for the following targets:
- `make tclextension-install`
diff --git a/doc/compile-for-windows.md b/doc/compile-for-windows.md
index 5cecfbf547..717569dd78 100644
--- a/doc/compile-for-windows.md
+++ b/doc/compile-for-windows.md
@@ -1,7 +1,9 @@
# Notes On Compiling SQLite On Windows 11
-Here are step-by-step instructions on how to build SQLite from
-canonical source on a new Windows 11 PC, as of 2024-10-09:
+Below are step-by-step instructions on how to build SQLite from
+canonical source on a new Windows 11 PC, as of 2024-10-09.
+See [](./compile-for-unix.md) for a similar guide for unix-like
+systems, including MacOS.
1. Install Microsoft Visual Studio. The free "community edition"
will work fine. Do a standard install for C++ development.
@@ -33,8 +35,8 @@ canonical source on a new Windows 11 PC, as of 2024-10-09:
"tclsh90.exe" command-line tool as part of the build process, and
the "tcl90.lib" and "tclstub.lib" libraries in order to run tests.
This document assumes you are working with TCL version 9.0.
- See versions of this document from prior to 2024-10-10 for
- instructions on how to build using TCL version 8.6.
+ See [](./tcl-extension-testing.md#windows) for guidance on how
+ to compile TCL version 8.6 for use with SQLite.
- Get the TCL source archive, perhaps from
diff --git a/doc/tcl-extension-testing.md b/doc/tcl-extension-testing.md
index e5ae6dc731..df5f6537ba 100644
--- a/doc/tcl-extension-testing.md
+++ b/doc/tcl-extension-testing.md
@@ -26,8 +26,12 @@ case, perhaps make minor changes to the procedure such as:
* Also compile "wish" to go with each "tclsh".
+
## 2.0 Testing On Unix-like Systems (Including Mac)
+See also the [](./compile-for-unix.md) document which provides another
+perspective on how to compile SQLite on unix-like systems.
+
### 2.1 Setup
@@ -111,8 +115,12 @@ case, perhaps make minor changes to the procedure such as:
- `rm -rf $TCLBUILD`
+
## 3.0 Testing On Windows
+See also the [](./compile-for-windows.md) document which provides another
+perspective on how to compile SQLite on Windows.
+
### 3.1 Setup for Windows
diff --git a/manifest b/manifest
index 4fea8ee35a..a8b5736857 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In\sthe\sdoc/tcl-extension-testing.md\sdocument,\sprovide\senhanced\sexplanation\sfor\nwhy\sthe\stcl\slibrary\sneeds\sto\sbe\scopied\sinto\sthe\sinstall\sdirectory.
-D 2025-01-08T12:25:33.217
+C Cross-link\sand\sotherwise\simprove\sthe\svarious\show-to-compile\sdocuments.\nNo\scode\schanges.
+D 2025-01-08T12:51:28.347
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -55,13 +55,13 @@ F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7
F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
-F doc/compile-for-unix.md 7d6a5770611ea0643de456b385581923dac7c0a7c3758825dda810d12fc3e5b2
-F doc/compile-for-windows.md 791f1754fcd669b0a8fdcdc0fdd56eff8c148add7457e8bf4863b46829966fc1
+F doc/compile-for-unix.md c9dce1ddd4bf0d25efccc5c63eb047e78c01ce06a6ff29c73e0a8af4a0f4adbc
+F doc/compile-for-windows.md 31cddda1d5f34027f1f2b7484d580e7558f22a9875884805b6fdc84d56cab848
F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347bb123ce1ea4f
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
-F doc/tcl-extension-testing.md 45dfc22b414d0b928f9c45aef2c8ae0a2f1d31b38c5582fe6283258a86d7e45f
+F doc/tcl-extension-testing.md 864875c3b672db79e7d42348dd726f9a4fbd852b1d8e5efcf09fe3d1ff6bf2a2
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 32b8b078d16b8931afa56e587cf840412c65b68da0bc6fd6280ac773295116cf
-R 52cb466101bde28f58c7d46df96d4072
+P cff70c859fff37f886fd622b7335a73836ff8cf15e6cb7aabcff449a7e427fa8
+R 9e488272febec3d17c3861ccb9f3e0b0
U drh
-Z cbebb7dddd96cd0f0ae4da260aa15c99
+Z 5539a934602dd195ca384aa9f37e29a3
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 0080029df3..d3b8030481 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-cff70c859fff37f886fd622b7335a73836ff8cf15e6cb7aabcff449a7e427fa8
+5e6ede92afae77ce6023f3b294dc565651631c7976d898d800988f1b3ff2e83f
From ad460db7eb21cbcdd4f509653f86acbcf43029dc Mon Sep 17 00:00:00 2001
From: dan
Date: Wed, 8 Jan 2025 15:54:44 +0000
Subject: [PATCH 25/35] Fix a crash in fts5 that could occur if shadow tables
are modified or removed.
FossilOrigin-Name: c0b691095ae72fc07530777ef6d23688fb4196ce2e0feff14fc3c597c572252d
---
ext/fts5/fts5_index.c | 6 +-
ext/fts5/fts5_storage.c | 5 +
ext/fts5/test/fts5circref.test | 2 +-
ext/fts5/test/fts5corrupt3.test | 233 +++++++++++++++++++++++++++++++
ext/fts5/test/fts5savepoint.test | 2 +-
manifest | 22 +--
manifest.uuid | 2 +-
7 files changed, 257 insertions(+), 15 deletions(-)
diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c
index 242258af70..2e512fd215 100644
--- a/ext/fts5/fts5_index.c
+++ b/ext/fts5/fts5_index.c
@@ -891,9 +891,13 @@ static int fts5IndexPrepareStmt(
){
if( p->rc==SQLITE_OK ){
if( zSql ){
- p->rc = sqlite3_prepare_v3(p->pConfig->db, zSql, -1,
+ int rc = sqlite3_prepare_v3(p->pConfig->db, zSql, -1,
SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_NO_VTAB,
ppStmt, 0);
+ /* If this prepare() call fails with SQLITE_ERROR, then one of the
+ ** %_idx or %_data tables has been removed or modified. Call this
+ ** corruption. */
+ p->rc = (rc==SQLITE_ERROR ? SQLITE_CORRUPT : rc);
}else{
p->rc = SQLITE_NOMEM;
}
diff --git a/ext/fts5/fts5_storage.c b/ext/fts5/fts5_storage.c
index 31f5fc5dc3..2b43016bef 100644
--- a/ext/fts5/fts5_storage.c
+++ b/ext/fts5/fts5_storage.c
@@ -205,6 +205,11 @@ static int fts5StorageGetStmt(
if( rc!=SQLITE_OK && pzErrMsg ){
*pzErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pC->db));
}
+ if( rc==SQLITE_ERROR && eStmt>FTS5_STMT_LOOKUP2 && eStmt
Date: Wed, 8 Jan 2025 20:43:03 +0000
Subject: [PATCH 26/35] Fix another assert() failure in fts5.
FossilOrigin-Name: 6da37893f5b5729ea5fd632e8d98789e867488a67501d4a4dad92f8e7cb6bda0
---
ext/fts5/fts5_main.c | 3 +-
ext/fts5/test/fts5corrupt5.test | 235 ++++++++++++++++++++++++++++++++
manifest | 14 +-
manifest.uuid | 2 +-
4 files changed, 245 insertions(+), 9 deletions(-)
diff --git a/ext/fts5/fts5_main.c b/ext/fts5/fts5_main.c
index 876420f24d..474f7441e9 100644
--- a/ext/fts5/fts5_main.c
+++ b/ext/fts5/fts5_main.c
@@ -1913,7 +1913,7 @@ static int fts5UpdateMethod(
);
assert( pTab->p.pConfig->pzErrmsg==0 );
if( pConfig->pgsz==0 ){
- rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex);
+ rc = sqlite3Fts5ConfigLoad(pTab->p.pConfig, pTab->p.pConfig->iCookie);
if( rc!=SQLITE_OK ) return rc;
}
@@ -2126,6 +2126,7 @@ static int fts5RollbackMethod(sqlite3_vtab *pVtab){
Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
fts5CheckTransactionState(pTab, FTS5_ROLLBACK, 0);
rc = sqlite3Fts5StorageRollback(pTab->pStorage);
+ pTab->p.pConfig->pgsz = 0;
return rc;
}
diff --git a/ext/fts5/test/fts5corrupt5.test b/ext/fts5/test/fts5corrupt5.test
index 19f0538418..ddb22f870d 100644
--- a/ext/fts5/test/fts5corrupt5.test
+++ b/ext/fts5/test/fts5corrupt5.test
@@ -1451,6 +1451,241 @@ do_catchsql_test 9.2 {
DELETE FROM t1;
} {1 {database disk image is malformed}}
+#-------------------------------------------------------------------------
+reset_db
+do_test 10.0 {
+ sqlite3 db {}
+ db deserialize [decode_hexdb {
+.open --hexdb
+| size 32768 pagesize 4096 filename crash-b06f016068bcea.db
+| page 1 offset 0
+| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
+| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08 .....@ ........
+| 32: 00 00 00 02 00 00 00 01 00 00 00 09 00 00 00 04 ................
+| 96: 00 00 00 00 0d 0f c7 00 07 0d 92 00 0f 8d 0f 36 ...............6
+| 112: 0e cb 0e 6b 0e 0e 0d b6 0d 92 0d 92 00 00 00 00 ...k............
+| 3472: 00 00 22 08 06 17 11 11 01 31 74 61 62 6c 65 74 .........1tablet
+| 3488: 32 74 32 08 43 52 45 41 54 45 20 54 41 42 4c 45 2t2.CREATE TABLE
+| 3504: 20 74 32 28 78 29 56 07 06 17 1f 1f 01 7d 74 61 t2(x)V.......ta
+| 3520: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 blet1_configt1_c
+| 3536: 6f 6e 66 69 67 07 43 52 45 41 54 45 20 54 41 42 onfig.CREATE TAB
+| 3552: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b LE 't1_config'(k
+| 3568: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 PRIMARY KEY, v)
+| 3584: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 06 WITHOUT ROWID[.
+| 3600: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64 ..!!...tablet1_d
+| 3616: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 ocsizet1_docsize
+| 3632: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 .CREATE TABLE 't
+| 3648: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 1_docsize'(id IN
+| 3664: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 TEGER PRIMARY KE
+| 3680: 59 2c 20 73 7a 20 42 4c 4f 42 29 5e 05 07 17 21 Y, sz BLOB)^...!
+| 3696: 21 01 81 07 74 61 62 6c 65 74 31 5f 63 6f 6e 74 !...tablet1_cont
+| 3712: 65 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 05 43 52 entt1_content.CR
+| 3728: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63 EATE TABLE 't1_c
+| 3744: 6f 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47 ontent'(id INTEG
+| 3760: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
+| 3776: 63 30 2c 20 63 31 2c 20 63 32 29 69 04 07 17 19 c0, c1, c2)i....
+| 3792: 19 01 81 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 ...-tablet1_idxt
+| 3808: 31 5f 69 64 78 04 43 52 45 41 54 45 20 54 41 42 1_idx.CREATE TAB
+| 3824: 4c 45 20 27 74 31 5f 69 64 78 27 28 73 65 67 69 LE 't1_idx'(segi
+| 3840: 64 2c 20 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 d, term, pgno, P
+| 3856: 52 49 4d 41 52 59 20 4b 45 59 28 73 65 67 69 64 RIMARY KEY(segid
+| 3872: 2c 20 74 65 72 6d 29 29 20 57 49 54 48 4f 55 54 , term)) WITHOUT
+| 3888: 20 52 4f 57 49 44 55 03 07 17 1b 1b 01 81 01 74 ROWIDU........t
+| 3904: 61 62 6c 65 74 31 5f 64 61 74 61 74 31 5f 64 61 ablet1_datat1_da
+| 3920: 74 61 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 ta.CREATE TABLE
+| 3936: 27 74 31 5f 64 61 74 61 27 28 69 64 20 49 4e 54 't1_data'(id INT
+| 3952: 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 EGER PRIMARY KEY
+| 3968: 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 38 02 06 , block BLOB)8..
+| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
+| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
+| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 LE t1 USING fts5
+| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
+| page 3 offset 8192
+| 0: 0d 00 00 00 03 0c 94 00 0f e6 0f ef 0c 94 00 00 ................
+| 3216: 00 00 00 00 86 4a 84 80 80 80 80 01 04 00 8d 18 .....J..........
+| 3232: 00 00 03 2b 02 30 30 01 02 06 01 02 06 01 02 06 ...+.00.........
+| 3248: 1f 02 03 01 02 03 01 02 03 01 08 32 30 31 36 30 ...........20160
+| 3264: 36 30 39 01 02 07 01 02 07 01 02 07 01 01 34 01 609...........4.
+| 3280: 02 05 01 02 05 01 02 05 01 01 35 01 02 04 01 02 ..........5.....
+| 3296: 04 01 02 04 02 07 30 30 30 30 30 30 30 1c 02 04 ......0000000...
+| 3312: 01 02 04 01 02 04 01 06 62 69 6e 61 72 79 03 06 ........binary..
+| 3328: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
+| 3344: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
+| 3360: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
+| 3376: 03 06 01 02 02 03 06 01 02 02 01 08 63 6f 6d 70 ............comp
+| 3392: 69 6c 65 72 01 02 02 01 02 02 01 02 02 01 06 64 iler...........d
+| 3408: 62 73 74 61 74 07 02 03 01 02 03 01 02 03 02 04 bstat...........
+| 3424: 65 62 75 67 04 02 02 01 02 02 01 02 02 01 06 65 ebug...........e
+| 3440: 6e 61 62 6c 65 07 02 02 01 02 02 01 02 02 01 02 nable...........
+| 3456: 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 ................
+| 3472: 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 ................
+| 3488: 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 ................
+| 3504: 02 01 02 02 02 08 78 74 65 6e 73 69 6f 6e 1f 02 ......xtension..
+| 3520: 04 01 02 04 01 02 04 01 04 66 74 73 34 0a 02 03 .........fts4...
+| 3536: 01 02 03 01 02 03 04 01 35 0d 02 03 01 02 03 01 ........5.......
+| 3552: 02 03 01 03 67 63 63 01 02 03 01 02 03 01 02 03 ....gcc.........
+| 3568: 02 06 65 6f 70 6f 6c 79 10 02 03 01 02 03 01 02 ..eopoly........
+| 3584: 03 01 05 6a 73 6f 6e 31 13 02 03 01 02 03 01 02 ...json1........
+| 3600: 03 01 04 6c 6f 61 64 1f 02 03 01 02 03 01 02 03 ...load.........
+| 3616: 01 03 6d 61 78 1c 02 02 01 02 02 01 02 02 02 05 ..max...........
+| 3632: 65 6d 6f 72 79 1c 02 03 01 02 03 01 02 03 04 04 emory...........
+| 3648: 73 79 73 35 16 02 03 01 02 02 03 01 03 01 06 6e sys5...........n
+| 3664: 6f 63 61 73 65 02 06 01 02 02 03 06 01 02 02 03 ocase...........
+| 3680: 06 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 ................
+| 3696: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
+| 3712: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
+| 3728: 02 01 04 6f 6d 69 74 1f 02 02 01 02 02 01 02 02 ...omit.........
+| 3744: 01 05 72 74 72 65 65 19 02 03 01 02 03 01 02 03 ..rtree.........
+| 3760: 04 02 69 6d 01 06 01 02 02 03 06 01 02 02 03 06 ..im............
+| 3776: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
+| 3792: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
+| 3808: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
+| 3824: 01 0a 74 68 72 65 61 64 73 61 66 65 03 57 34 56 ..threadsafe.W4V
+| 3840: 94 64 91 46 85 84 04 76 74 61 62 07 02 04 01 02 .d.F...vtab.....
+| 3856: 04 01 02 04 01 01 78 01 06 01 01 02 01 06 01 01 ......x.........
+| 3872: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 10 02 ................
+| 3888: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
+| 3904: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
+| 3920: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
+| 3936: 01 02 01 06 01 01 10 01 06 01 01 02 01 06 01 01 ................
+| 3952: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 ................
+| 3968: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
+| 3984: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
+| 4000: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
+| 4016: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
+| 4032: 02 01 06 01 01 02 01 06 01 01 02 04 15 13 0c 0c ................
+| 4048: 12 44 13 11 0f 47 13 0f 0c 0e 11 10 0f 0e 10 0f .D...G..........
+| 4064: 44 0f 10 40 15 0f 07 01 03 00 14 24 5a 24 24 0f D..@.......$Z$$.
+| 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 01 ...$............
+| page 4 offset 12288
+| 0: 0a 00 00 00 01 0f fa 00 00 00 00 00 00 00 00 00 ................
+| 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
+| page 5 offset 16384
+| 0: 0d 00 00 00 24 0c 0a 00 0f d8 0f af 0f 86 0f 74 ....$..........t
+| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
+| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
+| 48: 0d bb 0d a0 0d 84 0d 68 0d 4f 0d 35 0d 1b 0c fb .......h.O.5....
+| 64: 0c da 0c b9 0c 99 0c 00 00 00 00 00 00 00 00 00 ................
+| 3072: 00 00 00 00 00 00 00 00 00 00 18 24 05 00 25 0f ...........$..%.
+| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
+| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
+| 3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22 DSAFE=0XNOCASE..
+| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 31 46 45 3d ..%..THREADS1FE=
+| 3152: 30 58 52 64 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRdRIM.!..3..OM
+| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f IT LOAD EXTENSIO
+| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
+| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
+| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
+| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
+| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
+| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
+| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
+| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
+| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
+| 3328: 0f 17 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MAX MEMORY=500
+| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
+| 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
+| 3376: 49 4e 41 52 59 18 1a 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
+| 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
+| 3408: 19 05 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
+| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
+| 3440: 4e 41 42 4b 45 20 4d 45 4d 53 59 53 35 58 42 49 NABKE MEMSYS5XBI
+| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
+| 3472: 42 60 2d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 B`-EMSYS5XNOCASE
+| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 46 ....)..ENABLE MF
+| 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 15 05 00 25 MSYS5XRTRIM....%
+| 3520: 0f 19 45 4e 41 42 4c 45 20 4a 53 4f 4e 31 58 42 ..ENABLE JSON1XB
+| 3536: 49 4e 41 52 59 18 14 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
+| 3552: 4c 45 20 4a 53 4f 4e 31 58 4e 4f 43 41 53 45 17 LE JSON1XNOCASE.
+| 3568: 13 05 00 25 0f 17 45 4e 41 42 4c 45 20 4a 53 4f ...%..ENABLE JSO
+| 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 00 29 0f 19 45 N1XRTRIM....)..E
+| 3600: 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 49 4e 41 BLE GEOPOLYXBINA
+| 3616: 52 59 1a 11 05 00 39 0f 19 45 4e 41 42 4c 45 2e RY....9..ENABLE.
+| 3632: 41 40 47 45 4f 50 4f 4c 59 58 4e 4f 43 41 53 40 A@GEOPOLYXNOCAS@
+| 3648: 4f 4c 59 58 55 09 10 05 00 29 0f 17 45 4e 41 42 OLYXU....)..ENAB
+| 3664: 4c 45 20 47 45 4f 52 54 52 49 4d 17 0f 05 00 23 LE GEORTRIM....#
+| 3680: 0f 19 45 4e 41 42 4c 45 20 46 54 53 35 58 42 49 ..ENABLE FTS5XBI
+| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
+| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0d 05 E FTS5XNOCASE...
+| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
+| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
+| 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 17 0b LE FTS4XBINARY..
+| 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
+| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
+| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
+| 3824: 09 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
+| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
+| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
+| 3872: 54 41 54 20 56 54 24 15 48 4e 4f 43 41 53 45 1d TAT VT$.HNOCASE.
+| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
+| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 49 4d 11 06 TAT VTABXRTRIM..
+| 3920: 05 00 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
+| 3936: 59 11 05 05 00 17 0f 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
+| 3952: 43 41 53 45 10 04 05 00 17 0f 17 44 45 42 55 47 CASE.......DEBUG
+| 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
+| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
+| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
+| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
+| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
+| 4048: 39 58 4e 4f 43 41 53 45 26 01 05 00 43 0f 17 43 9XNOCASE&...C..C
+| 4064: 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e OMPILER=gcc-5.4.
+| 4080: 30 20 32 30 31 36 30 36 30 39 58 52 54 52 49 4d 0 20160609XRTRIM
+| page 6 offset 20480
+| 0: 0d 00 00 00 24 0e e0 00 0f f8 0f f0 0f e8 0f e0 ....$...........
+| 16: 0f d8 0f d0 0f c8 0f c0 0f b8 0f b0 0f a8 0f a0 ................
+| 32: 1f 98 0f 90 0f 88 0f 80 0f 78 0f 70 0f 68 0f 60 .........x.p.h.`
+| 48: 0f 58 0f 50 0f 48 0f 40 0f 38 0f 30 0f 28 0f 20 .X.P.H.@.8.0.(.
+| 64: 0f 18 0f 10 0f 08 0f 00 0e f8 0e f0 0e e8 00 00 ................
+| 3808: 06 24 03 00 12 02 01 01 06 23 03 00 12 02 01 01 .$.......#......
+| 3824: 06 22 03 00 12 02 01 01 06 21 03 00 12 03 01 01 .........!......
+| 3840: 06 20 03 00 12 03 01 01 06 1f 03 00 12 03 01 01 . ..............
+| 3856: 06 1e 03 00 12 03 01 01 06 1d 03 00 12 03 01 01 ................
+| 3872: 06 1c 03 00 12 03 01 01 06 1b 03 00 12 02 01 01 ................
+| 3888: 06 1a 03 00 12 02 01 01 06 19 03 00 12 02 01 01 ................
+| 3904: 06 18 03 00 12 02 01 01 06 17 03 00 12 02 01 01 ................
+| 3920: 06 15 f3 00 12 02 01 01 06 15 03 00 12 02 01 01 ................
+| 3936: 06 14 03 00 12 02 01 01 06 13 03 00 12 02 01 01 ................
+| 3952: 06 12 03 00 12 02 01 01 06 11 03 00 12 02 01 01 ................
+| 3968: 06 10 03 00 12 02 01 01 06 0f 03 00 12 02 01 01 ................
+| 3984: 06 0e 03 00 12 02 01 01 06 0d 03 00 12 02 01 01 ................
+| 4000: 06 0c 03 00 12 02 01 01 06 0b 03 00 12 02 01 01 ................
+| 4016: 06 0a 03 00 12 02 01 01 06 09 03 00 12 03 01 01 ................
+| 4032: 06 08 03 00 12 03 01 01 06 07 03 00 12 03 01 01 ................
+| 4048: 06 06 03 00 12 01 01 01 06 05 03 00 12 01 01 01 ................
+| 4064: 06 04 03 00 12 01 01 01 06 03 03 00 12 06 01 01 ................
+| 4080: 06 02 03 00 12 06 01 01 06 01 03 00 12 06 01 01 ................
+| page 7 offset 24576
+| 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
+| 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
+| page 8 offset 28672
+| 0: 0d 00 00 00 03 0f d6 00 0f f4 0f 00 00 00 00 00 ................
+| 4048: 00 00 00 00 00 00 11 03 02 2b 69 6e 74 65 67 72 .........+integr
+| 4064: 69 74 79 2d 63 68 65 63 6b 09 02 02 1b 72 65 62 ity-check....reb
+| 4080: 75 69 6c 64 0a 01 02 1d 6f 70 74 69 00 00 00 00 uild....opti....
+| end crash-b06f016068bcea.db
+.testctrl prng_seed 1 db
+.testctrl internal_functions
+.testctrl json_selfcheck on
+}]} {}
+
+do_execsql_test 10.1 {
+ UPDATE t1 SET b=quote(zeroblob(current_date)) WHERE t1 MATCH 't*';
+}
+
+do_catchsql_test 10.2 {
+ BEGIN;
+ INSERT INTO t1(t1,rank) VALUES('secure-delete',1);
+ REPLACE INTO t1(b,a,rowid) VALUES(1,2,3);
+} {0 {}}
+
+do_catchsql_test 10.3 {
+ COMMIT
+} {1 {database disk image is malformed}}
+
+do_catchsql_test 10.4 {
+ REPLACE INTO t1(b,a,rowid) VALUES(1,2,3);
+} {1 {database disk image is malformed}}
+
sqlite3_fts5_may_be_corrupt 0
finish_test
diff --git a/manifest b/manifest
index 57eca29cdb..c848e6661b 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\scrash\sin\sfts5\sthat\scould\soccur\sif\sshadow\stables\sare\smodified\sor\sremoved.
-D 2025-01-08T15:54:44.349
+C Fix\sanother\sassert()\sfailure\sin\sfts5.
+D 2025-01-08T20:43:03.635
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -113,7 +113,7 @@ F ext/fts5/fts5_config.c e7d8dd062b44a66cd77e5a0f74f23a2354cd1f3f8575afb967b2773
F ext/fts5/fts5_expr.c 69b8d976058512c07dfe86e229521b7a871768157bd1607cedf1a5038dfd72c9
F ext/fts5/fts5_hash.c adda4272be401566a6e0ba1acbe70ee5cb97fce944bc2e04dc707152a0ec91b1
F ext/fts5/fts5_index.c 1a450035b9e06cc82fcd75f71d6ed9028a78bd56101dcb0c813346e1e91c722a
-F ext/fts5/fts5_main.c 72527efa1d634054b93a21eafe854763cbc5c270e8a4ab99bbb589557b818482
+F ext/fts5/fts5_main.c 9ba1871ee99c415756346ea515d0fd31162d599b9b39a29a5b5a265509f136e3
F ext/fts5/fts5_storage.c 1ad05dab4830a4e2eaf2900bb143477f93bc17437093582f36f4b818809e88d8
F ext/fts5/fts5_tcl.c 7fb5a3d3404099075aaa2457307cb459bbc257c0de3dbd52b1e80a5b503e0329
F ext/fts5/fts5_test_mi.c 08c11ec968148d4cb4119d96d819f8c1f329812c568bac3684f5464be177d3ee
@@ -163,7 +163,7 @@ F ext/fts5/test/fts5corrupt.test 6485f721b88ba355ca5d701e7ee87a4efa3ea578d8e6adb
F ext/fts5/test/fts5corrupt2.test 335911e3f68b9625d850325f9e29a128db3f4276a8c9d4e32134580da8f924c4
F ext/fts5/test/fts5corrupt3.test 3420ad30bf9e9bbdbd43b3224c582431744899530a65b11b60ddacdf14200e19
F ext/fts5/test/fts5corrupt4.test dc08d19f5b8943e95a7778a7d8da592042504faf18dd93f68f7d7a0d7d7dd733
-F ext/fts5/test/fts5corrupt5.test 11b47126f5772cc37b67e3e8b2ed05895c4d07c05338bc07e4eea225bfe32c76
+F ext/fts5/test/fts5corrupt5.test b1199f316976dc0396caac59655f489576b7dd29c2520799af19ce3386ef6562
F ext/fts5/test/fts5corrupt6.test 2d72db743db7b5d9c9a6d0cfef24d799ed1aa5e8192b66c40e871a37ed9eed06
F ext/fts5/test/fts5corrupt7.test 4e830875c33b9ea3c4cf1ba71e692b63893cbb4faae8c69b1071889dc26e211c
F ext/fts5/test/fts5corrupt8.test b81d802e41631e98100f49a1aadeeffef860e30a62d6ed7d743c2797c477239e
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 5e6ede92afae77ce6023f3b294dc565651631c7976d898d800988f1b3ff2e83f
-R aaf463096c33b6880c3455de8eba69af
+P c0b691095ae72fc07530777ef6d23688fb4196ce2e0feff14fc3c597c572252d
+R 25cf4f6dfa19d9549598c6fb3f0ef39b
U dan
-Z ae39e4a53d5583331f681da82808c46e
+Z af424067c12fe68ac83a2d82b8d3d4b3
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index e3d479fb61..c25464140b 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-c0b691095ae72fc07530777ef6d23688fb4196ce2e0feff14fc3c597c572252d
+6da37893f5b5729ea5fd632e8d98789e867488a67501d4a4dad92f8e7cb6bda0
From b1cbae8bd62a1d920a91ad820841b50008130310 Mon Sep 17 00:00:00 2001
From: dan
Date: Thu, 9 Jan 2025 14:10:25 +0000
Subject: [PATCH 27/35] When removing an fts5 in secure-delete mode, defer
setting the table version to SECUREDELETE until flushing data to disk. This
prevents problems that can occur if there is a rollback or statement rollback
operation.
FossilOrigin-Name: c359e555ceafcaab2ae38074bc4f57cccdc5bc6080d17f82290c09b9e5dd80c2
---
ext/fts5/fts5_index.c | 18 +++
ext/fts5/fts5_main.c | 19 ---
ext/fts5/test/fts5corrupt5.test | 232 ++++++++++++++++++++++++++++++++
ext/fts5/test/fts5version.test | 2 +-
manifest | 18 +--
manifest.uuid | 2 +-
6 files changed, 261 insertions(+), 30 deletions(-)
diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c
index 2e512fd215..a8ac98b699 100644
--- a/ext/fts5/fts5_index.c
+++ b/ext/fts5/fts5_index.c
@@ -5477,6 +5477,24 @@ static void fts5FlushSecureDelete(
const int f = FTS5INDEX_QUERY_SKIPHASH;
Fts5Iter *pIter = 0; /* Used to find term instance */
+ /* If the version number has not been set to SECUREDELETE, do so now. */
+ if( p->pConfig->iVersion!=FTS5_CURRENT_VERSION_SECUREDELETE ){
+ Fts5Config *pConfig = p->pConfig;
+ sqlite3_stmt *pStmt = 0;
+ fts5IndexPrepareStmt(p, &pStmt, sqlite3_mprintf(
+ "REPLACE INTO %Q.'%q_config' VALUES ('version', %d)",
+ pConfig->zDb, pConfig->zName, FTS5_CURRENT_VERSION_SECUREDELETE
+ ));
+ if( p->rc==SQLITE_OK ){
+ int rc;
+ sqlite3_step(pStmt);
+ rc = sqlite3_finalize(pStmt);
+ if( p->rc==SQLITE_OK ) p->rc = rc;
+ pConfig->iCookie++;
+ pConfig->iVersion = FTS5_CURRENT_VERSION_SECUREDELETE;
+ }
+ }
+
fts5MultiIterNew(p, pStruct, f, 0, (const u8*)zTerm, nTerm, -1, 0, &pIter);
if( fts5MultiIterEof(p, pIter)==0 ){
i64 iThis = fts5MultiIterRowid(pIter);
diff --git a/ext/fts5/fts5_main.c b/ext/fts5/fts5_main.c
index 474f7441e9..9f504bb3a3 100644
--- a/ext/fts5/fts5_main.c
+++ b/ext/fts5/fts5_main.c
@@ -1901,7 +1901,6 @@ static int fts5UpdateMethod(
Fts5Config *pConfig = pTab->p.pConfig;
int eType0; /* value_type() of apVal[0] */
int rc = SQLITE_OK; /* Return code */
- int bUpdateOrDelete = 0;
/* A transaction must be open when this is called. */
assert( pTab->ts.eState==1 || pTab->ts.eState==2 );
@@ -1938,7 +1937,6 @@ static int fts5UpdateMethod(
rc = SQLITE_ERROR;
}else{
rc = fts5SpecialDelete(pTab, apVal);
- bUpdateOrDelete = 1;
}
}else{
rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]);
@@ -1975,7 +1973,6 @@ static int fts5UpdateMethod(
}else{
i64 iDel = sqlite3_value_int64(apVal[0]); /* Rowid to delete */
rc = sqlite3Fts5StorageDelete(pTab->pStorage, iDel, 0, 0);
- bUpdateOrDelete = 1;
}
}
@@ -2003,7 +2000,6 @@ static int fts5UpdateMethod(
if( eConflict==SQLITE_REPLACE && eType1==SQLITE_INTEGER ){
i64 iNew = sqlite3_value_int64(apVal[1]); /* Rowid to delete */
rc = sqlite3Fts5StorageDelete(pTab->pStorage, iNew, 0, 0);
- bUpdateOrDelete = 1;
}
fts5StorageInsert(&rc, pTab, apVal, pRowid);
}
@@ -2057,23 +2053,8 @@ static int fts5UpdateMethod(
rc = sqlite3Fts5StorageDelete(pStorage, iOld, 0, 1);
fts5StorageInsert(&rc, pTab, apVal, pRowid);
}
- bUpdateOrDelete = 1;
sqlite3Fts5StorageReleaseDeleteRow(pStorage);
}
-
- }
- }
-
- if( rc==SQLITE_OK
- && bUpdateOrDelete
- && pConfig->bSecureDelete
- && pConfig->iVersion==FTS5_CURRENT_VERSION
- ){
- rc = sqlite3Fts5StorageConfigValue(
- pTab->pStorage, "version", 0, FTS5_CURRENT_VERSION_SECUREDELETE
- );
- if( rc==SQLITE_OK ){
- pConfig->iVersion = FTS5_CURRENT_VERSION_SECUREDELETE;
}
}
diff --git a/ext/fts5/test/fts5corrupt5.test b/ext/fts5/test/fts5corrupt5.test
index ddb22f870d..6a70fc7e44 100644
--- a/ext/fts5/test/fts5corrupt5.test
+++ b/ext/fts5/test/fts5corrupt5.test
@@ -1686,6 +1686,238 @@ do_catchsql_test 10.4 {
REPLACE INTO t1(b,a,rowid) VALUES(1,2,3);
} {1 {database disk image is malformed}}
+#-------------------------------------------------------------------------
+reset_db
+do_test 11.0 {
+ sqlite3 db {}
+ db deserialize [decode_hexdb {
+.open --hexdb
+| size 32768 pagesize 4096 filename crash-3d05232c78871b.db
+| page 1 offset 0
+| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
+| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08 .....@ ........
+| 32: 00 00 00 02 00 00 00 01 00 00 00 09 00 00 00 04 ................
+| 96: 00 00 00 00 0d 0f c7 00 07 0d 92 00 0f 8d 0f 36 ...............6
+| 112: 0e cb 0e 6b 0e 0e 0d b6 0d 92 0d 92 00 00 00 00 ...k............
+| 3472: 00 00 22 08 06 17 11 11 01 31 74 61 62 6c 65 74 .........1tablet
+| 3488: 32 74 32 08 43 52 45 41 54 45 20 54 41 42 4c 45 2t2.CREATE TABLE
+| 3504: 20 74 32 28 78 29 56 07 06 17 1f 1f 01 7d 74 61 t2(x)V.......ta
+| 3520: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 blet1_configt1_c
+| 3536: 6f 6e 66 69 67 07 43 52 45 41 54 45 20 54 41 42 onfig.CREATE TAB
+| 3552: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b LE 't1_config'(k
+| 3568: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 PRIMARY KEY, v)
+| 3584: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 06 WITHOUT ROWID[.
+| 3600: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64 ..!!...tablet1_d
+| 3616: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 ocsizet1_docsize
+| 3632: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 .CREATE TABLE 't
+| 3648: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 1_docsize'(id IN
+| 3664: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 TEGER PRIMARY KE
+| 3680: 59 2c 20 73 7a 20 42 4c 4f 42 29 5e 05 07 17 21 Y, sz BLOB)^...!
+| 3696: 21 01 81 07 74 61 62 6c 65 74 31 5f 63 6f 6e 74 !...tablet1_cont
+| 3712: 65 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 05 43 52 entt1_content.CR
+| 3728: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63 EATE TABLE 't1_c
+| 3744: 6f 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47 ontent'(id INTEG
+| 3760: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
+| 3776: 63 30 2c 20 63 31 2c 20 63 32 29 69 04 07 17 19 c0, c1, c2)i....
+| 3792: 19 01 81 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 ...-tablet1_idxt
+| 3808: 31 5f 69 64 78 04 43 52 45 41 54 45 20 54 41 42 1_idx.CREATE TAB
+| 3824: 4c 45 20 27 74 31 5f 69 64 78 27 28 73 65 67 69 LE 't1_idx'(segi
+| 3840: 64 2c 20 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 d, term, pgno, P
+| 3856: 52 49 4d 41 52 59 20 4b 45 59 28 73 65 67 69 64 RIMARY KEY(segid
+| 3872: 2c 20 74 65 72 6d 29 29 20 57 49 54 48 4f 55 54 , term)) WITHOUT
+| 3888: 20 52 4f 57 49 44 55 03 07 17 1b 1b 01 81 01 74 ROWIDU........t
+| 3904: 61 62 6c 65 74 31 5f 64 61 74 61 74 31 5f 64 61 ablet1_datat1_da
+| 3920: 74 61 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 ta.CREATE TABLE
+| 3936: 27 74 31 5f 64 61 74 61 27 28 69 64 20 49 4e 54 't1_data'(id INT
+| 3952: 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 EGER PRIMARY KEY
+| 3968: 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 38 02 06 , block BLOB)8..
+| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
+| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
+| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 LE t1 USING fts5
+| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
+| page 3 offset 8192
+| 0: 0d 00 00 00 03 0c 94 00 0f e6 0f ef 0c 94 00 00 ................
+| 3216: 00 00 00 00 86 4a 84 80 80 80 80 01 04 00 8d 18 .....J..........
+| 3232: 00 00 03 2b 02 30 30 01 02 06 01 02 06 01 02 06 ...+.00.........
+| 3248: 1f 02 03 01 02 03 01 02 03 01 08 32 30 31 36 30 ...........20160
+| 3264: 36 30 39 01 02 07 01 02 07 01 02 07 01 01 34 01 609...........4.
+| 3280: 02 05 01 02 05 01 02 05 01 01 35 01 02 04 01 02 ..........5.....
+| 3296: 04 01 02 04 02 07 30 30 30 30 30 30 30 1c 02 04 ......0000000...
+| 3312: 01 02 04 01 02 04 01 06 62 69 6e 61 72 79 03 06 ........binary..
+| 3328: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
+| 3344: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
+| 3360: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
+| 3376: 03 06 01 02 02 03 06 01 02 02 01 08 63 6f 6d 70 ............comp
+| 3392: 69 6c 65 72 01 02 02 01 02 02 01 02 02 01 06 64 iler...........d
+| 3408: 62 73 74 61 74 07 02 03 01 02 03 01 02 03 02 04 bstat...........
+| 3424: 65 62 75 67 04 02 02 01 02 02 01 02 02 01 06 65 ebug...........e
+| 3440: 6e 61 62 6c 65 07 02 02 01 02 02 01 02 02 01 02 nable...........
+| 3456: 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 ................
+| 3472: 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 ................
+| 3488: 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 ................
+| 3504: 02 01 02 02 02 08 78 74 65 6e 73 69 6f 6e 1f 02 ......xtension..
+| 3520: 04 01 02 04 01 02 04 01 04 66 74 73 34 0a 02 03 .........fts4...
+| 3536: 01 02 03 01 02 03 04 01 35 0d 02 03 01 02 03 01 ........5.......
+| 3552: 02 03 01 03 67 63 63 01 02 03 01 02 03 01 02 03 ....gcc.........
+| 3568: 02 06 65 6f 70 6f 6c 79 10 02 03 01 02 03 01 02 ..eopoly........
+| 3584: 03 01 05 6a 73 6f 6e 31 13 02 03 01 02 03 01 02 ...json1........
+| 3600: 03 01 04 6c 6f 61 64 1f 02 03 01 02 03 01 02 03 ...load.........
+| 3616: 01 03 6d 61 78 1c 02 02 01 02 02 01 02 02 02 05 ..max...........
+| 3632: 65 6d 6f 72 79 1c 02 03 01 02 03 01 02 03 04 04 emory...........
+| 3648: 73 79 73 35 16 02 03 01 02 02 03 01 03 01 06 6e sys5...........n
+| 3664: 6f 63 61 73 65 02 06 01 02 02 03 06 01 02 02 03 ocase...........
+| 3680: 06 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 ................
+| 3696: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
+| 3712: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
+| 3728: 02 01 04 6f 6d 69 74 1f 02 02 01 02 02 01 02 02 ...omit.........
+| 3744: 01 05 72 74 72 65 65 19 02 03 01 02 03 01 02 03 ..rtree.........
+| 3760: 04 02 69 6d 01 06 01 02 02 03 06 01 02 02 03 06 ..im............
+| 3776: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
+| 3792: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
+| 3808: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
+| 3824: 01 0a 74 68 72 65 61 64 73 61 66 65 03 57 34 56 ..threadsafe.W4V
+| 3840: 94 64 91 46 85 84 04 76 74 61 62 07 02 04 01 02 .d.F...vtab.....
+| 3856: 04 01 02 04 01 01 78 01 06 01 01 02 01 06 01 01 ......x.........
+| 3872: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 10 02 ................
+| 3888: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
+| 3904: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
+| 3920: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
+| 3936: 01 02 01 06 01 01 10 01 06 01 01 02 01 06 01 01 ................
+| 3952: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 ................
+| 3968: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
+| 3984: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
+| 4000: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
+| 4016: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
+| 4032: 02 01 06 01 01 02 01 06 01 01 02 04 15 13 0c 0c ................
+| 4048: 12 44 13 11 0f 47 13 0f 0c 0e 11 10 0f 0e 10 0f .D...G..........
+| 4064: 44 0f 10 40 15 0f 07 01 03 00 14 24 5a 24 24 0f D..@.......$Z$$.
+| 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 01 ...$............
+| page 4 offset 12288
+| 0: 0a 00 00 00 01 0f fa 00 00 00 00 00 00 00 00 00 ................
+| 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
+| page 5 offset 16384
+| 0: 0d 00 00 00 24 0c 0a 00 0f d8 0f af 0f 86 0f 74 ....$..........t
+| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
+| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
+| 48: 0d bb 0d a0 0d 84 0d 68 0d 4f 0d 35 0d 1b 0c fb .......h.O.5....
+| 64: 0c da 0c b9 0c 99 0c 00 00 00 00 00 00 00 00 00 ................
+| 3072: 00 00 00 00 00 00 00 00 00 00 18 24 05 00 25 0f ...........$..%.
+| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
+| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
+| 3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22 DSAFE=0XNOCASE..
+| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 31 46 45 3d ..%..THREADS1FE=
+| 3152: 30 58 52 64 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRdRIM.!..3..OM
+| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f IT LOAD EXTENSIO
+| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
+| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
+| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
+| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
+| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
+| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
+| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
+| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
+| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
+| 3328: 0f 17 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MAX MEMORY=500
+| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
+| 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
+| 3376: 49 4e 41 52 59 18 1a 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
+| 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
+| 3408: 19 05 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
+| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
+| 3440: 4e 41 42 4b 45 20 4d 45 4d 53 59 53 35 58 42 49 NABKE MEMSYS5XBI
+| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
+| 3472: 42 60 2d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 B`-EMSYS5XNOCASE
+| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 46 ....)..ENABLE MF
+| 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 15 05 00 25 MSYS5XRTRIM....%
+| 3520: 0f 19 45 4e 41 42 4c 45 20 4a 53 4f 4e 31 58 42 ..ENABLE JSON1XB
+| 3536: 49 4e 41 52 59 18 14 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
+| 3552: 4c 45 20 4a 53 4f 4e 31 58 4e 4f 43 41 53 45 17 LE JSON1XNOCASE.
+| 3568: 13 05 00 25 0f 17 45 4e 41 42 4c 45 20 4a 53 4f ...%..ENABLE JSO
+| 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 00 29 0f 19 45 N1XRTRIM....)..E
+| 3600: 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 49 4e 41 BLE GEOPOLYXBINA
+| 3616: 52 59 1a 11 05 00 39 0f 19 45 4e 41 42 4c 45 2e RY....9..ENABLE.
+| 3632: 41 40 47 45 4f 50 4f 4c 59 58 4e 4f 43 41 53 40 A@GEOPOLYXNOCAS@
+| 3648: 4f 4c 59 58 55 09 10 05 00 29 0f 17 45 4e 41 42 OLYXU....)..ENAB
+| 3664: 4c 45 20 47 45 4f 52 54 52 49 4d 17 0f 05 00 23 LE GEORTRIM....#
+| 3680: 0f 19 45 4e 41 42 4c 45 20 46 54 53 35 58 42 49 ..ENABLE FTS5XBI
+| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
+| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0d 05 E FTS5XNOCASE...
+| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
+| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
+| 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 17 0b LE FTS4XBINARY..
+| 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
+| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
+| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
+| 3824: 09 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
+| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
+| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
+| 3872: 54 41 54 20 56 54 24 15 48 4e 4f 43 41 53 45 1d TAT VT$.HNOCASE.
+| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
+| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 49 4d 11 06 TAT VTABXRTRIM..
+| 3920: 05 00 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
+| 3936: 59 11 05 05 00 17 0f 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
+| 3952: 43 41 53 45 10 04 05 00 17 0f 17 44 45 42 55 47 CASE.......DEBUG
+| 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
+| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
+| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
+| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
+| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
+| 4048: 39 58 4e 4f 43 41 53 45 26 01 05 00 43 0f 17 43 9XNOCASE&...C..C
+| 4064: 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e OMPILER=gcc-5.4.
+| 4080: 30 20 32 30 31 36 30 36 30 39 58 52 54 52 49 4d 0 20160609XRTRIM
+| page 6 offset 20480
+| 0: 0d 00 00 00 24 0e e0 00 0f f8 0f f0 0f e8 0f e0 ....$...........
+| 16: 0f d8 0f d0 0f c8 0f c0 0f b8 0f b0 0f a8 0f a0 ................
+| 32: 1f 98 0f 90 0f 88 0f 80 0f 78 0f 70 0f 68 0f 60 .........x.p.h.`
+| 48: 0f 58 0f 50 0f 48 0f 40 0f 38 0f 30 0f 28 0f 20 .X.P.H.@.8.0.(.
+| 64: 0f 18 0f 10 0f 08 0f 00 0e f8 0e f0 0e e8 00 00 ................
+| 3808: 06 24 03 00 12 02 01 01 06 23 03 00 12 02 01 01 .$.......#......
+| 3824: 06 22 03 00 12 02 01 01 06 21 03 00 12 03 01 01 .........!......
+| 3840: 06 20 03 00 12 03 01 01 06 1f 03 00 12 03 01 01 . ..............
+| 3856: 06 1e 03 00 12 03 01 01 06 1d 03 00 12 03 01 01 ................
+| 3872: 06 1c 03 00 12 03 01 01 06 1b 03 00 12 02 01 01 ................
+| 3888: 06 1a 03 00 12 02 01 01 06 19 03 00 12 02 01 01 ................
+| 3904: 06 18 03 00 12 02 01 01 06 17 03 00 12 02 01 01 ................
+| 3920: 06 15 f3 00 12 02 01 01 06 15 03 00 12 02 01 01 ................
+| 3936: 06 14 03 00 12 02 01 01 06 13 03 00 12 02 01 01 ................
+| 3952: 06 12 03 00 12 02 01 01 06 11 03 00 12 02 01 01 ................
+| 3968: 06 10 03 00 12 02 01 01 06 0f 03 00 12 02 01 01 ................
+| 3984: 06 0e 03 00 12 02 01 01 06 0d 03 00 12 02 01 01 ................
+| 4000: 06 0c 03 00 12 02 01 01 06 0b 03 00 12 02 01 01 ................
+| 4016: 06 0a 03 00 12 02 01 01 06 09 03 00 12 03 01 01 ................
+| 4032: 06 08 03 00 12 03 01 01 06 07 03 00 12 03 01 01 ................
+| 4048: 06 06 03 00 12 01 01 01 06 05 03 00 12 01 01 01 ................
+| 4064: 06 04 03 00 12 01 01 01 06 03 03 00 12 06 01 01 ................
+| 4080: 06 02 03 00 12 06 01 01 06 01 03 00 12 06 01 01 ................
+| page 7 offset 24576
+| 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
+| 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
+| page 8 offset 28672
+| 0: 0d 00 00 00 03 0f d6 00 0f f4 0f 00 00 00 00 00 ................
+| 4048: 00 00 00 00 00 00 11 03 02 2b 69 6e 74 65 67 72 .........+integr
+| 4064: 69 74 79 2d 63 68 65 63 6b 09 02 02 1b 72 65 62 ity-check....reb
+| 4080: 75 69 6c 64 0a 01 02 1d 6f 00 00 00 00 00 00 00 uild....o.......
+| end crash-3d05232c78871b.db
+}]} {}
+
+do_execsql_test 11.1 {
+ UPDATE t1 SET b=quote(zeroblob('2025-01-09')) WHERE t1 MATCH 't*';
+ INSERT INTO t1(t1,rank) VALUES('secure-delete',1);
+}
+
+do_catchsql_test 11.2 {
+ BEGIN;
+ REPLACE INTO t1(rowid,b,a,rowid) VALUES(x'44023b9eb002d28b0ee90c',1,2,3);
+ PRAGMA writable_schema=RESET;
+ INSERT INTO t1(t1) SELECT x FROM t2;
+ ROLLBACK;
+} {1 {database disk image is malformed}}
+
+do_catchsql_test 11.3 {
+ REPLACE INTO t1(rowid,b,a,rowid) VALUES(x'44023b9eb002d28b0ee90c',1,2,3);
+} {1 {database disk image is malformed}}
+
+
sqlite3_fts5_may_be_corrupt 0
finish_test
diff --git a/ext/fts5/test/fts5version.test b/ext/fts5/test/fts5version.test
index a92c0dc9f4..58dd9fe14e 100644
--- a/ext/fts5/test/fts5version.test
+++ b/ext/fts5/test/fts5version.test
@@ -112,7 +112,7 @@ do_execsql_test 2.1 {
do_execsql_test 2.2 {
SELECT v FROM xyz_config WHERE k='version';
-} {5}
+} {4}
do_execsql_test 2.3 {
ROLLBACK TO one;
diff --git a/manifest b/manifest
index c848e6661b..6eb5459a34 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sanother\sassert()\sfailure\sin\sfts5.
-D 2025-01-08T20:43:03.635
+C When\sremoving\san\sfts5\sin\ssecure-delete\smode,\sdefer\ssetting\sthe\stable\sversion\sto\sSECUREDELETE\suntil\sflushing\sdata\sto\sdisk.\sThis\sprevents\sproblems\sthat\scan\soccur\sif\sthere\sis\sa\srollback\sor\sstatement\srollback\soperation.
+D 2025-01-09T14:10:25.673
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -112,8 +112,8 @@ F ext/fts5/fts5_buffer.c 0eec58bff585f1a44ea9147eae5da2447292080ea435957f7488c70
F ext/fts5/fts5_config.c e7d8dd062b44a66cd77e5a0f74f23a2354cd1f3f8575afb967b2773c3384f7f8
F ext/fts5/fts5_expr.c 69b8d976058512c07dfe86e229521b7a871768157bd1607cedf1a5038dfd72c9
F ext/fts5/fts5_hash.c adda4272be401566a6e0ba1acbe70ee5cb97fce944bc2e04dc707152a0ec91b1
-F ext/fts5/fts5_index.c 1a450035b9e06cc82fcd75f71d6ed9028a78bd56101dcb0c813346e1e91c722a
-F ext/fts5/fts5_main.c 9ba1871ee99c415756346ea515d0fd31162d599b9b39a29a5b5a265509f136e3
+F ext/fts5/fts5_index.c f1f6da5938af616e0a5e54f0423a3134df95b9f17ac1c6ebf2e2e8132bbc75b9
+F ext/fts5/fts5_main.c 9a1daef7247f9b8a50b4159323e340efa6b0e4bea4fcd83580480f94d4f2c888
F ext/fts5/fts5_storage.c 1ad05dab4830a4e2eaf2900bb143477f93bc17437093582f36f4b818809e88d8
F ext/fts5/fts5_tcl.c 7fb5a3d3404099075aaa2457307cb459bbc257c0de3dbd52b1e80a5b503e0329
F ext/fts5/fts5_test_mi.c 08c11ec968148d4cb4119d96d819f8c1f329812c568bac3684f5464be177d3ee
@@ -163,7 +163,7 @@ F ext/fts5/test/fts5corrupt.test 6485f721b88ba355ca5d701e7ee87a4efa3ea578d8e6adb
F ext/fts5/test/fts5corrupt2.test 335911e3f68b9625d850325f9e29a128db3f4276a8c9d4e32134580da8f924c4
F ext/fts5/test/fts5corrupt3.test 3420ad30bf9e9bbdbd43b3224c582431744899530a65b11b60ddacdf14200e19
F ext/fts5/test/fts5corrupt4.test dc08d19f5b8943e95a7778a7d8da592042504faf18dd93f68f7d7a0d7d7dd733
-F ext/fts5/test/fts5corrupt5.test b1199f316976dc0396caac59655f489576b7dd29c2520799af19ce3386ef6562
+F ext/fts5/test/fts5corrupt5.test bcf0801b0c991eadae3cb8e978e82b4bf01412cb4df41874a90d5aa279c7cc96
F ext/fts5/test/fts5corrupt6.test 2d72db743db7b5d9c9a6d0cfef24d799ed1aa5e8192b66c40e871a37ed9eed06
F ext/fts5/test/fts5corrupt7.test 4e830875c33b9ea3c4cf1ba71e692b63893cbb4faae8c69b1071889dc26e211c
F ext/fts5/test/fts5corrupt8.test b81d802e41631e98100f49a1aadeeffef860e30a62d6ed7d743c2797c477239e
@@ -264,7 +264,7 @@ F ext/fts5/test/fts5unindexed.test 168838d2c385e131120bbf5b516d2432a5fabc4caa225
F ext/fts5/test/fts5unindexed2.test 516236eceaac05ace322290a0d3705b4c4ffe4760d8eb9d014d9d27d56dfcc02
F ext/fts5/test/fts5update.test b8affd796e45c94a4d19ad5c26606ea06065a0f162a9562d9f005b5a80ccf0bc
F ext/fts5/test/fts5update2.test c5baa76799ac605ebb8e5e21035db2014b396cef25c903eb96ba39b1d6f9f046
-F ext/fts5/test/fts5version.test c22d163c17e60a99f022cbc52de5a48bb7f84deaa00fe15e9bc4c3aa1996204e
+F ext/fts5/test/fts5version.test 44ab35566267b7618c090443de2d9ad84f633df5d20bf72e9bad199ae5fced84
F ext/fts5/test/fts5vocab.test 2a2bdb60d0998fa3124d541b6d30b019504918dc43a6584645b63a24be72f992
F ext/fts5/test/fts5vocab2.test bbba149c254375d00055930c1a501c9a51e80b0d20bf7b98f3e9fa3b03786373
F ext/fts5/tool/fts5speed.tcl b0056f91a55b2d1a3684ec05729de92b042e2f85
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c0b691095ae72fc07530777ef6d23688fb4196ce2e0feff14fc3c597c572252d
-R 25cf4f6dfa19d9549598c6fb3f0ef39b
+P 6da37893f5b5729ea5fd632e8d98789e867488a67501d4a4dad92f8e7cb6bda0
+R 659181897535bd26e43a32e9be047282
U dan
-Z af424067c12fe68ac83a2d82b8d3d4b3
+Z a32ef00755f10bd4444e41dd1939dfc6
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index c25464140b..30a1951bd1 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-6da37893f5b5729ea5fd632e8d98789e867488a67501d4a4dad92f8e7cb6bda0
+c359e555ceafcaab2ae38074bc4f57cccdc5bc6080d17f82290c09b9e5dd80c2
From 35ac4c868572c57b12e7f034b299a632e2151ca0 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Thu, 9 Jan 2025 19:57:44 +0000
Subject: [PATCH 28/35] Update the makefile so that it puts the amalgamation
files in a subdirectory in the amalgamation-zip.
[forum:/forumpost/b8dd1941e1|Forum post b8dd1941e1].
FossilOrigin-Name: cef8e88bedf01dc47012ef1cb878b22117c9966e615edf5a69704486f9cfa56c
---
manifest | 14 +++++++-------
manifest.uuid | 2 +-
tool/mkamalzip.tcl | 12 ++++++++++--
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/manifest b/manifest
index 6eb5459a34..defee4b6a3 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C When\sremoving\san\sfts5\sin\ssecure-delete\smode,\sdefer\ssetting\sthe\stable\sversion\sto\sSECUREDELETE\suntil\sflushing\sdata\sto\sdisk.\sThis\sprevents\sproblems\sthat\scan\soccur\sif\sthere\sis\sa\srollback\sor\sstatement\srollback\soperation.
-D 2025-01-09T14:10:25.673
+C Update\sthe\smakefile\sso\sthat\sit\sputs\sthe\samalgamation\sfiles\sin\sa\ssubdirectory\nin\sthe\samalgamation-zip.\n[forum:/forumpost/b8dd1941e1|Forum\spost\sb8dd1941e1].
+D 2025-01-09T19:57:44.593
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -2139,7 +2139,7 @@ F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
F tool/logest.c c34e5944318415de513d29a6098df247a9618c96d83c38d4abd88641fe46e669
F tool/max-limits.c cbb635fbb37ae4d05f240bfb5b5270bb63c54439
F tool/merge-test.tcl de76b62f2de2a92d4c1ca4f976bce0aea6899e0229e250479b229b2a1914b176
-F tool/mkamalzip.tcl 8a1b21fb6a7f990eb9625e08daa2dd0e03cb551bccc69ccd1cdd5bd975e8177a
+F tool/mkamalzip.tcl 8aa5ebe7973c8b8774062d34e15fea9815c4cc2ceea3a9b184695f005910876a
F tool/mkautoconfamal.sh cbdcf993fa83dccbef7fb77b39cdeb31ef9f77d9d88c9e343b58d35ca3898a6a
F tool/mkccode.tcl 210159febe0ef0ecbc53c79833500663ceaba0115b2b374405818dc835b5f84b x
F tool/mkctimec.tcl ef6a67ec82e5b6fc19152a4c79f237227b18bf67ff16d155bac7adb94355d9cf x
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 6da37893f5b5729ea5fd632e8d98789e867488a67501d4a4dad92f8e7cb6bda0
-R 659181897535bd26e43a32e9be047282
-U dan
-Z a32ef00755f10bd4444e41dd1939dfc6
+P c359e555ceafcaab2ae38074bc4f57cccdc5bc6080d17f82290c09b9e5dd80c2
+R 4acc7fa1125cb682f7786bdefbb3cacb
+U drh
+Z 1b3035dddd40c2669ae993db009fbd5c
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 30a1951bd1..afb4e5caa1 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-c359e555ceafcaab2ae38074bc4f57cccdc5bc6080d17f82290c09b9e5dd80c2
+cef8e88bedf01dc47012ef1cb878b22117c9966e615edf5a69704486f9cfa56c
diff --git a/tool/mkamalzip.tcl b/tool/mkamalzip.tcl
index a7c6587566..92feb4122e 100644
--- a/tool/mkamalzip.tcl
+++ b/tool/mkamalzip.tcl
@@ -9,7 +9,15 @@ set vers [read $fd]
close $fd
scan $vers %d.%d.%d major minor patch
set numvers [format {3%02d%02d00} $minor $patch]
-set cmd "zip sqlite-amalgamation-$numvers.zip\
- sqlite3.c sqlite3.h shell.c sqlite3ext.h"
+set dir sqlite-amalgamation-$numvers
+file delete -force $dir
+file mkdir $dir
+set filelist {sqlite3.c sqlite3.h shell.c sqlite3ext.h}
+foreach f $filelist {
+ file copy $f $dir/$f
+}
+set cmd "zip -r $dir.zip $dir"
puts $cmd
+file delete -force $dir.zip
exec {*}$cmd
+file delete -force $dir
From c1f914dbc986e7e9ef6643eb02e03ec5cb55c3d0 Mon Sep 17 00:00:00 2001
From: stephan
Date: Sat, 11 Jan 2025 09:02:55 +0000
Subject: [PATCH 29/35] Fix an age-old bug in the lower-level wasm/js helper
bits which was (A) caused removal of customized WASM func/argument conversion
to siltently fail and (B) triggered a warning in the closure toolchain.
Reported in [jaccwabyt ticket
c5c296e85a7c01360820|https://fossil.wanderinghorse.net/r/jaccwabyt/info/c5c296e85a7c01360820].
FossilOrigin-Name: 99917a5bb04b5ad6ace95baf86d91e6ce098f9d3001de1a29d3d0b0b817acdce
---
ext/wasm/common/whwasmutil.js | 2 +-
manifest | 14 +++++++-------
manifest.uuid | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/ext/wasm/common/whwasmutil.js b/ext/wasm/common/whwasmutil.js
index 25400d48e3..8fe4a990b6 100644
--- a/ext/wasm/common/whwasmutil.js
+++ b/ext/wasm/common/whwasmutil.js
@@ -2055,7 +2055,7 @@ globalThis.WhWasmUtilInstaller = function(target){
if(1===argc) return xcvPart.get(typeName);
else if(2===argc){
if(!adapter){
- delete xcvPart.get(typeName);
+ xcvPart.delete(typeName);
return func;
}else if(!(adapter instanceof Function)){
toss(modeName,"requires a function argument.");
diff --git a/manifest b/manifest
index defee4b6a3..d41be8009b 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\sthe\smakefile\sso\sthat\sit\sputs\sthe\samalgamation\sfiles\sin\sa\ssubdirectory\nin\sthe\samalgamation-zip.\n[forum:/forumpost/b8dd1941e1|Forum\spost\sb8dd1941e1].
-D 2025-01-09T19:57:44.593
+C Fix\san\sage-old\sbug\sin\sthe\slower-level\swasm/js\shelper\sbits\swhich\swas\s(A)\scaused\sremoval\sof\scustomized\sWASM\sfunc/argument\sconversion\sto\ssiltently\sfail\sand\s(B)\striggered\sa\swarning\sin\sthe\sclosure\stoolchain.\sReported\sin\s[jaccwabyt\sticket\sc5c296e85a7c01360820|https://fossil.wanderinghorse.net/r/jaccwabyt/info/c5c296e85a7c01360820].
+D 2025-01-11T09:02:55.088
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -658,7 +658,7 @@ F ext/wasm/c-pp.c 6d131069644964223305582a80973477fa8b06b57306781690d7874ebd3a4f
F ext/wasm/common/SqliteTestUtil.js 7adaeffef757d8708418dc9190f72df22367b531831775804b31598b44f6aa51
F ext/wasm/common/emscripten.css 11bd104b6c0d597c67d40cc8ecc0a60dae2b965151e3b6a37fa5708bac3acd15
F ext/wasm/common/testing.css e97549bab24126c24e0daabfe2de9bb478fb0a69fdb2ddd0a73a992c091aad6f
-F ext/wasm/common/whwasmutil.js 6181f8cd958700f3723350bd4d76c7cc797db331a9aa14b25b42d121f12d6fee
+F ext/wasm/common/whwasmutil.js d76c69617e95d85ffc9996f7d9d7481df6976dcbd860ecd82bd8c075e3a101ae
F ext/wasm/demo-123-worker.html a0b58d9caef098a626a1a1db567076fca4245e8d60ba94557ede8684350a81ed
F ext/wasm/demo-123.html 8c70a412ce386bd3796534257935eb1e3ea5c581e5d5aea0490b8232e570a508
F ext/wasm/demo-123.js c7b3cca50c55841c381a9ca4f9396e5bbdc6114273d0b10a43e378e32e7be5bf
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c359e555ceafcaab2ae38074bc4f57cccdc5bc6080d17f82290c09b9e5dd80c2
-R 4acc7fa1125cb682f7786bdefbb3cacb
-U drh
-Z 1b3035dddd40c2669ae993db009fbd5c
+P cef8e88bedf01dc47012ef1cb878b22117c9966e615edf5a69704486f9cfa56c
+R 2966a1ed8608823769a5c4d3eb2bc028
+U stephan
+Z 02b31671f60b5e3785eaa517886d85b1
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index afb4e5caa1..a540ad80d9 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-cef8e88bedf01dc47012ef1cb878b22117c9966e615edf5a69704486f9cfa56c
+99917a5bb04b5ad6ace95baf86d91e6ce098f9d3001de1a29d3d0b0b817acdce
From 27661f24cd6fc71387af5a48caf3fc38dffe1b14 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 11 Jan 2025 13:59:42 +0000
Subject: [PATCH 30/35] Fix harmless scan-build warnings.
FossilOrigin-Name: b93af6feb7c0c3af30a47810a7c0e77ce41c386fac164c64bb5871a6c153db7e
---
manifest | 16 ++++++++--------
manifest.uuid | 2 +-
src/expr.c | 1 +
src/shell.c.in | 1 +
4 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/manifest b/manifest
index d41be8009b..6f043074b9 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\san\sage-old\sbug\sin\sthe\slower-level\swasm/js\shelper\sbits\swhich\swas\s(A)\scaused\sremoval\sof\scustomized\sWASM\sfunc/argument\sconversion\sto\ssiltently\sfail\sand\s(B)\striggered\sa\swarning\sin\sthe\sclosure\stoolchain.\sReported\sin\s[jaccwabyt\sticket\sc5c296e85a7c01360820|https://fossil.wanderinghorse.net/r/jaccwabyt/info/c5c296e85a7c01360820].
-D 2025-01-11T09:02:55.088
+C Fix\sharmless\sscan-build\swarnings.
+D 2025-01-11T13:59:42.950
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -728,7 +728,7 @@ F src/date.c 89ce1ff20512a7fa5070ba6e7dd5c171148ca7d580955795bf97c79c2456144a
F src/dbpage.c e90410e5d4c0217dfddc4184a81e38ec4903c25d4ec0f201060a0e54e7c2099f
F src/dbstat.c 73362c0df0f40ad5523a6f5501224959d0976757b511299bf892313e79d14f5c
F src/delete.c 03a77ba20e54f0f42ebd8eddf15411ed6bdb06a2c472ac4b6b336521bf7cea42
-F src/expr.c 3329173aacc6c37da3971b6253827799b32e301673be00126df8271bf018e15f
+F src/expr.c bc600813682b849ef180fffd26fbb36397016366ac1246aa3d3d58f9a31f88f8
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
F src/fkey.c 928ed2517e8732113d2b9821aa37af639688d752f4ea9ac6e0e393d713eeb76f
F src/func.c 89b733a5f513c4bc06b7271384363d5693d62782de8295bc87b97d79862c9714
@@ -779,7 +779,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c c8a5372b97b2a2e972a280676f06ddb5b74e885d3b1f5ce383f839907b57ef68
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 83e88fbb36f89b6703b348777491619554f0fd6f917c9fdf51e4c2e9cda6c04e
-F src/shell.c.in a9c0f8066eac40f1f97b8554bb0462b07263d5c02380cc1ef74734c5d1c67637
+F src/shell.c.in d6d1901fda17a7ab5443e6a6fbc3ca523c01c85058cf0d3ce2e2e5c2e898915e
F src/sqlite.h.in 6afbcaae44140216704a6c82e4c4ea4118c46d5f6573d6c5fa4fc901ed9d369e
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P cef8e88bedf01dc47012ef1cb878b22117c9966e615edf5a69704486f9cfa56c
-R 2966a1ed8608823769a5c4d3eb2bc028
-U stephan
-Z 02b31671f60b5e3785eaa517886d85b1
+P 99917a5bb04b5ad6ace95baf86d91e6ce098f9d3001de1a29d3d0b0b817acdce
+R 4a4f027b9e85dc62acdf46f689ae54cd
+U drh
+Z a5dd0b9f1006749b9a2e9efcfdf75968
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index a540ad80d9..034199fd7d 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-99917a5bb04b5ad6ace95baf86d91e6ce098f9d3001de1a29d3d0b0b817acdce
+b93af6feb7c0c3af30a47810a7c0e77ce41c386fac164c64bb5871a6c153db7e
diff --git a/src/expr.c b/src/expr.c
index 86c966683c..8c118d0779 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3285,6 +3285,7 @@ int sqlite3FindInIndex(
if( aiMap ) aiMap[i] = j;
}
+ assert( nExproutCount = 2;
}else{
From 4b5e8c926ac48d83f70ae9fc1db8a6a9f6b73454 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 11 Jan 2025 14:43:47 +0000
Subject: [PATCH 31/35] Better job at suppressing harmless scan-build warnings.
This time testing and working.
FossilOrigin-Name: c847973947de67579fab78a65ecfc90bf59fd5db0b7fa7a9c1abb1fc92213d01
---
manifest | 14 +++++++-------
manifest.uuid | 2 +-
src/expr.c | 2 +-
src/shell.c.in | 4 +++-
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/manifest b/manifest
index 6f043074b9..cf63954c97 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sharmless\sscan-build\swarnings.
-D 2025-01-11T13:59:42.950
+C Better\sjob\sat\ssuppressing\sharmless\sscan-build\swarnings.\s\sThis\stime\stesting\nand\sworking.
+D 2025-01-11T14:43:47.901
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -728,7 +728,7 @@ F src/date.c 89ce1ff20512a7fa5070ba6e7dd5c171148ca7d580955795bf97c79c2456144a
F src/dbpage.c e90410e5d4c0217dfddc4184a81e38ec4903c25d4ec0f201060a0e54e7c2099f
F src/dbstat.c 73362c0df0f40ad5523a6f5501224959d0976757b511299bf892313e79d14f5c
F src/delete.c 03a77ba20e54f0f42ebd8eddf15411ed6bdb06a2c472ac4b6b336521bf7cea42
-F src/expr.c bc600813682b849ef180fffd26fbb36397016366ac1246aa3d3d58f9a31f88f8
+F src/expr.c 30a407765d4e4b592f9f958085fb4e8336e54fa46a70ade7f5a67111bc191563
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
F src/fkey.c 928ed2517e8732113d2b9821aa37af639688d752f4ea9ac6e0e393d713eeb76f
F src/func.c 89b733a5f513c4bc06b7271384363d5693d62782de8295bc87b97d79862c9714
@@ -779,7 +779,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c c8a5372b97b2a2e972a280676f06ddb5b74e885d3b1f5ce383f839907b57ef68
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 83e88fbb36f89b6703b348777491619554f0fd6f917c9fdf51e4c2e9cda6c04e
-F src/shell.c.in d6d1901fda17a7ab5443e6a6fbc3ca523c01c85058cf0d3ce2e2e5c2e898915e
+F src/shell.c.in aca84434e73942aaaefdba3790fd147c75f73f7c6908959cf2d5cd6a53e8ee76
F src/sqlite.h.in 6afbcaae44140216704a6c82e4c4ea4118c46d5f6573d6c5fa4fc901ed9d369e
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 99917a5bb04b5ad6ace95baf86d91e6ce098f9d3001de1a29d3d0b0b817acdce
-R 4a4f027b9e85dc62acdf46f689ae54cd
+P b93af6feb7c0c3af30a47810a7c0e77ce41c386fac164c64bb5871a6c153db7e
+R ae54af26d9f89a39f6b222b17c0e4b08
U drh
-Z a5dd0b9f1006749b9a2e9efcfdf75968
+Z 623dab57f8e4a45135026255ca9de26f
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 034199fd7d..16c5fbe1c6 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-b93af6feb7c0c3af30a47810a7c0e77ce41c386fac164c64bb5871a6c153db7e
+c847973947de67579fab78a65ecfc90bf59fd5db0b7fa7a9c1abb1fc92213d01
diff --git a/src/expr.c b/src/expr.c
index 8c118d0779..ca5b9092e7 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3285,7 +3285,7 @@ int sqlite3FindInIndex(
if( aiMap ) aiMap[i] = j;
}
- assert( nExpr0 && nExpr
Date: Sat, 11 Jan 2025 16:28:41 +0000
Subject: [PATCH 32/35] Fix harmless "implicit fall through" warnings that
suddenly appeared when I upgraded to gcc-13.
FossilOrigin-Name: 3e2875dac27de1525d9c78f38ac5f1fc12fec7e1b43dbdf47798b128fae49084
---
ext/misc/base64.c | 9 ++++++---
ext/misc/base85.c | 4 ++++
manifest | 16 ++++++++--------
manifest.uuid | 2 +-
src/shell.c.in | 6 +++---
5 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/ext/misc/base64.c b/ext/misc/base64.c
index bc7a976abc..b8147707f9 100644
--- a/ext/misc/base64.c
+++ b/ext/misc/base64.c
@@ -175,15 +175,15 @@ static u8* fromBase64( char *pIn, int ncIn, u8 *pOut ){
case ND:
/* Treat dark non-digits as pad, but they terminate decode too. */
ncIn = 0;
- deliberate_fall_through;
+ deliberate_fall_through; /* FALLTHRU */
case WS:
/* Treat whitespace as pad and terminate this group.*/
nti = nac;
- deliberate_fall_through;
+ deliberate_fall_through; /* FALLTHRU */
case PC:
bdp = 0;
--nbo;
- deliberate_fall_through;
+ deliberate_fall_through; /* FALLTHRU */
default: /* bdp is the digit value. */
qv = qv<<6 | bdp;
break;
@@ -192,10 +192,13 @@ static u8* fromBase64( char *pIn, int ncIn, u8 *pOut ){
switch( nbo ){
case 3:
pOut[2] = (qv) & 0xff;
+ deliberate_fall_through; /* FALLTHRU */
case 2:
pOut[1] = (qv>>8) & 0xff;
+ deliberate_fall_through; /* FALLTHRU */
case 1:
pOut[0] = (qv>>16) & 0xff;
+ deliberate_fall_through; /* FALLTHRU */
}
pOut += nbo;
}
diff --git a/ext/misc/base85.c b/ext/misc/base85.c
index e7ef0a04c9..eaf1732c46 100644
--- a/ext/misc/base85.c
+++ b/ext/misc/base85.c
@@ -232,12 +232,16 @@ static u8* fromBase85( char *pIn, int ncIn, u8 *pOut ){
switch( nbo ){
case 4:
*pOut++ = (qv >> 24)&0xff;
+ /* FALLTHRU */
case 3:
*pOut++ = (qv >> 16)&0xff;
+ /* FALLTHRU */
case 2:
*pOut++ = (qv >> 8)&0xff;
+ /* FALLTHRU */
case 1:
*pOut++ = qv&0xff;
+ /* FALLTHRU */
case 0:
break;
}
diff --git a/manifest b/manifest
index cf63954c97..ba912442f4 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Better\sjob\sat\ssuppressing\sharmless\sscan-build\swarnings.\s\sThis\stime\stesting\nand\sworking.
-D 2025-01-11T14:43:47.901
+C Fix\sharmless\s"implicit\sfall\sthrough"\swarnings\sthat\ssuddenly\sappeared\swhen\nI\supgraded\sto\sgcc-13.
+D 2025-01-11T16:28:41.860
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -400,8 +400,8 @@ F ext/misc/README.md d6dd0fe1d8af77040216798a6a2b0c46c73054d2f0ea544fbbcdccf6f23
F ext/misc/amatch.c 5001711cbecdd57b288cb613386789f3034e5beb58fbe0c79f2b3d643ffd4e03
F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a22525eddb
F ext/misc/appendvfs.c 9642c7a194a2a25dca7ad3e36af24a0a46d7702168c4ad7e59c9f9b0e16a3824
-F ext/misc/base64.c a71b131e50300c654a66c469a25b62874481f3d1cb3beb56aca9a68edd812e0d
-F ext/misc/base85.c 073054111988db593ef5fdb87ab8c459df1ea0c3aaaddf0f5bfa3d72b7e6280a
+F ext/misc/base64.c 95abb0547cb1799d9851f3357c8d7fc3c09a95c63c8772aa3acd5f65f12050f6
+F ext/misc/base85.c a70c885c5c9350261ea6e7b166038eab21a09cf4fceae856ce41fae9c2213b60
F ext/misc/basexx.c 89ad6b76558efbceb627afd5e2ef1d84b2e96d9aaf9b7ecb20e3d00b51be6fcf
F ext/misc/blobio.c a867c4c4617f6ec223a307ebfe0eabb45e0992f74dd47722b96f3e631c0edb2a
F ext/misc/btreeinfo.c cb952620eedf5c0b7625b678f0f08e54d2ec0011d4e50efda5ebdc97f3df7d04
@@ -779,7 +779,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c c8a5372b97b2a2e972a280676f06ddb5b74e885d3b1f5ce383f839907b57ef68
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 83e88fbb36f89b6703b348777491619554f0fd6f917c9fdf51e4c2e9cda6c04e
-F src/shell.c.in aca84434e73942aaaefdba3790fd147c75f73f7c6908959cf2d5cd6a53e8ee76
+F src/shell.c.in beb370609906092a6810fcd9ea76737be2c91694445061c2eb05c4c0a3753de4
F src/sqlite.h.in 6afbcaae44140216704a6c82e4c4ea4118c46d5f6573d6c5fa4fc901ed9d369e
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P b93af6feb7c0c3af30a47810a7c0e77ce41c386fac164c64bb5871a6c153db7e
-R ae54af26d9f89a39f6b222b17c0e4b08
+P c847973947de67579fab78a65ecfc90bf59fd5db0b7fa7a9c1abb1fc92213d01
+R 21473fba427f7d039b2fd83376887456
U drh
-Z 623dab57f8e4a45135026255ca9de26f
+Z b74c42c31ff873968b8ed05fb8e82534
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 16c5fbe1c6..899a15f66c 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-c847973947de67579fab78a65ecfc90bf59fd5db0b7fa7a9c1abb1fc92213d01
+3e2875dac27de1525d9c78f38ac5f1fc12fec7e1b43dbdf47798b128fae49084
diff --git a/src/shell.c.in b/src/shell.c.in
index db0604eb18..17054a961c 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -7337,7 +7337,7 @@ static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){
break;
case AR_SWITCH_APPEND:
pAr->bAppend = 1;
- deliberate_fall_through;
+ deliberate_fall_through; /* FALLTHRU */
case AR_SWITCH_FILE:
pAr->zFile = zArg;
break;
@@ -12029,7 +12029,7 @@ static QuickScanState quickscan(char *zLine, QuickScanState qss,
break;
case '[':
cin = ']';
- deliberate_fall_through;
+ deliberate_fall_through; /* FALLTHRU */
case '`': case '\'': case '"':
cWait = cin;
qss = QSS_HasDark | cWait;
@@ -12064,7 +12064,7 @@ static QuickScanState quickscan(char *zLine, QuickScanState qss,
++zLine;
continue;
}
- deliberate_fall_through;
+ deliberate_fall_through; /* FALLTHRU */
case ']':
CONTINUE_PROMPT_AWAITC(pst, 0);
qss = QSS_SETV(qss, 0);
From 43afab28a09659f7869661a8e56f21865af2414d Mon Sep 17 00:00:00 2001
From: drh <>
Date: Mon, 13 Jan 2025 11:28:34 +0000
Subject: [PATCH 33/35] GCC 13 has become more quite pedantic about the
signature of functions matching the type of pointers through which the
functions are called. Make adjustments to extension functions and test
procedures to work around this. No changes to the core.
FossilOrigin-Name: ed83b79100b4345235aec990303c4526874f0c2f8701160c4639a80633ebaf70
---
ext/misc/closure.c | 7 ++++++-
ext/misc/regexp.c | 3 ++-
ext/session/test_session.c | 3 ---
manifest | 22 +++++++++++-----------
manifest.uuid | 2 +-
src/test1.c | 12 ++++++++----
src/test_intarray.c | 3 ++-
src/test_malloc.c | 6 ++++--
8 files changed, 34 insertions(+), 24 deletions(-)
diff --git a/ext/misc/closure.c b/ext/misc/closure.c
index 79a5a21d1e..267ae1c424 100644
--- a/ext/misc/closure.c
+++ b/ext/misc/closure.c
@@ -588,12 +588,17 @@ static int closureOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
return SQLITE_OK;
}
+/*
+** Wrapper around sqlite3_free
+*/
+static void closureMemFree(closure_avl *p){ sqlite3_free(p); }
+
/*
** Free up all the memory allocated by a cursor. Set it rLimit to 0
** to indicate that it is at EOF.
*/
static void closureClearCursor(closure_cursor *pCur){
- closureAvlDestroy(pCur->pClosure, (void(*)(closure_avl*))sqlite3_free);
+ closureAvlDestroy(pCur->pClosure, closureMemFree);
sqlite3_free(pCur->zTableName);
sqlite3_free(pCur->zIdColumn);
sqlite3_free(pCur->zParentColumn);
diff --git a/ext/misc/regexp.c b/ext/misc/regexp.c
index a50008ca35..71c7ea4c22 100644
--- a/ext/misc/regexp.c
+++ b/ext/misc/regexp.c
@@ -656,7 +656,8 @@ static const char *re_subcompile_string(ReCompiled *p){
** regular expression. Applications should invoke this routine once
** for every call to re_compile() to avoid memory leaks.
*/
-static void re_free(ReCompiled *pRe){
+static void re_free(void *p){
+ ReCompiled *pRe = (ReCompiled*)p;
if( pRe ){
sqlite3_free(pRe->aOp);
sqlite3_free(pRe->aArg);
diff --git a/ext/session/test_session.c b/ext/session/test_session.c
index 29aeadf537..41d6aaa109 100644
--- a/ext/session/test_session.c
+++ b/ext/session/test_session.c
@@ -719,7 +719,6 @@ static int replace_handler(
const char *zTab; /* Name of table conflict is on */
int nCol; /* Number of columns in table zTab */
int i;
- int x = 0;
sqlite3changeset_op(pIter, &zTab, &nCol, &op, 0);
@@ -728,7 +727,6 @@ static int replace_handler(
sqlite3_value *pVal;
sqlite3changeset_old(pIter, i, &pVal);
sqlite3_value_text16(pVal);
- x++;
}
}
@@ -737,7 +735,6 @@ static int replace_handler(
sqlite3_value *pVal;
sqlite3changeset_new(pIter, i, &pVal);
sqlite3_value_text16(pVal);
- x++;
}
}
diff --git a/manifest b/manifest
index ba912442f4..d079f815d5 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sharmless\s"implicit\sfall\sthrough"\swarnings\sthat\ssuddenly\sappeared\swhen\nI\supgraded\sto\sgcc-13.
-D 2025-01-11T16:28:41.860
+C GCC\s13\shas\sbecome\smore\squite\spedantic\sabout\sthe\ssignature\sof\sfunctions\smatching\sthe\ntype\sof\spointers\sthrough\swhich\sthe\sfunctions\sare\scalled.\s\sMake\sadjustments\sto\nextension\sfunctions\sand\stest\sprocedures\sto\swork\saround\sthis.\s\sNo\schanges\sto\sthe\ncore.
+D 2025-01-13T11:28:34.810
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -408,7 +408,7 @@ F ext/misc/btreeinfo.c cb952620eedf5c0b7625b678f0f08e54d2ec0011d4e50efda5ebdc97f
F ext/misc/carray.c 34fac63770971611c5285de0a9f0ac67d504eaf66be891f637add9290f1c76a5
F ext/misc/carray.h 503209952ccf2431c7fd899ebb92bf46bf7635b38aace42ec8aa1b8d7b6e98a5
F ext/misc/cksumvfs.c 3a7931dd30667be6348af919f3f9e6188dfd7646b42af8e399a499b327f5bd63
-F ext/misc/closure.c 0e04f52d93e678dd6f950f195f365992edf3c380df246f3d80425cba4c13891e
+F ext/misc/closure.c 87e0967772e0087e709887ce7ca9cf13aa32d2096e33b5d3382c8b8d477c6cb1
F ext/misc/completion.c cb978c88d5577821323617a8ea775ce1b920e02dcdb593858f02044a4d008eea
F ext/misc/compress.c 2c79a74330e0e0ba6cb3f7397f8ba5af12d46377ef5d3ee075e12dd8a6ed57f0
F ext/misc/csv.c 575c2c05fba0a451586a4d42c2c81e711780c41e797126f198d8d9e0a308dcdb
@@ -432,7 +432,7 @@ F ext/misc/percentile.c 82531c62cd015b9cdca95ad6bb10c3a907ceb570d21ebd4fb7d634c8
F ext/misc/prefixes.c 82645f79229877afab08c8b08ca1e7fa31921280906b90a61c294e4f540cd2a6
F ext/misc/qpvtab.c fc189e127f68f791af90a487f4460ec91539a716daf45a0c357e963fd47cc06c
F ext/misc/randomjson.c ef835fc64289e76ac4873b85fe12f9463a036168d7683cf2b773e36e6262c4ed
-F ext/misc/regexp.c 4bdd0045912f81c84908bd535ec5ad3b1c8540b4287c70ab84070963624047db
+F ext/misc/regexp.c 388e7f237307c7dfbfb8dde44e097946f6c437801d63f0d7ad63f3320d4e61cc
F ext/misc/remember.c add730f0f7e7436cd15ea3fd6a90fd83c3f706ab44169f7f048438b7d6baa69c
F ext/misc/rot13.c 51ac5f51e9d5fd811db58a9c23c628ad5f333c173f1fc53c8491a3603d38556c
F ext/misc/scrub.c 2a44b0d44c69584c0580ad2553f6290a307a49df4668941d2812135bfb96a946
@@ -616,7 +616,7 @@ F ext/session/sessionstat1.test 5e718d5888c0c49bbb33a7a4f816366db85f59f6a4f97544
F ext/session/sessionwor.test 6fd9a2256442cebde5b2284936ae9e0d54bde692d0f5fd009ecef8511f4cf3fc
F ext/session/sqlite3session.c d6f5e3e83b9b0bbc4a8db4837284f0ecc6af5321d4c8e7136380b456b278c46a
F ext/session/sqlite3session.h 683ccbf16e2c2521661fc4c1cf918ce57002039efbcabcd8097fa4bca569104b
-F ext/session/test_session.c aa29abdcc9011ac02f4fa38e8ede226106eaeee7c3ea7d8b2b999a124e0c368c
+F ext/session/test_session.c 12e0a2c15fd60f92da4bb29c697c9177ff0c0dbcdc5129a54c47e999f147937a
F ext/wasm/EXPORTED_FUNCTIONS.fiddle.in 27450c8b8c70875a260aca55435ec927068b34cef801a96205adb81bdcefc65c
F ext/wasm/GNUmakefile 311aa0d5edc7006409962cc77cc26560d92f9be69c2c4302e8bbc68189fd02db
F ext/wasm/README-dist.txt 6382cb9548076fca472fb3330bbdba3a55c1ea0b180ff9253f084f07ff383576
@@ -789,7 +789,7 @@ F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
F src/tclsqlite.c c6b9d3a0b1100e1e028460c418c41ca180dac5958e96bef79f6799b552522a37
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
-F src/test1.c 07c9b523f90b96f6e9a701476602fa1f82075da19955823316b3fe13eaaa52cc
+F src/test1.c 9d2da51b4c33633e7370e4068af6d16d2c52b22a5810ec012ac32e77f8397b64
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
F src/test3.c e7573aa0f78ee4e070a4bc8c3493941c1aa64d5c66d4825c74c0f055451f432b
F src/test4.c 13e57ae7ec7a959ee180970aef09deed141252fe9bb07c61054f0dfa4f1dfd5d
@@ -810,11 +810,11 @@ F src/test_fs.c c411c40baba679536fc34e2679349f59d8225570aed3488b5b3ef1908525a3d5
F src/test_func.c 858d4dddb7acf88222ebcba7cffb585f6dde83e4a15b838c0d05ccdf8d5219b9
F src/test_hexio.c 7449504e4bde876ba91b202617a9228c7c8c2e7bd8b957302f3803ac0e9e353c
F src/test_init.c 17313332d58e90defc527129d5eda4a08bd6b6e8de7207a231523c8d98fb445e
-F src/test_intarray.c e4216aadee9df2de7d1aee7e70f6b22c80ee79ece72a63d57105db74217639e5
+F src/test_intarray.c 3fcf8ca7bb5c8776ea83f6aa9b66f8df0d1f37a99207b0097c8486f9c15cedbf
F src/test_intarray.h 6c3534641108cd1bea517a8e117dcba237081310a29a4c35bd2190caa8972293
F src/test_journal.c a0b9709b2f12b1ec819eea8a1176f283bca6d688a6d4a502bd6fd79786f4e287
F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd
-F src/test_malloc.c a0295e022103b14a1bc5e0660cc2af7fbec05e0d029098782e326e50612e69d9
+F src/test_malloc.c 4954125ee89aa51d9f641d5cb272cc93ca4cb03dcc7c9c941d70210354c69567
F src/test_md5.c 811a45330c9391933360f998156a8907ee29909c828ab83ac05d329942cbea8f
F src/test_multiplex.c b99d7f43ec859e6b93a40aaa5455420b3ad133053cce3db739498d29ea30735f
F src/test_multiplex.h f0ff5b6f4462bfd46dac165d6375b9530d08089b7bcbe75e88e0926110db5363
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c847973947de67579fab78a65ecfc90bf59fd5db0b7fa7a9c1abb1fc92213d01
-R 21473fba427f7d039b2fd83376887456
+P 3e2875dac27de1525d9c78f38ac5f1fc12fec7e1b43dbdf47798b128fae49084
+R 6e0293de1d493e0b13b460e55a82a4db
U drh
-Z b74c42c31ff873968b8ed05fb8e82534
+Z 4c81104bb07f42df2245a2e0f81e374f
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 899a15f66c..d415ffab2c 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-3e2875dac27de1525d9c78f38ac5f1fc12fec7e1b43dbdf47798b128fae49084
+ed83b79100b4345235aec990303c4526874f0c2f8701160c4639a80633ebaf70
diff --git a/src/test1.c b/src/test1.c
index 4212c73232..c204335dcc 100644
--- a/src/test1.c
+++ b/src/test1.c
@@ -5681,9 +5681,11 @@ static int SQLITE_TCLAPI test_stmt_utf8(
sqlite3_stmt *pStmt;
int col;
const char *(*xFunc)(sqlite3_stmt*, int);
+ const unsigned char *(*xFuncU)(sqlite3_stmt*, int);
const char *zRet;
xFunc = (const char *(*)(sqlite3_stmt*, int))clientData;
+ xFuncU = (const unsigned char*(*)(sqlite3_stmt*,int))xFunc;
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
@@ -5692,7 +5694,11 @@ static int SQLITE_TCLAPI test_stmt_utf8(
if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR;
if( Tcl_GetIntFromObj(interp, objv[2], &col) ) return TCL_ERROR;
- zRet = xFunc(pStmt, col);
+ if( xFunc==sqlite3_column_name || xFunc==sqlite3_column_decltype ){
+ zRet = xFunc(pStmt, col);
+ }else{
+ zRet = (const char*)xFuncU(pStmt, col);
+ }
if( zRet ){
Tcl_SetResult(interp, (char *)zRet, 0);
}
@@ -7562,7 +7568,7 @@ static struct LogCallback {
Tcl_Interp *pInterp;
Tcl_Obj *pObj;
} logcallback = {0, 0};
-static void xLogcallback(void *unused, int err, char *zMsg){
+static void xLogcallback(void *unused, int err, const char *zMsg){
Tcl_Obj *pNew = Tcl_DuplicateObj(logcallback.pObj);
Tcl_IncrRefCount(pNew);
Tcl_ListObjAppendElement(
@@ -8601,7 +8607,6 @@ static int SQLITE_TCLAPI test_decode_hexdb(
const char *zIn = 0;
unsigned char *a = 0;
int n = 0;
- int lineno = 0;
int i, iNext;
int iOffset = 0;
int j, k;
@@ -8613,7 +8618,6 @@ static int SQLITE_TCLAPI test_decode_hexdb(
}
zIn = Tcl_GetString(objv[1]);
for(i=0; zIn[i]; i=iNext){
- lineno++;
for(iNext=i; zIn[iNext] && zIn[iNext]!='\n'; iNext++){}
if( zIn[iNext]=='\n' ) iNext++;
while( zIn[i]==' ' || zIn[i]=='\t' ){ i++; }
diff --git a/src/test_intarray.c b/src/test_intarray.c
index 16c1df2e9c..9e4629467e 100644
--- a/src/test_intarray.c
+++ b/src/test_intarray.c
@@ -61,7 +61,8 @@ struct intarray_cursor {
/*
** Free an sqlite3_intarray object.
*/
-static void intarrayFree(sqlite3_intarray *p){
+static void intarrayFree(void *pX){
+ sqlite3_intarray *p = (sqlite3_intarray*)pX;
if( p->xFree ){
p->xFree(p->a);
}
diff --git a/src/test_malloc.c b/src/test_malloc.c
index 21faa0d291..8d6c4fa505 100644
--- a/src/test_malloc.c
+++ b/src/test_malloc.c
@@ -41,8 +41,9 @@ static struct MemFault {
** fire on any simulated malloc() failure.
*/
static void sqlite3Fault(void){
- static int cnt = 0;
+ static u64 cnt = 0;
cnt++;
+ if( cnt>((u64)1<<63) ) abort();
}
/*
@@ -52,8 +53,9 @@ static void sqlite3Fault(void){
** This routine only runs on the first such failure.
*/
static void sqlite3FirstFault(void){
- static int cnt2 = 0;
+ static u64 cnt2 = 0;
cnt2++;
+ if( cnt2>((u64)1<<63) ) abort();
}
/*
From f1747f93e0f8df7984b595b91649c7789217fe59 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Mon, 13 Jan 2025 13:32:56 +0000
Subject: [PATCH 34/35] Remove a stray tab character from a comment.
FossilOrigin-Name: 315079b150b47e013e2cde4985bc39d24e0f6f6c6e60f9383fb8ea4ea897c67a
---
manifest | 12 ++++++------
manifest.uuid | 2 +-
src/where.c | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/manifest b/manifest
index d079f815d5..dfaaeb02a3 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C GCC\s13\shas\sbecome\smore\squite\spedantic\sabout\sthe\ssignature\sof\sfunctions\smatching\sthe\ntype\sof\spointers\sthrough\swhich\sthe\sfunctions\sare\scalled.\s\sMake\sadjustments\sto\nextension\sfunctions\sand\stest\sprocedures\sto\swork\saround\sthis.\s\sNo\schanges\sto\sthe\ncore.
-D 2025-01-13T11:28:34.810
+C Remove\sa\sstray\stab\scharacter\sfrom\sa\scomment.
+D 2025-01-13T13:32:56.652
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -862,7 +862,7 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
F src/wal.c 4e6181d8780ab0af2e1388d0754cbe6f2f04593d2b1ab6c41699a89942fd8997
F src/wal.h ba252daaa94f889f4b2c17c027e823d9be47ce39da1d3799886bbd51f0490452
F src/walker.c d5006d6b005e4ea7302ad390957a8d41ed83faa177e412f89bc5600a7462a014
-F src/where.c d519bc93b4a05928f10ba4925b1afc77cbd71c1b1b5148583ab4868925c639fb
+F src/where.c 604f17baed46f4997ffe79f25c07c4b51a4165a5938cc27fe165c7e1ca485d11
F src/whereInt.h 1e36ec50392f7cc3d93d1152d4338064cd522b87156a0739388b7e273735f0ca
F src/wherecode.c 0c3d3199a2b769a5e2bb70feb5003dc85b3d86842ecaf903a47f2b4205ca5dab
F src/whereexpr.c 0f93a29cabd3a338d09a1f5c6770620a1ac51ec1157f3229502a7e7767c60b6f
@@ -2205,8 +2205,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 3e2875dac27de1525d9c78f38ac5f1fc12fec7e1b43dbdf47798b128fae49084
-R 6e0293de1d493e0b13b460e55a82a4db
+P ed83b79100b4345235aec990303c4526874f0c2f8701160c4639a80633ebaf70
+R 0ed0cfcc7f2bc831da5d62a3490571ed
U drh
-Z 4c81104bb07f42df2245a2e0f81e374f
+Z 2b06b025e298002c2c77b6953d35e566
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index d415ffab2c..aeb488e3a7 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-ed83b79100b4345235aec990303c4526874f0c2f8701160c4639a80633ebaf70
+315079b150b47e013e2cde4985bc39d24e0f6f6c6e60f9383fb8ea4ea897c67a
diff --git a/src/where.c b/src/where.c
index 4325374bce..20b1c38c0c 100644
--- a/src/where.c
+++ b/src/where.c
@@ -862,7 +862,7 @@ static int constraintCompatibleWithOuterJoin(
** 3. If no disqualifying conditions above are found, return true.
**
** 2025-01-03: I experimented with a new rule that returns false if the
-** the datatype of the column is "BOOLEAN". This did not improve
+** the datatype of the column is "BOOLEAN". This did not improve
** performance on any queries at hand, but it did burn CPU cycles, so the
** idea was not committed.
*/
From 942c9587698715734715242737dba07ef296b0ef Mon Sep 17 00:00:00 2001
From: drh <>
Date: Tue, 14 Jan 2025 11:05:00 +0000
Subject: [PATCH 35/35] Version 3.48.0
FossilOrigin-Name: d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010
---
manifest | 11 +++++++----
manifest.uuid | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/manifest b/manifest
index dfaaeb02a3..809b43bc20 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sa\sstray\stab\scharacter\sfrom\sa\scomment.
-D 2025-01-13T13:32:56.652
+C Version\s3.48.0
+D 2025-01-14T11:05:00.186
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -2205,8 +2205,11 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P ed83b79100b4345235aec990303c4526874f0c2f8701160c4639a80633ebaf70
+P 315079b150b47e013e2cde4985bc39d24e0f6f6c6e60f9383fb8ea4ea897c67a
R 0ed0cfcc7f2bc831da5d62a3490571ed
+T +sym-major-relase *
+T +sym-relase *
+T +sym-version-3.48.0 *
U drh
-Z 2b06b025e298002c2c77b6953d35e566
+Z cc77aac977f98c5521d75f4212754ff8
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index aeb488e3a7..582262f689 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-315079b150b47e013e2cde4985bc39d24e0f6f6c6e60f9383fb8ea4ea897c67a
+d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010