drh
9c94fcbea8
In the experimental and unsupported amatch.c extension, raise an error
...
if a cost value is out of range even if the rule that the cost applies
to will never be used.
[bugs:/info/2026-07-29T06:30:13Z|Bug 2026-07-29T06:30:13Z]
FossilOrigin-Name: 86b7a62c5ccf41479a9556e705e3c43973a4033c2db42d298050dcfce121ee05
2026-07-29 18:03:45 +00:00
drh
9b6fbaf4ca
Do not allow recursion in extension functions sha1_query() or sha3_query().
...
[bugs:/info/2026-07-29T06:29:33Z|Bug 2026-07-29T06:29:33Z].
FossilOrigin-Name: 4687e04d948b787cee748279b13774ee1389bb179f8762720631a540f5cd9136
2026-07-29 17:36:16 +00:00
drh
a44c884677
Turn redundant loads of the experimental vfsstat.c extension from a
...
stack overflow into a harmless no-op.
[bugs:/info/2026-07-29T06:28:47Z|Bug 2026-07-29T06:28:47Z].
FossilOrigin-Name: add89fba2ffe9da5b0305182c97f8408e0dd7d2c3d81f40e0a84f6f79154c5a3
2026-07-29 17:19:00 +00:00
drh
d14c3f15ff
Turn redundant registrations of the cksumvfs extension from a stack
...
overflow into a harmless no-op.
[gugs:/info/2026-07-29T06:28:31Z|Bug 2026-07-29T06:28:31Z]
FossilOrigin-Name: d6453bc80e6e717813f2f5d4a40548cbc25e83e09c209793cacfddb94a408053
2026-07-29 17:08:52 +00:00
dan
88a179e9eb
Return an empty string if an fts3 snippet() is requested for an out-of-range column index. Bug [bugs:/info/2026-07-29T06:30:35Z | 2026-07-29T06:30:35Z].
...
FossilOrigin-Name: 5c645d5e241f6055c8dd45936a52245ecb2476a6603e06b793912bf897e42239
2026-07-29 16:55:36 +00:00
drh
37275bc277
Block deep recursion in test extension functions test_eval() and eval().
...
Does not affect deliverable code.
[bugs:/info/2026-07-29T06:29:11Z|Bug 2026-07-29T06:29:11Z]
FossilOrigin-Name: 3e99c27fe3db76a146bb4a77c08007e6c4598cda7975dd40d4f7f14c3bd914b5
2026-07-29 13:00:37 +00:00
stephan
77ef17960c
Add long-missing sqlite3_backup bindings to JS/WASM, in response to [forum:dc96ed27b3fdb202|forum thread dc96ed27b3]. This does not yet include tests.
...
FossilOrigin-Name: 90e599757416059044c643121631fc56eab2b6eea76d04b2d99eae49b8adef44
2026-07-29 12:51:52 +00:00
drh
d565536731
Improved comments clarifying operation of the ext/misc/noop.c testing
...
extension.
[bugs:/info/2026-07-29T06:31:22Z|Bug 2026-07-29T06:31:22Z].
FossilOrigin-Name: c9bb594059c5e7ad6fd04f1b8087910833d89f05ddf1b6eea6bd5590c851c790
2026-07-29 11:28:07 +00:00
drh
67cfb59334
Fix the sha1() extension function so that it interprets zero-length
...
BLOBs as BLOBs and not as NULL. Also add a few test cases for that
extension function, which was previously completely untested.
[bugs:/info/2026-07-29T06:31:41Z|Bug 2026-07-29T06:31:41Z].
FossilOrigin-Name: 978d12de384fef985d0363633566304bb20f452dfe8ceb836ca1d353a135f30a
2026-07-29 10:28:44 +00:00
drh
d9305a65c8
Add reference counting to the EditDist3Config object in the spellfix
...
extension. This should prevent possible UAF following OOM as
described by [bugs:/info/2026-07-26T07:55:13Z|Bug 2026-07-26T07:55:13Z].
FossilOrigin-Name: 37364eaecc148133de4e5b329e10c70922e65829244b4abd448c0adb5ca40877
2026-07-26 18:45:54 +00:00
stephan
53d99267bb
Add a JS test for [d5d8ee76d3] resp. [012550c089].
...
FossilOrigin-Name: f28494eeafc37320932a932044ecd66b6900632a1eccd45a9f8bed653cee3466
2026-07-26 16:05:47 +00:00
stephan
76a15f2b95
Factor an extranous local var out of the previous check-in.
...
FossilOrigin-Name: 422b4303dae214e23a53b181e5cdf7888d159da33e1675fd8317cbe66834b78e
2026-07-26 15:56:06 +00:00
stephan
bdde38eb0c
Remove some extraneous I/O in kvvfs. Reported off-list by Jure Rotar.
...
FossilOrigin-Name: ce09bfe406728312761a9f227b3f82cbee7cc176dddac1a499e10480a7ee2c1c
2026-07-26 15:47:56 +00:00
stephan
fdb802581c
Fix a JS container API misuse in sqlite3.oo1.DB.close() which caused its fallback cleanup of still-open statements to not actually do so. Reported off-list by Jure Rotar.
...
FossilOrigin-Name: d5d8ee76d337820f765cea7b279f2e5644a24d4f0e76d53b35b4d52277edb767
2026-07-26 15:39:18 +00:00
stephan
70c687859e
Fix an error handling case in #base64.
...
FossilOrigin-Name: f8c408f66257881937ed18b77e274f71dba2d97dd44546372fa0b0a9629efbd2
2026-07-22 14:16:33 +00:00
stephan
7d1796e488
Add (#base64 -f filename) support to the preprocessor and slightly simplify the wasm embedding with it. Fix a bug in the preprocessor's @token@ call expansion when the length of the configured @ is greater than 1 byte.
...
FossilOrigin-Name: 1e90bedec99054f4856bfb89efc4d676486504db67bd1304c45d14c638ddfc7e
2026-07-22 14:06:41 +00:00
stephan
6ad0fcac94
Random makefile doc updates. No functional changes.
...
FossilOrigin-Name: 014ef252c7ea404340a5af52a6615cdddd969a4dbf30712fda538550240bb9fc
2026-07-21 20:56:55 +00:00
stephan
04ba5ef30b
Random minor doc and formatting cleanups in the wasm makefile generator.
...
FossilOrigin-Name: a24064919bcc187d5a4d9fa67cb1810fc4e7b9c92596fd2c8e6b0a66bc37e4b3
2026-07-21 20:18:16 +00:00
stephan
adf52c4401
Restructure an errant goto which only accidentally never broke anything. Add some debug output to mkwasmbuilds.c.
...
FossilOrigin-Name: 0ca4e748e1682046f2e060876bcf7e8d249aa5611d939d32dc1365d3bcf12b48
2026-07-21 19:12:38 +00:00
stephan
add85ddbb3
Document the origin of the input size limit for #base64. No functional changes.
...
FossilOrigin-Name: 696988aac30797139060eb2718fcfda0363f1fa73df1187ea56956681d577411
2026-07-21 16:43:36 +00:00
stephan
6f1c5685db
Simplify the previous checkin by removing an extraneous local var.
...
FossilOrigin-Name: 6382d8336e2891c556456a340daecff81766980a27071e1d5bda6262ffba6f26
2026-07-21 16:29:34 +00:00
stephan
5b04866b72
Fix the corner case of feeding #base64 empty input.
...
FossilOrigin-Name: 999d20197143d884158341ac36e33bc1eb8e3484228eaf532818add927c30228
2026-07-21 16:23:21 +00:00
stephan
093ca6b1af
Consolidate a duplicated code block and ensure that the new filtering of the final JS files makes them read/write so that rebuilds without a clean between them work.
...
FossilOrigin-Name: 8b013184e42dbd7cd47c07bbb1edbb1f088dfb4efe540bfbc52a2e3c472c7b2d
2026-07-21 16:12:06 +00:00
stephan
1f2bc0ea64
Add support for (make base64.wasm=1), which embeds sqlite3.wasm into its corresponding JS file as base64. A very expensive calculator which was fed the resulting file sizes assures me that the two-file approach is, in the aggregate, more efficient both in terms of overall network bandwidth (+~20% bigger for base64) and client-side memory usage (streaming vs non-streaming wasm compilation), so we'll shelve this as an interesting experiment or maybe for use by custom builds.
...
FossilOrigin-Name: a167aee75198ff08b20b448fecd3267ed4a70af2472c02605318a5613f446fc6
2026-07-21 16:04:10 +00:00
stephan
bee0db8c60
This embeds sqlite3.wasm into sqlite3.js/mjs as base64 but is applied globally - it still needs to be made configurable.
...
FossilOrigin-Name: 0467a0f826b5b7bb65d9c74df80c7443f01824c1cc8184417849a74791f491b7
2026-07-21 13:28:52 +00:00
stephan
379e111bff
An initial attempt at embedding sqlite3.wasm into sqlite3.js using base64. This produces a chicken-egg situation in the build because the input file where the blob belongs is injested by emscripten (which generates the wasm file from which that blob is to be generated), so it does not work as-is but is being set aside for later. We'll need to add a second preprocessing step which uses a different #directive delimiter to keep it hidden inside the first pass, then squeeze the wasm file in through there.
...
FossilOrigin-Name: 538199cf62f07a2fe7ee5775c9f01aff1644d638bc0916cf631d61376462b5cb
2026-07-21 12:57:48 +00:00
stephan
b524d66cd2
Latest upstream ext/wasm/libcmpp.c, primarily to make it filcc-legal (only the final chunk in the diff - the rest is minor changes accumulated since the last update).
...
FossilOrigin-Name: 06f3bbc5bddc2e763042f8b487a3deedf47c54b7fa785ba6fd6abd524b4cbe3a
2026-07-21 10:44:28 +00:00
drh
7193cc9c08
Adjust QRF to generate lower-case HTML output with the SQLITE_STYLE_Html
...
style setting.
FossilOrigin-Name: 4be8630e053de91fb03c960d792960e837cf6360d5d24fbae4fc97b8fcaef062
2026-07-14 17:02:47 +00:00
drh
b14505fc54
Remove harmless "breakpoint" command inserted by the previous check-in
...
FossilOrigin-Name: 5a4b0b81de1abf9c1b73f026b416b29b9bdddc7a1b73ae5b9aa02f3dde131731
2026-07-14 14:52:25 +00:00
dan
98da7d71ee
Update some test cases in fts5corrupt3.test and fts5corruptB.test to account for recent updates to database and record corruption detection.
...
FossilOrigin-Name: a48f4cf312b8a1af03b1dc61d8475fc7448fb927e2573fa98882e7b14c065c65
2026-07-14 11:46:07 +00:00
dan
951de300af
Ensure that the "leaf-size" field of an fts5 record is only read from records that are actually leaves and are large enough to contain it. Bug [bugs:/info/2026-07-09T20:15:55Z | 2026-07-09T20:15:55Z].
...
FossilOrigin-Name: fe52900694e045231e91047fbfd82577c7fa347d7352bd048867a9e95299a0d0
2026-07-09 20:56:29 +00:00
drh
3d0c7ce2aa
Change the CLI so that the default "--title" is "always" instead of "on"
...
for some display modes. This check-in also include a fix to "--title always"
for the "markdown" display mode.
FossilOrigin-Name: c3b0fff1b76b8c354b34fef17ff639968698e97234d6ab7af15e0e1a835486e9
2026-07-07 14:53:53 +00:00
drh
cdbb701776
Fix a problem with --rowcount found by Claude in code review.
...
FossilOrigin-Name: bc5fb05aa6e8c819cb2c45ea96538b82b5b9c21058ddf685e84d50b183656578
2026-07-07 13:16:30 +00:00
drh
9c202c32c1
Improved title separator in QRF when using "-title always" on an empty row.
...
Improved comments on the mode matrix in the CLI code. Additional test
cases.
FossilOrigin-Name: a102d28fca6376da670b274d3d733da2c73da9abe3e7128defd04b4015b03a48
2026-07-07 12:24:50 +00:00
drh
dc4cb53863
Show --rowcount for "--style insert". New test cases.
...
FossilOrigin-Name: 386c40e3a9706111542b7f336e82f7bb6e9f43c6056185f9f3bd9aae1159070a
2026-07-07 11:00:10 +00:00
drh
0fe9987880
Continuing work on --rowcount and --title always.
...
FossilOrigin-Name: adeb4fbb86a8a781d7efb0eecb9c84ce605d0bd45f63992bf2ecd60765a60d2c
2026-07-07 00:23:38 +00:00
drh
8e409df984
Add new option "bRowCount" to QRF. Add QRF_Always as a possibility for
...
bTitles. Use these feature to enhance ".mode psql" to be a better
approximation of what psql actually does.
FossilOrigin-Name: 600c6b464050078b38cc688668148f684243e7c5f08d0aae4d5f72aa6f985482
2026-07-06 19:24:15 +00:00
drh
1b2a4a37b0
Reduce divergence between ext/misc/fossildelta.c,
...
the delta code in ext/rbu/sqlite3rbu.c, and Fossil itself.
FossilOrigin-Name: 7f49a7a90eda01753c0dff65197bd7bc48a751e24a46919d30af6e2baf0788fc
2026-07-06 16:26:30 +00:00
dan
2f7c4bbc19
Fix an OOB read caused by passing an out-of-range phrase number to fts5 auxiliary API xPhraseFirstColumn() in detail=columns mode.
...
FossilOrigin-Name: aeb85fdfca0a546cfd3ef26efd58b9ffc8d5fda15562558d8479dee55321596f
2026-07-06 16:04:51 +00:00
dan
f05795b96d
Fix a problem in the fossil-delta implementation within RBU causing it to reject some well-formed delta records. Bug [bugs:/info/2026-07-06T13:01:22Z | 2026-07-06T13:01:22Z].
...
FossilOrigin-Name: 0bfba3824f3d4c136db8479c97bd789fa0df7c86ba95bd0f011c569004be2166
2026-07-06 15:13:52 +00:00
dan
70ca21fa46
Fix another buffer overread in RBU that could occur when processing an RBU database with corrupt rbu_control fields. Bug [bugs:/info/2026-07-06T13:01:41Z | 2026-07-06T13:01:41Z].
...
FossilOrigin-Name: 46c2476b1074fb56c54068dcc04cac5a3b9da3a25bc0d3b95c00439e63d6ec43
2026-07-06 14:37:08 +00:00
dan
108288ae7f
Fix an OOB read that could occur in RBU when using a state db with corrupt contents. Bug [bugs:/info/2026-07-06T13:02:00Z | 2026-07-06T13:02:00Z].
...
FossilOrigin-Name: 9e54159f9a839f7fae3dee348fab862dc4bbe36ab866d0b3927f05fd10b1414a
2026-07-06 14:10:43 +00:00
drh
b113e89537
Avoid a (harmless) 1-byte OOB read due to malformed inputs in the
...
normalize.c extension.
[bugs:/info/2026-07-06T13:02:37Z|Bug 2026-07-06T13:02:37Z]
FossilOrigin-Name: b1d7123bc619e3cb9dffa8dd52ba31cc18329b14557d8f2d9e547b729016548c
2026-07-06 13:43:42 +00:00
dan
711af3d328
Return an error if a patchset is passed to sqlite3rebaser_configure(). This was causing a buffer overread.
...
FossilOrigin-Name: 887a29a8373bc3a5405df2288840c4918c045560a3a1de5303a4984eb4b40b50
2026-07-06 11:58:21 +00:00
drh
e9551eb2a3
In the strdup.c expension, do not invoke memcpy() with a NULL pointer
...
even if the count is zero.
FossilOrigin-Name: c56da4bba175cac55ea3f159520a583a8e4739dae77365ffe19e9ffcc5841804
2026-07-06 11:34:46 +00:00
dan
e7738a97c9
Avoid a buffer overread in the session module when an UPDATE change is rebased against a baseline that records fewer columns than the UPDATE. Bug [bugs:/info/2026-07-05T13:57:01Z | 2026-07-05T13:57:01Z].
...
FossilOrigin-Name: ea26bf3cd7fb1116a8a25e767c54a49ca153c29e243b68e523d79120c5832b1d
2026-07-06 08:36:48 +00:00
drh
2497b685b2
Properly handle errors from the readlink() system call in the
...
fileio.c extension.
[bugs:/info/2026-07-05T12:06:32Z|Bug 2026-07-05T12:06:32Z]
FossilOrigin-Name: 85effd2ad321fb7f02b42e200ad2ba27323b0e866fa3412a56db32ab8e048df5
2026-07-05 19:18:33 +00:00
drh
bfad7140ac
Fix the parse_create_index() SQL function created by the incremental
...
integrity_check extension so that it works for widely correct CREATE INDEX
statements.
[bugs:/info/2026-07-05T12:00:57Z|Bug 2026-07-05T12:00:57Z].
Also fix the extension so that it removes the parse_create_index() function.
Add the sqlite3_intck_register() API function so that the
parse_create_index() function can be more easily tested.
FossilOrigin-Name: bd28985523b02875b1045652fe29757e5d5519f48e6109ffebc99212314ab69c
2026-07-05 18:28:35 +00:00
drh
0c3a9d3b0c
Add the strdup() SQL function extension for use in testing.
...
FossilOrigin-Name: 521a7cf8443d914ae0486aa8a91924ed35a1d5b88082acbe513cef216408c97e
2026-07-04 15:09:52 +00:00
drh
2f13a51628
Fix possible one-byte OOB read in the fossildelta.c extension.
...
[bugs:/info/2026-07-04T04:53:59Z|Bug 2026-07-04T04:53:59Z]
FossilOrigin-Name: 8001a373d1c91f92639fb34fca18f9667f1ee92eb6bfa49df06b8cc256385292
2026-07-04 09:22:27 +00:00