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

5090 Commits

Author SHA1 Message Date
drh
69da86bf93 Fix harmless compiler warnings in the memstat.c extension. No changes to
the core.

FossilOrigin-Name: 9e903953ba986df98435da40e94fdb645f6f72279552cba63ef50cec1fe3b486
2025-04-02 12:41:16 +00:00
drh
2b918dbb01 Increase the size of a variable in FTS3 to help static analyzers
see that there are no integer overflow problems.

FossilOrigin-Name: a921a4682fba23e1e223c2e3ecebd22ec59321552bcc563c29ce501bfe70fa4e
2025-04-02 10:42:47 +00:00
drh
257e026de9 Merge cygwin and tclsqlite fixes into trunk.
FossilOrigin-Name: 121f4d97f9a855131859d342bc2ade5f8c34ba7732029ae156d02cec7cb6dd85
2025-03-27 23:29:25 +00:00
stephan
5ee946f907 Add an explicit db close to fix a file-is-opened failure in session1.test in cygwin.
FossilOrigin-Name: c6e4e1cf2b70d2e603ea3faabd9cb5fbd9f5497672574283ace8c62984dfbb97
2025-03-27 18:42:51 +00:00
drh
460e4cb686 Rearrange #includes in FTS3 to avoid a harmless compiler warning.
FossilOrigin-Name: c5206cee83a4f1e59bfceda35cdfa528f9b4611eaf306da863ae83e9f93cdeb7
2025-03-27 18:22:11 +00:00
jan.nijtmans
87b90921b6 In Tcl, always use eq/ne for comparing strings, not ==/!=
FossilOrigin-Name: f96a5346e3e890adfdc94a682688c2c15893e50fbaf2a26e5ef39cda8b331ee4
2025-03-27 14:32:57 +00:00
stephan
22d502e33a Merge trunk into cygwin-fixes branch. Add .fossil-settings/binary-glob to squelch warnings about *.db files on Cygwin.
FossilOrigin-Name: a8328b921c5504eceacade417e16e713999eff63978caf3418fd79501590b1cb
2025-03-26 00:02:15 +00:00
dan
e6e453def6 Test that the sqlite3changeset_apply() function is properly appling indirect changes.
FossilOrigin-Name: 1dadea3a79c3edd110b0b32b07287744300958fed31f2da11901a42b16f86669
2025-03-24 19:58:13 +00:00
dan
1b906dd920 Add test cases to session1.test.
FossilOrigin-Name: dda9d7cf319e74de7703bda1eb77e3e7aa7459d6fa1508cc1d62cdfc7985c368
2025-03-24 11:13:18 +00:00
drh
75484481c7 Fix the generate_series() enhancement from check-in [d50b784807333c54]
so that it works even if the number that "value" is being compared against
is a non-integer floating point number.  Bug reported by
[forum:/forumpost/0d5d63257e3ff4f6|forum post 0d5d63257].

FossilOrigin-Name: c113e31b818d16770bec1edc980f6833dfb27c4d74178e66a778fbb5671c3a13
2025-03-22 22:55:33 +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
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
stephan
e435547beb Internal doc touchups in ext/wasm/mkwasmbuilds.c. No functional changes.
FossilOrigin-Name: 47d34260e74912eeae704bff7c4314b893af86ee66dd96a1bc6f450d3e290702
2025-03-18 13:52:53 +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
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
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
dan
f212fb3362 Speed up parsing of very long fts3 query expressions.
FossilOrigin-Name: 2dd5b6895a3b23c2b9cbf0c1c1e802faf8f2b41ef60819eea25d609755266e64
2025-03-15 16:58:39 +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
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
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
stephan
908c0301d1 Merge trunk into the cygwin-fixes branch (which was inadvertently branched too early).
FossilOrigin-Name: a7863b2e2fbea0ea11c494016b99921f70aae09607868aa65af988cbd173b31a
2025-03-06 14:40:45 +00:00
stephan
b6503f1444 Cygwin-centric fixes from Jan Nijtmans.
FossilOrigin-Name: 205979813c7300debb5f1ba270583ef2f08e069d6d01865b5910702889a5c1ed
2025-03-06 13:38:07 +00:00
stephan
47991d973a Various typo fixes reported by Daniel Dumitriu. No functional changes.
FossilOrigin-Name: 37e6ec777445d8ef81acecbb66f86ae78f2ae67ef0bfd3fbd089da51fff35cc9
2025-03-06 09:08:38 +00:00
stephan
ba6510a399 Additional 'array index is signed char' warning cleanups for the shell and its embedded extensions, analog to [44bd44532d].
FossilOrigin-Name: f31042595b8f8a378db9778c9a8223b07ec02cf2f528581ba43bf72b5b03c964
2025-03-06 07:48:45 +00:00
dan
fc9b5d2a95 Have the recover module add "PRAGMA foreign_keys = off" to SQL output. Have the shell tool add ".dbconfig defensive off".
FossilOrigin-Name: dcfe3d3292851aa48a085a2c68623b049e2786c8dc7154ccc78508443973b5a1
2025-03-05 19:39:02 +00:00
dan
c27c61586f Update the recovery extension so that it works with encrypted databases.
FossilOrigin-Name: b0b66f21159b47e1950ca63a01f92fe4f621efb9a2962b310d65fa7ebdbb43b3
2025-03-05 17:26:56 +00:00
stephan
c9cc6a5474 Use SQLITE_EXTRA_INIT_MUTEXED instead of SQLITE_EXTRA_INIT for the SQLITE_WASM_EXTRA_INIT feature, as suggested in [forum:14183b98fc0b1dea|forum post 14183b98fc0b1dea]. This doesn't make a functional difference now - this is in the name of future-proofing against eventual threading support in wasm.
FossilOrigin-Name: 46479c2e30b9676e0fa8da117ba67f673671fb340c9bea38ece19a1b2371a57b
2025-03-01 23:44:11 +00:00
stephan
da5f813878 Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.
FossilOrigin-Name: f50c21484d3cac73589da0376c423de39ae8b842218105786c5aa3726e4dcaed
2025-02-27 21:17:55 +00:00
stephan
69eaadbee3 Merge trunk into the sahpool-digest branch.
FossilOrigin-Name: fc1eeb7d1f2880907b0fe71a8c572dd7cd74a5d65ec0177332976ad2f8c2b216
2025-02-26 03:32:52 +00:00
stephan
d804893762 Fix a bug in mkwasmbuilds.c which caused sqlite3.wasm to get deleted directly after it was built.
FossilOrigin-Name: 1a72d1d13e42f69f02861f8ac3058e69b78d4fd2050ca8c53a1ce016b7e0863d
2025-02-26 03:20:26 +00:00
stephan
d2f7dfa619 More work on the sahpool digest fix. New/fixed versions can read legacy (no digest) files but the reverse is only possible in limited circumstances (when files originated from a legacy version). The burning question is whether the real fix would be to remove this digest check altogether, as it only applies in a very limited context, and the fact that it was broken for some 18 months unnoticed suggests that its value might not be worth the CPU cycles.
FossilOrigin-Name: 0df62b776c68bebb0e187b353b6f29b0a41a29f0a1c8d6728fa6b9f7ce0d13f7
2025-02-26 03:03:08 +00:00
stephan
5d60f47001 Approximately 50 typo fixes, spanning the whole tree, contributed via [forum:006c8fa165083ac3|forum post 006c8fa165083ac3] and individually checked for correctness. Affects only code comments, docs, and a single line of debug output in a test app.
FossilOrigin-Name: af928818a030924060ee0762431dae0f16d53a62f4e1132754d052eb9c621ac2
2025-02-25 20:55:14 +00:00
stephan
9e632f5512 wasm: do not build the (untested/unsupported) node-for-node build by default, to cut build time by about 15%. Adjacent cleanups in mkwasmbuilds.c.
FossilOrigin-Name: e4539ebebd89840b76f5a0626393299100685a38f45546a0bf7a62e4df56f863
2025-02-20 05:39:18 +00:00
stephan
b42310a6b9 wasm makefile docs: make explicit that the node.js-for-node.js builds (as opposed to the node.js-for-browser builds) are both untested and unsupported.
FossilOrigin-Name: e1f184889fef4603d61d306c8c0dc86df616290ccf73dbd871fa27bd99e5e5c9
2025-02-20 04:45:02 +00:00
stephan
a32ea731a0 Add the pause/unpause capability to the opfs-sahpool VFS, as discussed in [forum:fe8cdb8431c|forum thread fe8cdb8431c]. Summary: this gives clients a way to eke some degree of multi-page/tab/Worker concurrency out of this VFS but requires that coordination to be implemented client-side, e.g. via a SharedWorker or WebLocks.
FossilOrigin-Name: b5dbd521951e129b4dec69f191a872500dbf387b34a8479ad58b053ffcccbab9
2025-02-20 04:14:26 +00:00
dan
eb3a069fc8 Have SQLITE_FTS5_ENABLE_TEST_MI builds avoid reading the database schema from
within sqlite3_open().

FossilOrigin-Name: 15dc524fd4113026cc542140c39c1c8f9e052d36946f0c599f282d9ac27efdab
2025-02-18 15:11:30 +00:00
stephan
9ef8399055 Update path on the web server for test/snapshot instances of fiddle.
FossilOrigin-Name: 57caa3136d1bfca06e4f2285734a4977b8d3fa1f75bf87453b975867e9de38fc
2025-02-18 01:16:26 +00:00
drh
7bfa4452a3 Additional changes making it easier to prove that integer overflow does not
occur.  No problems found.

FossilOrigin-Name: e846743a875430a5c51d41f00ac9532214f97d9925e6261113b63580f92369fc
2025-02-17 18:09:24 +00:00
stephan
18780193d5 API naming typo reported in [forum:416f2d8dec|forum post 416f2d8dec]. No functional changes.
FossilOrigin-Name: 0cfb9e234e116741d01b65d0abf18210e495276319fb08ec6e40d3f2e698956d
2025-02-16 13:13:19 +00:00
dan
f3e24d0875 Remove old function declaration accidentally left in sqlite3session.h.
FossilOrigin-Name: 0cfbe349d4b740f3d2be8c714cf679901fc2465db4c64e4c3742da700d82f4e7
2025-02-12 15:31:26 +00:00