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
dan
078d71402f Fix 8 byte buffer overwrite that could occur when applying RBU updates to databases containing indexes with more than 16 columns. Report [bugs:/info/2026-09-25T11:18:49Z | 2026-09-25T11:18:49Z].
FossilOrigin-Name: 7b4fa1d8cd8e43d858ed80549d653f412345468ac699c699a44e78435f59e8c3
2026-09-25 15:12:14 +00:00
dan
00830b2819 Fix some cases where fts3 integrity-check was not detecting corrupt databases. Report [bugs:/info/2026-09-25T11:18:11Z | 2026-09-25T11:18:11Z].
FossilOrigin-Name: 9b23f99212f49587c5f0b025e90fdd2e844437fbb76fc11c26062df7bcff765c
2026-09-25 14:55:16 +00:00
dan
d21bd37c7c Avoid a use-after-free problem in rtree triggered by an attacker manipulating the shadow table schema to ensure sqlite3_last_insert_rowid() returns 0 after certain INSERTs. Problem reported by Claude and Ada Logics.
FossilOrigin-Name: 6a9e1415659f9e75940b3c3a6f6e123f61c5e9e2a7a612693ee395d7b7567bef
2026-09-24 20:14:31 +00:00
dan
2503dc6182 Avoid marking little-known extension function next_char() as SQLITE_INNOCUOUS by default.
FossilOrigin-Name: 481a1df638aeef163022523f8de590c265f64d078eb070cf262995e8ecb0f690
2026-09-24 17:09:56 +00:00
dan
f544d3599a Avoid leaving an fts3 porter tokenizer cursor in an inconsistent state following an OOM error. At the moment, this does not cause problems because fts3 always frees a tokenizer cursor following an OOM. But it might if some other code used the porter tokenizer implementation.
FossilOrigin-Name: 75c1ee9de670c6366200df65b3a2c7c8888f709e985b5eaf81d57e562ab65b93
2026-09-24 15:53:23 +00:00
drh
c62a4430f9 Work around quirks in MSVC associated with [d046d5f4c6855].
FossilOrigin-Name: 18b6a43eb8c242e923a852c046a48fe8430d1596c286e114eb1383d6de9adafa
2026-09-24 10:55:16 +00:00
drh
9da2d2374a The --escape mode for CSV should default to "off".
[bugs:/info/2026-09-23T16:25:07Z|Bug 2026-09-23T16:25:07Z]

FossilOrigin-Name: c356641fadf591bcf312ae9657ddc84e483a06aa068eb2d3021467435cbad0c1
2026-09-23 21:04:57 +00:00
stephan
a8d1f1ff12 Fix a small potential buffer overwrite in the JS impl of kvvfs to resolve [bugs:8d4fe4cc4c|bug report 2026-09-23T10:50:46Z]. Remove some adjacent dead code.
FossilOrigin-Name: c43287d8855b3f9a4621545793ecb2a89ef456d563d8377f2b243812e6acb2b3
2026-09-23 14:00:07 +00:00
dan
2fc31a37cb Avoid a potential crash by checking the arguments to sqlite_expert_rem() (part of the "expert" extension). This function was normally only called internally, but a sufficiently determined attacker could also find a way. Report [bugs:/info/2026-09-23T10:50:15Z | 2026-09-23T10:50:15Z].
FossilOrigin-Name: 3529f81f53f4b6da6fde23b6d149c7874954f552a51a0c4009394b297a31c95f
2026-09-23 11:31:44 +00:00
dan
95699469b7 Handle correctly very large (or small) out-of-range column indexes passed to various fts5 auxiliary functions. Report [bugs:/info/2026-09-23T02:40:15Z | 2026-09-23T02:40:15Z].
FossilOrigin-Name: 55c634d96d390ca52c38c58c66be680c1883d799427ddf23a2501d12e7be07d3
2026-09-23 11:06:11 +00:00
stephan
6ceffc33fe Preprocessor: remove more not-relevant-to-this-copy pieces and add support for C-style comments in directive arguments.
FossilOrigin-Name: 5c321483e07c09271e5a59209cdb7c6748e6525c351c5e7aeeb259eba4ea3e70
2026-09-23 10:06:30 +00:00
drh
2923911f53 Change the behavior of rtree_i32 such that coordinate inputs that are
outside the range of signed 32-bit integers are converted into the nearest
representable signed 32-bit integer rather than just being truncated
to 32-bits. The prior behavior of truncating is what programmers expected
years ago, but apparently the new generation of programmers expects the
values to be capped at the nearest representable value.
We could argue about which is more "correct", but it seems easier to
just do what the younglings expect.
The documentation is ambiguous about what to do in this case,
so this is not a breaking change.
[bugs:/info/2026-09-23T02:37:39Z|Bug 2026-09-23T02:37:39Z].

FossilOrigin-Name: d046d5f4c6855227f14349d60709a9dcbe27a909ebbb364b7c0ef55db0dbacdf
2026-09-23 09:34:08 +00:00
drh
b943fa1288 Fix a possible double-free in the (unused) sqlite3_intck_test_sql()
test interface to the intck extension.
[bugs:/info/2026-09-22T22:05:25Z|Bug 2026-09-22T22:05:25Z]

FossilOrigin-Name: 3b1e5538da0ec57ae456e3a5293746b8fb34451f57d0049cc51dd72eb2f89d6e
2026-09-23 01:29:05 +00:00
stephan
fde3a84ddd Latest preprocessor for various cleanups and fixes. Duplicate the tester1 concurrency warning in the worker-based copy.
FossilOrigin-Name: c9b4695ffae5a3388a49643d6819355851a0fda362cdaf140c59fc934759dcac
2026-09-21 20:18:51 +00:00
dan
5636f0f4a4 Fix potential buffer overreads in demo program ext/fts3/tool/fts3view.c. Bug [bugs:/info/2026-09-21T13:50:52Z | 2026-09-21T13:50:52Z].
FossilOrigin-Name: 90891e96c488ce0eca12e00d01231cd011587236d349f09d4fa979f781ccdafe
2026-09-21 17:12:55 +00:00
dan
9fe7e4dd31 Update sessionChangesetFindTable() so that it honors the contract defined in its header comment and always returns non-zero if the table is not found.
FossilOrigin-Name: e6fc087f5a302906a79fd111420d2df310c2db88401231349c0ea11987a380af
2026-09-21 15:52:34 +00:00
dan
5f8b6a782d Fix truncation of 64-bit integer values passed to the fts3 snippet() function. Report [bugs:/info/2026-09-21T02:41:49Z | 2026-09-21T02:41:49Z].
FossilOrigin-Name: b0919c9687f01240c89171e1607816b603450e5bed37c468860298b2ccc11a81
2026-09-21 11:14:14 +00:00
stephan
c908175cbe Add new test cases for the sqlite3.oo1.Stmt.get() overloads which take both a client-specified type ID and an array or object target.
FossilOrigin-Name: 24bddf2aff01962a35c42422e322c12582ea77e2c7ddd5f8754d12c454ce8a1d
2026-09-21 07:29:41 +00:00
dan
5bd0f37f60 Add test cases to sessionchange2.test.
FossilOrigin-Name: e90a05f56f594da0af9c8af7aea91492fae5c66f3b16f5a12ca8db13eada5824
2026-09-19 17:20:43 +00:00
drh
9e0959ca03 Fix test cases due to improved error messages from this branch.
FossilOrigin-Name: 3a2f7fc4c6f37eb374166db1d352e12dacb694a52fd8aa0cdac61838700b4b6e
2026-09-19 13:35:57 +00:00
drh
30bc31907d Update sessionChangesetFindTable() so that it honors the contract defined
in its header comment and always returns non-zero if the table is not
found.

FossilOrigin-Name: 72005af24ddebbee80a7bc5f802b2d745f8a99a2cc29a2ea3a37428162626b8f
2026-09-19 09:52:20 +00:00
stephan
ae9c436852 User new, more compare JS syntax in a couple of places. No functional changes.
FossilOrigin-Name: 0d747adadf56a0aa3bd5666954a9f7c75c394254dbb938f28ddcd987ffff01b2
2026-09-19 08:13:27 +00:00
drh
c5b1623ec7 Simplification to the 32-bit float rounding routines from the previous
check-in.  Also fix a test case from that check-in.

FossilOrigin-Name: 78871391d5ea914a02771e9902202bcc4caee344fe67702a7dc3b6ca9b281364
2026-09-19 07:59:20 +00:00
drh
af32e544ea Fix 32-bit floating point (float) rounding in rtree so that it works
correctly for subnormal values and for values near infinity.
[bugs:/info/2026-09-19T00:36:32Z|Bug 2026-09-19T00:36:32Z].

FossilOrigin-Name: 3d5e1013245e1280b1f74fe09f9407f18313270847da5385a2e36c2b8eb56d74
2026-09-19 01:54:07 +00:00
drh
cd4e52fe73 Improved support for stdcall on 32-bit windows, for legacy.
FossilOrigin-Name: e638307a519c929271682b9d9093e6dbdc90ca9a07d45ca9fc9ee114d6fd02c7
2026-09-18 15:38:29 +00:00
stephan
46c7da50b3 Minor internal API doc update.
FossilOrigin-Name: 346c56e02c39858b4364e4c8b8e4c88237e64470066ebb2687ae06d2b0e978b8
2026-09-18 08:00:34 +00:00
stephan
d457639847 Performance improvements in some of the JS sqlite3.oo1 APIs, based on analysis and suggestions from Jure Rotar.
FossilOrigin-Name: 8c6c586c3e42dd1d0af4f374b01a660bfc6afb47fd3b34cd7ef16c198ec66d0a
2026-09-18 07:56:22 +00:00
stephan
5a04cfc091 Add a note to ext/wasm/tester1 about running tests in concurrent tabs.
FossilOrigin-Name: 8ce64bed3bac4038b2fd96758d4bd92cb26ac515ec50cbfc94ef296e5c6fe558
2026-09-18 07:55:02 +00:00
dan
b0d5cbda9c Fix a problem causing fts5 auxiliary function API methods xRowCount() and xColumnTotalSize() to return inaccurate values after rows had been deleted from a contentless_delete=1 table. Forum post [forum:/info/5e6f15753a | 5e6f15753a].
FossilOrigin-Name: 39ca0ac36596d37fd62316beb7c6341812624e6d3efea90d68ae0393f742163b
2026-09-16 13:58:43 +00:00
stephan
6f5c0659c2 Typo fix in JS test code.
FossilOrigin-Name: 4630ee80dcb69588ec1c88d049e313b53258e7e23fc0209ac505c92b3bc85c63
2026-09-16 08:31:09 +00:00
stephan
4ebc78674d Add a JavaScript switch/case break which does not actually change any behavior but has the potential to (A) confuse someone into thinking it's broken or (B) become broken via future code changes. Spotted in [https://github.com/sqlite/sqlite/pull/37|a PR in the sqlite github repository].
FossilOrigin-Name: a6351d0413572cf92f9d5eaf01e8777001646961cc77dd5823ca26f7a84a60f3
2026-09-15 18:11:22 +00:00
drh
220b580fc7 Fix minor issues with the delta_parse() table-valued function in the
fossildelta.c extension.  Add test cases for the fossildelta.c extension.
[bugs:/info/2026-09-09T10:29:35Z|Bug 2026-09-09T10:29:35Z] and
[bugs:/info/2026-09-09T10:55:54Z|Bug 2026-09-09T10:55:54Z].

FossilOrigin-Name: 737ab94632c7745d3fd1f82894a1c8174db59350a33329660681398dd604c4d0
2026-09-09 13:49:42 +00:00
dan
42c45bd235 Fix a bug in fts5 test code function fts5TestUtf8(). Report [bugs:/info/2026-09-03T14:51:50Z | 2026-09-03T14:51:50Z].
FossilOrigin-Name: ac094ec69b9b726985d2fdb82062f098e77c427539cdf5b07ee15dd8427cba66
2026-09-03 16:37:55 +00:00
dan
492e7fc0a7 Fix a case in the fts5 matchinfo() demo function causing it to return the wrong error code.
FossilOrigin-Name: 5251f4d7071f86ad9d772d8b9309bc7191ca485c3db5cb658f689abf02de72c4
2026-08-27 18:07:23 +00:00
drh
9ec2b69c0d Fix the ext/misc/compress.c extension such that it compiles independently
of the CLI.

FossilOrigin-Name: 4cd5ecc5b3ea4b86875849ede0c5a072e76331eae3ccac139e51fe7568260b42
2026-08-27 10:01:13 +00:00
drh
b130fc5319 Enhance the tmstmpvfs.c extension so that it tags zero pages in the log file.
FossilOrigin-Name: e9d649b77b14990cdc5440e08fdace6989737f3fd1acfc8b1c1bb72be7022ec0
2026-08-26 12:31:34 +00:00
drh
86a15af2b1 Improved handling of OOM conditions in the sessions extension.
[bugs:/info/2026-08-25T17:04:14Z|Bug 2026-08-25T17:04:14Z].

FossilOrigin-Name: ce2aa9f8495edfa361220c4702a54035e9df78984ce6c9fff40e04bd45cc3393
2026-08-25 18:40:50 +00:00
dan
39ccdd9314 Add assert() statements and comments to explain why the return value of sqlite3_column_name() does not need to be checked in fts3.c. Repor [bugs:/info/2026-08-25T17:08:22Z | 2026-08-25T17:08:22Z].
FossilOrigin-Name: 08b34b1656b7dec2328345bb8ea93d75193703aaff52546fc17844b7110b2741
2026-08-25 18:28:21 +00:00
drh
112122c2f9 Avoid a possible NULL pointer dereference in the QRF sublibrary when
compiled with SQLITE_ENABLE_STMT_SCANSTATUS.

FossilOrigin-Name: 58014b2a2efdf0800946591d2d53d1c001a9b58681156dc201aa542912567570
2026-08-25 18:26:40 +00:00
drh
603233d42e Improved handling of OOM errors in the Windows implementation of the
sqlite3_stdio.c extension.
[bugs:/info/2026-08-25T16:55:53Z|Bug 2026-08-25T16:55:53Z].

FossilOrigin-Name: 555489e4c21f5ab65364c73217ec76202a5c97d2f4d66cf38e00158af13ecad6
2026-08-25 18:16:16 +00:00
drh
e18ff9bf54 Prevent some potential NULL pointer deferences following misuse of the
non-standard amatch extension.
[bugs:/info/2026-08-25T16:47:32Z|Bug 2026-08-25T16:47:32Z].

FossilOrigin-Name: 99b69371a136d71e91b482e97e38bfbc3b0c1a63db6c75af5c83494fd758d4cd
2026-08-25 17:59:05 +00:00
dan
a62edeb74d Fix OOM handling in little-used extension file "expert.c". Report [bugs:/info/2026-08-25T16:02:31Z | 2026-08-25T16:02:31Z].
FossilOrigin-Name: c89f4f79676f34cd8399f4a8a3934ad63d4547b9528e736bad1ee0e6f5fe6305
2026-08-25 16:15:15 +00:00
dan
8c43b6559f Avoid a technically undefined signed integer overflow in fts5. Report [bugs:/info/2026-08-23T16:25:44Z | 2026-08-23T16:25:44Z].
FossilOrigin-Name: cde23480be10e2da6acb357d39e129b314429640143034b9e2207719dcf18350
2026-08-24 18:55:06 +00:00
dan
c737eb289c Fix some fts5 cases where all columns are excluded by a column filter (so that no rows match). Report [bugs:/info/2026-08-23T16:25:44Z | 2026-08-23T16:25:44Z].
FossilOrigin-Name: 7c9b711fc8c2c714ff8709750773c49dba1c6e4f39700806ebf59e6a094bf32d
2026-08-24 18:24:44 +00:00
dan
b3db734685 Ensure that the fts5_vocab.term column behaves as if it has blob affinity for comparisons.
FossilOrigin-Name: a832bc1ef270365658b60aa4eece35bad1fe26725a45453b302cc7a06cc46cc6
2026-08-24 17:29:17 +00:00
dan
ca3e62724e Fix a problem with combining index=none and secure-delete modes causing full-text index entries to be sometimes lost when inserts and deletes on the same token are combined in the same transaction. Report [bugs:/info/2026-08-23T16:25:44Z | 2026-08-23T16:25:44Z].
FossilOrigin-Name: e1f939f473d6e478ceabcb10a4f5b96d1d538c4aec39e0e3cfeb3c5ff97ea2ec
2026-08-24 17:08:41 +00:00
drh
a7969a001d Fix a harmless compiler warning in the non-deliverable normalize.c
extension.  [bugs:/info/2026-08-20T23:33:57Z|Bug 2026-08-20T23:33:57Z].

FossilOrigin-Name: 11a73d18be23f52c83d4b1a81841bef140a3cbd117bf3351c0bd143e0435a17f
2026-08-21 00:31:55 +00:00
drh
48f575d0c0 Remove a literal 0x0d character from a sessions test script, using
char(0x0d) in its place, to avoid false-positive mixed-line-ending
warnings from Fossil.

FossilOrigin-Name: d0e4714aff80e74d16ed2d5b3a2186890ae0f801e9cef0199bb9ebc8de3c81ac
2026-08-20 15:59:53 +00:00
stephan
912706d94a Latest upstream libcmpp.c for #eval and #include -resolve, and removal of the clumsy @'string' literals.
FossilOrigin-Name: dc176e433555fc818fb20218d846f06477305e6524dc1d73f175de9efccb3428
2026-08-20 11:50:33 +00:00
drh
c69f996361 Fix the zipvfs virtual table so that it works with UPDATE OR REPLACE.
[bugs:/info/2026-08-19T01:52:09Z|Bug 2026-08-19T01:52:09Z].

FossilOrigin-Name: 1f71a577adfbfe9ca691766b9c97d002720118dbfdee5f16424ecf96b4a40b9b
2026-08-19 15:29:15 +00:00