1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-20 08:47:46 +03:00

29833 Commits

Author SHA1 Message Date
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
stephan
1fc7844d40 Teach testrunner.tcl to distinguish Cygwin from Windows. This gets it running but then all downstream tests fail, at least in part because of the build target name discrepancies between the platform which requires .exe and those which do not.
FossilOrigin-Name: 2861788e479aea12354f2d34d8e6a2706d193642674ef1f4f852f24c877e0140
2025-03-11 11:24:52 +00:00
drh
642479d1cd Ensure that the TEMP database has been initialized at the beginning of
a call to sqlite3_open_blob() for the TEMP database.  Fix for the issue
reported by [forum:/forumpost/0a556d619b|forum post 0a556d619b].

FossilOrigin-Name: 2cfccdbe08b7b14a6b255f7157ac20d0807327adefcb33fcffeeed14c7603fe1
2025-03-10 22:31:55 +00:00
stephan
e0fa42053f Merge trunk into the cygwin-fixes branch.
FossilOrigin-Name: f3d14433f24f89558e72a9085c950bc72440e9933d6b4ff59d6e603d25e39422
2025-03-10 17:35:00 +00:00
stephan
09eba154b2 Add an explicit db close to test/walsetlk.test to work around an unjustified test failure on Windows when the walsetlk tests are run in the same invocation of testfixture.exe in Windows.
FossilOrigin-Name: f418de109335cd7cb29d2b587540c163bbaaa7129c662c2908ef67492139b2d7
2025-03-10 17:28:43 +00:00
stephan
b37f8b9714 Patch an unnecessary size_t-to-int conversion which warns on some compilers.
FossilOrigin-Name: 8681dfdb59d3258663ec176daafd7a52446a207db21fbd1a4d151508092dcbc5
2025-03-10 15:35:43 +00:00
stephan
4cd6c0b81b Ensure that the 'clean' target for Makefile.msc cleans up the testdir dir, analog to how the canonical makefile works, as stale files there have been leading to test failures.
FossilOrigin-Name: a591c018558af70e0ddfdd2d4d61905f030bac01df19ac9b204aed09d44517be
2025-03-10 15:27:17 +00:00
stephan
42e5ceb093 Reimplement pathname conversion on Cygwin. MSC test passes/failures are on par with trunk and 'make test' running on cygwin is down to a single failure.
FossilOrigin-Name: 57a4de09149663ac001848773c9dffe53e30f9263e4dacc792a0267401147d25
2025-03-10 15:15:13 +00:00
stephan
05ba11fc95 Tweak [6f24da264cf8d] so that it has no side-effects on autoconf/Makefile.msc.
FossilOrigin-Name: d3d322f122e88ea7d7f086f1c7d3ba8ab5ba7c2899d6d1e18b0b593001f01dcf
2025-03-10 14:10:46 +00:00
drh
eed4e1d2df Disable the [d1ba200234f40b84|count-of-view optimization] if any subquery
is DISTINCT, as the optimization does not work in that case.
Bug reported by [forum/forumpost/a860f5fb2e|forum post a860f5fb2e].

FossilOrigin-Name: d7013b63932b2f5750572ae6bdd259a2b6e6548c20fb9a5559edd22d2f2fc6cb
2025-03-10 10:32:31 +00:00