1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-25 09:59:22 +03:00
Commit Graph

6146 Commits

Author SHA1 Message Date
drh
17e0414503 In the (test and debug use only) qpvtab extension, terminate each string
at the first 0x00 character.
[bugs:/info/2026-08-19T02:29:00Z|Bug 2026-08-19T02:29:00Z].

FossilOrigin-Name: 15192e7a4f6b08dc267b7215e1a126a5e6664e988ad68195195ab164cb63e90e
2026-08-19 15:06:04 +00:00
drh
93f6407070 Detect and report FTS5 index corruption early enough to prevent CPU stack
overflow.
[bugs:/info/2026-08-19T01:42:02Z|Bug 2026-08-19T01:42:02Z].

FossilOrigin-Name: 663aa876b54ddf477bc31e286e2101726bc637fe4f4570fd3b47abc4dc9ba713
2026-08-19 14:27:45 +00:00
drh
55bf04a530 Fix the (test and debug use only) vtablog.c extension so that it avoids
NULL pointer dereferences following an OOM fault.
[bugs:/info/2026-08-19T02:38:14Z|Bug 2026-08-19T02:38:14Z].

FossilOrigin-Name: 33296ed1d6cf6ebd7ff6638b20afaad2b0ffd7ed997a70450354034a74e7f643
2026-08-19 13:01:34 +00:00
dan
7fa8cff00c Fix a buffer overread in the fts5vocab virtual table when processing "term < 123" constraints. Problem recently introduced by [db05b203f4].
FossilOrigin-Name: 08e5a730d4ccfba16e961550a232512a956f0f2f9116a2e59e4a2124c3277915
2026-08-18 15:06:31 +00:00
drh
048112def6 The geopoly_regular() SQL function now returns NULL if the radius argument
is too large (+1.0e+300 or larger).
[bugs:/info/2026-08-18T09:12:02Z|Bug 2026-08-18T09:12:02Z]

FossilOrigin-Name: 15da75f10429e8831793325926b8d6ea175aa26773e6fbce3042b5a22c34f772
2026-08-18 14:15:25 +00:00
drh
9ac0c79e11 Use a typecast to fix a possible integer overflow in the
(unsupported) ext/misc/compress.c extension.
[bugs:/info/2026-08-18T09:33:57Z|Bug 2026-08-18T09:33:57Z].

FossilOrigin-Name: d0f1f683b94f90ba111509ec1c108a73388579c870aa740379b28cbb00a2827b
2026-08-18 10:33:46 +00:00
dan
5271f86cfa Declare fts5 structure records corrupt if they contain a page number greater than 0x7FFFFF00. Report [bugs:/info/2026-08-17T20:07:33Z | 2026-08-17T20:07:33Z].
FossilOrigin-Name: c97a940ceb4c21adc68123e084c8b8b688bcd309579a82951b2e160dc7bacf44
2026-08-17 21:26:44 +00:00
dan
a87bd2471a Avoid a problem causing a use-after-free in the fts3 snippet() function. Report [bugs:/info/2026-08-17T09:18:24Z | 2026-08-17T09:18:24Z].
FossilOrigin-Name: e4635c41536a0b3620780c3f1c872de33121370bafb608fce9fe7e3113e2ae01
2026-08-17 13:55:38 +00:00
dan
0085ea1443 Have the fts5term and fts3aux virtual table modules only process constraints on the term column that use binary collation. Report [bugs:/info/2026-08-17T10:17:15Z | 2026-08-17T10:17:15Z].
FossilOrigin-Name: f26099b7fad1eab2791b574c9371021d4f05fbf824141e77cdff921a2819866a
2026-08-17 11:52:13 +00:00
dan
64459c87cc Avoid a buffer overrun when processing a strategically corrupted changeset. Report [bugs:/info/2026-08-16T10:15:25Z | 2026-08-16T10:15:25Z].
FossilOrigin-Name: 3f57024aecea0f3b565ed823cf94b085031c481fd6323c1f2e4319a53500864f
2026-08-17 11:31:59 +00:00
dan
f17a2ee06b Fix the fts5vocab virtual table so that columns always behave as if they have blob affinity. Report [bugs:/info/2026-08-15T07:03:55Z | 2026-08-15T07:03:55Z].
FossilOrigin-Name: db05b203f47e6ed0792ac011b18e0da98275e900407436798ca28d5f7dd2e094
2026-08-15 14:24:18 +00:00
drh
3d18207a6f Fix typos. Turn off -fpfmt and -ifmt using "auto" instead of "default".
FossilOrigin-Name: 530b55da56326f4816d43893d05f57b10541605a9508b0b37c46df21ecd22b76
2026-08-15 12:22:31 +00:00
drh
c799c15dbe Refactor "realfmt"&rarr;"fpfmt" and "intfmt"&rarr;"ifmt".
FossilOrigin-Name: 17277813d101187d85755b7bad3f1c95380335021e13ee368be0add0c8c346b3
2026-08-15 10:10:17 +00:00
drh
753df3d91a Remove redundant offsetof definition from qrf.c.
FossilOrigin-Name: 5d230cafc6abf48dd623385df106e61fa5bf15a9cff855eb27680aa0f7533c8b
2026-08-14 18:49:42 +00:00
drh
6f23a689c1 We don't actually need to increment the version number of QRF as
version 2 has not yet been released.  Updates to the QRF README.md
file.

FossilOrigin-Name: 3ccc25a06fd247da0ffd273c331ad992334d7e397e32a625dabe155eb37425f3
2026-08-14 16:58:20 +00:00
drh
a6a26aa3f5 Fix an off-by-one bug in --intfmt. Add some test cases.
FossilOrigin-Name: 4e86fc1922e347825e1160652a2d5e6c60d04eabe847621b08f03b05b66904ea
2026-08-14 16:34:00 +00:00
drh
d1e066bf3f Initial code for an enhancement to QRF that allows for app-defined format
strings used to render integer and floating-point values.

FossilOrigin-Name: 067083e973b195f50fa0d199e24a3b01d1b2780a0812fda63d3747c4c75662bf
2026-08-14 15:57:32 +00:00
dan
b1c41f40b0 Fix the fts4aux virtual table so that it consistently behaves as if its columns have blob affinity. Report [bugs:/info/2026-08-14T07:27:28Z | 2026-08-14T07:27:28Z].
FossilOrigin-Name: d5b57f76b63552b23ba3e5e372a3773118b929a4116f60f374a91cba87c1152e
2026-08-14 10:57:58 +00:00
dan
acc18b80ef Fix a problem in the fts4aux virtual table causing it to sometimes return spurious SQLITE_CORRUPT errors for fts4 tables with more than 1 column. Report [bugs:/info/2026-08-13T05:56:36Z | 2026-08-13T05:56:36Z].
FossilOrigin-Name: 06f3f9f93be17584982b5fbd84eb1f35b6e15e9271e8d128df5452226fb3b5b9
2026-08-13 11:29:33 +00:00
drh
e59c4f9ddd Fix an MSVC compiler warning in the amatch.c extension.
FossilOrigin-Name: 43b23132a1288979063b3121b3f4f0d9d7805323b8e8496508426fa371425338
2026-08-12 20:26:57 +00:00
dan
d9de6eedbe Fix a problem in fts5 secure-delete code that could lead to a buffer overrun when dealing with a strategically corrupted database. Problem reported by YEONBA.
FossilOrigin-Name: 9cd4f9e9205c5a5096388397a39349db9ff5377d19095c6b20388ff799969c31
2026-08-11 14:16:12 +00:00
dan
4267bbf920 Update preprocessor logic in test file fts5_tcl.c to use intptr_t when available.
FossilOrigin-Name: fee71cd6f7294ffd02784d26811a9d11d80e83d4075e1233b8ec0289519bb891
2026-08-11 10:46:12 +00:00
drh
9163bd79c2 Performance improvement and size reduction in the OP_MakeRecord opcode.
FossilOrigin-Name: 8b1f4923748cdcd6dc2ced81805c844e7d0ba84354f8c0c3bb79a0fec2137493
2026-08-10 20:05:36 +00:00
dan
f45af6ac7e Add "include <stdint.h>" to test file fts5_tcl.c.
FossilOrigin-Name: 9cf3f0079a7f9a4f02a6a86bd50f4ffc5645625eaa6de8cd9d09dd6a40d11176
2026-08-10 19:49:25 +00:00
drh
205e512915 Fix the logic for big-endian CPUs. Add comments on how to test various
limbs of the logic.

FossilOrigin-Name: cf49f4fc96d7493745e6611069598a14200ee062d6f25f94d275d18a782cd374
2026-08-10 18:07:34 +00:00
stephan
cde725f23c Remove some stray debug output and obsolete bug-hunting comments. No functional changes.
FossilOrigin-Name: 41443d5ffe1f6852f447181071a0d9dac89df51c836d16b1bd9420a8513d2ec2
2026-08-10 12:45:11 +00:00
stephan
e9930003c1 Expose the sqlite3_backup APIs to JavaScript.
FossilOrigin-Name: fa17d89f76d50c153b6ff7ca96ae06c1ddc130abc3c0056dac3ef6d66f4f40c5
2026-08-10 12:41:17 +00:00
stephan
3d0687bade Disable Module.instantiateWasm() in node builds to match branch-3.53's behavior. Fix a sqlite3_backup test (duplicate finalize). The aforementioned world-breaking bug was caused by my browser having gotten into a funky state and needing a restart.
FossilOrigin-Name: 7d77bb088641881fca7a625d9828503d269d0ca1e245583a2dcf24a4f09390f5
2026-08-10 12:35:49 +00:00
drh
c9771b7018 Replace the EIGHT_BYTE_U64 macro with the in-line function sqlite3Get8byte()
which is more efficient cross-platform.

FossilOrigin-Name: 9492183f2f954d89be698e0d48123d50a6dc96c06b18482e1f06ae9031506033
2026-08-10 12:29:43 +00:00
stephan
961cc1ec09 Add tests for the sqlite3_backup JS bindings but they are disabled while tracking down an unrelated problem which prevents those tests from working (most of the sqlite3.capi methods are being mis-mapped to the sqlite3InitModule function for reasons unimaginable).
FossilOrigin-Name: cb610a8a87cfd29d70ab6b825b4a43d44fd801feecfda1bf4fb7ae181806d84b
2026-08-10 12:18:07 +00:00
stephan
6e93c8c5f1 Fix a circular dep generated by mkwasmbuilds.c
FossilOrigin-Name: f2514ace13c3bcc2ae1d39546fb095676c3540ec8fff6f3f194339660151fc77
2026-08-10 11:51:20 +00:00
stephan
46441db7e8 Merge trunk into the js-backup-bindings branch.
FossilOrigin-Name: 692c4e8ad81f142a454c2038fcdc83317dbaeb71dd6d0497edb4621297c2e35c
2026-08-10 11:23:29 +00:00
dan
7c8835dc0a Change the way fts5 test code casts between integers and pointers to avoid a ubsan error in some versions of gcc. Report [bugs:/info/2026-08-08T15:54:04Z | 2026-08-08T15:54:04Z].
FossilOrigin-Name: d275eb5b634afb85bf1f5fab4fd5243247ed06e03db3e2077192c01ff43713d0
2026-08-08 19:47:28 +00:00
dan
67bf81a85d Fix a problem introduced by [32c762bbb1] causing sessions module conflict handling to malfunction when used with a database handle configured with sqlite3_extended_result_codes(). Also ensure the "session_eec" permutation, which would have detected this, is run as part of release testing.
FossilOrigin-Name: 8b3da5d6cea2e3b31784f5e8f05c4801a3d881039aa26ecadf3a50b4454a3de6
2026-08-07 13:33:54 +00:00
stephan
d0afe9c60b Lower the range of inputs accepted by the pstack allocator to address [bugs:4dbd096fe335f974dbd096fe3|/bugs/4dbd096fe335].
FossilOrigin-Name: fafefb59481530255a881f22b1f75b587731867d00eabea39eaec7da2199fdff
2026-08-07 05:31:08 +00:00
stephan
a790e273e2 Merge in the errant wasm-updates branch, caused by developer PEBKAC.
FossilOrigin-Name: 75d3343fa3daa0503c057bae14c83ce6a1c5b8dfa4b5a312168b26e5d877684b
2026-08-05 15:40:00 +00:00
stephan
7dc844581a Strip out 42kb of ext/wasm/libcmpp.c (build tool) by using a destilled build shorn of the capabilities we don't use in this tree, like #pipe and loadable modules.
FossilOrigin-Name: 3ec42b829e8de23f8d050b49b48eac1220463156eb973fd4daff440e6183c868
2026-08-05 15:00:54 +00:00
dan
7a4496c474 Fix a single byte buffer overrun in the approximate_match extension.
FossilOrigin-Name: 7f380be91b75307bd7b57415cb53ca5c01894ff921f2ad23736a8faaff25b907
2026-08-04 13:44:14 +00:00
dan
e1c9934f9f In fts5, account for the possibility of negative docids when allocating a buffer to store the results of merging detail=none prefix lists. Fix for report [bugs:/info/2026-08-04T08:49:27Z | 2026-08-04T08:49:27Z].
FossilOrigin-Name: a7f8c92f623e9cbe8a61266d949916acc9e5110c94dff4aa6fd1ad2ea8a60d4e
2026-08-04 11:04:17 +00:00
drh
1e7bd5531e Make the test-use-only SQL function fts3_exprtest() (available only if
compiled with SQLITE_TEST) more resistant to out-of-bounds inputs.
[bugs:/info/2026-08-02T12:28:28Z|Bug 2026-08-02T12:28:28Z] and
[bugs:/info/2026-08-02T12:31:40Z|bug 2026-08-02T12:31:40Z].

FossilOrigin-Name: 30a61347077f4b9996f6ea771c7fd27203ab05039d54cc4df3068e45faf4d2d4
2026-08-02 22:45:36 +00:00
drh
ee917329f8 Cap constraint values on constraints to the amatch virtual table so
that they fit into a 32-bit signed integer.
[bugs:/info/2026-08-02T13:01:25Z|Bug 2026-08-02T13:01:25Z]

FossilOrigin-Name: 092b87164aa7d097287ad0fee4be8b66cf840043dc3091193824d74f2d54a833
2026-08-02 21:59:03 +00:00
drh
0950d29072 Update the header comment on the zipfile extension to state clearly that
writes to the ZIP archive are non-transaction.  No code changes.
[bugs:/info/2026-08-02T14:03:49Z|Bug 2026-08-02T14:03:49Z].

FossilOrigin-Name: 1b623a6064427e81dffc2897e017accc98243ecaf23c5f4df752d3da91b51be6
2026-08-02 20:17:53 +00:00
drh
4b43e57193 Fix incorrect header comment in the templatevtab.c demo extension.
[bugs:/info/2026-08-02T13:49:50Z|Bug 2026-08-02T13:49:50Z]

FossilOrigin-Name: 1c95c741ca01be4241657f27e5e8697afb46dbc2ca4764a3de5080b04ffa3750
2026-08-02 19:40:20 +00:00
drh
ba60f9c836 Fix typo in column name generation logic of the (debugging use
only) vtablog.c extension.
[bugs:/info/2026-08-02T13:56:56Z|Bug 2026-08-02T13:56:56Z]

FossilOrigin-Name: 42bde30535f43404a5996618ff923dcc8af71b56f72935e9e22ada315a046e72
2026-08-02 19:35:12 +00:00
drh
b94e0e8468 Take care to avoid trying to compute 0.0/0.0 in the diskused extension.
If such a value needs to be displayed, show the result as 0.0.
[bugs:/info/2026-08-02T12:48:58Z|Bug 2026-08-02T12:48:58Z]

FossilOrigin-Name: a455f347c50872518eff46753ded9a6080ece680be4a1fcc9dc747e16521e95c
2026-08-02 18:27:00 +00:00
drh
83e6d3e471 Enhance the (unsupported) closure extension to support 64-bit "depth"
values. [bugs:/info/2026-08-02T13:11:13Z|Bug 2026-08-02T13:11:13Z].

FossilOrigin-Name: fccfd5c410c875c35b72475d442c9c1d384deaef1859ba05586841d6c0909e0d
2026-08-02 17:12:01 +00:00
drh
c59cf28db7 Do not allow the (obsolete and unsupported) closure extension to use itself
as its own reference table.
[bugs:/info/2026-08-02T13:07:40Z|Bug 2026-08-02T13:07:40Z].

FossilOrigin-Name: 5e347561c3f8d271bf47c44473fa4b51b87ccab91b40c33f5aad28990a26e9ba
2026-08-02 16:32:28 +00:00
drh
f034d515b4 The use of sqlite3_set_clientdata() to limit recursion in [4687e04d948b787c]
is incorrect.  Fixed here.

FossilOrigin-Name: bf44a08adc94b8c7c69921a1292d56bec0cbd9f3ac772e31d8ea5866e9f46063
2026-07-31 22:45:45 +00:00
stephan
648be9e67f Update ext/wasm/libcmpp.c for build portability improvements and doc updates.
FossilOrigin-Name: 48fdf51b53e9314f938fb0107ba04f6051d6c47b743c47e30c18a1be0da4015c
2026-07-30 12:17:33 +00:00
drh
db30b1cbc3 Enforce the 1GiB size limit on appendvfs files.
[bugs:/info/2026-07-29T06:29:52Z|Bug 2026-07-29T06:29:52Z]

FossilOrigin-Name: 180e75e07630b4fa7abdd28ad889e27031071555078989c40a8c10a1d2905338
2026-07-29 23:47:55 +00:00