Commit Graph

  • a89d43e5db Correct test from [96a48a15760a] - that journal was indeed corrupt, but not in the intended manner. Add a verification that the bad journal gets replaced after a write. master stephan 2026-06-21 11:38:05 +00:00
  • 646931b83e Extend the test from the previous check-in a bit. stephan 2026-06-21 11:10:17 +00:00
  • 9be4c57ca1 Add a JS test demonstrating that [7c4db1cd2d06] recovers gracefully from journal corruption. stephan 2026-06-21 10:55:09 +00:00
  • d7e055d41c Fix a result value semantics bug which broke application of a journal in kvvfs. Fix a memory-reset bug in hypothetical non-WASM builds of kvvfs. Bug report [bugs:7fcd3ea30fa4fcfc|2026-06-20T18:22:59Z], and this resolves the journaling issue mentioned in the parent post. stephan 2026-06-21 08:38:07 +00:00
  • 97467fa8fa Fix a potential integer overflow when decoding a corrupt kvvfs block. Bug report [bugs:76acc88b57|2026-06-20T18:35:54Z]. stephan 2026-06-21 08:13:22 +00:00
  • fb41f57de4 Fix an incorrect assert() in check-in [984c9b181801c1de] drh 2026-06-20 21:54:18 +00:00
  • 190034d268 Correct misuse of a loop control variable in writing of a kvvfs journal. Bug report [bugs:20e208fe17|2026-06-20T08:49:41Z]. Remove a snippet of dead code in the JS kvvfs side. stephan 2026-06-20 11:07:04 +00:00
  • ae3c30e318 Add the sqlite3_result_str() interface and use it to simplify the code. drh 2026-06-19 23:53:29 +00:00
  • 7644162026 Use SQLITE_FINISH in a few places in the core, to help ensure that path is well tested. sqlite3-result-str drh 2026-06-19 22:57:44 +00:00
  • fa8e52021f Put the sqlite3OomStr singleton in "const" space to ensure that it is never modified. Doing so identified a long-standing bug. drh 2026-06-19 22:17:09 +00:00
  • ec4f18fed8 Additional changes based on Claude analysis. drh 2026-06-19 21:43:04 +00:00
  • 9487f6d441 Further refinements and uses for sqlite3_result_str(). drh 2026-06-19 20:01:47 +00:00
  • 7b386a77ff Prototype implementation for a new sqlite3_result_str() API. drh 2026-06-19 17:03:21 +00:00
  • 3a697a26de Fix the format() SQL function so that it returns an empty string not a NULL if the first argument is an empty string. [bugs:/info/2026-06-19T16:40:04Z|Bug 2026-06-19T16:40:04Z] drh 2026-06-19 16:55:08 +00:00
  • d5b7e82ccd Fix a cast in fts3_write so that it is applied as intended. branch-3.53 drh 2026-06-19 12:14:55 +00:00
  • 593b55cb78 Fix a cast in fts3_write so that it is applied as intended. Bug [bugs:/info/2026-06-19T07:56:23Z | 2026-06-19T07:56:23Z]. dan 2026-06-19 11:46:05 +00:00
  • b2de7df934 Fix an fts5 problem causing attempts to create locale=1 tables with more than 115 columns to fail. drh 2026-06-19 11:18:51 +00:00
  • 8c4a4acc02 Fix an fts5 problem causing attempts to create locale=1 tables with more than 115 columns to fail. Bug [bugs:/info/2026-06-19T05:19:08Z | 2026-06-19T05:19:08Z]. dan 2026-06-19 11:14:16 +00:00
  • 978b0abe4d Fix a memory size computation error on 32-bit platforms caused by check-in [9a2a230464e43140]. drh 2026-06-18 17:09:20 +00:00
  • e070f37183 Small parsing performance improvement by reducing the amount of the Parse object that needs to be initialized. drh 2026-06-17 20:11:26 +00:00
  • b5d0d980be Remove the unnecessary Parse.szOpAlloc field, for small size reduction and performance improvement. drh 2026-06-17 19:28:17 +00:00
  • 3dbf444538 Small performance boost in the sqlite3VdbeResolveLabel() routine of the code generator. drh 2026-06-17 18:39:05 +00:00
  • 3f7bf4ef2f Safer conversion from double to 64-bit integer in two places. drh 2026-06-17 16:57:19 +00:00
  • c9bffdb35e Additional refinements to the large floating-point handling in generate_series(). Follow-up to [5aab8c2cde63f9db]. drh 2026-06-17 14:53:14 +00:00
  • 168184da7c Fix CLI CSV test cases so that they suppress the CR on windows and thus work cross-platform. Test case changes only - no changes to code. drh 2026-06-17 14:12:07 +00:00
  • ffc14a20ad Fix CLI CSV test cases so that they suppress the CR on windows and thus work cross-platform. drh 2026-06-17 13:52:55 +00:00
  • aa1579de80 Fix the OR-to-IN optimization so that it works in cases where there are conflicting collation sequences on the equality constraints within the OR. [bugs:/info/2026-06-17T05:04:48Z|Bug 2026-06-17T05:04:48Z]. drh 2026-06-17 13:31:01 +00:00
  • bb1d375577 Improved detection of when the alternative windows-compatible main() is needed in the sqldiff.exe utility. drh 2026-06-17 09:46:23 +00:00
  • 8227408b6f Typo fix in a comment used to generate documentation. No changes to code. [forum:/info/2026-06-16T23:18:50Z|Forum 2026-06-16T23:18:50Z]. drh 2026-06-16 23:59:58 +00:00
  • 544b208113 After opening a non-covering index cursor, pass the corresponding table cursor to the implementation via sqlite3BtreeCursorHint(). cursor-hint-tblcsr dan 2026-06-16 18:06:46 +00:00
  • c89700b6c0 Limit VIEW recursion depth to SQLITE_LIMIT_EXPR_DEPTH to prevent static overflow in malicious schemas with tens of thousands of levels of recursive views. drh 2026-06-16 13:46:54 +00:00
  • 9fb225190c Limit VIEW recursion depth to SQLITE_LIMIT_EXPR_DEPTH to prevent static overflow in malicious schemas with tens of thousands of levels of recursive views. [bugs:/info/2026-06-16T04:21:51Z|Bug 2026-06-16T04:21:51Z] drh 2026-06-16 13:43:08 +00:00
  • e9d40c821d Fix instances of potential buffer overflow caused by loading the contents of a stat4 table with an absurd number of samples in a 32-bit build. drh 2026-06-16 12:02:02 +00:00
  • b7c32f2f29 Fix instances of potential buffer overflow caused by loading the contents of a stat4 table with an absurd number of samples in a 32-bit build. Bug [bugs:/info/2026-06-16T11:30:52Z | 2026-06-16T11:30:52Z]. dan 2026-06-16 11:53:19 +00:00
  • 09c84c70ee Fix a possible call to memcpy() with a NULL source pointer when the size parameter is zero (which is technically undefined behavior but in practice is completely harmless) in the sha1_query() extension function. [bugs:/info/2026-06-16T07:42:23Z|Bug 2026-06-16T07:42:23Z]. drh 2026-06-16 09:53:23 +00:00
  • 9a5801af3a Consistent error messages for excess trigger nesting. drh 2026-06-15 17:39:46 +00:00
  • a0dc22438d Speed up SQL aggregate functions percentile() and median() by using quickselect to find the required values instead of fully sorting the array of values with quicksort. dan 2026-06-15 17:27:05 +00:00
  • f0075cd2e4 New Windows makefile targets for common EXEs that omit the ".exe" suffix, so that when muscle memory kicks in and we type "make sqlite3" on windows, it still works. drh 2026-06-15 17:14:12 +00:00
  • b348459070 Improve comments in percentSort(). pecentile-partial-sort dan 2026-06-15 17:13:40 +00:00
  • d49588d0d9 Enhance SQLITE_LIMIT_TRIGGER_DEPTH so that it also limits a chain of distinct triggers during code generation. drh 2026-06-15 16:49:06 +00:00
  • 732bffada9 Fix a problem sometimes causing an UPSERT to incorrectly convert an excluded.* column from type REAL to INT in cases where doing so does not cause data loss. drh 2026-06-15 16:46:14 +00:00
  • 458dfb94d0 Enhance SQLITE_LIMIT_TRIGGER_DEPTH so that it also limits a chain of distinct triggers during code generation. [bugs:/info/2026-06-15T06:44:07Z|Bug 2026-06-15T06:44:07Z]. drh 2026-06-15 16:45:35 +00:00
  • 2161a3d88b Improvements to handling of inequality constraints on generate_series().value against very large floating-point values. drh 2026-06-15 16:27:51 +00:00
  • 91a3aa3646 Change the PACKAGE_BUGREPORT config option point to /bugs instead of /forum. stephan 2026-06-15 15:48:40 +00:00
  • 1b5bd0edf1 Fix a problem sometimes causing an UPSERT to incorrectly convert an excluded.* column from type REAL to INT in cases where doing so does not cause data loss. Bug [bugs:/info/2026-06-15T09:08:12Z | 2026-06-15T09:08:12Z]. dan 2026-06-15 15:38:16 +00:00
  • a2fd301a6a Improvements to handling of inequality constraints on generate_series().value against very large floating-point values. [bugs:/info/2026-06-15T04:37:48Z|Bug 2026-06-15T04:37:48Z]. drh 2026-06-15 15:27:26 +00:00
  • 53f419e2c8 Additional tweaks and test cases for generate_series() constraints using very large floating-point numbers. series-boundry-cases drh 2026-06-15 15:24:37 +00:00
  • 0cdc6432f7 Better behavior for generate_series() in cases where constraints involve floating point number that are near the minimum and maximum 64-bit integer values. drh 2026-06-15 14:16:13 +00:00
  • 051745a6c3 Avoid a possible buffer overrun in 32-bit builds of fts5 that could occur when processing corrupt records. drh 2026-06-15 13:53:44 +00:00
  • 667d1b15c1 Avoid a possible buffer overrun in 32-bit builds of fts5 that could occur when processing corrupt records. Bug [bugs:/info/2026-06-14T12:21:15Z | 2026-06-14T12:21:15Z]. dan 2026-06-15 13:39:20 +00:00
  • b1bbff20a0 Revert the native impl of kvvfs's xOpen() (as distinct from the JS impl which the wasm build uses) to the historical db name restrictions of 'local' or 'session', failing with SQLITE_CANTOPEN if passed another name. [ec866b04d088e53b] overhauled support for kvvfs db names in JS but it turns out that the native impl still relies on those names in order to match journals to databases. Correct a related too-lenient assert() in the WASM pieces. stephan 2026-06-15 12:36:24 +00:00
  • e5ca18182a Revert the native impl of kvvfs's xOpen() (as distinct from the JS impl which the wasm build uses) to the historical db name restrictions of 'local' or 'session', failing with SQLITE_CANTOPEN if passed another name. [ec866b04d088e53b] overhauled support for kvvfs db names in JS but it turns out that the native impl still relies on those names in order to match journals to databases. Correct a related too-lenient assert() in the WASM pieces. mistake stephan 2026-06-15 12:22:06 +00:00
  • 633e08da82 Fix a problem that could cause fts5 to return incorrect answers when performing prefix queries on tokens with synonyms. drh 2026-06-15 11:52:31 +00:00
  • 23e50585eb Fix a problem that could cause fts5 to return incorrect answers when performing prefix queries on tokens with synonyms. Bug [bugs:/info/2026-06-14T11:11:06Z | 2026-06-14T11:11:06Z]. dan 2026-06-15 11:47:52 +00:00
  • b273dc8de1 Regardless of whether the platform is 32 or 64-bits, Use 64-bit arithmetic to calculate buffer sizes in the fts3_snippet(). Bug [bugs:/info/2026-06-14T09:19:52Z | 2026-06-14T09:19:52Z]. dan 2026-06-15 11:03:13 +00:00
  • 461f6c14c5 Fix rounding behavior in the decimal extension when all leading digits are 9 and there is not fractional component. drh 2026-06-15 10:16:23 +00:00
  • 9c2ac0b6e3 Fix rounding behavior in the decimal extension when all leading digits are 9 and there is not fractional component. [bugs:/info/2026-06-15T03:49:42Z|Bug 2026-06-15T03:49:42Z]. drh 2026-06-15 10:13:31 +00:00
  • a5e5116228 Prevent array overflow when decoding a corrupted value from the underlying key/value store. [bugs:/info/2026-06-14T21:58:12Z|Bug 2026-06-14T21:58:12Z] drh 2026-06-15 01:24:06 +00:00
  • 5d59375ac8 Remove the unused, untested, experiemental "blobio.c" extension, to avoid confusing AIs. [bugs:/info/2026-06-14T15:12:50Z|Bug 2026-06-14T15:12:50Z] drh 2026-06-14 22:01:56 +00:00
  • 1b828b8770 Do not allow ridiculous "columns=N" values in the (unused) csv virtual table in the extensions folder. [bugs:/info/2026-06-14T15:22:47Z|Bug 2026-06-14T15:22:47Z] drh 2026-06-14 20:10:28 +00:00
  • 36e9e015de Speed up SQL aggregate functions percentile() and median() by avoiding a full sort of the array of arguments. dan 2026-06-13 20:16:54 +00:00
  • aff01bd5a4 Make the --header option to the CLI sticky, so that it does not get turned off by subsequence --csv or similar mode change options. drh 2026-06-13 18:17:08 +00:00
  • d8f6cc7ea4 Make the --header option to the CLI sticky, so that it does not get turned off by subsequence --csv or similar mode change options. [bugs:/info/2026-06-13T11:49:18Z|Bug 2026-06-13T11:49:18Z] drh 2026-06-13 18:04:18 +00:00
  • 33e4dc8833 When reading a super-journal name from a journal file, allocate a new buffer rather than using Pager.pTmpSpace. This prevents a buffer overrun that could occur when using a VFS with a large sqlite3_vfs.mxPathname value with a database with a small page size. drh 2026-06-12 18:38:10 +00:00
  • 2884421c05 When reading a super-journal name from a journal file, allocate a new buffer rather than using Pager.pTmpSpace. This prevents a buffer overrun that could occur when using a VFS with a large sqlite3_vfs.mxPathname value with a database with a small page size. dan 2026-06-12 18:35:24 +00:00
  • 7459c01689 Fix errors in comments on this branch. Also prefer SQLITE_NOMEM_BKPT to SQLITE_NOMEM. super-journal-malloc dan 2026-06-12 17:32:44 +00:00
  • 053048a40f Fix a memory leak that could follow an OOM error in the new code on this branch. dan 2026-06-12 17:16:12 +00:00
  • 2ca10782d2 Improved documentation for sqlite3_deserialize(). drh 2026-06-12 16:47:45 +00:00
  • 2429af2e0c Do not use shared locks on SHM files when the filename is a long DOS-device path. Only used shared locks for UNC paths. Do not confuse the long-DOS-device syntax with UNC paths. drh 2026-06-12 16:26:39 +00:00
  • 790e97cb4f Fix a buffer overwrite in fts3 that could occur while processing NEAR queries against corrupt records. drh 2026-06-12 16:04:50 +00:00
  • 865a8f3072 Fix a buffer overwrite in fts3 that could occur while processing NEAR queries against corrupt records. Bug [bugs:/info/2026-06-11T23:11:26Z | 2026-06-11T23:11:26Z]. dan 2026-06-12 15:36:26 +00:00
  • 619e38a552 When using a read-only WAL/SHM, handle a corrupt page size in the WAL file correctly. drh 2026-06-12 12:20:36 +00:00
  • 124f449319 When using a read-only WAL/SHM, handle a corrupt page size in the WAL file correctly. [bugs:/info/2026-06-11T22:20:03Z|Bug 2026-06-11T22:20:03Z]. drh 2026-06-12 12:15:42 +00:00
  • 76ad3be617 Add the --raw option to the dbtotxt command-line tool, for debugging. drh 2026-06-12 11:55:39 +00:00
  • 2dc1c576e9 Fix a signed integer overflow that could occur in fts3 when processing corrupt database records. drh 2026-06-12 11:45:37 +00:00
  • 23d0a08176 Fix a signed integer overflow that could occur in fts3 when processing corrupt database records. Bug [bugs:/info/2026-06-11T23:12:25Z | 2026-06-11T23:12:25Z]. dan 2026-06-12 11:24:30 +00:00
  • fa68f4d5bd Defense against a read-only WAL file that has an invalid page size. corrupt-readonly-wal drh 2026-06-12 00:13:57 +00:00
  • a89c9f34d8 Fix a signed-integer overflow in fts5 that might occur when dealing with strategicly corrupted records. drh 2026-06-11 23:28:49 +00:00
  • 84865cd22a Fix a possible signed integer overflow in the RBU extension given a maliciously crafted delta. drh 2026-06-11 23:26:01 +00:00
  • 801d847cd9 Harden code that processes Fossil Deltas against OOM and maliciously malformed delta blobs. drh 2026-06-11 23:22:57 +00:00
  • d7436d6cf1 Enhance the ".ar -x" command to add the undocumented --debug option and to give enhanced robustness to deliberately malformed archives. drh 2026-06-11 23:18:21 +00:00
  • b14202f86e Comment improvements on the ".ar -x" command of the CLI. No changes to code. drh 2026-06-11 23:11:14 +00:00
  • 0b9f4ee89c Fix harmless compiler warnings. drh 2026-06-11 22:48:16 +00:00
  • d1b9001a7f Further improvements to the ".ar" command of the CLI. drh 2026-06-11 16:39:41 +00:00
  • d57abdb017 Three-pass algorithm for the ".ar x" command in the CLI, so that symlinks are created after all regular files are created. drh 2026-06-11 14:28:48 +00:00
  • 970b3bc4c4 Add the (undocumented) --debug option to the ".ar" command in the CLI drh 2026-06-11 14:14:37 +00:00
  • 3b161d32a0 Improved detection of corrupt node IDs in RTree shadow tables. drh 2026-06-11 01:37:00 +00:00
  • d688d1551a Improved detection of corrupt node IDs in RTree shadow tables. Test case in TH3. drh 2026-06-11 01:31:19 +00:00
  • dacabb4a33 When reading a super-journal name from a journal file, allocate a new buffer rather than using Pager.pTmpSpace. This prevents a buffer overrun that could occur when using a VFS with a large sqlite3_vfs.mxPathname value with a database with a small page size. dan 2026-06-10 20:10:19 +00:00
  • 2bd7ac6716 Fix a signed-integer overflow in fts5 that might occur when dealing with strategicly corrupted records. Bug [bugs:/info/2026-06-10T03:56:42Z | 2026-06-10T03:56:42Z]. dan 2026-06-10 16:51:20 +00:00
  • 49edbe2150 Detect an OOM condition in the realpath() function of the fileio.c extension and cause that function to return NULL. To Do: we should go back in and fix realpath() to raise an SQLITE_NOMEM error on OOM rather than returning NULL. But we will delay that, in as much as OOMs are all but impossible on modern OSes. [bug:/info/2026-06-10T07:46:32Z|Bug 2026-06-10T07:46:32Z]. drh 2026-06-10 10:40:29 +00:00
  • 062016c2fd Fix a possible signed integer overflow in the RBU extension given a maliciously crafted delta. [bugs:/info/2026-06-10T06:41:54Z|Bug 2026-06-10T06:41:54Z]. drh 2026-06-10 10:13:11 +00:00
  • 84ead09d94 Harden code that processes Fossil Deltas against OOM and maliciously malformed delta blobs. [bugs:/info/2026-06-10T07:01:00Z|Bug 2026-06-10T07:01:00Z] and [bugs:/info/2026-06-10T07:06:43Z|Bug 2026-06-10T07:06:43Z]. drh 2026-06-10 09:51:33 +00:00
  • 2cb57d9d4a Avoid a possible integer overflow when fts5 tokenizes a very large document. Only possible with non-standard builds that use large values of SQLITE_MAX_LENGTH. Bug [bugs:/info/2026-06-09T05:27:16Z | 2026-06-09T05:27:16Z]. dan 2026-06-09 10:43:37 +00:00
  • 2f5d281796 Change loop counter variables from int to i64 to avoid a potential integer overflow inside an assert() statement when SQLite is compiled with SQLITE_DEBUG and an extra-large SQLITE_MAX_LENGTH. Does not affect production builds. [bugs:/info/2026-06-09T08:53:14Z|Bug 2026-06-09T08:53:14Z]. drh 2026-06-09 10:16:40 +00:00
  • 78a50f9e74 Fix four obscure yet separate problems in FTS5. drh 2026-06-08 19:23:56 +00:00
  • 6a1efec20a Fix builds on i486 CPUs. [forum:/info/2025-01-25T12:58:44Z|Forum 2025-01-25T12:58:44Z]. drh 2026-06-08 18:15:27 +00:00
  • 082e41f17b Fix another buffer overread in fts5 when processing corrupt records. Bug [bugs:/info/2026-06-08T16:03:39Z | 2026-06-08T16:03:39Z ]. dan 2026-06-08 17:48:00 +00:00
  • 19a2ba1f5b Fix a buffer overread that could occur in fts5 when processing corrupt records. Bug [bugs:/info/2026-06-08T11:15:52Z | 2026-06-08T11:15:52Z] dan 2026-06-08 15:20:49 +00:00
  • b677c5afd4 Avoid a potential use-after-free in fts5. Report [bugs:/info/2026-06-08T08:45:27Z | 2026-06-08T08:45:27Z]. dan 2026-06-08 12:03:52 +00:00