Commit Graph

5653 Commits

Author SHA1 Message Date
dan
4b9def1903 Fix further problems with deleting from corrupt fts5 databases in secure-delete mode.
FossilOrigin-Name: f8f89d2e10f06b54acf58a3b0543aef749c3d2b65670d4cc71530dea7997651e
2026-01-16 20:04:04 +00:00
dan
90942efd21 Fix an error in new test script fts5corrupt9.test.
FossilOrigin-Name: a5918835e172fd4eda6511d297b61368952d617eac33950b67368671e3bd40fe
2026-01-15 17:17:00 +00:00
dan
bcc496e526 Add extra test for handling corrupt delta records in rbu.
FossilOrigin-Name: 7dba05100fbef3614e6ee8eff39dab7a4713550e5672c2f6cf8f4b490a96aa25
2026-01-15 17:00:58 +00:00
dan
ce83fd80ad Fix a buffer overrun that could occur when deleting rows in secure-delete mode from a strategically corrupted fts5 database.
FossilOrigin-Name: 1e66d6e3276cc6aab4d002a1df13b044e61f3946322bf97cac06d98dbb68e433
2026-01-15 16:09:35 +00:00
dan
abdfd3312a Update sessions module so that it takes the db mutex before, instead of just after, opening a savepoint when generating a changeset.
FossilOrigin-Name: 41bbd13d737d2b7879d906b6fa76df42c6ee142f1a7acdafd26da0063bc90baf
2026-01-14 17:52:27 +00:00
drh
35b9709d46 Fix integer overflow problems and error reporting memory leaks in
the zipfile extension.
[forum:/forumpost/2026-01-13T00:09:06Z|Forum post 2026-01-13T00:09:06Z].

FossilOrigin-Name: 8e656a483557bc5385219d560b9155c232e7dc9d62642249abc879fb37bacd2a
2026-01-13 02:35:19 +00:00
dan
4b12a38ffb Fix an OOB read in the sessions module that could occur while processing a corrupt changeset.
FossilOrigin-Name: 3c46295487f089a891f566cae43b67ce97794bb60645d5806285600e05eff456
2026-01-12 20:16:04 +00:00
drh
9a341c1edb Avoid unsigned integer overflow in the delta_apply() extension function.
Not part of any standard deliverable.  
[forum:/forumpost/d41879b367c7f7ec|Forum thread d41879b367c7f7ec].

FossilOrigin-Name: b354dd12c25c820c04b08e0be4ba8c095fc648dfb4b71345aacce50a17fd269a
2026-01-12 19:56:00 +00:00
dan
9f78d22870 Fix an infinite loop in the sessions module that could occur when processing a corrupt changeset blob.
FossilOrigin-Name: d98653bdbc9781970f1c5d66f69c81c93ad14549223ceae02e74c1b99ab05377
2026-01-12 19:13:09 +00:00
stephan
bc2101b44e wasm: filter the custom Module.instantiateWasm() out of node builds, per request from the npm project.
FossilOrigin-Name: b57a8215f4259a0aae188b7ee5060f8ff48919303179aae80b58b43ed3b991f5
2026-01-12 15:43:18 +00:00
drh
6444f694a6 Improved documentation (in the header comment) for tmstmpvfs.c.
FossilOrigin-Name: 70b1da718c176b8eb154fe087af4352eb6f55c9c0d1f09fc625d073d9f8075f4
2026-01-12 14:45:55 +00:00
stephan
428c2656ff Add the @preserve tag to the standalone file sqlite3-opfs-async-proxy.js.
FossilOrigin-Name: 334b2be57e752672cfcaf764e3bc73e3d00a0a5174e8ef7c3d83c26136bccaf5
2026-01-11 16:21:32 +00:00
stephan
9ab2a2af1b wasm: add @preserve tags to two comment blocks (license header and build version info) so that the npm tools know to retain those comments when minifying.
FossilOrigin-Name: 596f1ea084e78843aa668d3a197690929848d474e55ff7b1444f78bd11f116b1
2026-01-11 14:14:16 +00:00
stephan
aef151ada7 Add the 'npm' ext/wasm makefile target to create npm-bundle.zip for use by the downstream npm package. This target is intended to become their path for pulling npm-relevant deliverables, rather than the canonical downloads, and they have our/my commitment not to break it without involving them first.
FossilOrigin-Name: a4752c18a85bee0cef61ee5ac7911661c1894fb861412c957692069195a001a5
2026-01-09 19:44:31 +00:00
stephan
0ad6c6c440 Fix the wasm snapshot build's zipfile name to include '-snapshot' and correct the update-docs target for recent build refactoring.
FossilOrigin-Name: 0f53dbf06010f66ba23941ee4269d507efa370f1a8cc0099d274d8baadebdb46
2026-01-09 18:42:27 +00:00
drh
4b93124b6b Fix potential OOB read on the undocumented test function rtreenode() that
is part of the RTREE extension, as described in
[forum:/forumpost/2026-01-08T23:32:19Z|forum post 2026-01-08T23:32:19Z].
The problem is almost certainly harmless since any memory allocation will
be a multiple of 8 bytes, and once the input buffer size gets rounded up to
the next multiple of 8 bytes, the access will still be within bounds.
Nevertheless, it still needs to be fixed.

FossilOrigin-Name: 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516
2026-01-09 00:41:35 +00:00
drh
c34d561940 Change the name of the log file for tmstmpvfs.c to be an ISO8601 date/time,
for improved readability and situational awareness.

FossilOrigin-Name: 66018b85a92db2f3b6b15f7c5c0d54bac890f8e50a1839c08857507c39ec4af7
2026-01-08 18:55:49 +00:00
stephan
22c99e01ff Fix the sqlite3-worker1.mjs (ESM, non-bundler) build and have demo-worker1-promiser use that file rather than the vanilla one, as a test case. Delete the global symbol installed by that file in ESM and bundler builds, as it's unnecessary there. The first change should resolve [https://github.com/sqlite/sqlite-wasm/issues/123|downstream sqlite-wasm/issues/123], with thanks to Jure Rotar for his help.
FossilOrigin-Name: 11f5ab0dd8efc68112c3dc5ea0ed486c32bcdb9fde85352180f40a77c6354cac
2026-01-08 18:15:23 +00:00
drh
5df3efe6f4 Fix an off-by-one error in the page number of ELOG_CKPT_PAGE log
messages in tmstmpvfs.c

FossilOrigin-Name: 6fafd010de2d9820f77ee6d2a5f0a7ab1260872d09e95b6932c959ef017aaa77
2026-01-08 17:52:42 +00:00
drh
403c153dfa Minor bug fixes in tmstmpvfs.c, showdb.c, and showtmlog.c.
FossilOrigin-Name: 1fee8265f7eab649ee8b28456c37d95198f5cde54e905154e3eccc0b328ece9a
2026-01-08 15:25:04 +00:00
stephan
784bceae33 Remove an obsolete '32-bit' label from tester1-worker.
FossilOrigin-Name: e14d9a980351a8d5e935e6991ea02a1c40c9ea8f0ad0fadcabe07d575a9b289c
2026-01-08 15:06:28 +00:00
stephan
92730d21ff Fix the --size X flag for speedtest1.html when X=0 and force the job size to 5 for kvvfs so that it doesn't block the main thread for too awful long.
FossilOrigin-Name: e2634e500cce44650ad5dd95b722b993b1f999b9f8b2396ab15154e67cb065c7
2026-01-08 15:03:00 +00:00
drh
c0420cd8e4 Add the showtmlog utility for decoding the tmstmpvfs log files.
Fix tmstmpvfs so that it records timestamps in milliseconds since the
Unix epoch, not in JDN milliseconds.

FossilOrigin-Name: 762d3cbf06218f1010425a98a71ebf7623b84b45a90e6419b7dec7f10ad0c5a5
2026-01-08 12:22:50 +00:00
drh
8a2be4b739 Add the tmstmpvfs.c extension to trunk. It is not a part of any deliverable
and can easily be removed later, if found to not be desirable.

FossilOrigin-Name: 869f306592a86d2a78f00266c615f033cd2318a7bff0a97b3dcdd3348d99fc66
2026-01-08 00:41:12 +00:00
drh
ef5d9952eb Fix the static build.
FossilOrigin-Name: 4e1a1b6aeffaa5b8c11e165803c6d33becabd1f646f39e4309dfba6892fd4bd6
2026-01-07 19:06:11 +00:00
drh
0b5f8766fd Improvements to logging. Better log-file names. Log files are in a
subdirectory named after the database.  Only connections that write to
the database create logs.  Better documentation in the header comment.

FossilOrigin-Name: 5b1cf0fe73ba1a40fe4cd8f5f6e8ee5b471f96b60aff52c03c045ad6514c363a
2026-01-07 18:45:23 +00:00
drh
03c0ac435e Enhance QRF so that it terminates more quickly if it encounters an OOM
or oversize string error, and fix it so that it reports such errors.

FossilOrigin-Name: ebedeb6169cc3bc3708130d4061065af600a8851e896fc3eeaf33c8c83fe3b95
2026-01-07 16:19:18 +00:00
drh
8fe0385661 Documentation tweaks.
FossilOrigin-Name: b10b0aa7658a04b9354ca09a2dcb807eecd9421451537f3230ba5f47269ec5c1
2026-01-06 21:18:42 +00:00
drh
d3c9cce43c Enhance the timestamp-vfs prototype so that it also keeps an event log.
FossilOrigin-Name: f087c6c0cdd542ec24b4668fff9cb434f46caf554f8856a49fd062ab3f72014e
2026-01-06 20:51:06 +00:00
dan
55f258bd27 Update the regexp extension so that the "-" character may be escaped with a backslash. Forum post [forum:c5e7358f82 | c5e7358f82].
FossilOrigin-Name: 80013129361fb81ce5db1f6390cad640c2cb547e5ba16724dfb55d0aceecdf6d
2026-01-05 18:29:07 +00:00
drh
bb4428e605 Add the experimental tmstmpvfs.c extension that adds a timestamp and other
debugging information on each page of a database as that page is written,
if the database is configured for exactly 16 bytes of reserve space.

FossilOrigin-Name: 703e593dfc92676a2d44c67ca8282a78a1943b9c1e3f2447c0a9917d70a383c4
2026-01-05 17:28:33 +00:00
drh
02e38b4d21 In the (completely unused, as far as I know) btreeinfo.c extension (not
a part of any standard build) do a better job of detecting corrupt database
files and provide better error messages when corruption is detected.
[forum:/forumpost/e66a458339|Forum post e66a458339].

FossilOrigin-Name: 326d29ac7ecd933d6fca80d3d538783ed46939e7bc6e3aa60ded4b619aa73730
2025-12-31 19:45:45 +00:00
drh
6789770822 Use 64-bit integers to track memory allocation sizes in the CSV extension.
[forum:/forumpost/e66a458339|Forum post e66a458339].

FossilOrigin-Name: f293a2b3ffcfe20fcda954bd31e88bbfcba18d007e9b5f29a473983f6030f2ce
2025-12-31 18:30:45 +00:00
drh
f8bd7df996 Use sqlite3_malloc64() in all places in the compress.c extension to avoid
integer overflow.
[forum:/forumpost/2025-12-31T01:04:00z|Forum post 2025-12-31T01:04:00z].

FossilOrigin-Name: 7ceaf1f0c3d9b96d2224ce6526fb3092b9e1673573e3d7dd898b2a135e23027d
2025-12-31 01:19:51 +00:00
drh
03380a55a5 Fix a typo in [0819fe670f9ceec7] that lead to incomplete protection against
buffer overflow in the zipfile extension.
[forum:/forumpost/2025-12-30T23:57:19z|Forum post 2025-12-30T23:57:19z]

FossilOrigin-Name: a6abbadacbb88c1ddcc236b40fb34eddf3bb0891189bd00a5af8d34b42871967
2025-12-31 01:01:14 +00:00
dan
01f2907d48 Fix the change on this branch so that it works with amalgamation builds.
FossilOrigin-Name: 7f0b9e7a8bba1b73ef16257e72a055ea84fb10eb5cf0e6431fca81b2f040c5ee
2025-12-30 11:33:30 +00:00
dan
6e92494955 Avoid signed integer overflow when an fts5 'merge' command is passed -2147483648 as a parameter.
FossilOrigin-Name: 4c5d18d7f5bdcf95efdf96062c7434d5d10584a1fdfd65b18d331b8aae42e26a
2025-12-30 11:19:27 +00:00
dan
add73c831b Add the SQLITE_PREPARE_FROM_DDL flag to sqlite3_prepare_v3(). Use this to prevent fts3/4 tables in non-trusted schemas from calling unsafe SQL functions.
FossilOrigin-Name: 26f39ac806a5582fab1497e38a4ce68dad2b79df8c8aade43c4e21eed7576931
2025-12-22 15:22:02 +00:00
drh
3b81f93532 Fix a harmless signed integer overflow warning in the ieee754() extension
function.

FossilOrigin-Name: f43d3339c1f06aabcb8e678ed4b91a490cfd0bc880c642ce9c1138c7e08cb360
2025-12-22 12:00:57 +00:00
drh
28ec7be607 Stricter enforcement of the LIKE_PATTERN_LENGTH for the regexp extension.
FossilOrigin-Name: c94b1e9c5674f7d0ad75d91085262f38cba6036979e8a0f9d39edc7db841915f
2025-12-16 13:13:21 +00:00
drh
97601244e2 Enhance the vtablog extension so that it shows the value of
sqlite3_vtab_distinct() in xBestIndex, and so that provides the new
consume_order_by option that can cause xBestIndex to set the
orderByConsumed flag.

FossilOrigin-Name: b158fe929929ae209f2603b11a2c4f44ad9147f6b2ce09a10ec1f92429402631
2025-12-15 17:32:56 +00:00
drh
22546e1d7e Clarify the affect of nCharLimit, nLineLimit, and nTitleLimit on the
xRender output from QRF.

FossilOrigin-Name: 881534858de8bccffca53e7256a725378a98a354e792374d972b120880c2ae78
2025-12-15 13:58:41 +00:00
drh
63f1fb40be Fix an inaccuracy in the qrfRelaxable() routine in QRF when the input is
an empty string.

FossilOrigin-Name: eb8a519571f7d35b81cbdbe668da45b33e5505d9a038305129df7ba2c16fd3b0
2025-12-12 10:21:52 +00:00
drh
c2cd606f8a Prevent a malicious delta from causing an integer overflow in the
fossildelta extension.  This code is not used in the SQLite core.

FossilOrigin-Name: 01409738afc2c0d5bdaa248ffb508aa5f36a66390f6b8e4834734529ee8ed2fa
2025-12-11 23:24:05 +00:00
drh
85fb541ac0 Various improvements to the .mode command of the CLI, and especially to how
it handles the --limits option.

FossilOrigin-Name: f883b854976d2aa679c87edce3b577f38b5fa518f707706320d1ddb38365e2dd
2025-12-10 19:04:49 +00:00
stephan
3262f769ee In fiddle, remove the default .dot-commands it runs, as they do not reflect current shell defaults.
FossilOrigin-Name: 27b6aeda5d70e3480b1448b06277a19395b30a205f3f3bac5ce0e4102e3849ed
2025-12-10 16:20:44 +00:00
drh
1debc25ef8 Test cases and documentation tweaks.
FossilOrigin-Name: cc9e47a205883aedf24b5e85e8e0499567f514780e3e6ec58069a39ea6270133
2025-12-10 15:50:23 +00:00
drh
9bf37cc3eb Add the nTitleLimit option to QRF. Also change "line" style so that it
uses zColumnSep as the divider between the title and the value.

FossilOrigin-Name: d67a299c86ff80ed67857d2546b0edaf852cb23dbfbc15e24793d1c4860a2e50
2025-12-10 15:24:46 +00:00
dan
b4f6c09e60 In fts5, avoid holding an open blob handle after an INSERT/UPDATE/DELETE statement, as this can interfere with sqlite3_interrupt(). Forum post [forum:/forumpost/95413eb410 | 95413eb410].
FossilOrigin-Name: f88e1d03573f394fc7caf60704c96152717b3fe8be4eef0caeb64737054f0fd2
2025-12-09 13:41:01 +00:00
stephan
567dcbb5db Update the added-in-version stamp to some kvvfs JS APIs.
FossilOrigin-Name: 939275c6c574a3354e0626164aab1a005998f811c53a66b078249d6b2fcbd68e
2025-12-08 13:11:17 +00:00