drh
3ba6a65bbb
Fix another problem with OS_VXWORKS
...
FossilOrigin-Name: 5eb1662fbb3af945017821094522cf05dd30df3e7b5e780a96e627c5549a5ce0
2026-10-25 20:15:12 +00:00
drh
5a7949b088
Avoid a small memory leak that might occurs if SQLite is compiled using
...
-DOS_VXWORKS=1 and a call to sem_open() in the unix-namedsem VFS fails.
FossilOrigin-Name: f0a3729e3835cf27f8ffc0b40239ec722eb0f97543ae3a6026ec2e64baf6cb54
2026-10-25 19:29:06 +00:00
drh
e5672e209e
Better detection of database corruption in the clearCellOverflow() routine.
...
FossilOrigin-Name: b6c072240dfe4f5d075b1b505c98281f830579f48ff939cdb6e054bfb179efa3
2026-10-25 18:43:18 +00:00
drh
d16e78b4fb
Fix two instances in test cases where there is an attempt to delete
...
a file that is still open, which does not work on windows.
FossilOrigin-Name: c6e22bceae0e2ba57c739d6349f07da2bb27e115131e4d867163e5a8958a78c9
2026-10-25 18:13:16 +00:00
drh
862625c9ae
Use a 64-bit integer to measure expression chain size in
...
dupedExprSize(), in case of crazy expressions.
FossilOrigin-Name: ed78f5d2bf2042332637edf541c1295f5f5ca7b1cbb4f647492d3f2221afc781
2026-10-25 17:45:41 +00:00
drh
42c9401de2
Use a new typedef "tSerial" to determine the datatype for serial-type
...
value. It is 32 bits for reasonable SQLITE_MAX_LENGTH but can be
64 bits if necessary.
FossilOrigin-Name: 8435c6f0b1ac3025f5af5da2a0f03898142c506e5981d55a2b633e611dcecb8f
2026-10-25 17:38:36 +00:00
stephan
cc3cf98eec
Reorder a sequence point violation. [bugs:d82d144d71|Bug report 2026-10-25T16:05:55Z].
...
FossilOrigin-Name: 78ad029d8fdcc1f52bb7c761ee7b7b5c02d3dd616b441a76421aed3fa7a91e01
2026-10-25 16:57:25 +00:00
drh
834c87f539
Increase the size of unixShmNode.nRegion to 32 bits to avoid the possibility
...
of integer overflow.
FossilOrigin-Name: 033b603cedb4ea246373d4015b4873b8ea1eb523c8f60d9f842cdea25dc97210
2026-10-25 16:54:02 +00:00
drh
45c3d6e297
An even better fix to the same problem as the previous two check-ins.
...
FossilOrigin-Name: 8f694d2a7de472eff8b3f6018085e03f8a1b68e6307e386e069c72b8af1b1f45
2026-10-25 13:46:07 +00:00
drh
7dcbdfa671
A better fix for the recover OOB write problem of the [37963c3869640f98]
...
FossilOrigin-Name: fbe2d9fb82582c06d6f2b137270a085b76d415d551a704db7ab517207cf129bb
2026-10-25 13:36:36 +00:00
drh
427b538f72
Fix a possible OOB write in the recover extension given a corrupt
...
schema. [bugs:/info/2026-10-25T12:08:19Z|Bug 2026-10-25T12:08:19Z].
FossilOrigin-Name: 37963c3869640f9857dd4edf5e26fdca336ec71d8b1cf188507cab5fad91f681
2026-10-25 13:07:54 +00:00
dan
c985864f08
Have vec1 check the vector size field is within range when loading a configuration. Report [bugs:/info/2026-10-24T09:06:20Z | 2026-10-24T09:06:20Z].
...
FossilOrigin-Name: d3325353c8326ba92f03b3bdd46dc4522cd7eb3da670adb073bb060927be58c6
2026-10-24 16:35:32 +00:00
dan
fd277ecc04
Enforce the upper limit on vector size in vec1_train() as well as in the vec1 virtual table. This fixes integer overflow report [bugs:/info/2026-10-23T11:24:33Z | 2026-10-23T11:24:33Z].
...
FossilOrigin-Name: 25a81a8650505b08597947ec58ad6591ca62af4b40a92a910347ac61053865f7
2026-10-24 16:18:44 +00:00
dan
98fced6200
Change the order of fields in an internal structure to avoid the possibility of leaking heap address information when a corrupt database is queried.
...
FossilOrigin-Name: 3f9a0ba4f4dffac7a4b9de30e66d94498a1433d96e327cfff43134b8856f4ba1
2026-10-24 14:37:18 +00:00
dan
9a9446f3b0
Fix a race condition with a writer that could cause a connection with a read-only *-shm file to return a spurious SQLITE_READONLY_RECOVERY error.
...
FossilOrigin-Name: e2e7c8eb02daea0876fb25abccd96c769f55fba3e995f0e7cf29aa992d7c61a6
2026-10-23 18:14:43 +00:00
dan
196f6a9389
Fix a race condition with a writer that could cause a connection with a read-only *-shm file to return a spurious SQLITE_READONLY_CANTINIT error.
...
FossilOrigin-Name: 30a301835b588f9d57fc04af3140612bef781bdc9b19aa83515d77a24ab06ee0
2026-10-23 17:24:48 +00:00
drh
b66207d732
Fix a one-byte buffer overread in FTS5 associated with LIKE processing.
...
[bugs:/info/2026-10-23T12:49:10Z|Bug 2026-10-23T12:49:10Z].
FossilOrigin-Name: 60222d023e889eb8c67c0a654637c3f3da741b37143f1b3351a7ac4ef09befc6
2026-10-23 13:22:05 +00:00
drh
881f4fd025
Fix a UAF in FTS5 on a query that uses a prefix query and a ordinary term
...
inside of a transaction.
[bugs:/info/2026-10-23T03:10:17Z|Bug 2026-10-23T03:10:17Z].
FossilOrigin-Name: 599f3345b99b79e11a71bd0087555d0980f2af5cffb6b78683a5027e78f67831
2026-10-23 12:23:36 +00:00
drh
878113ff3b
In FTS5, fix a potential read past the string terminator while parsing
...
a malformed RANK input. Private email from Mirchev.
FossilOrigin-Name: d7e1c85c176083d78b60b3098a863754160edada5b0cb924b3468650713c1075
2026-10-23 09:48:13 +00:00
drh
a0599e8b60
Fix a heap-buffer overread in FTS5 due to a corrupt inverted index holding
...
an empty doclist. Private email from Mirchev.
FossilOrigin-Name: d0716cc48bd182436ae017ffc25b8889854cb82f8209b82f8d0af6cda6dedd56
2026-10-23 09:38:43 +00:00
drh
ac1dd97f22
Ensure that all content that is copied into the -shm file during recovery
...
has been initialized, even in the case of no valid WAL frames.
FossilOrigin-Name: f2255af8231d74ce3d949d3d597a25eda6baa3c9ddfd23fa0e8020c213404e6c
2026-10-23 09:34:42 +00:00
drh
03c3a3edd2
Make the session rebaser more robust the face of column count mismatches.
...
FossilOrigin-Name: 12285a3f4efdf41210fa3020127670b0d1fd8d740a5ac43db0c6641fec3e5142
2026-10-22 11:35:33 +00:00
drh
007df2b477
Add a rootpage number lower bounds check in the "recover" extension.
...
Test case in TH3.
FossilOrigin-Name: 4a1fd244b5ca93c6cfe1e0f8e1d087d5b99482081e4b760d09909959c258e506
2026-10-22 11:19:52 +00:00
drh
de805a8c12
Increased safety margin in sqlite3_preupdate_old(). Test case in TH3.
...
FossilOrigin-Name: 31b84157965fcd3309a1420db71e0beee4ccdd88a2f44e5f9029a05cb04ae9cf
2026-10-22 11:03:08 +00:00
drh
7f91834658
Extra safety margin added to sqlite3VdbeMemFromBtree(). Change
...
suggested by Martin Mirchev. Test cases in TH3.
FossilOrigin-Name: 952ae2c63e0a2007d8213132636e2e99bae113a9c7582b68b2e5a686b0777a99
2026-10-22 10:40:42 +00:00
dan
0269dadc3d
Avoid returning extra rows when the RHS of a "rowid = " constraint on an fts5 table is not an integer value. Report [bugs:/info/2026-10-20T20:31:49Z | 2026-10-20T20:31:49Z].
...
FossilOrigin-Name: 5a09fc807377b4cfa37b06d69101530611df143bd64f3384db480797d8795fea
2026-10-21 15:25:33 +00:00
dan
5a1da0ae1b
When a b-tree cell is deleted, zero the cursor's cell-info cache as the cell it describes no longer exists, even if the cursor position is being preserved. Report [bugs:/info/2026-10-18T16:11:58Z | 2026-10-18T16:11:58Z].
...
FossilOrigin-Name: 07ed30558ee7da460ed0ca2b36cd555aeb5caa91f0971b2cf83adc08524ca9b7
2026-10-20 17:27:17 +00:00
dan
12b80e71b6
When a real value is specified as a default for a text column, avoid various inconsistencies by ensuring that it is always converted to an IEEE double and then back to text before use, as is already done for integer values. Report [bugs:/info/2026-10-05T16:22:00Z | 2026-10-05T16:22:00Z].
...
FossilOrigin-Name: d140ada6488a27342c6baf0d8e44adf38f91b37a657c2bcc0efa9ecf437b414c
2026-10-20 16:11:44 +00:00
drh
e3a9db8c15
Raise an error if a REGEXP pattern ends with "\\".
...
[bugs:/info/2026-10-20T13:44:52Z|Bug 2026-10-20T13:44:52Z]
FossilOrigin-Name: 480d6e1a39a2057685260cf8386a3dbef4f391c6d1766a6cded5f8cc4d1a0ec4
2026-10-20 15:42:45 +00:00
dan
34a05a3723
Fix handling of GROUP BY and HAVING clauses attached to the rightmost SELECT of a compound SELECT with one or more COLLATE clauses attached to ORDER BY expressions. Report [bugs:/info/2026-10-16T22:06:45Z | 2026-10-16T22:06:45Z].
...
FossilOrigin-Name: bd873f7ca9fc0d36a884d3929517d9a19c181c811dae65d64815a2006005b788
2026-10-20 15:19:35 +00:00
drh
7697c7d2b9
Fix QRF so that it correctly handles zero-length output appended to
...
the sqlite3_qrf_spec.pzOutput result.
[bugs:/info/2026-10-20T13:22:11Z|/info/2026-10-20T13:22:11Z]
FossilOrigin-Name: ee344fc063ec0de8f1cd4c61c88eca33c2587c52d868202db3c514f0bc2fae52
2026-10-20 14:36:09 +00:00
dan
4f5062f0ba
Correctly handle aggregate functions that aggregate over the rows of a window function query, even if they are nested within sub-selects. Report [bugs:/info/2026-10-16T08:07:09Z | 2026-10-16T08:07:09Z].
...
FossilOrigin-Name: 7522512ff96d869c46596e7d514b65f210530db09e6359c2f37911d45f34979d
2026-10-20 14:07:59 +00:00
drh
4855cb2a31
Fix the CLI to correctly handle a ".exit" immediately following
...
a ".output memory". [bugs:/info/2026-10-20T13:13:50Z|Bug 2026-10-20T13:13:50Z]
FossilOrigin-Name: 2fdd752dc92692e08c805eb10bf78d97e93c8436433c8175fbff310513f340d7
2026-10-20 13:45:54 +00:00
dan
d89373dc10
Fix a problem causing queries on secure-delete fts5 databases to occasionally return extra, non-matching, rows. Report [bugs:/info/2026-10-18T20:40:47Z | 2026-10-18T20:40:47Z].
...
FossilOrigin-Name: 10b8f4166da26908aef9182824b0c967af7d861ff6c83daed7cd50321ee563b3
2026-10-20 11:13:15 +00:00
stephan
f6ba5a5abf
Correct two bugs, dating back to [96ba44946b|2022-12-23], which caused the JS wrappers of sqlite3_bind_text/blob() to severely misbehave. Add missing tests. [bugs:bbb715c3f2a0e989|Bug report 2026-10-19T19:03:55Z].
...
FossilOrigin-Name: d45943cbaf35f21f72b78aafa88f72830343bfeb3a0198a3af0da063dcf6a707
2026-10-19 21:07:18 +00:00
dan
6410c0e4a9
Avoid dropping error codes from the streaming input callback in sqlite3rebaser_rebase_strm(). Report [bugs:/info/2026-10-18T05:31:08Z | 2026-10-18T05:31:08Z].
...
FossilOrigin-Name: 90f953b42a7c9c4939b215fa9e1fe11cf381978d3ee7737d390ae14611cccbcf
2026-10-19 20:21:23 +00:00
drh
cc04298893
Fix a problem in ALTER TABLE DROP COLUMN that could result in a stale
...
index. [bugs:/info/2026-10-19T06:36:17Z|Bug 2026-10-19T06:36:17Z]
FossilOrigin-Name: 4ea5d16c2159738614e135377120b604f89ff1cdf0bfe60ea3cc41073680c8f1
2026-10-19 19:40:21 +00:00
drh
154360f1cd
Fix a regression in the CLI's handling of control characters in CSV output,
...
caused by [d0fe92e0ce8662b9].
[bugs:/info/2026-10-18T20:38:57Z|Bug 2026-10-18T20:38:57Z].
FossilOrigin-Name: 2146eab561d153b70eb41c54bb122ea8d2dc0ad983f00639aa2f65fd3a64e603
2026-10-19 19:15:13 +00:00
dan
6a63c4070b
Fix a problem in the sessions rebaser occuring when a DELETE/REPLACE rebase record is followed by another rebase record on the same row. Report [bugs:/info/2026-10-18T05:00:41Z | 2026-10-18T05:00:41Z].
...
FossilOrigin-Name: c2d299124211d8780bc0beab8217fc53da8aadca0c3abce0fedbe84506ef412a
2026-10-19 18:57:35 +00:00
stephan
c01201027e
Wasm build: move wasm-strip to after wasm-opt, at recommendation from an Emscripten ticket. Remove several more uses of -sWASM_BIGINT=1, as described for [cc9457981e2a].
...
FossilOrigin-Name: c2fc091401aa8c75db5f0c98486d9ee1e54fb6c96ec2dc04eecca41aa26990a1
2026-10-19 18:33:02 +00:00
drh
aa037e12be
Correct the handling of SQLITE_IGNORE returns from authorizer calls
...
for UPDATE on the rowid or INTEGER PRIMARY KEY. See the test cases
in TH3 for details.
FossilOrigin-Name: 606005419f60bd14eec71ee87a770051c8c551273c9a7567d830283eeb1058e8
2026-10-19 18:20:03 +00:00
stephan
16327cc106
JS: resolve a [ https://github.com/emscripten-core/emscripten/issues/28016 |build regression] triggered by Emscripten 6.0.5+. Remove the -sWASM_BIGINT flag from the build because (A) it's been Emscripten's default for a long time and (B) Emscripten now warns loudly if it's used. Remove a stray build flag from fiddle, inadvertently introduced in [c32cf3e355], which caused it to build in 64-bit mode.
...
FossilOrigin-Name: cc9457981e2a63d271525b1d891a63dd28b1c2da04777228e27132d7cc743cfa
2026-10-19 18:05:25 +00:00
dan
18a23191bf
Avoid crashing if an RBU vacuum is attempted with a VFS that does not support RBU. Report [bugs:/info/2026-10-19T12:21:34Z | 2026-10-19T12:21:34Z].
...
FossilOrigin-Name: 5024b528dcf419393086d89eff50aa1b52116bb05b6e07849555f76891bc68a0
2026-10-19 17:44:46 +00:00
drh
9c6e3568ba
Fix JSON parsing to properly recognize a backslash-continuation at the
...
end of a string.
[bugs:/info/2026-10-18T04:42:37Z|Bug 2026-10-18T04:42:37Z]
FossilOrigin-Name: d8c93a5f2c19622d1da29f503145223ff433e1597235510273fbebefe455c4c4
2026-10-19 17:24:43 +00:00
drh
ee16b84fb6
In the CLI, do not read the ~/.sqliterc file or an alternative specified by
...
the --init command-line option if the --safe option is used.
[bugs:/info/2026-10-19T12:32:27Z|Bug 2026-10-19T12:32:27Z]
FossilOrigin-Name: f1e94b6042f056f103eaf4ac11004fc2f559499ccf2b93eae0c9283150a6e921
2026-10-19 16:25:28 +00:00
drh
c3ba37e71c
Update sqldiff so that the script it outputs preserves the full
...
precision of floating point values. This fixes the first of two
issues reported by [bugs:/info/2026-10-18T20:38:30Z|Bug 2026-10-18T20:38:30Z]
FossilOrigin-Name: 2a439593d068a75a30807ab41e764c8aac1dafb205229a78071b716997d2650c
2026-10-19 16:06:56 +00:00
dan
c7885735ac
Correctly handle compound SELECTs with explicit COLLATE clauses on ORDER BY expressions, even if they appear in a CTE or VIEW definition. Report [bugs:/info/2026-10-19T08:22:22Z | 2026-10-19T08:22:22Z].
...
FossilOrigin-Name: 36803e2660eed4f3d16750f1d3a4af796e2c15034838f07f472c2fbb0f9b52b0
2026-10-19 15:14:13 +00:00
stephan
55b6ae8606
Apply [5080eb6d7a7a] to a similar case in the JS test suite.
...
FossilOrigin-Name: 336154a23a2a98df12a2a5e6ef51221acccef4063936cbb48cbb77a24cf1bd26
2026-10-19 15:06:38 +00:00
stephan
d37e0daad3
JS: reject URL arguments which may influence the load path for sqlite3.js and sqlite3.wasm if those values look like they might be remote URLs. sqlite3.mjs (ESM) is unaffected by this. This addresses [bugs:74f052d3d2|bug report 2026-10-19T12:25:33Z] but is a preliminary measure, with follow-ups expected.
...
FossilOrigin-Name: 5080eb6d7a7a7a5c2cdfd08a766f0e096d0d5536488fcf0b325e7b06a6bdd092
2026-10-19 14:50:22 +00:00
drh
853288469d
The default floating point format for JSON and INSERT output modes
...
should be "%!0.17" to preserve full binary→text→binary round-trips
with no loss of precision.
[bugs:/info/2026-10-18T20:37:23Z|Bug 2026-10-18T20:37:23Z].
FossilOrigin-Name: c31221e954bcca2e6505338446635d0efb809f453008c4927441ebd6f0e1b873
2026-10-19 14:34:34 +00:00