Commit Graph

  • 3cf93639e3 Fix the log(B,N) function so that it works for 0.0<B<1.0. [bugs:/info/2026-10-26T16:32:25Z|Bug 2026-10-26T16:32:25Z] master drh 2026-10-28 00:20:35 +00:00
  • 37a6d8d4e4 When aggregate content passes through the sorter to implement GROUP BY it loses its subtype. So do not pass JSON values from an index on an expression through the sorter and into a JSON aggregate, as that optimization will not work. [bugs:/info/2026-10-27T20:02:01Z|Bug 2026-10-27T20:02:01Z] drh 2026-10-28 00:00:01 +00:00
  • 58aeaa5d61 Merge the latest trunk enhancements and fixes into the reuse-schema branch. reuse-schema drh 2026-10-27 19:16:23 +00:00
  • e5796f671a Improve generate_series so that it handles constraints that compare the "value" output against a string or blob. [bugs:/info/2026-10-26T12:55:22Z|Bug 2026-10-26T12:55:22Z] drh 2026-10-27 18:46:26 +00:00
  • 71f1e0e738 Merge all the latest trunk enhancements and fixes into the begin-concurrent branch begin-concurrent drh 2026-10-27 18:44:22 +00:00
  • 7721051f69 Fix a problem introduced by [08e979525ff1eef8] and reported by [bugs:/forumpost/70e3174f54|a follow-up comment] to the original bug report. drh 2026-10-27 18:26:34 +00:00
  • ab6b5f2290 Remove an ALWAYS() in the query planner that can be false for a truly ridiculous 350K+ character input query. [bugs:/info/2026-10-26T18:22:15Z|Bug 2026-10-26T18:22:15Z]. drh 2026-10-27 16:24:38 +00:00
  • 9b4db00944 Fix a problem with vector NOT IN expressions that use an index with the leftmost column declared DESC. Report [bugs:/info/2026-10-26T12:54:00Z | 2026-10-26T12:54:00Z]. branch-3.54 dan 2026-10-27 15:19:57 +00:00
  • 814fd8ef4d Merge branch-3.54 fixes into trunk drh 2026-10-27 15:11:21 +00:00
  • 076ab6c286 Prevent application-defined functions that invoke DDL statement or perform other mischief from deleting the schema out from under the statement that called the function. [bugs:/info/2026-10-25T19:26:00Z|Bug 2026-10-25T19:26:00Z] drh 2026-10-27 14:58:34 +00:00
  • 495eef2d14 Fix a typo in sqlite3expert.c that could lead to a heap buffer overwrite in some cases. Report [bugs:/info/2026-10-27T14:08:33Z | 2026-10-27T14:08:33Z]. dan 2026-10-27 14:37:55 +00:00
  • e86ed8bbbc Remove DIRECTONLY markings from the tryeval() and expire() functions. schema-reset-appfunc drh 2026-10-27 14:28:17 +00:00
  • 2ec708af90 Add the SQLITE_FILECTRL_EXPIRE_STMTS file-control to facilitate testing. drh 2026-10-27 12:18:02 +00:00
  • fb6bc2334f Disable the "<expr> IN ('const')" to "expr = 'const'" optimization when 'const' has a collation sequence. Bug [bugs:/info/2026-10-26T04:25:22Z | 2026-10-26T04:25:22Z]. dan 2026-10-27 11:08:15 +00:00
  • aa20b91788 Expire every prepared statement that uses a schema when that schema is cleared. In the VDBE, do not access p4.pTab or p4.pIdx fields if the prepared statement is expired. drh 2026-10-27 10:07:10 +00:00
  • c2069120e5 Revert the part of [341525ecfdd4] which throws for a short digest read, and simply treat that as a digest mismatch as we historically have. stephan 2026-10-27 09:55:56 +00:00
  • 3a963c36af Rename an internal JS API for clarity. Replace a == from the previous checkin with ===. stephan 2026-10-27 09:49:44 +00:00
  • 530c6d839b JS: teach the SAHPool VFS to be able to recover the data part of a handle when the JS context is killed between the two writes of its header part. [bugs:7418667df7|Bug report 2026-10-27T08:42:50Z]. stephan 2026-10-27 09:41:49 +00:00
  • 2cc8623f54 New test cases for schema resets. drh 2026-10-26 23:21:29 +00:00
  • 4bb628d92d Fix missing prototype for sqlite3DbMaskUnion() drh 2026-10-26 22:53:00 +00:00
  • 51dcf20a61 A more accurate approach to resetting schemas on active statements. drh 2026-10-26 21:07:46 +00:00
  • 06e89d6616 Be very permissive for schema resets following a schema cookie mismatch. drh 2026-10-26 20:07:13 +00:00
  • 116c504057 Fix test script error causing failures in sessionfault2.test for SQLITE_DEBUG builds. dan 2026-10-26 20:05:07 +00:00
  • 37623e85f8 More precision in controlling when to reset schemas. drh 2026-10-26 19:51:23 +00:00
  • 5d1ee88809 Avoid leaving a transaction open in the session module when a changeset applied in no-savepoint mode fails because an UPDATE hits a constraint. Report [bugs:/info/2026-10-21T02:23:36Z | 2026-10-21T02:23:36Z]. dan 2026-10-26 19:43:48 +00:00
  • 3f490b14f7 Have vec1 discard its in-memory model cache when a savepoint is rolled back. Report [bugs:/info/2026-10-26T11:36:53Z | 2026-10-26T11:36:53Z]. dan 2026-10-26 17:49:10 +00:00
  • 9b3f957fe1 Where possible delete the table root page prior to updating the schema cookie, and that avoids the need to early-out the reprepare loop. drh 2026-10-26 17:21:24 +00:00
  • ec4c2a0152 Fix another fts5 problem with mixing writes in secure-delete and non-secure-delete mode on a single table. Report [bugs:/info/2026-10-22T16:23:31Z | 2026-10-22T16:23:31Z]. dan 2026-10-26 17:21:22 +00:00
  • f7564c540b Do not be as aggressive at blocking automatic reprepares due to a pending schema reset. drh 2026-10-26 15:44:25 +00:00
  • 9a7e5d2e43 Update to include the latest trunk enhancements. drh 2026-10-26 15:26:25 +00:00
  • 0b97f1b101 Test case tweaks to account for different configurations. drh 2026-10-26 15:18:19 +00:00
  • c20c589111 Fix an fts5 problem with deleting a key in secure-delete mode on a detail=none table when the key being deleted is the last on its page and has a delete-marker attached to it. Report [bugs:/info/2026-10-21T17:14:08Z | 2026-10-21T17:14:08Z]. dan 2026-10-26 14:57:18 +00:00
  • 77f8caa273 Merge corrections from branch-3.54 into trunk drh 2026-10-26 14:43:56 +00:00
  • 8295706a8e Disable (at least temporarily) a test case associated with .recover that shows different corruption recoveries based on compile-time options. drh 2026-10-26 14:13:00 +00:00
  • a74857a26a Fix the ext/recover/recovercorrupt4.test script so that works even if cell_size_check is turned on by default. drh 2026-10-26 13:55:24 +00:00
  • d07e02e1ed Test case changes to account for various configurations. drh 2026-10-26 13:21:51 +00:00
  • 4303eaf221 Reorganize OP_MakeRecord slightly to avoid signed 32-bit integer overflow prior to discovering an oversize error. drh 2026-10-26 12:46:03 +00:00
  • ac308db785 Back out the tSerial type definition change. It was a mistake. drh 2026-10-26 12:37:49 +00:00
  • 2692a5619b Improvements to handling of failed DDL statements from within an application-defined function. drh 2026-10-26 11:46:18 +00:00
  • 9902ebadb8 Improve detection of corrupt changesets in session module function sqlite3changeset_next(). dan 2026-10-26 08:23:03 +00:00
  • 6fd45c5ce9 Avoid a signed integer overflow in fts5 when processing a corrupt database. dan 2026-10-26 06:39:08 +00:00
  • 005a5862a5 Experimental fix to [bugs:/info/2026-10-25T19:26:00Z|Bug 2026-10-25T19:26:00Z] drh 2026-10-26 01:20:04 +00:00
  • 1820defd76 Merge all recent branch-3.54 fixes into trunk drh 2026-10-25 22:40:37 +00:00
  • 221ff059c3 Prevent a NULL pointer dereference in dbdump after an OOM drh 2026-10-25 22:12:07 +00:00
  • 8e72095ca8 Fix the sqlite3_db_dump() interface to the dbdump.c extension so that it works even on an empty database with PRAGMA empty_result_callbacks engaged. drh 2026-10-25 22:05:29 +00:00
  • 8f72f50e27 Make sure memory allocations do not overflow in spellfix on i386 and similar 32-bit platforms. drh 2026-10-25 22:00:07 +00:00
  • f99a038a08 Avoid an integer overflow in the spellfix extension when setting a ridiculous values for the top= parameter. drh 2026-10-25 21:51:58 +00:00
  • 50586b61d8 Use the new sqlite3_result_str() function to implement SQL functions geopoly_json() and geopoly_svg() as part of the geopoly extension. drh 2026-10-25 20:42:16 +00:00
  • 4546f13d17 Increase the size of the Fts3Table.nPendingData field to 64 bits to avoid any chance of ridiculous inputs causing a signed integer overflow. drh 2026-10-25 20:29:47 +00:00
  • 3ba6a65bbb Fix another problem with OS_VXWORKS drh 2026-10-25 20:15:12 +00:00
  • 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. drh 2026-10-25 19:29:06 +00:00
  • e5672e209e Better detection of database corruption in the clearCellOverflow() routine. drh 2026-10-25 18:43:18 +00:00
  • 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. drh 2026-10-25 18:13:16 +00:00
  • 862625c9ae Use a 64-bit integer to measure expression chain size in dupedExprSize(), in case of crazy expressions. drh 2026-10-25 17:45:41 +00:00
  • 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. drh 2026-10-25 17:38:36 +00:00
  • cc3cf98eec Reorder a sequence point violation. [bugs:d82d144d71|Bug report 2026-10-25T16:05:55Z]. stephan 2026-10-25 16:57:25 +00:00
  • 834c87f539 Increase the size of unixShmNode.nRegion to 32 bits to avoid the possibility of integer overflow. drh 2026-10-25 16:54:02 +00:00
  • 732a2f0d97 Teach SQLite's internal sqlite3AtoF() routine to understand "Inf" and in so doing fix [bugs:/info/2026-10-22T05:11:21Z|Bug 2026-10-22T05:11:21Z]. drh 2026-10-25 15:59:53 +00:00
  • 2d9389c494 Merge the improved .recover OOB write fix from branch-3.54 drh 2026-10-25 13:52:08 +00:00
  • 45c3d6e297 An even better fix to the same problem as the previous two check-ins. drh 2026-10-25 13:46:07 +00:00
  • 7dcbdfa671 A better fix for the recover OOB write problem of the [37963c3869640f98] drh 2026-10-25 13:36:36 +00:00
  • 4012bdca5f Merge recent branch-3.54 fixes into trunk. drh 2026-10-25 13:29:09 +00:00
  • 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]. drh 2026-10-25 13:07:54 +00:00
  • c1ee4b4c88 Fix a bug in the whereOrInsert() routine of the query planner that caused a sub-optimal query plan to be selected. [bugs:/info/2026-10-24T05:24:02Z|Bug 2026-10-24T05:24:02Z] The speedtest1.c program is updated to include the test case. drh 2026-10-25 12:39:29 +00:00
  • fb58600a8f The test case for this bug exercises code paths through the query planner and bytecode engine that are not otherwise followed in performance testing, so it seems reasonable to add the test case to speedtest1.c. where-or-insert drh 2026-10-25 12:30:45 +00:00
  • f282a6d222 Fix performance problem according to [bugs:/info/2026-10-25T01:57:04Z|bugs-forum reply 2026-10-25T01:57:04Z]. drh 2026-10-25 11:23:19 +00:00
  • 9626d89e02 Rework the classic seconds-only sleep computations in [458351f9725a423b] to avoid any chance of integer overflow. drh 2026-10-24 22:25:07 +00:00
  • 6de9972df6 Fix an fts5 problem causing auxiliary functions to see an incorrect list of matches in some cases when the query contains a NEAR expression. Report [bugs:/info/2026-10-22T16:41:04Z | 2026-10-22T16:41:04Z]. dan 2026-10-24 19:50:13 +00:00
  • 01f9950f87 Fix some cases where the list of matches made available to auxilary fts5 functions was not correct. Report [bugs:/info/2026-10-23T02:22:13Z | 2026-10-23T02:22:13Z]. dan 2026-10-24 19:30:11 +00:00
  • d246ad4b9c The recover extension no longer drops the last column of a table with a generated column, and other fixes. [bugs:/info/2026-10-20T02:56:33Z|Bug 2026-10-20T02:56:33Z] drh 2026-10-24 18:56:00 +00:00
  • e7dfb3cae9 Make the fts5_vocab virtual table WITHOUT ROWID, so that RIGHT JOIN and OR queries work properly with it. Report [bugs:/info/2026-10-23T03:07:25Z | 2026-10-23T03:07:25Z]. dan 2026-10-24 18:26:57 +00:00
  • 0a4a0aab8c Pages that fail the cell-size-check should be marked as uninitialized so they are not reused without being checked again. [bugs:/info/2026-10-24T05:20:01Z|Bug 2026-10-24T05:20:01Z] drh 2026-10-24 18:13:36 +00:00
  • 3e6bbeaeca This is the change suggested by [bugs:/info/2026-10-24T05:24:02Z|Bug 2026-10-24T05:24:02Z]. But it makes SQLite run slower, at least on the speedtest1.c benchmark. Need to investigate further. drh 2026-10-24 17:25:21 +00:00
  • 30be364a7c Always report back the output flags from the xOpen method of the unix VFS. [bugs:/info/2026-10-24T04:49:19Z|Bug 2026-10-24T04:49:19Z] drh 2026-10-24 17:08:39 +00:00
  • f565c8efc4 Fix various minor problems in the CLI. [bugs:/info/2026-10-24T04:43:44Z|Bug 2026-10-24T04:43:44Z] drh 2026-10-24 16:49:09 +00:00
  • 642b2ff342 Upate AGENTS.md to encourage robots to generate PoC scripts that run in the CLI. drh 2026-10-24 16:40:49 +00:00
  • 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]. dan 2026-10-24 16:35:32 +00:00
  • 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]. dan 2026-10-24 16:18:44 +00:00
  • c6536c6e60 For the "relaxed" quoting mode of QRF, tighten the restrictions on what must be quoted to help prevent strings that actually look like numbers from going unquoted. [bugs:/info/2026-10-24T04:41:27Z|Bug 2026-10-24T04:41:27Z] drh 2026-10-24 15:10:50 +00:00
  • 9410bfb946 Use 64-bit math to avoid integer overflow in unixSleep() on the rare systems that lack both usleep() and nanosleep(). [bugs:/info/2026-10-24T09:43:25Z|Bug 2026-10-24T09:43:25Z] drh 2026-10-24 14:54:49 +00:00
  • 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. dan 2026-10-24 14:37:18 +00:00
  • 31b1a10a9c Change the order of fields in an internal structure to avoid the possibility of leaking heap address information when a corrupt database is queried. dan 2026-10-24 14:29:45 +00:00
  • 342d4527d3 New CLI commands: .if, .elseif, .else, and .endif. New CLI function: capable(X). drh 2026-10-24 14:05:21 +00:00
  • 32d4ecb572 Improvement to testing using the new CLI commands. if-else drh 2026-10-24 13:57:04 +00:00
  • 0e3a71c327 Further improvements and bug fixes to .if. Add the if.sql test script. drh 2026-10-24 12:34:08 +00:00
  • 2e1dd36d03 Enhancements and bug fixes to .if. Added a heredoc option to .read for testing purposes. drh 2026-10-24 11:59:08 +00:00
  • c14245073f Add the "capable(X)" function to the CLI, with the idea of using it for things like ".if capable('fts5')". drh 2026-10-24 08:19:30 +00:00
  • 8ac6750d71 Initial prototype implementation of ".if", ".elseif", ".else" and ".endif" for the CLI. drh 2026-10-24 03:27:17 +00:00
  • 598d9cf776 Fix a test case for geopoly that should have been inside of "ifcapable geopoly". drh 2026-10-24 01:23:56 +00:00
  • 19e832b3b3 Merge WAL race condition fixes from branch-3.54 drh 2026-10-24 00:40:15 +00:00
  • 8b3da22ffe Experiment to add 8 bytes of zeroed padding between a page buffer and the structures that accompany it. padded-page-buffers dan 2026-10-23 20:18:16 +00:00
  • f879fb18cd FTS5: INSERT into a locale=1, contentless_unindexed=1 table with an UNINDEXED column now works. [bugs:/info/2026-10-21T02:49:37Z|Bug 2026-10-21T02:49:37Z] drh 2026-10-23 18:39:36 +00:00
  • 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. dan 2026-10-23 18:14:43 +00:00
  • 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. dan 2026-10-23 17:24:48 +00:00
  • 7b6afb441b Merge the FTS5 one-byte overread fix from branch-3.54 drh 2026-10-23 16:01:12 +00:00
  • 1778ff4dab Merge BOM handling fixes. drh 2026-10-23 15:56:07 +00:00
  • a4b453a1e6 The .recover command should not remove BOMs that are already inside the database. [bugs:/info/2026-10-18T20:41:57Z|Bug 2026-10-18T20:41:57Z] bom-handling drh 2026-10-23 15:52:17 +00:00
  • 5285494b18 Fix the sqlite3_bind_value() interface so that it does not remove a byte-order mark on the value being bound. drh 2026-10-23 15:30:27 +00:00
  • 014644d8f2 FTS5: Fix false-positive corrupt FTS5 index report on an INSERT into a contentless_unindexed table. [bugs:/info/2026-10-21T02:49:37Z|Bug 2026-10-21T02:49:37Z] drh 2026-10-23 13:41:31 +00:00
  • 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]. drh 2026-10-23 13:22:05 +00:00