]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
10 months agoImprovements to the hash table used to store symbols in the schema, so that hash-improvements
drh [Sat, 8 Feb 2025 11:15:41 +0000 (11:15 +0000)] 
Improvements to the hash table used to store symbols in the schema, so that
it works better (requires fewer calls to sqlite3StrICmp()) for large schemas,
and uses less code space.

FossilOrigin-Name: 0318b68c845c84eded757c67f820e1783551574ac9e5670be640c4bfe22a934b

10 months agoFix comments on the Parse.nMaxArgs field so that they are correct. Add
drh [Fri, 7 Feb 2025 19:09:20 +0000 (19:09 +0000)] 
Fix comments on the Parse.nMaxArgs field so that they are correct.  Add
assert()s to ensure they are correct.  Other Parse changes to reduce the
amount of memset() needed to initialize it.

FossilOrigin-Name: c56092507c96723030589ddd9121bc993d615a7acd453305fc3b1dbb9e30554c

10 months agoFurther reduction in the amount of memset() needed to initialize the Parse
drh [Fri, 7 Feb 2025 15:49:21 +0000 (15:49 +0000)] 
Further reduction in the amount of memset() needed to initialize the Parse
object.

FossilOrigin-Name: 45e462c0060e51c3375a226d636148e3415ee6020e544ecc84861c7aef4ecf7b

10 months agoMac-specific build fixes discussed in [forum:9dfd5b8fd525a5d7|forum thread 9dfd5b8fd5...
stephan [Fri, 7 Feb 2025 14:44:31 +0000 (14:44 +0000)] 
Mac-specific build fixes discussed in [forum:9dfd5b8fd525a5d7|forum thread 9dfd5b8fd525a5d7]: rename dylib links and add legacy-compatibility versioning stamps to libsqlite3.dylib.

FossilOrigin-Name: 668bcf327a82a63d45be8cf38fdddc855dbcefdedf6c208e091eb7e2d244929d

10 months agoReduce the amount of memset() needed to initialize the Parse object.
drh [Fri, 7 Feb 2025 13:37:15 +0000 (13:37 +0000)] 
Reduce the amount of memset() needed to initialize the Parse object.

FossilOrigin-Name: 284538d8486ef3e9bee1ab980043b53c144743c31b984be13a5cc137e7cbec31

10 months agoconfigure: change extension of static libraries from .lib to .a on msys/cygwin, as...
stephan [Fri, 7 Feb 2025 12:58:09 +0000 (12:58 +0000)] 
configure: change extension of static libraries from .lib to .a on msys/cygwin, as per discussion in [forum:02db2d4240|forum post 02db2d4240]. Replace unidiomatic JS-style use of inner procs in autosetup/proj.tcl with TCL lambdas.

FossilOrigin-Name: 46f51e2a3707614a2b3ca6261bc6e0e8835477fdb7cbcf2f06b20cdebde2bab9

10 months agoReorder a piece of ext/wasm/GNUmakefile to correct the timing of various var accesses...
stephan [Fri, 7 Feb 2025 12:33:48 +0000 (12:33 +0000)] 
Reorder a piece of ext/wasm/GNUmakefile to correct the timing of various var accesses. Fixes a problem [https://github.com/sqlite/sqlite-wasm/pull/99|reported in the downstream npm subproject] and explains the confusion in [4aa025a943a4024094b9] (which has been reverted).

FossilOrigin-Name: 65798c09a00662a3598f01571d6f3a2dc750c3d0b127c344590539244afe4aa7

10 months agoFix out-of-tree builds of the autoconf bundle, as reported in [forum:a0cd0beb1baa6bef...
stephan [Fri, 7 Feb 2025 11:15:58 +0000 (11:15 +0000)] 
Fix out-of-tree builds of the autoconf bundle, as reported in [forum:a0cd0beb1baa6bef|forum post a0cd0beb1baa6bef].

FossilOrigin-Name: d47964a65bcfd4bc0b06baca281467a0b7fc87eba912a19c0974f63a54928ff8

10 months agoBump TEA configure.ac version number.
stephan [Fri, 7 Feb 2025 01:43:05 +0000 (01:43 +0000)] 
Bump TEA configure.ac version number.

FossilOrigin-Name: a1a9c780d1f1b47b0408397edded9c5d230c7b144207ad142d06c048792d31fa

10 months agoAdjust the test/speedtest.tcl script so that it uses an on-disk database
drh [Thu, 6 Feb 2025 17:29:14 +0000 (17:29 +0000)] 
Adjust the test/speedtest.tcl script so that it uses an on-disk database
rather than an in-memory database.

FossilOrigin-Name: e93d7aa1db9bdbf1996c4c168e67284177e384b7acf176d74a0458258faab05c

10 months agoFix a harmless typo in a comment.
drh [Thu, 6 Feb 2025 17:10:38 +0000 (17:10 +0000)] 
Fix a harmless typo in a comment.

FossilOrigin-Name: ed82272904deb37640286448e03153316f828c629547a615a504af1d7ec5a278

10 months agoBump version number to 3.50.0 for the next dev cycle.
stephan [Thu, 6 Feb 2025 13:36:31 +0000 (13:36 +0000)] 
Bump version number to 3.50.0 for the next dev cycle.

FossilOrigin-Name: 46d08071f3f9fef78bc2444b52060e0e7de8c357a2aa213ac13c565e33acc4a0

10 months agoFix a dependencies/order-of-operations bug in ext/wasm/GNUmakefile which causes creat...
stephan [Thu, 6 Feb 2025 13:18:49 +0000 (13:18 +0000)] 
Fix a dependencies/order-of-operations bug in ext/wasm/GNUmakefile which causes creation of files filtered via c-pp to fail if the ext/wasm/jswasm dir did not exist beforehand.

FossilOrigin-Name: 4bac76138853a89484d3ac0486a9ed5143aa671b13b4b3abb704c1487213b388

10 months agoVersion 3.49.0 version-3.49.0
drh [Thu, 6 Feb 2025 11:55:18 +0000 (11:55 +0000)] 
Version 3.49.0

FossilOrigin-Name: 4a7dd425dc2a0e5082a9049c9b4a9d4f199a71583d014c24b4cfe276c5a77cde

10 months agoFix a harmless unused-parameter compiler warning introduced by [75f3d8744879].
drh [Wed, 5 Feb 2025 16:08:11 +0000 (16:08 +0000)] 
Fix a harmless unused-parameter compiler warning introduced by [75f3d8744879].

FossilOrigin-Name: 9f28f6694f97d5ee0345b45f9bf81e3fdce0990ce32fb9bdbbaac079126a67c9

10 months agoSummarize known incompatibilities/gotches between JimTCL and canonical TCL, and their...
stephan [Wed, 5 Feb 2025 12:56:55 +0000 (12:56 +0000)] 
Summarize known incompatibilities/gotches between JimTCL and canonical TCL, and their workarounds. Doc changes only.

FossilOrigin-Name: 60c932e67b886d4c050698f36e1d3fc04eb99473d62bb3b1585a97d90e27227e

10 months agoUpstream JimTCL patch and minor tcl script tweaks to support (fconfigure -translation...
stephan [Wed, 5 Feb 2025 12:49:15 +0000 (12:49 +0000)] 
Upstream JimTCL patch and minor tcl script tweaks to support (fconfigure -translation binary) for better cross-platform build portability.

FossilOrigin-Name: 0974a17c4565f202777fc6203df20dca19acc1e8740ede15334783f41e3e5054

10 months agoAttempted improvements to the SQLITE_DBCONFIG_... documentation.
drh [Wed, 5 Feb 2025 12:02:43 +0000 (12:02 +0000)] 
Attempted improvements to the SQLITE_DBCONFIG_... documentation.

FossilOrigin-Name: baac853871ad307b67b4d624b9ee47fc1313f1aa62c9f8072fb49e97aa33db94

10 months agoDetect and report signed integer overflow in the sumInverse() routine,
drh [Tue, 4 Feb 2025 02:38:23 +0000 (02:38 +0000)] 
Detect and report signed integer overflow in the sumInverse() routine,
used by window functions.

FossilOrigin-Name: 317e9a470fba2a4b717b9cb66488b8fccb44810a80f3a7deaf1ea81906e2b8d2

10 months agoTest case for the FTS3 fix in the previous check-in.
drh [Mon, 3 Feb 2025 23:27:27 +0000 (23:27 +0000)] 
Test case for the FTS3 fix in the previous check-in.

FossilOrigin-Name: 459d8f695ef868d0ec09920ab2035eebd36a66051f9905e2605f4600623faa47

10 months agoFix a potential UAF in FTS3.
drh [Mon, 3 Feb 2025 23:19:42 +0000 (23:19 +0000)] 
Fix a potential UAF in FTS3.

FossilOrigin-Name: 75f3d87448793fc7fd68d817874d561842e029a2d6c1ea4abcec39764cd38469

10 months agoNew dbsqlfuzz case added to fuzzdata8.db. fuzzer-20250203
drh [Mon, 3 Feb 2025 21:24:40 +0000 (21:24 +0000)] 
New dbsqlfuzz case added to fuzzdata8.db.

FossilOrigin-Name: 7ee20cfc237229dbea7116149c0c35883f7b8087b9ccdce6dca16b6da1c6caf8

10 months agoThe Parse.addrExplain field is never even if SQLITE_OMIT_EXPLAIN is defined.
drh [Mon, 3 Feb 2025 21:04:21 +0000 (21:04 +0000)] 
The Parse.addrExplain field is never even if SQLITE_OMIT_EXPLAIN is defined.

FossilOrigin-Name: 5d81a984c6aabb9fa9180efde8ca942b40f1ec18ff5a89f2fbb1252734f051d3

10 months agoEnhance fuzzcheck so that the --sqlid and --dbid options can take a range
drh [Mon, 3 Feb 2025 18:53:02 +0000 (18:53 +0000)] 
Enhance fuzzcheck so that the --sqlid and --dbid options can take a range
of IDs to run.

FossilOrigin-Name: 408fa57f048e05a261fb62b45ae44b8a97c97fc01e3776124cbef6595df579d4

10 months agoFixes and improved documentation to the new --sqlid and --dbid range fuzzcheck-improvements
drh [Mon, 3 Feb 2025 18:49:06 +0000 (18:49 +0000)] 
Fixes and improved documentation to the new --sqlid and --dbid range
options in fuzzcheck.

FossilOrigin-Name: 59e26632449163a36b803cc7027ed99c1f6b675dda6f0b2b12bbe55884923f08

10 months agoEnhance fuzzcheck so that the --sqlid and --dbid options can specify a
drh [Mon, 3 Feb 2025 18:36:05 +0000 (18:36 +0000)] 
Enhance fuzzcheck so that the --sqlid and --dbid options can specify a
range of tests to be run.

FossilOrigin-Name: cdd0af6f86e49ade1339ad5a3cc444400a9722a9efdf84a30b3ff9428b7ac36d

10 months agoFix for a potential UAF in FTS5.
drh [Mon, 3 Feb 2025 18:05:54 +0000 (18:05 +0000)] 
Fix for a potential UAF in FTS5.

FossilOrigin-Name: e33f2fedda17b4f3678fc23c438093c256b0c125da5f1ac42ecaf3d604d54b6a

10 months agoImprove the JS-side sqlite3_set_auxdata() test to also trigger the case that the...
stephan [Mon, 3 Feb 2025 18:01:42 +0000 (18:01 +0000)] 
Improve the JS-side sqlite3_set_auxdata() test to also trigger the case that the aux data actually gets reused. Test changes only, no library code.

FossilOrigin-Name: 9f27379d860518e6e097a2c999da04176812260a61bf11fe495c3efd76971806

10 months agoFix a use-after-free case in fts5 provoked by fuzzdata8.db. Tcl test case pending. fuzz-data
dan [Mon, 3 Feb 2025 17:54:55 +0000 (17:54 +0000)] 
Fix a use-after-free case in fts5 provoked by fuzzdata8.db. Tcl test case pending.

FossilOrigin-Name: a4962df665084e423e020be9a2834b6886a8e3feb461cff5358b61398a2a20d2

10 months agoNew test case for test/fuzzdata8.db
drh [Mon, 3 Feb 2025 17:45:41 +0000 (17:45 +0000)] 
New test case for test/fuzzdata8.db

FossilOrigin-Name: 8a882f976e22100b91c7ca4119123f16ad5f03311f0a6dc17449bcdcff29618c

10 months agoRework [76c8435a] to eliminate automatic JS-to-WASM function conversions of sqlite3_s...
stephan [Mon, 3 Feb 2025 17:34:12 +0000 (17:34 +0000)] 
Rework [76c8435a] to eliminate automatic JS-to-WASM function conversions of sqlite3_set_auxdata() destructors because it can leads to leaks on every call of a UDF. This feature never worked before [76c8435a] but fixing it was ill-conceived because of the memory leakage it introduces. WASM function pointers can still be used as destructors in this context.

FossilOrigin-Name: 3fb993af0caf041da934cea29c039b27c468be0b75bce1537a6425767cf9bf8d

10 months agoAdd a more complete test for [76c8435a] and add some commentary about (A) the inabili...
stephan [Mon, 3 Feb 2025 14:55:56 +0000 (14:55 +0000)] 
Add a more complete test for [76c8435a] and add some commentary about (A) the inability to automatically clean up automatically-generated WASM proxy functions for sqlite3_set_auxdata() destructors and (B) how to deal with (A) to avoid leaking WASM proxy functions.

FossilOrigin-Name: d693c2dddbd10a2e0b77893b04b11502e30b768f1b06814105f7f35172845fb9

10 months agoFix the build process on Windows so that it generates identical sqlite3.c,
drh [Mon, 3 Feb 2025 14:44:16 +0000 (14:44 +0000)] 
Fix the build process on Windows so that it generates identical sqlite3.c,
sqlite3.h, and shell.c files on Windows and Unix.  This patch also includes
a change to JS bindings that got caught up in the branch.

FossilOrigin-Name: 91ef45fc2902e46813366ec6b8317209f39f10e4a23c3808e33aceedab9da6c7

10 months agoBring the autoconf-tarball Makefile.msc into alignment with the main windows-build-issue
drh [Mon, 3 Feb 2025 14:40:05 +0000 (14:40 +0000)] 
Bring the autoconf-tarball Makefile.msc into alignment with the main
Makefile.msc.

FossilOrigin-Name: 52a7a162d131532de8f4403b099fa122fc72c80f71494fb561afc4e0ff8e6bf4

10 months agoCorrect the FuncPtrAdapter signature for the JS binding of sqlite3_set_auxdata()...
stephan [Mon, 3 Feb 2025 14:04:27 +0000 (14:04 +0000)] 
Correct the FuncPtrAdapter signature for the JS binding of sqlite3_set_auxdata(). Reported in [https://github.com/sqlite/sqlite-wasm/issues/92|the npm subproject, ticket #92].

FossilOrigin-Name: 76c8435a5f390001038b8ee94322ff478c9d5f29501ed1c5891c952a41e377aa

10 months agoAdjust the build process to avoid extra CR characters inserted by jimsh
drh [Mon, 3 Feb 2025 13:20:11 +0000 (13:20 +0000)] 
Adjust the build process to avoid extra CR characters inserted by jimsh
on Windows.

FossilOrigin-Name: 1f54853932cec9ba20e9be48a59f1817b8b45e4c4d6ef8a06d34f86dd688e28e

10 months agoThe "clean" target on Makefile.msc should not delete the auto.def file.
drh [Mon, 3 Feb 2025 12:42:03 +0000 (12:42 +0000)] 
The "clean" target on Makefile.msc should not delete the auto.def file.

FossilOrigin-Name: 72fbcedfb09febb72fa325cb21d160cd33dca7fe5579817143f47d90a20ec2ef

10 months agoAdd a header comment to test/speedtest1.c that outlines how to compile the
drh [Sun, 2 Feb 2025 18:01:32 +0000 (18:01 +0000)] 
Add a header comment to test/speedtest1.c that outlines how to compile the
program using historical amalgamation sources, for comparison testing.

FossilOrigin-Name: 602d4dd69ec9a724c69cb41ab15376ec731bfd4894fac0a2b25076b857786c6d

10 months agoUpdate to the "--help" output from speedtest1.
drh [Sun, 2 Feb 2025 16:52:21 +0000 (16:52 +0000)] 
Update to the "--help" output from speedtest1.

FossilOrigin-Name: 5216452047eecdd6c0f6ab85b304f975ed05a394a4ad9ae793fb65d645502b12

10 months agoURL typo fix in code comments. No code changes.
stephan [Sun, 2 Feb 2025 12:15:25 +0000 (12:15 +0000)] 
URL typo fix in code comments. No code changes.

FossilOrigin-Name: 002a123094e4ef14eb5ec28033adca6083ba2717e1eaa23e80595e37a947e6c2

10 months agoAdd a missing "db2 close" to the ext/session/session_gen.test test module.
drh [Sat, 1 Feb 2025 23:49:01 +0000 (23:49 +0000)] 
Add a missing "db2 close" to the ext/session/session_gen.test test module.

FossilOrigin-Name: 4068f586ddadd3a818645574f7584fcee6d373dbf45805c545100883b495598a

10 months agoFix a comment typo - in a comment used to generate documentation.
drh [Sat, 1 Feb 2025 23:34:33 +0000 (23:34 +0000)] 
Fix a comment typo - in a comment used to generate documentation.

FossilOrigin-Name: b8de75eeded79a8312218d7a543e7c7d11181c9f4004e875495608d11a81ff38

10 months agoRemove an ALWAYS() added by [2567298f4b0fdfeb] because dbsqlfuzz found a way
drh [Sat, 1 Feb 2025 23:28:49 +0000 (23:28 +0000)] 
Remove an ALWAYS() added by [2567298f4b0fdfeb] because dbsqlfuzz found a way
to reach it.  The test case was added to TH3.

FossilOrigin-Name: d08a7aa8987458a91fcb861d58289e622ba8722936c7874a284f9f2fd782e269

10 months agoEnable SQLITE_ENABLE_NORMALIZE for several test configurations.
drh [Sat, 1 Feb 2025 21:06:49 +0000 (21:06 +0000)] 
Enable SQLITE_ENABLE_NORMALIZE for several test configurations.

FossilOrigin-Name: b07c64077a3912ef7cdf23e9411df6387f38baa32f5a11fffec5ba4f93935e27

10 months agoFix an issue with sqlite3_normalized_sql() caused by changes needed to
drh [Sat, 1 Feb 2025 20:53:17 +0000 (20:53 +0000)] 
Fix an issue with sqlite3_normalized_sql() caused by changes needed to
support SQLITE_DBCONFIG_ENABLE_COMMENT.

FossilOrigin-Name: 79d287a39443f2d098fcc24199627555a656b34aa5bf5d484f91cb513d83e143

10 months agoJS doc typo fixes. No functional changes.
stephan [Sat, 1 Feb 2025 09:44:48 +0000 (09:44 +0000)] 
JS doc typo fixes. No functional changes.

FossilOrigin-Name: e0d9c74c1cdddb2321131255b94f9cda6530be3f2a06aed4abb54dcda092481e

10 months agoTweaks to [4b4f33d791fe4318] to make it easier to test.
drh [Fri, 31 Jan 2025 20:18:34 +0000 (20:18 +0000)] 
Tweaks to [4b4f33d791fe4318] to make it easier to test.

FossilOrigin-Name: 2567298f4b0fdfeb42aa6bba7e0bec3bc8d0b89bf644a79b41893dd6a6c5774c

10 months agoFix test case numbering in tests recently added to like3.test.
drh [Fri, 31 Jan 2025 18:56:58 +0000 (18:56 +0000)] 
Fix test case numbering in tests recently added to like3.test.

FossilOrigin-Name: 6df2098c548b58c2910837726b666a628d5c712c560c0221a771e8181f71fae7

10 months agoExpose the new SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE/WRITE and SQLITE_DBCONFIG_ENABLE_...
stephan [Fri, 31 Jan 2025 18:45:03 +0000 (18:45 +0000)] 
Expose the new SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE/WRITE and SQLITE_DBCONFIG_ENABLE_COMMENTS (from [325e547a21955]) to JS/WASM.

FossilOrigin-Name: 8da1a9af66f905c683e9c3445d609b5c0e11ac912be192c468ddd79f237837f4

10 months agoRemove an assert() that is not true if a trace-callback is deregistered while there...
dan [Fri, 31 Jan 2025 18:33:37 +0000 (18:33 +0000)] 
Remove an assert() that is not true if a trace-callback is deregistered while there are active statements.

FossilOrigin-Name: 0ecfc4d0ebdb272a69f8f98ddb069c7e0735fb899804027eb16f241d83b3d046

10 months agoFix a problem with LIKE and GLOB processing in utf-16be databases in cases where...
dan [Fri, 31 Jan 2025 14:52:36 +0000 (14:52 +0000)] 
Fix a problem with LIKE and GLOB processing in utf-16be databases in cases where the utf-8 encoding of a character ends with the byte 0xBF.

FossilOrigin-Name: 4b4f33d791fe4318c4597bee7d2f9e486ed223e731982af470f5cc0dbdc600fc

10 months agoIf any errors occur while processing sqlite_dbpage changes, cancel
drh [Fri, 31 Jan 2025 14:52:05 +0000 (14:52 +0000)] 
If any errors occur while processing sqlite_dbpage changes, cancel
pending truncate operations.

FossilOrigin-Name: 6138e0dc4e0e4e19cb048fe0cd969156151fdc427eee21188d2a822642aad043

10 months agoThree new options to sqlite3_db_config(): ATTACH_CREATE, ATTACH_WRITE,
drh [Fri, 31 Jan 2025 13:32:03 +0000 (13:32 +0000)] 
Three new options to sqlite3_db_config():  ATTACH_CREATE, ATTACH_WRITE,
and COMMENTS.

FossilOrigin-Name: 325e547a2195571ece4bb22ca65d67d8c2cb42030618916d37930666cf221917

10 months agoMinor wasm-specific doc touchups.
stephan [Fri, 31 Jan 2025 12:30:37 +0000 (12:30 +0000)] 
Minor wasm-specific doc touchups.

FossilOrigin-Name: 56b618da9073db8b8d5dafa177a3c9e4c4d927bf512e14b0e6d23937f91ce4cf

10 months agoImprovements to the SQLITE_DBCONFIG option documentation. extra-security
drh [Fri, 31 Jan 2025 12:09:36 +0000 (12:09 +0000)] 
Improvements to the SQLITE_DBCONFIG option documentation.

FossilOrigin-Name: 59f0ba10062a6ccfd56061a16af3436b9e1b9d23378bff3302bcf33bb3137cb9

10 months agoCorrect a typo in tool/emcc.sh.in which could cause all of the configure-time work...
stephan [Fri, 31 Jan 2025 11:45:55 +0000 (11:45 +0000)] 
Correct a typo in tool/emcc.sh.in which could cause all of the configure-time work to locate the emcc binary to go unused. Reported in [forum:feb325cdde5b6f37|forum post feb325cdde5b6f37].

FossilOrigin-Name: f66efd5b531210407ee8f30cdf6684a7610479fd8810a609c54469f7424a0644

10 months agoAdd the SQLITE_DBCONFIG_ENABLE_COMMENTS setting (default on) to enable or
drh [Fri, 31 Jan 2025 01:34:19 +0000 (01:34 +0000)] 
Add the SQLITE_DBCONFIG_ENABLE_COMMENTS setting (default on) to enable or
disable the ability to include comments in SQL input text.

FossilOrigin-Name: 393749a2e22d5c8eba36e2106a35909420aa6316652d1ab4f18ef699247b6fba

10 months agoMerge all the latest trunk changes into the extra-security branch.
drh [Fri, 31 Jan 2025 00:54:59 +0000 (00:54 +0000)] 
Merge all the latest trunk changes into the extra-security branch.

FossilOrigin-Name: 86ba57561a8d8c14e401c06b2345a9417053aa3a5f0c84e52460f23f5e6aa8d0

10 months agoThe reuse-subroutine optimization [c9a3498113074bbc] might have generated
drh [Thu, 30 Jan 2025 21:12:58 +0000 (21:12 +0000)] 
The reuse-subroutine optimization [c9a3498113074bbc] might have generated
byte-code that loops forever.  This check-in fixes the problem.

FossilOrigin-Name: 0cc4ed8c6e53aca1f5e94c132bedbc7f561c04a77f1a30b965ffe7560634bfeb

10 months agoRemove an unused parameter from an internal-use subroutine in the TCL interface.
drh [Thu, 30 Jan 2025 16:07:51 +0000 (16:07 +0000)] 
Remove an unused parameter from an internal-use subroutine in the TCL interface.

FossilOrigin-Name: a700692b39e24f5ca9ea6f879d413e20c2ad2b85f62c867407dafe111f13d931

10 months agoImprovements to the TCL interface for Tcl9 as suggested by Jan Nijtmans.
drh [Thu, 30 Jan 2025 16:00:28 +0000 (16:00 +0000)] 
Improvements to the TCL interface for Tcl9 as suggested by Jan Nijtmans.

FossilOrigin-Name: d76c5db866de2732b68401a4c3e39acddc7a99bed965160c1796477c062b478a

10 months agoUpdates to the compile-for-windows.md document.
drh [Thu, 30 Jan 2025 13:54:32 +0000 (13:54 +0000)] 
Updates to the compile-for-windows.md document.

FossilOrigin-Name: bcd22ed686954657ba820d53dec255d33797924f76e57b931016813581e04e06

10 months agoMinor code de-duplication across the top-level auto.def and autoconf/auto.def.
stephan [Thu, 30 Jan 2025 12:19:30 +0000 (12:19 +0000)] 
Minor code de-duplication across the top-level auto.def and autoconf/auto.def.

FossilOrigin-Name: 3c990d77cb83ab371d92c97e0528f790ab6126c60f48ff77e48bd166d7834cf0

10 months agoDisable a test case that (intentionally) does use-after-free, as it does
drh [Thu, 30 Jan 2025 12:01:24 +0000 (12:01 +0000)] 
Disable a test case that (intentionally) does use-after-free, as it does
occasionally cause problems even for non-sanitizer builds.

FossilOrigin-Name: 23c7d5bea351c04785153ddb30e19c1236db9d11054ab8229893531026b53655

10 months agoFix build regression, introduced in [d2fe6b05f38d9d] (3.48.0), in which SQLITE_OMIT...
stephan [Thu, 30 Jan 2025 11:19:16 +0000 (11:19 +0000)] 
Fix build regression, introduced in [d2fe6b05f38d9d] (3.48.0), in which SQLITE_OMIT and SQLITE_ENABLE flags passed to configure via CFLAGS were not propagated to the OPT_FEATURE_FLAGS list. Reported in [forum:9801e54665afd728|forum post 9801e54665afd728].

FossilOrigin-Name: ec71d9dcd582188d7fb4ab945187de1023eaaecffeeb2903a6fcc49650bd21e9

10 months agoFix bug in sessions handling of FK constraints introduced by [e09a0c02] (released...
dan [Wed, 29 Jan 2025 18:53:19 +0000 (18:53 +0000)] 
Fix bug in sessions handling of FK constraints introduced by [e09a0c02] (released in 3.48.0). Bug was preventing a changeset containing FK violations from being applied even when the xConflict(CHANGESET_FOREIGN_KEY) returned OMIT.

FossilOrigin-Name: d7c07581203a0a88456588e49e51b40a8341b0e7121809f75be0ee882d91650f

10 months agoEnhance the if() and iif() SQL functions so that they support any
drh [Tue, 28 Jan 2025 20:32:48 +0000 (20:32 +0000)] 
Enhance the if() and iif() SQL functions so that they support any
number of arguments greater than or equal to two.
Suggested by [forum:/forumpost/40f7867f75f80|forum post 40f7867f75f80].

FossilOrigin-Name: fb76d184ee5afc41009c4023bb68b3ddd42c9235a79ec9695c26f5bbe9a1aa25

10 months agoFix sessions module handling of tables with generated columns.
dan [Tue, 28 Jan 2025 19:03:37 +0000 (19:03 +0000)] 
Fix sessions module handling of tables with generated columns.

FossilOrigin-Name: 437fb316389bc3c24c5cdb4d01edfc81e2c2e9f2b399fc2a95b05d279361d8ec

10 months agoFix a copy/paste typo in the output of vfstrace for xDlClose().
drh [Tue, 28 Jan 2025 18:03:22 +0000 (18:03 +0000)] 
Fix a copy/paste typo in the output of vfstrace for xDlClose().

FossilOrigin-Name: 1d57b57c85bb8cb9b8a1808b771bb91eeb8150efd14f9064a390e533e715bab7

10 months agoSimplifh the IdList object to remove unnecessary fields. Performance
drh [Tue, 28 Jan 2025 12:50:17 +0000 (12:50 +0000)] 
Simplifh the IdList object to remove unnecessary fields.  Performance
increases by about 0.8%.

FossilOrigin-Name: a4625bb995dd5582d1f3cf0c2e54eb3f01f1cc1405811dda86ebd38b2b858994

10 months agoFix typo in speedtest.md.
drh [Tue, 28 Jan 2025 10:56:22 +0000 (10:56 +0000)] 
Fix typo in speedtest.md.

FossilOrigin-Name: 984a9cc22c7c8492bf4fae482749663899b0e33a25c32e6ae5c5e98fc12bb83e

10 months agoApparently I got the logic of [abfe488ed67e2e35] confused, even backwards.
drh [Tue, 28 Jan 2025 01:10:45 +0000 (01:10 +0000)] 
Apparently I got the logic of [abfe488ed67e2e35] confused, even backwards.
Change it so that the SQLITE_USE_W32_FOR_CONSOLE_IO macro causes Win32 APIs
to be used for console I/O and for stdio to be used otherwise.  This is
reported to be necessary for builds that use a C-language runtime other than
the one provided by Microsoft.  This changes if for Windows only.  It is a
bug fix, though we don't have a test case that will demonstrate a malfunction.

FossilOrigin-Name: 925e97e6f4238f02259a0c95b1fc668ae32a95329242f8eeae236ef207aca112

10 months agoRemove an ALWAYS() in the star-query heuristic that is sometimes false if you
drh [Tue, 28 Jan 2025 00:48:01 +0000 (00:48 +0000)] 
Remove an ALWAYS() in the star-query heuristic that is sometimes false if you
have a corrupt database.  dbsqlfuzz c37ba7728d79859b79c8341b59297e88fba017d3.
Test case in TH3.

FossilOrigin-Name: 6b9a339628eb8bfb6dfbee02000a6ac91cc8a9ae16bd990e62c4142b9f912c36

10 months agoUse hashing to accelerate column matching on INSERT statements. Code is
drh [Mon, 27 Jan 2025 21:18:13 +0000 (21:18 +0000)] 
Use hashing to accelerate column matching on INSERT statements.  Code is
smaller and about 1.8% faster overall according to test/speedtest.tcl.

FossilOrigin-Name: 8be956383e0344fb613ec2e56fce7b518f439ae34bf9ddb424de2bd9b31c9889

10 months agoEnhance ./configure to issue an unambiguious error if the pathname to either
drh [Mon, 27 Jan 2025 17:48:51 +0000 (17:48 +0000)] 
Enhance ./configure to issue an unambiguious error if the pathname to either
the source tree or the build directory contains any space characters.

FossilOrigin-Name: 614ae5c74f3b534f50432c875681d7a1e6135be883508939c9c57822cc1e9361

10 months agoAvoid splitting a hyperlink across lines in the documentation comment for
drh [Mon, 27 Jan 2025 14:12:14 +0000 (14:12 +0000)] 
Avoid splitting a hyperlink across lines in the documentation comment for
sqlite3_serialize().

FossilOrigin-Name: 74b770bd445d98ff883000ab2e31603d729e415e4e4f640646eef30825634f48

10 months agoMake two private routines in FTS "static" so that they are not callable from
drh [Sun, 26 Jan 2025 23:34:49 +0000 (23:34 +0000)] 
Make two private routines in FTS "static" so that they are not callable from
outside of SQLite itself.

FossilOrigin-Name: 9b11bed0448b95319206b413c35f23bb80f3f4c0a4394d40f2e64066400a01ed

10 months agoFurther comment improvements in the star-query heuristic. Add an ALWAYS()
drh [Sun, 26 Jan 2025 20:09:57 +0000 (20:09 +0000)] 
Further comment improvements in the star-query heuristic.  Add an ALWAYS()
on an unreachable branch to achieve MC/DC.

FossilOrigin-Name: 5e18ce68fbc5e73e6694936f3ba71f5b5e3758cf380951805ca6ea6a3f0943aa

10 months agoSmall size and complexity reduction on the star-query heuristic. Improved
drh [Sun, 26 Jan 2025 17:29:33 +0000 (17:29 +0000)] 
Small size and complexity reduction on the star-query heuristic.  Improved
comments for the star-query heuristic.

FossilOrigin-Name: a7ecb2f4b7eee78b88f1b2e026dffed2007ca4ffeb152632624ab2582839b250

10 months agoRevise the strategy used by the star-query heuristic: Instead of decreasing
drh [Sat, 25 Jan 2025 23:04:05 +0000 (23:04 +0000)] 
Revise the strategy used by the star-query heuristic:  Instead of decreasing
the cost of all fact-table WhereLoops, increase the run-cost of WhereLoops that
are SCANs of dimension tables.

FossilOrigin-Name: 1bc09c9e8bd77ac41ecbe510c7e003757fc11d0f586da6cdf3584315aa9d6407

10 months agoImprovments to debug output on the star-query heuristic.
drh [Sat, 25 Jan 2025 14:30:36 +0000 (14:30 +0000)] 
Improvments to debug output on the star-query heuristic.

FossilOrigin-Name: b3ebeb0682a2c837987acf4ed92f06cf91aea235830c5a0f9dd1ce64afe16e84

10 months agoAvoid calling computeMxChoice() after an OOM as some assert()s can fail
drh [Sat, 25 Jan 2025 00:07:14 +0000 (00:07 +0000)] 
Avoid calling computeMxChoice() after an OOM as some assert()s can fail
in that routine if a prior OOM occurred while building the WhereLoop array.

FossilOrigin-Name: 8b9e621dbf599d7e75e07d75d4c400247d693ea76e00eba0919f4e33e3e10bdd

10 months agoRemove an incorrect ALWAYS() added in check-in [7cfbe14d199bb631].
drh [Fri, 24 Jan 2025 20:59:12 +0000 (20:59 +0000)] 
Remove an incorrect ALWAYS() added in check-in [7cfbe14d199bb631].

FossilOrigin-Name: 431a1a29f93dc642779dc21c3a0edad5fcda1d175e9d1e3b216fa02c234fe774

10 months agoClarify handling of a NULL for the 2nd argument to sqlite3_serialize(), as pointed...
stephan [Fri, 24 Jan 2025 18:37:55 +0000 (18:37 +0000)] 
Clarify handling of a NULL for the 2nd argument to sqlite3_serialize(), as pointed out in [forum:3df7168b90|forum post 3df7168b90].

FossilOrigin-Name: 340edbe5540762656b648c18a359ab7039b4a0af15db199fc86317a415e2bafa

10 months agoImprove the star-query heuristic so that it does a better job of identifying
drh [Fri, 24 Jan 2025 16:37:31 +0000 (16:37 +0000)] 
Improve the star-query heuristic so that it does a better job of identifying
actual star queries.  Also includes improved diagnostic output from the
query planner.

FossilOrigin-Name: 7cfbe14d199bb631abd4d009698eeaee9b8450d5061ded612095ee4738ac6a1f

10 months agoThe debugging output for WhereLoop objects now shows cost star-query-heuristic
drh [Fri, 24 Jan 2025 16:27:18 +0000 (16:27 +0000)] 
The debugging output for WhereLoop objects now shows cost
estimate changes due to the star-query heuristic.

FossilOrigin-Name: a280f5f5480e560fc2b80e8947d8062e8b3487d930e71cb60fc9ba90d87977c1

10 months agoMinor tweaks to the star-query detection and processing.
drh [Fri, 24 Jan 2025 15:55:20 +0000 (15:55 +0000)] 
Minor tweaks to the star-query detection and processing.

FossilOrigin-Name: 61f76a45ac7aa454419fd7539a3d8e60f0733fb5a2abd034d795328f3c1b6e9b

10 months agoCorrect a version number in autosetup/README.md.
stephan [Fri, 24 Jan 2025 15:41:33 +0000 (15:41 +0000)] 
Correct a version number in autosetup/README.md.

FossilOrigin-Name: c338caf0fd4adc7baacf20f6d4274b1776b9487a5a976b8d85e490791be82b11

10 months agoWhen looking for star-queries, do not count a table as a dimension table
drh [Fri, 24 Jan 2025 14:51:15 +0000 (14:51 +0000)] 
When looking for star-queries, do not count a table as a dimension table
if that table is separated from the fact table by an OUTER or CROSS join
or if the table is a self-join.

FossilOrigin-Name: 5aebd7df0d577e98b3affd22b84b42dfe84a9f37fa29187505cc245b95460ba4

10 months agoUpdate autosetup/README.md to reflect recent refactoring.
stephan [Fri, 24 Jan 2025 14:13:20 +0000 (14:13 +0000)] 
Update autosetup/README.md to reflect recent refactoring.

FossilOrigin-Name: 601636829b79888deda7d4dc5786f82b4f0b302d84663ee96b4d47fcb429abcf

11 months agoReplace a handful of hard tabs in string literals with \t in mkwasmbuilds.c.
stephan [Fri, 24 Jan 2025 12:54:59 +0000 (12:54 +0000)] 
Replace a handful of hard tabs in string literals with \t in mkwasmbuilds.c.

FossilOrigin-Name: e8e4d497a7b6aae450cb93927c7583fcce3fe971cd3691f9d9cad605de3cfb1f

11 months agoMinor additions to ext/wasm/README.md.
stephan [Fri, 24 Jan 2025 09:21:39 +0000 (09:21 +0000)] 
Minor additions to ext/wasm/README.md.

FossilOrigin-Name: 85747ea1654c74d330614aa174ede4a989b6456eb1fc5eb0fc9f2d1418b6ef99

11 months agoUpdate ext/wasm/README.md to reflect simplifications permitted by the current configu...
stephan [Fri, 24 Jan 2025 09:18:19 +0000 (09:18 +0000)] 
Update ext/wasm/README.md to reflect simplifications permitted by the current configure script behavior.

FossilOrigin-Name: 9abb56c6acb1c84c2df8534ca3ebb2894afd68bc7b8331d4d12611896c576749

11 months agoRemove extraneous are-we-making-clean guards from the generated wasm build rules...
stephan [Fri, 24 Jan 2025 08:58:54 +0000 (08:58 +0000)] 
Remove extraneous are-we-making-clean guards from the generated wasm build rules, as that guard is set at a higher level. Rename a makefile call()able for consistency.

FossilOrigin-Name: 7f9074e2a7ff62bdcf343895e80a51224de62a22afbbf82068ec5fea7eeda0bb

11 months agowasm: de-list demo-worker1-promiser-esm.html from the test pages because (per Chrome...
stephan [Thu, 23 Jan 2025 22:23:31 +0000 (22:23 +0000)] 
wasm: de-list demo-worker1-promiser-esm.html from the test pages because (per Chrome 131) "Module scripts don't support importScripts()", where "don't" means "they used to but no longer do".

FossilOrigin-Name: 4aa025a943a4024094b91f13abfb8945bbbb8334e3ec904dee5315852845bfe1

11 months agoFix a possible infinity loop in debugging-printf logic in the query planner.
drh [Thu, 23 Jan 2025 21:06:59 +0000 (21:06 +0000)] 
Fix a possible infinity loop in debugging-printf logic in the query planner.
No changes to production code.

FossilOrigin-Name: 9a20b94080f5379867530772e081b737ae4cf6b416469dcabb85b8dd819f491f

11 months agoWhen running wasm-opt, ignore any failure because it will fail for unknown flags...
stephan [Thu, 23 Jan 2025 19:44:09 +0000 (19:44 +0000)] 
When running wasm-opt, ignore any failure because it will fail for unknown flags and the set of legal flags will change from version to version.  Document the size-reduction effect (or non-effect) of a dozen-odd wasm-opt flags and retain those which demonstrate a wasm file size reduction in -Oz builds (our production build mode). Total size savings: roughly 13kb.

FossilOrigin-Name: c9dc581e0287e3462ac55f80ca76e7e98d31157022052c892517363c45287a7b

11 months agoRemove some now-dead makefile code, rename a var for consistency, and fix a recipe...
stephan [Thu, 23 Jan 2025 16:11:24 +0000 (16:11 +0000)] 
Remove some now-dead makefile code, rename a var for consistency, and fix a recipe bug introduced in the previous checkin in the bundler-friendly build.

FossilOrigin-Name: 0acd4ef3addb311476f4a670be0c4c4a0f3f88b0420886d4c1c3c3027dd51d73

11 months agoInitial support for post-processing wasm files with wasm-opt (if it's available)...
stephan [Thu, 23 Jan 2025 15:58:01 +0000 (15:58 +0000)] 
Initial support for post-processing wasm files with wasm-opt (if it's available). This currently shaves 12kb off of the release-mode build of sqlite3.wasm but there are many dozens of wasm-opt flags left to try.

FossilOrigin-Name: 5d16e3f28364de2d6b6456a6fc56bf604b9106c3ae15719f2862192ae3020cc1

11 months agoMove small parts of ext/wasm/GNUmakefile into ext/wasm/config.make.in and have the...
stephan [Thu, 23 Jan 2025 14:09:02 +0000 (14:09 +0000)] 
Move small parts of ext/wasm/GNUmakefile into ext/wasm/config.make.in and have the configure script populate that, rather than dynamically determining those values on each 'make' invocation. Add a configure-time check for the optional wasm-opt binary in prep for pending experimentation with using it to reduce the wasm file sizes.

FossilOrigin-Name: 0a426a549577b883e2de7cd0605041cc97b57f53ee6657bc318b0bfde7b62677