1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-26 11:28:58 +03:00

29842 Commits

Author SHA1 Message Date
stephan
11d5bea210 Flesh out the new proc-debug and its infrastructure a bit.
FossilOrigin-Name: ba7f1ff0d7d1d3fb79fc298d99fd27b65f639fb1691a1a9cdc9c006b8ff41212
2025-03-21 16:49:32 +00:00
stephan
eb6997fbac Proxy configure's msg-debug with proc-debug, which works the same except that it prepends the name of the calling proc to the debug message. No functional changes.
FossilOrigin-Name: f0298c773d3490ad3a5b53d2ceeff1bd90e1a7bb5deeba2d24f681ec1bc10510
2025-03-21 16:06:16 +00:00
stephan
315de605af Teach the configure script to be able find a default installation of libreadline on Haiku OS.
FossilOrigin-Name: 260e9884118172ef76457a34042ace301f20abab4ced172f6b6135010c446a68
2025-03-20 13:41:08 +00:00
drh
4c13878ac2 Fix a problem in the sqlite_dbpage() table-valued function when it is
trying to truncate a file in locking-mode=EXCLUSIVE and the file was
obtained via sqlite3_deserialize().  Problem found by dbsqlfuzz.

FossilOrigin-Name: 346cf9794c6ce82ac32f7ccabc67240309306626709951593720abd198b103e3
2025-03-20 11:47:39 +00:00
stephan
339f9a33b4 Correct part of [505d9e49f7] and [7126a51ed8] to get sessioninvert tests working on cygwin.
FossilOrigin-Name: 83c34decbe336c76062e6b1bfe4c2e8f786841a4b6efa001747e786e872c8c71
2025-03-19 15:21:21 +00:00
stephan
18b250e9c9 Correct part of [04075517] which changed the implicit return value of a test function.
FossilOrigin-Name: 505d9e49f7af619eda9e46e7ed19c4446c64628233528e1ab3f70264e1640ace
2025-03-19 14:57:32 +00:00
stephan
f715576a6c Add some explicit db close calls to work around a process-reaping timing problem on cygwin builds.
FossilOrigin-Name: 7126a51ed8a1b90b7f4cf3f1c13f7a1d560ff7a3ae73897ce8d9194df40356ed
2025-03-19 14:52:39 +00:00
stephan
52e2a79304 Test script patches from Jan Nijtmans: always use -DUSE_TCL_STUBS in buildtclext.tcl and improvements in how TRG is populated in testrunner.tcl.
FossilOrigin-Name: aa192203aa1aa188866fe00a5d40dc7b7c72b4f38b06da8708ed0a6c8b8638a6
2025-03-19 13:49:34 +00:00
stephan
21aeeb06fe Merge trunk into the cygwin-fixes branch for the shell test improvements on Windows. An MSC build's make test now has zero failures.
FossilOrigin-Name: 2de4efe10c2591192edca3833fc9e2fae10ebc925fb556f5b53ad483b491b5b3
2025-03-19 13:13:12 +00:00
stephan
178edbaa2f Avoid running test cases involving ANSI control characters or Unicode on Windows in a slave interpreter, as that combination does not work.
FossilOrigin-Name: c7fd71c77f1716c9c85d0f41a07ebd7c96f2e9d5e4c1392fefa1fb53f3cbb746
2025-03-19 11:53:46 +00:00
stephan
6e059d9dac Merge trunk into the cygwin-fixes branch.
FossilOrigin-Name: 34eadd374b3c0a8c9e1f5f4a1c60fda8f16b1c56213b8c4047f96390c676b695
2025-03-19 10:14:46 +00:00
drh
8db881d055 Change the generate_series() table-valued function so that its rowid is just an
alias for its value.  This allows it to be used as the RHS operand of a
RIGHT JOIN.  This fixes the issue raised by
[forum:/forumpost/1e17219c88|forum post 1e17219c88].

FossilOrigin-Name: 77db4d85e70fbf358ae2321c2601966666bdb4d971d7c113ce30a3e541458ee8
2025-03-18 20:15:16 +00:00
dan
31fd886576 Fix a problem that could occur when the RHS of an IN operator was a compound SELECT featuring an ORDER BY on a subquery that was flattened into one of the component SELECTs introduced by [baa83b460c677c21]. Forum post [/forumpost/1e17219c88].
FossilOrigin-Name: 7101ccd5331e36fd1a539f540e79ce0ce159be76ec422e1d9436eec6f3908c6e
2025-03-18 19:21:04 +00:00
stephan
e435547beb Internal doc touchups in ext/wasm/mkwasmbuilds.c. No functional changes.
FossilOrigin-Name: 47d34260e74912eeae704bff7c4314b893af86ee66dd96a1bc6f450d3e290702
2025-03-18 13:52:53 +00:00
stephan
ccda0f008a Very slight simplification of the run-fuzzcheck rules.
FossilOrigin-Name: c858a39fad30c46aec6a1f81b2d4e56c18ecf7f5cb6d2fe4a32c4b3bb1a6ed64
2025-03-18 12:31:09 +00:00
stephan
a49265b717 General updates to autosetup/README.md.
FossilOrigin-Name: be8ad5cf579662c54b7e7bc492d8ca03b1f9032c5dad9a6b20590ca1ac00840b
2025-03-18 11:36:15 +00:00
stephan
17df9cd909 Update the docs in tool/mkccode.tcl to reflect that it's more generic than it was when the docs were written. Change the shebang line to use /bin/env tclsh instead of a hard-coded tclsh path.
FossilOrigin-Name: 9300f7f42dfd143f77fd51aa9e080099540854d36b6997ab1a16be7d77f78d8e
2025-03-18 10:28:56 +00:00
drh
7b99cd6063 Prevent integer overflow when parsing NEAR queries in FTS5.
FossilOrigin-Name: 1a5283d7dab210badb8a33eac29f44dc8c1c210ffb5ef84f43e348170aa406a6
2025-03-17 15:13:47 +00:00
stephan
1774ec3ad0 Add support for the --with-wasi-sdk configure flag to the autoconf build.
FossilOrigin-Name: 44880fa3f0748604ef50b942c28390e041138759efea1d076dfcaa1da48970cb
2025-03-17 14:59:55 +00:00
stephan
d176ef5881 Fix a long-standing filename digest computation bug in the OPFS SAHPool VFS which caused all VFS-stored filenames to have a digest value of 0. See [/forumpost/042d53c928382021] and for full details.
FossilOrigin-Name: 493cbe74504e8eb1ca8f2edf49fdab6bebc7fe36ffab06932a4b8c5a4eea86cd
2025-03-16 14:05:42 +00:00
stephan
ab68965794 Add --asan-fsanitize=... configure flag to the canonical build to optionally set -fsantize flags for the fuzzcheck-asan tool. Teach proj-check-fsanitiz to fail for flags which the compiler emits any warning for, for reasons described in its comments.
FossilOrigin-Name: 013730e9b92af39cb7fd2871df9b4bc81b8990f918892bd79370704421672da0
2025-03-16 13:09:21 +00:00
stephan
539442300c Configure-internal doc cleanups. No functional changes.
FossilOrigin-Name: be3a2e631100b711996b9524a54fc604966513a62d83fc916270a6226da7adab
2025-03-16 12:27:21 +00:00
stephan
bafddb17d7 Consolidate some much-duplicated run-fuzzcheck recipe code in main.mk.
FossilOrigin-Name: c0d9b9fad3a2f23941927f1be2abded3bde2f2b04f7a5f3cc0a54a978020ebaa
2025-03-16 11:24:32 +00:00
drh
fc293f7c0e Rework the run-fuzzcheck makefile target so that it better exploit parallelism.
Test case "<tt>make -j16 run-fuzzcheck FUZZDB=20250222.db</tt>"
went from 596 seconds down to 107 seconds.

FossilOrigin-Name: 18bda13e197e4b4ec7464b3e70012f71edc05f73d8b14bb48bad452f81c7e185
2025-03-16 00:13:29 +00:00
drh
42db4d043e Enhance the fuzzcheck testing tool with new command-line options:
--brief, and --slice M N.

FossilOrigin-Name: e64132723db0c4f2b9a58932a93beb1671e42006eebc1aeaa8f320e717043051
2025-03-15 23:42:32 +00:00
drh
6e5d59e8ef Make use of the C99 flexible array feature, when available, so that
the -fsanitize=bounds-strict option can be used, when available.
[forum:/forumpost/311dbf9a1cadfae6|Forum thread 311dbf9a1c].

FossilOrigin-Name: d4307a0d43f42e96ec06ad2c1d8d0f5c8ecae759bae8231b1998633089809f49
2025-03-15 19:55:19 +00:00
drh
b7b060401e Work around compilers that do not understand flexible arrays, in the
recovery extension and in the fuzzcheck test module.

FossilOrigin-Name: f101c46cf83e532fd33034abccba496bf395ef10c161af003211614d6581d5eb
2025-03-15 19:00:46 +00:00
drh
7bd72d4abf Fix alignment problems on Linux with -m32 and on Mac PPC.
FossilOrigin-Name: 8a91aeca60548d5cd19add128cf65b9c3815c9103b1ef8ff6bc02711b6d709de
2025-03-15 18:26:27 +00:00
dan
f212fb3362 Speed up parsing of very long fts3 query expressions.
FossilOrigin-Name: 2dd5b6895a3b23c2b9cbf0c1c1e802faf8f2b41ef60819eea25d609755266e64
2025-03-15 16:58:39 +00:00
stephan
9f8a238fb5 Configure-internal build cleanups (no functional changes). Add EXTRA_SRC to the deps of sqlite3.c.
FossilOrigin-Name: 8afb8bbce8654d6f76207fb136e79dc52b6724a71eae82a4c098690a68eb75a1
2025-03-15 15:19:42 +00:00
stephan
8c0e922721 -fsanitize is a CFLAG, not LDFLAG, so rename some vars accordingly and simplify the feature check to not run the linker.
FossilOrigin-Name: 44f2c64ec16f4720dc538be30410863c4138ea4ce41c94521bd7980535261735
2025-03-15 13:50:07 +00:00
stephan
f792cda1a1 For fuzzcheck-asan, dynamically determine the list of -fsanitize flags to use based on configure-time feature tests.
FossilOrigin-Name: b70f9cc81516e57e73960bed4b4d2abdcf3dab0ad4a400ca1aed49365c25231e
2025-03-15 13:36:01 +00:00
drh
d389fd3699 Omit the -fsanitize=bounds-strict for now, as that is still not widely
implemented.  In particular, it does not work on Macs.

FossilOrigin-Name: 3e1c2ac7817e73ea736a39bb0c0ec8212ceedbc89b265b4caf1b53871d27d7c0
2025-03-15 13:11:24 +00:00
drh
0a4f10e6e2 Use flexible arrays in the recovery extension and in the fuzzcheck test program.
Adjust the unix makefile to use -fsanitize=bounds-strict when building
fuzzcheck-asan.

FossilOrigin-Name: 6ea6a6b211fed1a14d7bec1ab1790dec09e2a00423860498a60b760c4a4561fa
2025-03-15 13:04:16 +00:00
drh
bd0e3ed522 Use flexible arrays whereever appropriate in FTS5.
FossilOrigin-Name: 16dfc415b6e98a2acae79a24bb0afd401e60efc27cbdd1603a426fd33e17d427
2025-03-15 12:22:39 +00:00
drh
17abe9e251 Convert the Fts5Sorter.aIdx field to a flexible array.
FossilOrigin-Name: 28ac776a23da2753265a7fe2ee2ebb09964815fc9058e69c08275fc217842edc
2025-03-15 00:11:22 +00:00
drh
502b7a236e Turn Fts5Colset.aiCol into a flexible array.
FossilOrigin-Name: 0c4d9c74741794468adc444908f6024f016738aa2852d3a646f2c28d079d9446
2025-03-14 23:57:53 +00:00
drh
126541f8ac In FTS3, rename the MatchinfoBuffer.aMatchinfo field to aMI, to avoid confusing
it with MatchInfo.aMatchinfo.  Make aMI a flexiable array.

FossilOrigin-Name: bb00b973980d259ca85af84c054501cae78b3a9d33ccffa54d7034235dd8d50d
2025-03-14 23:20:12 +00:00
drh
dbd455a0fd Fix one of two flexible arrays in FTS3.
FossilOrigin-Name: ddfa87c17906ecf7fd5639a87bbfa9a87d17ab688159acd2fd80cc5b6f25f09b
2025-03-14 21:15:11 +00:00
drh
01ef1dfc1f Use flexible arrays for RTREE.
FossilOrigin-Name: 2b41776179c726586e3ff836edcf235938cf02f7c5e33c1d6954b84d4061b8d5
2025-03-14 20:19:49 +00:00
drh
b6e8f65ffe KeyInfo is now an indeterminate size, so we cannot declare a variable of that
type, only a pointer to an instance of that type.

FossilOrigin-Name: 37b687dc2d3b9dc82ed09a9c5b2c00e576b1eebe358a20d18a3da190347b644e
2025-03-14 19:07:11 +00:00
drh
cebf06c798 Make use of the flexible-array feature of C99, when available, to try to
pacify -fsanitize=strict-bounds.  This check-in fixes the core. There is
more yet to do in FTS3, RTREE, and in FTS5.

FossilOrigin-Name: 6fd6b32d06bd6a705e5140cd613af823b8183a6f6a9ceeeedfcf5e8b50821d68
2025-03-14 18:10:02 +00:00
stephan
dae87df198 Fix an internal doc typo reported in [forum:e25e581f917|forum post e25e581f917].
FossilOrigin-Name: fa6f6ccdffc50024624306900efd2538c7415d8bdd0f02835b2e9c05adab3cf1
2025-03-14 12:37:36 +00:00
stephan
5390f95f07 Minor doc corrections for the sahpool-digest fix and merge in current trunk.
FossilOrigin-Name: 500f2e6ec74b4c0e4ac0365ba4e0d81ed6df8dd09dc0f8af65d294c3453f8865
2025-03-14 11:14:52 +00:00
stephan
1560045c32 Cherrypick the [2b582c0097e33] doc addition, which was initially committed to the wrong branch.
FossilOrigin-Name: f786de8d1873cd27b1bf83273a1e100e9d481144674888ccf65974e003a3caad
2025-03-14 09:34:09 +00:00
drh
99e8490705 Fix the generate_series extension for the case where the termination value
is not an even multiple of the step from the start value and there is also
a value=NNN constraint in the WHERE clause.
[forum:/info/bf2dc8e909983511|Forum post bf2dc8e9]

FossilOrigin-Name: 75e72e3b0d0d689d39e00a01dc361dd6ce2649e68d200bf501ddcf04063041b2
2025-03-13 18:51:18 +00:00
drh
62d9d70edd The --echo flag on the CLI also echos dot-commands provided on the command-line.
FossilOrigin-Name: 6ec0c03b954cf705da076d035a1cc2e784233ae28857385379e44a59af6c5ec4
2025-03-12 15:17:13 +00:00
stephan
ff3c451428 Document that sqlite_update_hook() can unset the current hook by passing a NULL callback, to address [forum:652aef4747|forum post 652aef4747].
FossilOrigin-Name: 2b582c0097e3374beb280dfa6b03e0dacb9911da1bceb0dce0468e6b7291e74f
2025-03-12 11:41:12 +00:00
drh
72b5c6db35 Avoid running test cases involving ANSI control characters or Unicode
on Windows in a slave interpreter, as that combination does not work.

FossilOrigin-Name: f6745a7355c62ee64c08e23b795f437dd74add903b55e1255c1d03f9a811170d
2025-03-11 15:46:23 +00:00
drh
a7829ecbdd The substitute "puts" command used by the Windows implementation of
sqlite3_analyzer must invoke fflush() after each line of output.  Otherwise
the output can be truncated when redirected into a file.

FossilOrigin-Name: ba058ce90a2ba9ebc4d8fb289108c04f80fa85da01c0b8bd58855681836ba83d
2025-03-11 12:19:27 +00:00