From 7bd230cf4da87afa6adb44a53fb29845e3f7e5fc Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 4 Sep 2024 18:51:59 +0000 Subject: [PATCH 01/13] Make the default TCLDIR be C:\Tcl in the Makefile.msc. FossilOrigin-Name: c2c0a9176ae7291a0b72f3d048a2ef5716c325b9f693cdc5eada552e0c881a9d --- Makefile.msc | 2 +- manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index fde1f31a9f..36a0ed3abe 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -938,7 +938,7 @@ TCLSUFFIX = !ENDIF !IFNDEF TCLDIR -TCLDIR = $(TOP)\compat\tcl +TCLDIR = C:\Tcl !ENDIF !IFNDEF TCLINCDIR diff --git a/manifest b/manifest index eb0b2807fd..8775a8ed5f 100644 --- a/manifest +++ b/manifest @@ -1,11 +1,11 @@ -C Fix\sa\sbug\sin\sthe\sparsing\sof\ssome\scorner-case\sJSON\sPATH\sstrings\sthat\scontain\nescaped\sdouble-quotes. -D 2024-09-04T16:01:44.145 +C Make\sthe\sdefault\sTCLDIR\sbe\sC:\\Tcl\sin\sthe\sMakefile.msc. +D 2024-09-04T18:51:59.227 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F Makefile.in af5fbc3453b745daa68c7aa5dfdb945c09cb724971db3b783d6b5e1a62279e28 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 -F Makefile.msc 2c905f4c795a628d7fd892294e8fdec6d5f719fa5b252cb839fed147e64435a0 +F Makefile.msc e72a4653ea8f48efd14c7dac1e7de308a1f3cc91f905f15cbcacc680301c8f03 F README.md 5b678e264236788390d11991f2c0052bd73f19790173883fc56d638bcb849154 F VERSION 0db40f92c04378404eb45bff93e9e42c148c7e54fd3da99469ed21e22411f5a6 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P c0c6e9abebf76358625f30a179658319b260baba6eded2a4c5ad356143e36f97 -R c9ec90e0d0ba3db3bca78a08a6c286b8 +P 60ac55c4b76355aaf7cbde38bf1f6082ff5612bf4ffc49ab69d00fd4e3d64e64 +R 7c445598106af51bfd865380701cef37 U drh -Z c8dd2f7c1df9f10ff01ca20270187b6f +Z 345e63504eb5893ea2a5338064417dd5 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 70820e2597..2340dd1354 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -60ac55c4b76355aaf7cbde38bf1f6082ff5612bf4ffc49ab69d00fd4e3d64e64 +c2c0a9176ae7291a0b72f3d048a2ef5716c325b9f693cdc5eada552e0c881a9d From 6aedd6d9fce717e366af1c10c801eb5b6afec2df Mon Sep 17 00:00:00 2001 From: drh <> Date: Thu, 5 Sep 2024 11:46:43 +0000 Subject: [PATCH 02/13] Faster implementation of the aggregate_test_counts procedure inside of testrunner.tcl. FossilOrigin-Name: a01d869520329fb9e786cdc65f359785a95d19d289e4c6b844c758d6e5385aaf --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 23 ++++------------------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/manifest b/manifest index 8775a8ed5f..106a4d98ac 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Make\sthe\sdefault\sTCLDIR\sbe\sC:\\Tcl\sin\sthe\sMakefile.msc. -D 2024-09-04T18:51:59.227 +C Faster\simplementation\sof\sthe\saggregate_test_counts\sprocedure\sinside\sof\ntestrunner.tcl. +D 2024-09-05T11:46:43.981 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1715,7 +1715,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl 2c203a2dd664298f239f0ec3ce22fbc65b5f021c1e09edbae8452af8a694e052 -F test/testrunner.tcl 982939f0f1835007298b92e52694c207d16ef79143993b35e5cbc9f0c585938b x +F test/testrunner.tcl 68b23b52e9ba45eb294b2597c27c383d12129afc06e33c8771313c7238bd1c44 x F test/testrunner_data.tcl dbc0bb1c5b912dfd1e32b25d544318e412edd6085bd5fc9e6619cb93a739b786 F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 60ac55c4b76355aaf7cbde38bf1f6082ff5612bf4ffc49ab69d00fd4e3d64e64 -R 7c445598106af51bfd865380701cef37 +P c2c0a9176ae7291a0b72f3d048a2ef5716c325b9f693cdc5eada552e0c881a9d +R f43ab99ba85b48d85b41205bb3574221 U drh -Z 345e63504eb5893ea2a5338064417dd5 +Z ff8ebe5698dd3ab04755716aae5f59e1 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 2340dd1354..7f61e5a5d3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c2c0a9176ae7291a0b72f3d048a2ef5716c325b9f693cdc5eada552e0c881a9d +a01d869520329fb9e786cdc65f359785a95d19d289e4c6b844c758d6e5385aaf diff --git a/test/testrunner.tcl b/test/testrunner.tcl index a63a22d2fc..ccf888b572 100755 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -633,25 +633,10 @@ if {[llength $argv]>=1 # Aggregate these numbers and return them. # proc aggregate_test_counts {db} { - set ncase 0 - set nerr 0 - $db eval {SELECT output FROM jobs WHERE displaytype IN ('tcl','fuzz')} { - set n 0 - set m 0 - if {[regexp {(\d+) errors out of (\d+) tests} $output all n m] - && [string is integer -strict $n] - && [string is integer -strict $m]} { - incr ncase $m - incr nerr $n - } elseif {[regexp {sessionfuzz.*: *(\d+) cases, (\d+) crash} $output \ - all m n] - && [string is integer -strict $m] - && [string is integer -strict $n]} { - incr ncase $m - incr nerr $n - } - } - return [list $nerr $ncase] + set ne 0 + set nt 0 + $db eval {SELECT sum(nerr) AS ne, sum(ntest) as nt FROM jobs} break + return [list $ne $nt] } #-------------------------------------------------------------------------- From 21e7816e651eb0e4fc67283b7acbc540c2a96cae Mon Sep 17 00:00:00 2001 From: drh <> Date: Thu, 5 Sep 2024 12:06:45 +0000 Subject: [PATCH 03/13] Enhance testrunner.tcl to keep track of the platform and SQLite version as reported by individual test cases and to report that information in the summary at the end of each test run. FossilOrigin-Name: 80ebb7c7e686cd936ac834f2258f585a7004762593e0bc859ecd75d6fb0badfd --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 19 +++++++++++++++++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 106a4d98ac..0d01cba7f0 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Faster\simplementation\sof\sthe\saggregate_test_counts\sprocedure\sinside\sof\ntestrunner.tcl. -D 2024-09-05T11:46:43.981 +C Enhance\stestrunner.tcl\sto\skeep\strack\sof\sthe\splatform\sand\sSQLite\sversion\nas\sreported\sby\sindividual\stest\scases\sand\sto\sreport\sthat\sinformation\sin\sthe\nsummary\sat\sthe\send\sof\seach\stest\srun. +D 2024-09-05T12:06:45.482 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1715,7 +1715,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl 2c203a2dd664298f239f0ec3ce22fbc65b5f021c1e09edbae8452af8a694e052 -F test/testrunner.tcl 68b23b52e9ba45eb294b2597c27c383d12129afc06e33c8771313c7238bd1c44 x +F test/testrunner.tcl 1ebde7e8b57c464b9eb6ce047977c1edb46688b2ab94cc67e3cd5e4a3645ff00 x F test/testrunner_data.tcl dbc0bb1c5b912dfd1e32b25d544318e412edd6085bd5fc9e6619cb93a739b786 F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P c2c0a9176ae7291a0b72f3d048a2ef5716c325b9f693cdc5eada552e0c881a9d -R f43ab99ba85b48d85b41205bb3574221 +P a01d869520329fb9e786cdc65f359785a95d19d289e4c6b844c758d6e5385aaf +R a6deed6e9bd78f423240221d74d8d7b3 U drh -Z ff8ebe5698dd3ab04755716aae5f59e1 +Z 8cf0ea19b5a0efdaca6c57466a00e96c # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 7f61e5a5d3..9f0908d687 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a01d869520329fb9e786cdc65f359785a95d19d289e4c6b844c758d6e5385aaf +80ebb7c7e686cd936ac834f2258f585a7004762593e0bc859ecd75d6fb0badfd diff --git a/test/testrunner.tcl b/test/testrunner.tcl index ccf888b572..cd9d0daff5 100755 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -290,6 +290,8 @@ set TRG(schema) { state TEXT CHECK( state IN ('','ready','running','done','failed','omit') ), ntest INT, -- Number of test cases run nerr INT, -- Number of errors reported + svers TEXT, -- Reported SQLite version + pltfm TEXT, -- Host platform reported output TEXT -- test output ); @@ -1255,6 +1257,10 @@ proc mark_job_as_finished {jobid output state endtm} { set nerr $a set ntest $b } + regexp {\y\d+ errors out of \d+ tests (on [^\n]+-bit \S+-endian)} \ + $output all pltfm + regexp {\ySQLite \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [0-9a-fA-F]+} \ + $output svers } r_write_db { if {$state=="failed"} { @@ -1266,7 +1272,7 @@ proc mark_job_as_finished {jobid output state endtm} { trdb eval { UPDATE jobs SET output=$output, state=$state, endtime=$endtm, - ntest=$ntest, nerr=$nerr + ntest=$ntest, nerr=$nerr, svers=$svers, pltfm=$pltfm WHERE jobid=$jobid; UPDATE jobs SET state=$childstate WHERE depid=$jobid; } @@ -1519,7 +1525,16 @@ proc run_testset {} { FROM jobs WHERE endtime>0 } break; set et [elapsetime $totaltime] - puts "$totalerr errors out of $totaltest tests in about $et" + set pltfm {} + trdb eval { + SELECT pltfm, count(*) FROM jobs WHERE pltfm IS NOT NULL + ORDER BY 2 DESC LIMIT 1 + } {puts $pltfm} + puts "$totalerr errors out of $totaltest tests in about $et $pltfm" + trdb eval { + SELECT DISTINCT svers FROM jobs WHERE svers IS NOT NULL + } {puts $svers} + } # Handle the --buildonly option, if it was specified. From 4987c5c3c24755bd2b19c4bd0fa11dc3b04d260b Mon Sep 17 00:00:00 2001 From: drh <> Date: Thu, 5 Sep 2024 15:28:15 +0000 Subject: [PATCH 04/13] Testrunner.tcl enhancements: (1) Attempt to build the SQLite tcl extension if it is not already available. (2) testrunner target "devtest" is added as an alias for "mdevtest". (3) Try to keep summary information at the end of a test below 80-characters per line. (4) Update the Makefile.in so that the "clean" target removes the tcl extension built by item 1 above. FossilOrigin-Name: aa5f10f21dbfb24ee54ca96bfb7b013ae29e26fec05b80681f19cc63d9face49 --- Makefile.in | 2 +- manifest | 16 ++++++++-------- manifest.uuid | 2 +- test/tester.tcl | 9 +++++++-- test/testrunner.tcl | 37 +++++++++++++++++++++++++++++++++---- 5 files changed, 50 insertions(+), 16 deletions(-) diff --git a/Makefile.in b/Makefile.in index 2377146417..cc75000033 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1626,7 +1626,7 @@ tidy: rm -f LogEst$(TEXE) fts3view$(TEXE) rollback-test$(TEXE) showdb$(TEXE) rm -f showjournal$(TEXE) showstat4$(TEXE) showwal$(TEXE) speedtest1$(TEXE) rm -f wordcount$(TEXE) changeset$(TEXE) version-info$(TEXE) - rm -f *.dll *.lib *.exp *.def *.pc *.vsix + rm -f *.dll *.lib *.exp *.def *.pc *.vsix *.so *.dylib pkgIndex.tcl rm -f sqlite3_analyzer$(TEXE) rm -f mptester$(TEXE) rbu$(TEXE) srcck1$(TEXE) rm -f fuzzershell$(TEXE) fuzzcheck$(TEXE) sqldiff$(TEXE) dbhash$(TEXE) diff --git a/manifest b/manifest index 0d01cba7f0..2cb670f56a 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Enhance\stestrunner.tcl\sto\skeep\strack\sof\sthe\splatform\sand\sSQLite\sversion\nas\sreported\sby\sindividual\stest\scases\sand\sto\sreport\sthat\sinformation\sin\sthe\nsummary\sat\sthe\send\sof\seach\stest\srun. -D 2024-09-05T12:06:45.482 +C Testrunner.tcl\senhancements:\s\s(1)\sAttempt\sto\sbuild\sthe\sSQLite\stcl\sextension\nif\sit\sis\snot\salready\savailable.\s\s(2)\stestrunner\starget\s"devtest"\sis\sadded\sas\nan\salias\sfor\s"mdevtest".\s\s(3)\sTry\sto\skeep\ssummary\sinformation\sat\sthe\send\sof\na\stest\sbelow\s80-characters\sper\sline.\s\s(4)\sUpdate\sthe\sMakefile.in\sso\sthat\nthe\s"clean"\starget\sremoves\sthe\stcl\sextension\sbuilt\sby\sitem\s1\sabove. +D 2024-09-05T15:28:15.141 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 -F Makefile.in af5fbc3453b745daa68c7aa5dfdb945c09cb724971db3b783d6b5e1a62279e28 +F Makefile.in 098d9814c66d81a8bbfb3550876b7d9695a0b050c0d4680afb4931a7aa8fe7f1 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 F Makefile.msc e72a4653ea8f48efd14c7dac1e7de308a1f3cc91f905f15cbcacc680301c8f03 F README.md 5b678e264236788390d11991f2c0052bd73f19790173883fc56d638bcb849154 @@ -1714,8 +1714,8 @@ F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30 F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d1631311a16 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc -F test/tester.tcl 2c203a2dd664298f239f0ec3ce22fbc65b5f021c1e09edbae8452af8a694e052 -F test/testrunner.tcl 1ebde7e8b57c464b9eb6ce047977c1edb46688b2ab94cc67e3cd5e4a3645ff00 x +F test/tester.tcl 7b44f1a9b9a2de8112695b908afc21dd9a68cd2d44e84b73f1b27b53492c0d59 +F test/testrunner.tcl 8b8052ef2abf673729eeeeb222961c99b3e08231635c196533aff315e3f12f2d x F test/testrunner_data.tcl dbc0bb1c5b912dfd1e32b25d544318e412edd6085bd5fc9e6619cb93a739b786 F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P a01d869520329fb9e786cdc65f359785a95d19d289e4c6b844c758d6e5385aaf -R a6deed6e9bd78f423240221d74d8d7b3 +P 80ebb7c7e686cd936ac834f2258f585a7004762593e0bc859ecd75d6fb0badfd +R 83bee4b7a0d6a0c18b04c62c3e6012df U drh -Z 8cf0ea19b5a0efdaca6c57466a00e96c +Z 30dd6ec18ce8874d43e8198deb845f86 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 9f0908d687..5af6554025 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -80ebb7c7e686cd936ac834f2258f585a7004762593e0bc859ecd75d6fb0badfd +aa5f10f21dbfb24ee54ca96bfb7b013ae29e26fec05b80681f19cc63d9face49 diff --git a/test/tester.tcl b/test/tester.tcl index 164ee47f42..b5f49ebde9 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -1279,10 +1279,15 @@ proc finalize_testing {} { out of $nTest tests" } else { set cpuinfo {} - if {[catch {exec hostname} hname]==0} {set cpuinfo [string trim $hname]} + if {[catch {exec hostname} hname]==0} { + regsub {\.local$} $hname {} hname + set cpuinfo [string trim $hname] + } append cpuinfo " $::tcl_platform(os)" append cpuinfo " [expr {$::tcl_platform(pointerSize)*8}]-bit" - append cpuinfo " [string map {E -e} $::tcl_platform(byteOrder)]" + if {[string match big* $::tcl_platform(byteOrder)]} { + append cpuinfo " [string map {E -e} $::tcl_platform(byteOrder)]" + } output2 "SQLite [sqlite3 -sourceid]" output2 "$nErr errors out of $nTest tests on $cpuinfo" } diff --git a/test/testrunner.tcl b/test/testrunner.tcl index cd9d0daff5..09704c03d3 100755 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -17,8 +17,14 @@ cd $dir # recommend that the user build one. # proc find_interpreter {} { + global dir set interpreter [file tail [info nameofexec]] set rc [catch { package require sqlite3 }] + if {$rc} { + if {[file readable pkgIndex.tcl] && [catch {source pkgIndex.tcl}]==0} { + set rc [catch { package require sqlite3 }] + } + } if {$rc} { if { [string match -nocase testfixture* $interpreter]==0 && [file executable ./testfixture] @@ -31,8 +37,30 @@ proc find_interpreter {} { } } if {$rc} { - puts stderr "Failed to find tcl package sqlite3" - puts stderr "Run \"make testfixture\" and then try again..." + puts "Cannot find tcl package sqlite3: Trying to build it now..." + if {$::tcl_platform(platform)=="windows"} { + set bat [open make-tcl-extension.bat w] + puts $bat "nmake /f Makefile.msc tclextension" + close $bat + catch {exec -ignorestderr -- make-tcl-extension.bat} + } else { + catch {exec make tclextension} + } + if {[file readable pkgIndex.tcl] && [catch {source pkgIndex.tcl}]==0} { + set rc [catch { package require sqlite3 }] + } + if {$rc==0} { + puts "The SQLite tcl extension was successfully built and loaded." + puts "Run \"make tclextension-install\" to avoid having to rebuild\ + it in the future." + } else { + puts "Unable to build the SQLite tcl extension" + } + } + if {$rc} { + puts stderr "Cannot find a working instance of the SQLite tcl extension." + puts stderr "Run \"make tclextension\" or \"make testfixture\" and\ + try again..." exit 1 } } @@ -1166,6 +1194,7 @@ proc add_jobs_from_cmdline {patternlist} { } } + devtest - mdevtest { set config_set { All-O0 @@ -1530,9 +1559,9 @@ proc run_testset {} { SELECT pltfm, count(*) FROM jobs WHERE pltfm IS NOT NULL ORDER BY 2 DESC LIMIT 1 } {puts $pltfm} - puts "$totalerr errors out of $totaltest tests in about $et $pltfm" + puts "$totalerr errors out of $totaltest tests in $et $pltfm" trdb eval { - SELECT DISTINCT svers FROM jobs WHERE svers IS NOT NULL + SELECT DISTINCT substr(svers,1,80) FROM jobs WHERE svers IS NOT NULL } {puts $svers} } From 6ffcdb1856fea916f9c98379e9cb57afc6db9104 Mon Sep 17 00:00:00 2001 From: drh <> Date: Thu, 5 Sep 2024 15:55:04 +0000 Subject: [PATCH 05/13] Update notes on build procedures in the README.md file. FossilOrigin-Name: 1d12744fe7cc294994e53e1ffe72799d0321dd5c1ef031213f083e200918fee5 --- README.md | 43 +++++++++++++++++++++++++++---------------- manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index c208f11ea3..ad11c453ac 100644 --- a/README.md +++ b/README.md @@ -103,17 +103,19 @@ script found at the root of the source tree. Then run "make". For example: - tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite" - mkdir bld ;# Build will occur in a sibling directory - cd bld ;# Change to the build directory - ../sqlite/configure ;# Run the configure script - make sqlite3 ;# Builds the "sqlite3" command-line tool - make sqlite3.c ;# Build the "amalgamation" source file - make devtest ;# Run development tests (requires tcl-dev) - make releasetest ;# Run full release tests (requires tcl-dev) - make sqldiff ;# Builds the "sqldiff" command-line tool - make sqlite3_analyzer ;# Builds the "sqlite3_analyzer" tool (requires tcl-dev) - make tclextension-install ;# Build and install the SQLite TCL extension + apt install gcc make tcl-dev ;# Make sure you have all the necessary build tools + tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite" + mkdir bld ;# Build will occur in a sibling directory + cd bld ;# Change to the build directory + ../sqlite/configure ;# Run the configure script + make sqlite3 ;# Builds the "sqlite3" command-line tool + make sqlite3.c ;# Build the "amalgamation" source file + make sqldiff ;# Builds the "sqldiff" command-line tool + # Makefile targets below this point require tcl-dev + make tclextension-install ;# Build and install the SQLite TCL extension + make devtest ;# Run development tests + make releasetest ;# Run full release tests + make sqlite3_analyzer ;# Builds the "sqlite3_analyzer" tool See the makefile for additional targets. For debugging builds, the core developers typically run "configure" with options like this: @@ -124,9 +126,12 @@ For release builds, the core developers usually do: ../sqlite/configure --enable-all -Almost all makefile targets require a "tclsh" TCL interpreter -version 8.6 or later. The targets marked with "(requires tcl-dev)" also require -the TCL development libraries. +Almost all makefile targets require a "tclsh" TCL interpreter version 8.6 or +later. The "tclextension-install" target and the test targets that follow +all require TCL development libraries too. ("apt install tcl-dev"). It is +helpful, but is not required, to install the SQLite TCL extension (the +"tclextension-install" target) prior to running tests. The "releasetest" +target has additional requiremenst, such as "valgrind". On "make" command-lines, one can add "OPTIONS=..." to specify additional compile-time options over and above those set by ./configure. For example, @@ -157,15 +162,21 @@ TCL library, using a command like this: SQLite uses "tclsh.exe" as part of the build process, and so that program will need to be somewhere on your %PATH%. SQLite itself does not contain any TCL code, but it does use TCL to help with the -build process and to run tests. +build process and to run tests. You may need to install TCL development +libraries in order to successfully complete some makefile targets. +It is helpful, but is not required, to install the SQLite TCL extension +(the "tclextension-install" target) prior to running tests. Build using Makefile.msc. Example: nmake /f Makefile.msc sqlite3.exe nmake /f Makefile.msc sqlite3.c + nmake /f Makefile.msc sqldiff.exe + # Makefile targets below this point require TCL development libraries + nmake /f Makefile.msc tclextension-install nmake /f Makefile.msc devtest nmake /f Makefile.msc releasetest - nmake /f Makefile.msc tclextension-install + nmake /f Makefile.msc sqlite3_analyzer.exe There are many other makefile targets. See comments in Makefile.msc for details. diff --git a/manifest b/manifest index 2cb670f56a..b5a5da924d 100644 --- a/manifest +++ b/manifest @@ -1,12 +1,12 @@ -C Testrunner.tcl\senhancements:\s\s(1)\sAttempt\sto\sbuild\sthe\sSQLite\stcl\sextension\nif\sit\sis\snot\salready\savailable.\s\s(2)\stestrunner\starget\s"devtest"\sis\sadded\sas\nan\salias\sfor\s"mdevtest".\s\s(3)\sTry\sto\skeep\ssummary\sinformation\sat\sthe\send\sof\na\stest\sbelow\s80-characters\sper\sline.\s\s(4)\sUpdate\sthe\sMakefile.in\sso\sthat\nthe\s"clean"\starget\sremoves\sthe\stcl\sextension\sbuilt\sby\sitem\s1\sabove. -D 2024-09-05T15:28:15.141 +C Update\snotes\son\sbuild\sprocedures\sin\sthe\sREADME.md\sfile. +D 2024-09-05T15:55:04.340 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F Makefile.in 098d9814c66d81a8bbfb3550876b7d9695a0b050c0d4680afb4931a7aa8fe7f1 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 F Makefile.msc e72a4653ea8f48efd14c7dac1e7de308a1f3cc91f905f15cbcacc680301c8f03 -F README.md 5b678e264236788390d11991f2c0052bd73f19790173883fc56d638bcb849154 +F README.md 282d999d14bfd1dcb36652abbfba9f8dffbda083ddcdb91361459e43164a1d23 F VERSION 0db40f92c04378404eb45bff93e9e42c148c7e54fd3da99469ed21e22411f5a6 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 80ebb7c7e686cd936ac834f2258f585a7004762593e0bc859ecd75d6fb0badfd -R 83bee4b7a0d6a0c18b04c62c3e6012df +P aa5f10f21dbfb24ee54ca96bfb7b013ae29e26fec05b80681f19cc63d9face49 +R 7cc85ab35bb58c1a46f86590da7723ea U drh -Z 30dd6ec18ce8874d43e8198deb845f86 +Z a2b02066e2e694d910978f885128ac52 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 5af6554025..210827e73b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -aa5f10f21dbfb24ee54ca96bfb7b013ae29e26fec05b80681f19cc63d9face49 +1d12744fe7cc294994e53e1ffe72799d0321dd5c1ef031213f083e200918fee5 From 934e796e439495ab0f2655e5711c5fe6d39285b9 Mon Sep 17 00:00:00 2001 From: drh <> Date: Thu, 5 Sep 2024 23:22:55 +0000 Subject: [PATCH 06/13] Ensure that the WhereInfo.revMask bitmap is adjusted when tables are removed from the FROM clause by the Omit-Noop-Join optimization of [0cd82ee9a8413cf1]. Fix for the issue described by [forum:/forum/8a1e467e905b8d27|format post 8a1e467e905b8d27]. FossilOrigin-Name: 22ca5a2ffb89ccb5f337993b5a95e27c449c39014284156eabc33da012a8759c --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/where.c | 3 +++ test/join2.test | 21 +++++++++++++++++++++ 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index b5a5da924d..0a8c14d268 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Update\snotes\son\sbuild\sprocedures\sin\sthe\sREADME.md\sfile. -D 2024-09-05T15:55:04.340 +C Ensure\sthat\sthe\sWhereInfo.revMask\sbitmap\sis\sadjusted\swhen\stables\sare\sremoved\nfrom\sthe\sFROM\sclause\sby\sthe\sOmit-Noop-Join\soptimization\sof\n[0cd82ee9a8413cf1].\s\sFix\sfor\sthe\sissue\sdescribed\sby\n[forum:/forum/8a1e467e905b8d27|format\spost\s8a1e467e905b8d27]. +D 2024-09-05T23:22:55.647 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -852,7 +852,7 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9 F src/wal.c 887fc4ca3f020ebb2e376f222069570834ac63bf50111ef0cbf3ae417048ed89 F src/wal.h ba252daaa94f889f4b2c17c027e823d9be47ce39da1d3799886bbd51f0490452 F src/walker.c d5006d6b005e4ea7302ad390957a8d41ed83faa177e412f89bc5600a7462a014 -F src/where.c c046dd58c3410f7b7528e1e6317cb876398557bad346d568ed8562321a7d002d +F src/where.c 079f1cf6abc086315f5c9873626b7c0537f382c55184c516b8e3d29f7a537fdc F src/whereInt.h a5d079c346a658b7a6e9e47bb943d021e02fa1e6aed3b964ca112112a4892192 F src/wherecode.c 5172d647798134e7c92536ddffe7e530c393d79b5dedd648b88faf2646c65baf F src/whereexpr.c 44f41ae554c7572e1de1485b3169b233ee04d464b2ee5881687ede3bf07cacfa @@ -1346,7 +1346,7 @@ F test/ioerr5.test 5984da7bf74b6540aa356f2ab0c6ae68a6d12039a3d798a9ac6a100abc17d F test/ioerr6.test a395a6ab144b26a9e3e21059a1ab6a7149cca65b F test/istrue.test e7f285bb70282625c258e866ce6337d4c762922f5a300e1b50f958aef6e7d9c9 F test/join.test f7abfef3faeaf2800308872e33a57e5b6e4a2b44fb8c6b90c6068412e71a6cf4 -F test/join2.test 8561fe82ce434ac96de91544072e578dc2cadddf2d9bc9cd802f866a9b92502e +F test/join2.test f59d63264fb24784ae9c3bc9d867eb569cd6d442da5660f8852effe5c1938c27 F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0 F test/join4.test 1a352e4e267114444c29266ce79e941af5885916 F test/join5.test 380d12a9350f99f0cc681a4f1fea999886f18b3fe0d71a9b3065bcaead1e007f @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P aa5f10f21dbfb24ee54ca96bfb7b013ae29e26fec05b80681f19cc63d9face49 -R 7cc85ab35bb58c1a46f86590da7723ea +P 1d12744fe7cc294994e53e1ffe72799d0321dd5c1ef031213f083e200918fee5 +R 45d88f5375170588d0b1bd314eace7a3 U drh -Z a2b02066e2e694d910978f885128ac52 +Z 4179122ae9403ba759b59f6aa6b2df32 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 210827e73b..dc2d1cd140 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1d12744fe7cc294994e53e1ffe72799d0321dd5c1ef031213f083e200918fee5 +22ca5a2ffb89ccb5f337993b5a95e27c449c39014284156eabc33da012a8759c diff --git a/src/where.c b/src/where.c index 2b835009db..7ca4f533f0 100644 --- a/src/where.c +++ b/src/where.c @@ -6199,6 +6199,7 @@ static SQLITE_NOINLINE Bitmask whereOmitNoopJoin( WhereTerm *pTerm, *pEnd; SrcItem *pItem; WhereLoop *pLoop; + Bitmask m1; pLoop = pWInfo->a[i].pWLoop; pItem = &pWInfo->pTabList->a[pLoop->iTab]; if( (pItem->fg.jointype & (JT_LEFT|JT_RIGHT))!=JT_LEFT ) continue; @@ -6226,6 +6227,8 @@ static SQLITE_NOINLINE Bitmask whereOmitNoopJoin( } if( pTerm drop loop %c not used\n", pLoop->cId)); + m1 = MASKBIT(i)-1; + pWInfo->revMask = (m1 & pWInfo->revMask) | ((pWInfo->revMask>>1) & ~m1); notReady &= ~pLoop->maskSelf; for(pTerm=pWInfo->sWC.a; pTermprereqAll & pLoop->maskSelf)!=0 ){ diff --git a/test/join2.test b/test/join2.test index 15e76f965d..6f2fe1d770 100644 --- a/test/join2.test +++ b/test/join2.test @@ -428,4 +428,25 @@ do_eqp_test 12.3 { `--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?) LEFT-JOIN } +# 2024-09-05 https://sqlite.org/forum/forumpost/8a1e467e905b8d27 +# When performing the Omit-Noop-Join optimization, if FROM clause terms +# to the right of the omitted join have the reverse-order bit set in the +# WhereInfo.revMask bitmask, those bits need to be shifted to account +# for the omitted join. +# +reset_db +do_execsql_test 13.0 { + CREATE TABLE t1(a1 INTEGER PRIMARY KEY, b1 INT); + CREATE TABLE t2(c2 INT, d2 INTEGER PRIMARY KEY); + CREATE TABLE t3(e3 INTEGER PRIMARY KEY); + INSERT INTO t1 VALUES(33,0); + INSERT INTO t2 VALUES(33,1),(33,2); +} +do_execsql_test 13.1 { + SELECT t1.a1, t2.d2 + FROM (t1 LEFT JOIN t3 ON t3.e3=t1.b1) JOIN t2 ON t2.c2=t1.a1 + WHERE t1.a1=33 + ORDER BY t2.d2 DESC; +} {33 2 33 1} + finish_test From dc181d41d56141fa151257ffd2892b7fdc3ba2b0 Mon Sep 17 00:00:00 2001 From: drh <> Date: Thu, 5 Sep 2024 23:40:13 +0000 Subject: [PATCH 07/13] Fix a testrunner status reporting problem introduced by [aa5f10f21dbfb24e]. FossilOrigin-Name: d20c65c3b4256a662ebf7ed024b7b7adaceca90358f58111dc645da322000794 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 0a8c14d268..5ffa57feba 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Ensure\sthat\sthe\sWhereInfo.revMask\sbitmap\sis\sadjusted\swhen\stables\sare\sremoved\nfrom\sthe\sFROM\sclause\sby\sthe\sOmit-Noop-Join\soptimization\sof\n[0cd82ee9a8413cf1].\s\sFix\sfor\sthe\sissue\sdescribed\sby\n[forum:/forum/8a1e467e905b8d27|format\spost\s8a1e467e905b8d27]. -D 2024-09-05T23:22:55.647 +C Fix\sa\stestrunner\sstatus\sreporting\sproblem\sintroduced\sby\s[aa5f10f21dbfb24e]. +D 2024-09-05T23:40:13.439 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1715,7 +1715,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl 7b44f1a9b9a2de8112695b908afc21dd9a68cd2d44e84b73f1b27b53492c0d59 -F test/testrunner.tcl 8b8052ef2abf673729eeeeb222961c99b3e08231635c196533aff315e3f12f2d x +F test/testrunner.tcl a59e911e3732ba4d6b66e310f72d9599eb0392d3de659a525c519ba755cbf3e1 x F test/testrunner_data.tcl dbc0bb1c5b912dfd1e32b25d544318e412edd6085bd5fc9e6619cb93a739b786 F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 1d12744fe7cc294994e53e1ffe72799d0321dd5c1ef031213f083e200918fee5 -R 45d88f5375170588d0b1bd314eace7a3 +P 22ca5a2ffb89ccb5f337993b5a95e27c449c39014284156eabc33da012a8759c +R bc86dd135008dded1df1caf42383464b U drh -Z 4179122ae9403ba759b59f6aa6b2df32 +Z 5f358c18a2ed0f553bb9c3eac9d42cd6 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index dc2d1cd140..c0a2eed54c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -22ca5a2ffb89ccb5f337993b5a95e27c449c39014284156eabc33da012a8759c +d20c65c3b4256a662ebf7ed024b7b7adaceca90358f58111dc645da322000794 diff --git a/test/testrunner.tcl b/test/testrunner.tcl index 09704c03d3..d28bdd4fba 100755 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -1561,8 +1561,8 @@ proc run_testset {} { } {puts $pltfm} puts "$totalerr errors out of $totaltest tests in $et $pltfm" trdb eval { - SELECT DISTINCT substr(svers,1,80) FROM jobs WHERE svers IS NOT NULL - } {puts $svers} + SELECT DISTINCT substr(svers,1,80) as v1 FROM jobs WHERE svers IS NOT NULL + } {puts $v1} } From 56a048054078e316ddb057057c323116b82d8b46 Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 6 Sep 2024 09:49:13 +0000 Subject: [PATCH 08/13] Clarification and simplification to the README.md file and to the instructions for building on Windows. FossilOrigin-Name: f69ef1a37b2778bdf73ee7e3b3edd74f7344ab8e5eedbedc22203c782e521f5b --- README.md | 27 +++++++++++++++------------ doc/compile-for-windows.md | 13 ++++++++++++- manifest | 14 +++++++------- manifest.uuid | 2 +- 4 files changed, 35 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index ad11c453ac..689b52dabd 100644 --- a/README.md +++ b/README.md @@ -73,23 +73,26 @@ archives or [SQLite archives](https://sqlite.org/cli.html#sqlar) as follows: then click on the "Tarball" or "ZIP Archive" links on the information page. -To access sources directly using Fossil, first install Fossil version 2.0 or later. -Source tarballs and precompiled binaries available -[here](https://www.fossil-scm.org/home/uv/download.html). Fossil is +To access sources directly using [Fossil](https://fossil-scm.org/home), +first install Fossil version 2.0 or later. +Source tarballs and precompiled binaries available at +. Fossil is a stand-alone program. To install, simply download or build the single executable file and put that file someplace on your $PATH. Then run commands like this: - mkdir -p ~/sqlite ~/Fossils + mkdir -p ~/sqlite cd ~/sqlite - fossil clone https://www.sqlite.org/src ~/Fossils/sqlite.fossil - fossil open ~/Fossils/sqlite.fossil + fossil open https://sqlite.org/src -After setting up a repository using the steps above, you can do -bandwidth-efficient updates to the latest version using: +The "fossil open" command will take two or three minutes. Afterwards, +you can do fast, bandwidth-efficient updates to the whatever versions +of SQLite you like. Some examples: - fossil update trunk ;# latest trunk check-in - fossil update release ;# latest official release + fossil update trunk ;# latest trunk check-in + fossil update release ;# latest official release + fossil update trunk:2024-01-01 ;# First trunk check-in after 2024-01-01 + fossil update version-3.39.0 ;# Version 3.39.0 Or type "fossil ui" to get a web-based user interface. @@ -148,7 +151,7 @@ show what changes are needed. ## Compiling for Windows Using MSVC -On Windows, all applicable build products can be compiled with MSVC. +On Windows, everything can be compiled with MSVC. You will also need a working installation of TCL. See the [compile-for-windows.md](doc/compile-for-windows.md) document for additional information about how to install MSVC and TCL and configure your @@ -383,7 +386,7 @@ implementation. It will not be the easiest library in the world to hack. * **VERSION**, **manifest**, and **manifest.uuid** - These files define the current SQLite version number. The "VERSION" file is human generated, but the "manifest" and "manifest.uuid" files are automatically generated - by the [Fossil version control system](https://fossil-scm/). + by the [Fossil version control system](https://fossil-scm.org/). There are many other source files. Each has a succinct header comment that describes its purpose and role within the larger system. diff --git a/doc/compile-for-windows.md b/doc/compile-for-windows.md index 5e6a2d1a25..1627188acd 100644 --- a/doc/compile-for-windows.md +++ b/doc/compile-for-windows.md @@ -57,11 +57,22 @@ canonical source on a new Windows 11 PC, as of 2023-11-01:
  • `nmake /f makefile.msc`
  • `nmake /f makefile.msc sqlite3.c` +
  • `nmake /f makefile.msc sqlite3.exe` +
  • `nmake /f makefile.msc sqldiff.exe` +
  • `nmake /f makefile.msc tclextension-install`
  • `nmake /f makefile.msc devtest`
  • `nmake /f makefile.msc releasetest` -
  • `nmake /f makefile.msc sqlite3.exe` +
  • `nmake /f makefile.msc sqlite3_analyzer.exe`
+ It is not required that you run the "tclextension-install" target prior to + running tests. However, the tests will run more smoothly if you do. + The version of SQLite used for the TCL extension does *not* need to + correspond to the version of SQLite under test. So you can install the + SQLite TCL extension once, and then use it to test many different versions + of SQLite. + + 7. For a debugging build of the CLI, where the ".treetrace" and ".wheretrace" commands work, add the DEBUG=3 argument to nmake. Like this:
    diff --git a/manifest b/manifest index 5ffa57feba..f6017ee1ad 100644 --- a/manifest +++ b/manifest @@ -1,12 +1,12 @@ -C Fix\sa\stestrunner\sstatus\sreporting\sproblem\sintroduced\sby\s[aa5f10f21dbfb24e]. -D 2024-09-05T23:40:13.439 +C Clarification\sand\ssimplification\sto\sthe\sREADME.md\sfile\sand\sto\sthe\sinstructions\nfor\sbuilding\son\sWindows. +D 2024-09-06T09:49:13.510 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F Makefile.in 098d9814c66d81a8bbfb3550876b7d9695a0b050c0d4680afb4931a7aa8fe7f1 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 F Makefile.msc e72a4653ea8f48efd14c7dac1e7de308a1f3cc91f905f15cbcacc680301c8f03 -F README.md 282d999d14bfd1dcb36652abbfba9f8dffbda083ddcdb91361459e43164a1d23 +F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159 F VERSION 0db40f92c04378404eb45bff93e9e42c148c7e54fd3da99469ed21e22411f5a6 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5 @@ -39,7 +39,7 @@ F configure 49523f0a070b583cea040d26eff53a65fb0893eca4663b1343a4d5a9a964da53 x F configure.ac a100ebf7a07f5dedd319ef547dd467d1676ed059b85a7877aa9c44ac309f7000 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd -F doc/compile-for-windows.md e8635eea9153dcd6a51fd2740666ebc4492b3813cb1ac31cd8e99150df91762d +F doc/compile-for-windows.md 4d4bfafda42a7a33f166d23aed4db1bb4ea1e5751595a5cced2bad349fd14652 F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347bb123ce1ea4f F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 22ca5a2ffb89ccb5f337993b5a95e27c449c39014284156eabc33da012a8759c -R bc86dd135008dded1df1caf42383464b +P d20c65c3b4256a662ebf7ed024b7b7adaceca90358f58111dc645da322000794 +R e0122c673835ce2d6d2df201e5b1e575 U drh -Z 5f358c18a2ed0f553bb9c3eac9d42cd6 +Z 474793855763ef2064fdff2fee5b0897 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index c0a2eed54c..f130b71200 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d20c65c3b4256a662ebf7ed024b7b7adaceca90358f58111dc645da322000794 +f69ef1a37b2778bdf73ee7e3b3edd74f7344ab8e5eedbedc22203c782e521f5b From c4e84b72958d46aad7a08e77b6e8744e8e3e88ab Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 6 Sep 2024 10:35:36 +0000 Subject: [PATCH 09/13] A testcase() macro added to help ensure that the fix to the omit-noop-join optimization from yesterday does not regress. FossilOrigin-Name: 224628b1039b996499e0d806fc0215f175da6f1059eb1b9ac491ac11126971ab --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/where.c | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index f6017ee1ad..d0c4ee56d5 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Clarification\sand\ssimplification\sto\sthe\sREADME.md\sfile\sand\sto\sthe\sinstructions\nfor\sbuilding\son\sWindows. -D 2024-09-06T09:49:13.510 +C A\stestcase()\smacro\sadded\sto\shelp\sensure\sthat\sthe\sfix\sto\sthe\somit-noop-join\noptimization\sfrom\syesterday\sdoes\snot\sregress. +D 2024-09-06T10:35:36.196 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -852,7 +852,7 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9 F src/wal.c 887fc4ca3f020ebb2e376f222069570834ac63bf50111ef0cbf3ae417048ed89 F src/wal.h ba252daaa94f889f4b2c17c027e823d9be47ce39da1d3799886bbd51f0490452 F src/walker.c d5006d6b005e4ea7302ad390957a8d41ed83faa177e412f89bc5600a7462a014 -F src/where.c 079f1cf6abc086315f5c9873626b7c0537f382c55184c516b8e3d29f7a537fdc +F src/where.c 7fb55836eb7fd07f0a0d8400c50619fc02cda1f46a617cfb003c2990f040193d F src/whereInt.h a5d079c346a658b7a6e9e47bb943d021e02fa1e6aed3b964ca112112a4892192 F src/wherecode.c 5172d647798134e7c92536ddffe7e530c393d79b5dedd648b88faf2646c65baf F src/whereexpr.c 44f41ae554c7572e1de1485b3169b233ee04d464b2ee5881687ede3bf07cacfa @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P d20c65c3b4256a662ebf7ed024b7b7adaceca90358f58111dc645da322000794 -R e0122c673835ce2d6d2df201e5b1e575 +P f69ef1a37b2778bdf73ee7e3b3edd74f7344ab8e5eedbedc22203c782e521f5b +R a9f753c3499efd243abe359303301f78 U drh -Z 474793855763ef2064fdff2fee5b0897 +Z a70e5af6a81ae35c981b5946f602f67c # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index f130b71200..b195d89eaa 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f69ef1a37b2778bdf73ee7e3b3edd74f7344ab8e5eedbedc22203c782e521f5b +224628b1039b996499e0d806fc0215f175da6f1059eb1b9ac491ac11126971ab diff --git a/src/where.c b/src/where.c index 7ca4f533f0..35da4caa6e 100644 --- a/src/where.c +++ b/src/where.c @@ -6226,8 +6226,9 @@ static SQLITE_NOINLINE Bitmask whereOmitNoopJoin( } } if( pTerm drop loop %c not used\n", pLoop->cId)); + WHERETRACE(0xffffffff,("-> omit unused FROM-clause term %c\n",pLoop->cId)); m1 = MASKBIT(i)-1; + testcase( ((pWInfo->revMask>>1) & ~m1)!=0 ); pWInfo->revMask = (m1 & pWInfo->revMask) | ((pWInfo->revMask>>1) & ~m1); notReady &= ~pLoop->maskSelf; for(pTerm=pWInfo->sWC.a; pTerm Date: Fri, 6 Sep 2024 11:21:53 +0000 Subject: [PATCH 10/13] Fix harmless compiler warnings. FossilOrigin-Name: 60fb8ee153ec293b6b3a4170dafa305e4c16af575aced72daef46116d8dc2bb6 --- ext/rbu/sqlite3rbu.c | 41 ++++++++++++++++++++++++++++++++------ ext/session/test_session.c | 8 ++++---- manifest | 20 +++++++++---------- manifest.uuid | 2 +- src/test1.c | 2 +- test/fuzzcheck.c | 7 ++++--- test/fuzzinvariants.c | 7 ++++--- 7 files changed, 59 insertions(+), 28 deletions(-) diff --git a/ext/rbu/sqlite3rbu.c b/ext/rbu/sqlite3rbu.c index feb7695d66..8e29ab820f 100644 --- a/ext/rbu/sqlite3rbu.c +++ b/ext/rbu/sqlite3rbu.c @@ -336,6 +336,27 @@ struct RbuFrame { u32 iWalFrame; }; +#ifndef UNUSED_PARAMETER +/* +** The following macros are used to suppress compiler warnings and to +** make it clear to human readers when a function parameter is deliberately +** left unused within the body of a function. This usually happens when +** a function is called via a function pointer. For example the +** implementation of an SQL aggregate step callback may not use the +** parameter indicating the number of arguments passed to the aggregate, +** if it knows that this is enforced elsewhere. +** +** When a function parameter is not used at all within the body of a function, +** it is generally named "NotUsed" or "NotUsed2" to make things even clearer. +** However, these macros may also be used to suppress warnings related to +** parameters that may or may not be used depending on compilation options. +** For example those parameters only used in assert() statements. In these +** cases the parameters are named as per the usual conventions. +*/ +#define UNUSED_PARAMETER(x) (void)(x) +#define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y) +#endif + /* ** RBU handle. ** @@ -387,7 +408,7 @@ struct sqlite3rbu { int rc; /* Value returned by last rbu_step() call */ char *zErrmsg; /* Error message if rc!=SQLITE_OK */ int nStep; /* Rows processed for current object */ - int nProgress; /* Rows processed for all objects */ + sqlite3_int64 nProgress; /* Rows processed for all objects */ RbuObjIter objiter; /* Iterator for skipping through tbl/idx */ const char *zVfsName; /* Name of automatically created rbu vfs */ rbu_file *pTargetFd; /* File handle open on target db */ @@ -504,7 +525,7 @@ static unsigned int rbuDeltaGetInt(const char **pz, int *pLen){ v = (v<<6) + c; } z--; - *pLen -= z - zStart; + *pLen -= (int)(z - zStart); *pz = (char*)z; return v; } @@ -689,6 +710,7 @@ static void rbuFossilDeltaFunc( char *aOut; assert( argc==2 ); + UNUSED_PARAMETER(argc); nOrig = sqlite3_value_bytes(argv[0]); aOrig = (const char*)sqlite3_value_blob(argv[0]); @@ -2268,13 +2290,13 @@ static char *rbuObjIterGetIndexWhere(sqlite3rbu *p, RbuObjIter *pIter){ else if( c==')' ){ nParen--; if( nParen==0 ){ - int nSpan = &zSql[i] - pIter->aIdxCol[iIdxCol].zSpan; + int nSpan = (int)(&zSql[i] - pIter->aIdxCol[iIdxCol].zSpan); pIter->aIdxCol[iIdxCol++].nSpan = nSpan; i++; break; } }else if( c==',' && nParen==1 ){ - int nSpan = &zSql[i] - pIter->aIdxCol[iIdxCol].zSpan; + int nSpan = (int)(&zSql[i] - pIter->aIdxCol[iIdxCol].zSpan); pIter->aIdxCol[iIdxCol++].nSpan = nSpan; pIter->aIdxCol[iIdxCol].zSpan = &zSql[i+1]; }else if( c=='"' || c=='\'' || c=='`' ){ @@ -2964,6 +2986,8 @@ static void rbuFileSuffix3(const char *zBase, char *z){ for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){} if( z[i]=='.' && sz>i+4 ) memmove(&z[i+1], &z[sz-3], 4); } +#else + UNUSED_PARAMETER2(zBase,z); #endif } @@ -3548,7 +3572,7 @@ static void rbuSaveState(sqlite3rbu *p, int eStage){ "(%d, %Q), " "(%d, %Q), " "(%d, %d), " - "(%d, %d), " + "(%d, %lld), " "(%d, %lld), " "(%d, %lld), " "(%d, %lld), " @@ -3906,6 +3930,7 @@ static void rbuIndexCntFunc( sqlite3 *db = (rbuIsVacuum(p) ? p->dbRbu : p->dbMain); assert( nVal==1 ); + UNUSED_PARAMETER(nVal); rc = prepareFreeAndCollectError(db, &pStmt, &zErrmsg, sqlite3_mprintf("SELECT count(*) FROM sqlite_schema " @@ -4181,7 +4206,7 @@ sqlite3rbu *sqlite3rbu_vacuum( ){ if( zTarget==0 ){ return rbuMisuseError(); } if( zState ){ - int n = strlen(zState); + size_t n = strlen(zState); if( n>=7 && 0==memcmp("-vactmp", &zState[n-7], 7) ){ return rbuMisuseError(); } @@ -4398,6 +4423,7 @@ int sqlite3rbu_savestate(sqlite3rbu *p){ */ static int xDefaultRename(void *pArg, const char *zOld, const char *zNew){ int rc = SQLITE_OK; + UNUSED_PARAMETER(pArg); #if defined(_WIN32_WCE) { LPWSTR zWideOld; @@ -5302,6 +5328,9 @@ static int rbuVfsCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){ ** No-op. */ static int rbuVfsGetLastError(sqlite3_vfs *pVfs, int a, char *b){ + UNUSED_PARAMETER(pVfs); + UNUSED_PARAMETER(a ); + UNUSED_PARAMETER(b); return 0; } diff --git a/ext/session/test_session.c b/ext/session/test_session.c index 79ad000e18..29aeadf537 100644 --- a/ext/session/test_session.c +++ b/ext/session/test_session.c @@ -383,10 +383,10 @@ static int SQLITE_TCLAPI test_session_cmd( { "rowid", SQLITE_SESSION_OBJCONFIG_ROWID }, { 0, 0 } }; - size_t sz = sizeof(aOpt[0]); + int sz = (int)sizeof(aOpt[0]); int iArg; - int iOpt; + Tcl_Size iOpt; if( Tcl_GetIndexFromObjStruct(interp,objv[2],aOpt,sz,"option",0,&iOpt) ){ return TCL_ERROR; } @@ -803,7 +803,7 @@ static int SQLITE_TCLAPI testSqlite3changesetApply( if( bV2 ){ while( objc>1 ){ const char *z1 = Tcl_GetString(objv[1]); - int n = strlen(z1); + int n = (int)strlen(z1); if( n>3 && n<=12 && 0==sqlite3_strnicmp("-nosavepoint", z1, n) ){ flags |= SQLITE_CHANGESETAPPLY_NOSAVEPOINT; } @@ -1119,7 +1119,7 @@ static int SQLITE_TCLAPI test_sqlite3session_foreach( while( objc>1 ){ char *zOpt = Tcl_GetString(objv[1]); - int nOpt = strlen(zOpt); + int nOpt = (int)strlen(zOpt); if( zOpt[0]!='-' ) break; if( nOpt<=7 && 0==sqlite3_strnicmp(zOpt, "-invert", nOpt) ){ isInvert = 1; diff --git a/manifest b/manifest index d0c4ee56d5..238ef2d4dc 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C A\stestcase()\smacro\sadded\sto\shelp\sensure\sthat\sthe\sfix\sto\sthe\somit-noop-join\noptimization\sfrom\syesterday\sdoes\snot\sregress. -D 2024-09-06T10:35:36.196 +C Fix\sharmless\scompiler\swarnings. +D 2024-09-06T11:21:53.173 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -484,7 +484,7 @@ F ext/rbu/rbuvacuum.test 542561741ff2b262e3694bc6012b44694ee62c545845319a06f3237 F ext/rbu/rbuvacuum2.test ae097d04feb041446a74fac94b24bffeb3fdd60e32b848c5611e507ab702b81b F ext/rbu/rbuvacuum3.test 3ce42695fdf21aaa3499e857d7d4253bc499ad759bcd6c9362042c13cd37d8de F ext/rbu/rbuvacuum4.test ffccd22f67e2d0b380d2889685742159dfe0d19a3880ca3d2d1d69eefaebb205 -F ext/rbu/sqlite3rbu.c 4a3376c0fb9a844a799ac529fb81260523f6b13c9f629bc270c632dbae5fc1f8 +F ext/rbu/sqlite3rbu.c d90c79c2e9998e0f54da86d28c8433db7997864279fcfce02592e0838c8ce71d F ext/rbu/sqlite3rbu.h 9d923eb135c5d04aa6afd7c39ca47b0d1d0707c100e02f19fdde6a494e414304 F ext/rbu/test_rbu.c b9727c3394307d058e806c1da0f8bb7b24daf3c6bb94cb10cca88ea4d5c806c0 F ext/recover/dbdata.c 5295f4f922b60d7035b6b9fd5846b13071b9d97ed7fad8496837bb7640d24771 @@ -595,7 +595,7 @@ F ext/session/sessionstat1.test 5e718d5888c0c49bbb33a7a4f816366db85f59f6a4f97544 F ext/session/sessionwor.test 6fd9a2256442cebde5b2284936ae9e0d54bde692d0f5fd009ecef8511f4cf3fc F ext/session/sqlite3session.c c7473aafbd88f796391a8c25aa90975a8f3729ab7f4f8cf74ab9d3b014e10abe F ext/session/sqlite3session.h 683ccbf16e2c2521661fc4c1cf918ce57002039efbcabcd8097fa4bca569104b -F ext/session/test_session.c 6acbe67db80ab0806147eb62a12f9e3a44930f4a740b68b0a4340dddda2c10d7 +F ext/session/test_session.c aa29abdcc9011ac02f4fa38e8ede226106eaeee7c3ea7d8b2b999a124e0c368c F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3 F ext/userauth/user-auth.txt ca7e9ee82ca4e1c1744295f8184dd70edfae1992865d26c64303f539eb6c084c F ext/userauth/userauth.c 7f00cded7dcaa5d47f54539b290a43d2e59f4b1eb5f447545fa865f002fc80cb @@ -777,7 +777,7 @@ F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1 F src/tclsqlite.c c6888598f08dee3d9112a38ef42c8f5c89ca7f3190f4694744d0b84250f4bf8c F src/tclsqlite.h c6af51f31a2b2172d674608763a4b98fdf5cd587e4025053e546fb8077757262 -F src/test1.c 3f18399557d954bc85f4564aec8ea1777d2161a81d98a3ff6c9e9046bf3554c1 +F src/test1.c 8d7cd219c004cd2ced60659ebf045025cc5c16ce19d12459589dacd4310f7f07 F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3 F src/test3.c e7573aa0f78ee4e070a4bc8c3493941c1aa64d5c66d4825c74c0f055451f432b F src/test4.c 13e57ae7ec7a959ee180970aef09deed141252fe9bb07c61054f0dfa4f1dfd5d @@ -1267,7 +1267,7 @@ F test/fuzz3.test 70ba57260364b83e964707b9d4b5625284239768ab907dd387c740c0370ce3 F test/fuzz4.test c229bcdb45518a89e1d208a21343e061503460ac69fae1539320a89f572eb634 F test/fuzz_common.tcl b7197de6ed1ee8250a4f82d67876f4561b42ee8cbbfc6160dcb66331bad3f830 F test/fuzz_malloc.test f348276e732e814802e39f042b1f6da6362a610af73a528d8f76898fde6b22f2 -F test/fuzzcheck.c 20be6c96bd0da2e91d25f089a037c1b3f8142211c97104f20629bf15610019e6 +F test/fuzzcheck.c 3b8b39e3c0c88422c51ef0a93481d3d528fb370668344bf0ae4c87629c18b021 F test/fuzzdata1.db 3e86d9cf5aea68ddb8e27c02d7dfdaa226347426c7eb814918e4d95475bf8517 F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba @@ -1279,7 +1279,7 @@ F test/fuzzdata8.db 4a53b6d077c6a5c23b609d8d3ac66996fa55ba3f8d02f9b6efdd0214a767 F test/fuzzer1.test 3d4c4b7e547aba5e5511a2991e3e3d07166cfbb8 F test/fuzzer2.test a85ef814ce071293bce1ad8dffa217cbbaad4c14 F test/fuzzerfault.test f64c4aef4c9e9edf1d6dc0d3f1e65dcc81e67c996403c88d14f09b74807a42bc -F test/fuzzinvariants.c 81167c9a7e82c0539a1d704aeb3384046d01f4108cda160a2447cb2a149d6362 +F test/fuzzinvariants.c 3de49c7b33f5641b67edc2496328a49af029738e92c8499fafbf8618ad42f68d F test/gcfault.test 4ea410ac161e685f17b19e1f606f58514a2850e806c65b846d05f60d436c5b0d F test/gencol1.test e169bdfa11c7ed5e9f322a98a7db3afe9e66235750b68c923efee8e1876b46ec F test/genesis.tcl 1e2e2e8e5cc4058549a154ff1892fe5c9de19f98 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P f69ef1a37b2778bdf73ee7e3b3edd74f7344ab8e5eedbedc22203c782e521f5b -R a9f753c3499efd243abe359303301f78 +P 224628b1039b996499e0d806fc0215f175da6f1059eb1b9ac491ac11126971ab +R 4ffcc50319bb317830ac49a5c5529b0f U drh -Z a70e5af6a81ae35c981b5946f602f67c +Z 1e521328c9a1b05b589836828e6bb245 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index b195d89eaa..7d403270b8 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -224628b1039b996499e0d806fc0215f175da6f1059eb1b9ac491ac11126971ab +60fb8ee153ec293b6b3a4170dafa305e4c16af575aced72daef46116d8dc2bb6 diff --git a/src/test1.c b/src/test1.c index 177091a0e1..38ea6229ee 100644 --- a/src/test1.c +++ b/src/test1.c @@ -2343,7 +2343,7 @@ static int SQLITE_TCLAPI test_stmt_scanstatus( } for(ii=0; ii<(int)nFlag; ii++){ int iVal = 0; - int res = Tcl_GetIndexFromObjStruct( + res = Tcl_GetIndexFromObjStruct( interp, aFlag[ii], aTbl, sizeof(aTbl[0]), "flag", 0, &iVal ); if( res ) return TCL_ERROR; diff --git a/test/fuzzcheck.c b/test/fuzzcheck.c index ea0d949b5b..f81e0982d9 100644 --- a/test/fuzzcheck.c +++ b/test/fuzzcheck.c @@ -1045,10 +1045,11 @@ static void bindDebugParameters(sqlite3_stmt *pStmt){ sqlite3_bind_int(pStmt, i+1, atoi(&zVar[5])); }else if( strncmp(zVar, "$text_", 6)==0 ){ - char *zBuf = sqlite3_malloc64( strlen(zVar)-5 ); + size_t szVar = strlen(zVar); + char *zBuf = sqlite3_malloc64( szVar-5 ); if( zBuf ){ - memcpy(zBuf, &zVar[6], strlen(zVar)-5); - sqlite3_bind_text64(pStmt, i+1, zBuf, -1, sqlite3_free, SQLITE_UTF8); + memcpy(zBuf, &zVar[6], szVar-5); + sqlite3_bind_text64(pStmt, i, zBuf, szVar-6, sqlite3_free, SQLITE_UTF8); } } } diff --git a/test/fuzzinvariants.c b/test/fuzzinvariants.c index 36121963f5..2f09c43ab6 100644 --- a/test/fuzzinvariants.c +++ b/test/fuzzinvariants.c @@ -54,10 +54,11 @@ static void bindDebugParameters(sqlite3_stmt *pStmt){ sqlite3_bind_int(pStmt, i+1, atoi(&zVar[5])); }else if( strncmp(zVar, "$text_", 6)==0 ){ - char *zBuf = sqlite3_malloc64( strlen(zVar)-5 ); + size_t szVar = strlen(zVar); + char *zBuf = sqlite3_malloc64( szVar-5 ); if( zBuf ){ - memcpy(zBuf, &zVar[6], strlen(zVar)-5); - sqlite3_bind_text64(pStmt, i+1, zBuf, -1, sqlite3_free, SQLITE_UTF8); + memcpy(zBuf, &zVar[6], szVar-5); + sqlite3_bind_text64(pStmt, i, zBuf, szVar-6, sqlite3_free, SQLITE_UTF8); } } } From c43d16d69ab2ee9eb4375d8e2e6892b5e58c5c4b Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 6 Sep 2024 13:13:25 +0000 Subject: [PATCH 11/13] In testrunner.tcl, correctly capture and display information about the system under test: hostname, OS, pointer size, byte-order. FossilOrigin-Name: ec75cfc5d4b69e4aed64d17748cac15cd62a759a1cbe7feaa4580ad8346b0b95 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/manifest b/manifest index 238ef2d4dc..63f65d36d5 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sharmless\scompiler\swarnings. -D 2024-09-06T11:21:53.173 +C In\stestrunner.tcl,\scorrectly\scapture\sand\sdisplay\sinformation\sabout\sthe\nsystem\sunder\stest:\s\shostname,\sOS,\spointer\ssize,\sbyte-order. +D 2024-09-06T13:13:25.545 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1715,7 +1715,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl 7b44f1a9b9a2de8112695b908afc21dd9a68cd2d44e84b73f1b27b53492c0d59 -F test/testrunner.tcl a59e911e3732ba4d6b66e310f72d9599eb0392d3de659a525c519ba755cbf3e1 x +F test/testrunner.tcl 3dd75b45593d2afa2e3bca76121297a9f163bebb98474b13536f326829a71db1 x F test/testrunner_data.tcl dbc0bb1c5b912dfd1e32b25d544318e412edd6085bd5fc9e6619cb93a739b786 F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 224628b1039b996499e0d806fc0215f175da6f1059eb1b9ac491ac11126971ab -R 4ffcc50319bb317830ac49a5c5529b0f +P 60fb8ee153ec293b6b3a4170dafa305e4c16af575aced72daef46116d8dc2bb6 +R 10b53f0d3edd4deb6d00308ae86e15b9 U drh -Z 1e521328c9a1b05b589836828e6bb245 +Z 1062f5bb698948cf0174718b6a1b925f # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 7d403270b8..e8fed7784f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -60fb8ee153ec293b6b3a4170dafa305e4c16af575aced72daef46116d8dc2bb6 +ec75cfc5d4b69e4aed64d17748cac15cd62a759a1cbe7feaa4580ad8346b0b95 diff --git a/test/testrunner.tcl b/test/testrunner.tcl index d28bdd4fba..a4a71a85e0 100755 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -1282,12 +1282,11 @@ proc mark_job_as_finished {jobid output state endtm} { set ntest 1 set nerr 0 if {$endtm>0} { - if {[regexp {\y(\d+) errors out of (\d+) tests} $output all a b]} { + set re {\y(\d+) errors out of (\d+) tests( on [^\n]+\n)?} + if {[regexp $re $output all a b pltfm]} { set nerr $a set ntest $b } - regexp {\y\d+ errors out of \d+ tests (on [^\n]+-bit \S+-endian)} \ - $output all pltfm regexp {\ySQLite \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [0-9a-fA-F]+} \ $output svers } @@ -1298,6 +1297,7 @@ proc mark_job_as_finished {jobid output state endtm} { } else { set childstate ready } + if {[info exists pltfm]} {set pltfm [string trim $pltfm]} trdb eval { UPDATE jobs SET output=$output, state=$state, endtime=$endtm, @@ -1558,10 +1558,10 @@ proc run_testset {} { trdb eval { SELECT pltfm, count(*) FROM jobs WHERE pltfm IS NOT NULL ORDER BY 2 DESC LIMIT 1 - } {puts $pltfm} + } break puts "$totalerr errors out of $totaltest tests in $et $pltfm" trdb eval { - SELECT DISTINCT substr(svers,1,80) as v1 FROM jobs WHERE svers IS NOT NULL + SELECT DISTINCT substr(svers,1,79) as v1 FROM jobs WHERE svers IS NOT NULL } {puts $v1} } From bc976303137dd905dc610910d7154908d89c4159 Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 6 Sep 2024 14:01:48 +0000 Subject: [PATCH 12/13] Fix a harmless stray carriage-return character. FossilOrigin-Name: 84a6c5f975de36ba93b888e01cc5188717b5644ab8384beb8fd8906bdfc8e227 --- ext/rbu/sqlite3rbu.c | 2 +- manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/rbu/sqlite3rbu.c b/ext/rbu/sqlite3rbu.c index 8e29ab820f..36688925d6 100644 --- a/ext/rbu/sqlite3rbu.c +++ b/ext/rbu/sqlite3rbu.c @@ -5329,7 +5329,7 @@ static int rbuVfsCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){ */ static int rbuVfsGetLastError(sqlite3_vfs *pVfs, int a, char *b){ UNUSED_PARAMETER(pVfs); - UNUSED_PARAMETER(a ); + UNUSED_PARAMETER(a); UNUSED_PARAMETER(b); return 0; } diff --git a/manifest b/manifest index 63f65d36d5..b721afee72 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\stestrunner.tcl,\scorrectly\scapture\sand\sdisplay\sinformation\sabout\sthe\nsystem\sunder\stest:\s\shostname,\sOS,\spointer\ssize,\sbyte-order. -D 2024-09-06T13:13:25.545 +C Fix\sa\sharmless\sstray\scarriage-return\scharacter. +D 2024-09-06T14:01:48.949 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -484,7 +484,7 @@ F ext/rbu/rbuvacuum.test 542561741ff2b262e3694bc6012b44694ee62c545845319a06f3237 F ext/rbu/rbuvacuum2.test ae097d04feb041446a74fac94b24bffeb3fdd60e32b848c5611e507ab702b81b F ext/rbu/rbuvacuum3.test 3ce42695fdf21aaa3499e857d7d4253bc499ad759bcd6c9362042c13cd37d8de F ext/rbu/rbuvacuum4.test ffccd22f67e2d0b380d2889685742159dfe0d19a3880ca3d2d1d69eefaebb205 -F ext/rbu/sqlite3rbu.c d90c79c2e9998e0f54da86d28c8433db7997864279fcfce02592e0838c8ce71d +F ext/rbu/sqlite3rbu.c c07817e89477b8fc286ab6ed87da5bc82fc3490bbbe9e9b22eb2d900e81ee5dc F ext/rbu/sqlite3rbu.h 9d923eb135c5d04aa6afd7c39ca47b0d1d0707c100e02f19fdde6a494e414304 F ext/rbu/test_rbu.c b9727c3394307d058e806c1da0f8bb7b24daf3c6bb94cb10cca88ea4d5c806c0 F ext/recover/dbdata.c 5295f4f922b60d7035b6b9fd5846b13071b9d97ed7fad8496837bb7640d24771 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 60fb8ee153ec293b6b3a4170dafa305e4c16af575aced72daef46116d8dc2bb6 -R 10b53f0d3edd4deb6d00308ae86e15b9 +P ec75cfc5d4b69e4aed64d17748cac15cd62a759a1cbe7feaa4580ad8346b0b95 +R fff388cd7307c5b0da6a2a2532ba0d3f U drh -Z 1062f5bb698948cf0174718b6a1b925f +Z 8d9185ba5e8e9cd8d975e704cf12a0ed # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index e8fed7784f..104d10f3e6 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ec75cfc5d4b69e4aed64d17748cac15cd62a759a1cbe7feaa4580ad8346b0b95 +84a6c5f975de36ba93b888e01cc5188717b5644ab8384beb8fd8906bdfc8e227 From 6946a7fa508f4be45f2d32b5ebc2a9a31a30a92c Mon Sep 17 00:00:00 2001 From: stephan Date: Fri, 6 Sep 2024 15:01:00 +0000 Subject: [PATCH 13/13] Resolve the "No rule to make target '0'" error when building with --disable-tcl. FossilOrigin-Name: d94541ae76b5d8b69f5524f10dcccc0814283f438a03f553848ed631a1983633 --- Makefile.in | 14 ++++++++++++-- manifest | 14 +++++++------- manifest.uuid | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index cc75000033..9036babcb2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -661,11 +661,16 @@ SQLITE3_SHELL_TARGET_ = sqlite3$(TEXE) SQLITE3_SHELL_TARGET_1 = SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@) +# Use $(libtclsqlite3.la_$(HAVE_TCL)) to resolve to either +# libtclsqlite3.la or an empty value. +libtclsqlite3.la_0 = +libtclsqlite3.la_1 = libtclsqlite3.la + # This is the default Makefile target. The objects listed here # are what get build when you type just "make" with no arguments. # all: sqlite3.h libsqlite3.la $(SQLITE3_SHELL_TARGET) \ - $(HAVE_TCL:1=libtclsqlite3.la) + $(libtclsqlite3.la_$(HAVE_TCL)) Makefile: $(TOP)/Makefile.in ./config.status @@ -1566,7 +1571,12 @@ lib_install: libsqlite3.la $(INSTALL) -d $(DESTDIR)$(libdir) $(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir) -install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_install} +# Use $(tcl_install_$(HAVE_TCL)) to resolve to either tcl_install or +# an empty value. +tcl_install_0 = +tcl_install_1 = tcl_install + +install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc $(tcl_install_$(HAVE_TCL)) $(INSTALL) -d $(DESTDIR)$(bindir) $(LTINSTALL) sqlite3$(TEXE) $(DESTDIR)$(bindir) $(INSTALL) -d $(DESTDIR)$(includedir) diff --git a/manifest b/manifest index b721afee72..9e6ae9fd87 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Fix\sa\sharmless\sstray\scarriage-return\scharacter. -D 2024-09-06T14:01:48.949 +C Resolve\sthe\s"No\srule\sto\smake\starget\s'0'"\serror\swhen\sbuilding\swith\s--disable-tcl. +D 2024-09-06T15:01:00.761 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 -F Makefile.in 098d9814c66d81a8bbfb3550876b7d9695a0b050c0d4680afb4931a7aa8fe7f1 +F Makefile.in c41539ec7e8e69091e74c7d9e011115ae5e81d1f53829e640d299f3a754f94a4 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 F Makefile.msc e72a4653ea8f48efd14c7dac1e7de308a1f3cc91f905f15cbcacc680301c8f03 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159 @@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P ec75cfc5d4b69e4aed64d17748cac15cd62a759a1cbe7feaa4580ad8346b0b95 -R fff388cd7307c5b0da6a2a2532ba0d3f -U drh -Z 8d9185ba5e8e9cd8d975e704cf12a0ed +P 84a6c5f975de36ba93b888e01cc5188717b5644ab8384beb8fd8906bdfc8e227 +R b7c82ea9b1442aabb45d735bf528bcb3 +U stephan +Z 5b4290c809ba1bac71c5f3f2e0536ccb # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 104d10f3e6..e5b5999a3e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -84a6c5f975de36ba93b888e01cc5188717b5644ab8384beb8fd8906bdfc8e227 +d94541ae76b5d8b69f5524f10dcccc0814283f438a03f553848ed631a1983633