Commit Graph

  • 4e512bf10d Fix the decimal extension to correctly deal with NULL parameters. [bugs:/info/2026-10-18T14:25:03Z|Bug 2026-10-18T14:25:03Z] drh 2026-10-18 19:42:52 +00:00
  • dac1b8dc84 Add the SQLITE_LIMIT_CTES option to sqlite3_limit(). The default is 50K. Setting to zero disables the limit. The limit is approximate - it does not actually count CTEs but rather simply refuses to process a CTE with cursor number that exceeds this limit. This is a re-do of the fix for [bugs:/info/2026-10-04T05:35:14Z|Bug 2026-10-04T05:35:14Z] that also avoids the regression reported by [forum:/info/2026-10-16T20:30:17Z|Forum post 2026-10-16T20:30:17Z]. drh 2026-10-18 19:10:13 +00:00
  • e58a5a91ed Limit the size of the second argument of the (testing use only) SQL function fpdecode() to avoid a (harmless) signed integer overflow. [bugs:/info/2026-10-18T03:43:20Z|Bug 2026-10-18T03:43:20Z] drh 2026-10-18 18:30:00 +00:00
  • d7e0a4717a Merge recent branch-3.54 fixes into trunk drh 2026-10-18 16:31:01 +00:00
  • 850ea24139 Back out parts of [e68aa6e1293a2c7a] for the 3.54.x patch series, as they cause a regression reported by [forum:/info/2026-10-16T20:30:17Z|Forum post 2026-10-16T20:30:17Z]. The "bug" fixed was not important. The plan is to add a new limit in 3.55.0 to address this problem. drh 2026-10-18 16:17:16 +00:00
  • c006236c19 Remove a NEVER() that can in fact be true. A test case to demonstrate has been separately added to TH3. drh 2026-10-18 16:04:03 +00:00
  • 3baca233c5 Ensure that vec1 normalizes vectors before, not after, applying the WHT transform. Report [bugs:/info/2026-10-18T10:46:11Z | 2026-10-18T10:46:11Z]. dan 2026-10-18 13:54:43 +00:00
  • 352e01f2fc Correct a var name typo in the session extension. [forum:527f85c78d|Bug report 2026-10-18T10:40:12Z]. stephan 2026-10-18 10:43:06 +00:00
  • c8e019ec97 Minor doc-only updates to ext/wasm/README.md and GNUmakefile. stephan 2026-10-18 10:39:36 +00:00
  • 18347d8044 Check the datatype of the second (optional) argument to the log() SQL function and return NULL if it is non-numeric as the documentation says it should. [bugs:/info/2026-10-18T05:05:18Z|Bug 2026-10-18T05:05:18Z] drh 2026-10-18 10:14:50 +00:00
  • 245d21fb37 Only enforce the limit on the number of CTE cursors at SQLITE_LIMIT_EXPR_DEPTH if SQLITE_DBCONFIG_DEFENSIVE is engaged. Also give a different error message when the number of CTEs grow too large. This is a proposed work-around for the problem described at [forum:/info/2026-10-16T20:30:17Z|Forum post 2026-10-16T20:30:17Z]. It does require the user to disable defensive. Perhaps for 3.55.0 I should add a new limit instead, like SQLITE_LIMIT_CTES. too-many-ctes drh 2026-10-18 00:34:48 +00:00
  • 0dad7f20e2 Use box-drawing characters to highlight the "Expected" and "Got" output from failed ".check" lines in the CLI, for improved debug support. experimental drh 2026-10-17 18:29:00 +00:00
  • 43a48f7758 Fix uses of C99 and other minor issues in ext/vec1/vec1.c. Report [bugs:/info/2026-10-17T09:17:48Z | 2026-10-17T09:17:48Z]. dan 2026-10-17 18:25:47 +00:00
  • 3bce1260e7 Fix 24:00:00 rounding of dates with negative years. [forum:/info/2026-10-17T12:57:32Z|Forum post 2026-10-17T12:57:32Z] drh 2026-10-17 13:23:07 +00:00
  • 94852686fe Merge recent branch-3.54 fixes into trunk. drh 2026-10-17 12:10:02 +00:00
  • ea9d6e8419 Fix an incorrect assert() in generate_series(). No impact on non-debug builds. [bugs:/info/2026-10-17T09:24:09Z|Bug 2026-10-17T09:24:09Z] drh 2026-10-17 12:03:36 +00:00
  • 06a948cadd Enhance ".expert" in the CLI so that when it is generating unique index names, the probability of being unable to create a unique names becomes vanishingly small, essentially zero. And even if that does happen, be sure to free the last candidate name before returning an error. [bugs:/info/2026-10-17T09:25:38Z|Bug 2026-10-17T09:25:38Z] drh 2026-10-17 11:34:38 +00:00
  • 8e1b59b6dc Enhance QRF to deal with zero-length column names. Also make use of the new sqlite3_str_free() interface. [bugs:/info/2026-10-17T09:26:21Z|Bug 2026-10-17T09:26:21Z] drh 2026-10-17 11:13:08 +00:00
  • b5b50e0c12 Add a byte to an alloc made during .mode -widths parsing. Bug report [bugs:9c07558565|2026-10-17T09:23:52Z]. stephan 2026-10-17 10:10:16 +00:00
  • 3bc2ad344b Merge the latest fixes from branch-3.54 onto trunk. drh 2026-10-17 03:06:04 +00:00
  • 78793bee81 Update the sqlite3_clear_bindings() interface so that it avoids forcing a reprepare if a binding that is not 0 or 1 is cleared. [forum:/info/2026-10-16T19:10:10Z|Forum post 2026-10-16T19:10:10Z]. drh 2026-10-17 01:52:29 +00:00
  • 3ca476654f Augment the AST for *-expansion of a column in the left table of a RIGHT JOIN that is joined via USING. Working toward a fix for [bugs:/info/2026-10-08T15:50:07Z|Bug 2026-10-08T15:50:07Z]. Experimental and incomplete. Saved to work on other things. drh 2026-10-16 23:32:43 +00:00
  • 34e5f2ee47 Add two new assert()s to document invariants within selectExpander(). drh 2026-10-16 20:31:38 +00:00
  • 7fd436eaf9 Fix a problem with reading large UTF16 strings with a BOM out of the VDBE column cache. [bugs:/info/2026-10-13T01:16:49Z|Bug 2026-10-13T01:16:49Z] drh 2026-10-16 18:11:30 +00:00
  • 6444bb328b Fix a harmless C90 compiler warning in the decimal extension. drh 2026-10-16 17:58:38 +00:00
  • 88c7cc0a27 Fix a problem handling zero-length strings in some cases in group_concat() when it is used as a window function. Report [bugs:/info/2026-10-16T15:51:51Z | 2026-10-16T15:51:51Z]. dan 2026-10-16 17:42:42 +00:00
  • d0463f5ade Increase the version number to 3.54.2 to begin the next patch cycle. drh 2026-10-16 16:23:02 +00:00
  • c9b6f126e8 Merge the latest trunk enhancements into the reuse-schema branch drh 2026-10-16 15:40:41 +00:00
  • 955080d16e Merge the latest trunk enhancements into the bedrock branch via wal2. drh 2026-10-16 15:37:06 +00:00
  • 911dff5408 Merge the latest trunk enhancements into the wal2 branch drh 2026-10-16 15:28:35 +00:00
  • 3f5e6ec276 Merge the latest trunk enhancements into the begin-concurrent branch. drh 2026-10-16 15:24:17 +00:00
  • 7de3a6dced Version 3.54.1 for the reuse-schema branch reuse-schema-3.54 drh 2026-10-16 15:15:51 +00:00
  • 57520227c9 Version 3.54.1 version-3.54.1 release drh 2026-10-16 14:45:20 +00:00
  • c3e073420f In test file test1.c, use a static SQLite mutex to protect the hash table instead of a Tcl mutex. A Tcl mutex is a no-op on unix unless TCL_THREADS is defined at runtime, and SQLite test configurations do not define this, which was causing errors in multi-threaded tests like notify2.test. dan 2026-10-16 14:31:53 +00:00
  • c4181ee000 Do not allow two or more sandbox() calls with the same nonce within the same SQL statement. Report a sandbox violation if a sandbox() contains the wrong number of arguments. branch-3.53-sandbox-func drh 2026-10-16 14:02:02 +00:00
  • 97e9560e21 Do not allow two or more sandbox() calls with the same nonce within the same SQL statement. Report a sandbox violation if a sandbox() contains the wrong number of arguments. sandbox-func drh 2026-10-16 13:59:23 +00:00
  • 6c2d8c88f7 Avoid unnecessary zero-length calls to memmove(). drh 2026-10-16 13:14:42 +00:00
  • 3538f83a21 Experimental: expressions within {...} may not contain subqueries. curly-brace-expr-3.53 drh 2026-10-16 11:15:13 +00:00
  • f391199a5a Experimental: expressions within {...} may not contain subqueries. curly-brace-expr drh 2026-10-16 11:11:34 +00:00
  • b495f75d81 New optimizations to GLOB/LIKE and to mutex locking on shared-cache. drh 2026-10-16 10:00:28 +00:00
  • 739ac505c3 Avoid zero-length memmove() calls when appending B-tree cells. opt-btree-insertcell-skip-empty-memmove jeffchen 2026-10-16 08:43:47 +00:00
  • aa39569616 Enable the noSharedCache fast path in SQLITE_THREADSAFE=0 builds. opt-btree-enterall-nosharedcache jeffchen 2026-10-15 23:22:07 +00:00
  • f8a62a56e1 Avoid unnecessary recursive calls in LIKE and GLOB matching by checking the next ASCII literal before recursing. opt-like-glob-prefilter jeffchen 2026-10-15 23:15:39 +00:00
  • 848cad0ec0 Deal with harmless 32-bit integer overflow on parameters to some extension SQL functions. [bugs:/info/2026-10-15T04:34:08Z|Bug 2026-10-15T04:34:08Z] drh 2026-10-15 21:46:13 +00:00
  • 14913b9e28 Avoid a crash processing "ORDER BY rowid NULLS LAST" introduced by the previous commit. dan 2026-10-15 19:59:06 +00:00
  • 8351ef7256 Avoid a spurious corruption report in some cases when processing an ORDER BY .. NULLS LAST query against a WITHOUT ROWID table that has had columns added to it using ALTER TABLE. Forum post [forum:2026-10-15T03:54:19Z | 2026-10-15T03:54:19Z]. dan 2026-10-15 19:07:48 +00:00
  • ef3e33c3df Fix DEFAULT so that BLOB values cast to text use the database encoding. [bugs:/info/2026-10-14T17:33:12Z|Bug 2026-10-14T17:33:12Z]. drh 2026-10-15 17:36:23 +00:00
  • 4132f00833 Fix a missing term on an assert() added by the previous check-in. drh 2026-10-15 17:09:41 +00:00
  • e4facb4585 When a single loop uses an IN(...) expression and a LIKE/GLOB expression with an index, nest the 2-iteration loop that scans ranges of text and blob values using the LIKE/GLOB pattern inside the IN(...) loop in order to ensure that results are scanned in index order. Report [bugs:/info/2026-10-13T18:54:28Z | 2026-10-13T18:54:28Z]. dan 2026-10-15 15:33:09 +00:00
  • c2d796b3f2 Remove code that is no longer reachable after [bbdd13370de93035]. Add an assert() to verify that the code is unreachable. drh 2026-10-15 13:55:05 +00:00
  • e9183c57f2 Merge the 24:00:00 fix from branch-3.54 into trunk drh 2026-10-15 13:33:20 +00:00
  • 1bf6883244 Fixes to the handling of time 24:00:00. [forum:/info/2026-10-15T10:26:06Z|Forum post 2026-10-15T10:26:06Z] drh 2026-10-15 13:19:18 +00:00
  • 2d93d620dc Initial implementation of the experimental sandbox(N1,E,N2) function. The function resolves (by transforming the AST) to the expression E if N1 and N2 are the same constant expression. Requires the -DSQLITE_ENABLE_SANDBOX_FUNCTION compile-time option. drh 2026-10-14 20:14:26 +00:00
  • 90687aa700 Ensure the correct collation sequence is used for expressions like "a IN (SELECT b COLLATE ...)" when using an index on "a". Bug [bugs:/info/2026-10-14T18:00:55Z | 2026-10-14T18:00:55Z]. dan 2026-10-14 20:07:19 +00:00
  • a87eb97e08 Initial implementation of the experimental sandbox(N1,E,N2) function. The function resolves (by transforming the AST) to the expression E if N1 and N2 are the same constant expression. Requires the -DSQLITE_ENABLE_SANDBOX_FUNCTION compile-time option. drh 2026-10-14 20:06:21 +00:00
  • fb0878ac38 Fix indexes on typeless generated columns that pull from REAL columns so that they correctly return REAL values. [bugs:/info/2026-10-14T17:34:30Z|Bug 2026-10-14T17:34:30Z]. drh 2026-10-14 18:39:44 +00:00
  • 2023a2b375 Fix json_tree() when it is given a root that ends with an array index so that it returns the correct "key" for the first root. This was broken by check-in [858b76a00e8ff552] and in version 3.45.0. Problem reported by [forum:/info/2026-10-14T08:42:26Z|Forum post 2026-10-14T08:42:26Z]. drh 2026-10-14 17:52:44 +00:00
  • 3098b95515 Have testrunner.tcl unset environment variable DEBUGINFOD_URLS. Leaving it set slows down some sanitizer release tests. dan 2026-10-14 17:52:21 +00:00
  • fff257d3ed Improve the error messages emitted by fts5 in some cases. Report [forum:2026-10-13T21:57:58Z | 2026-10-13T21:57:58Z]. dan 2026-10-14 16:11:09 +00:00
  • 77a30f6648 Ensure the internal DBFLAG_SchemaKnownOk flag is always cleared after a database schema is reset. drh 2026-10-14 15:02:55 +00:00
  • a4724302d6 Add the (experimental) SQLITE_PREPARE_STATIC_SQL flag to the sqlite3_prepare_v3() interface. If present, SQLite avoids making a copy of the SQL into heap memory, thus reducing heap memory usage. static-sql drh 2026-10-14 14:17:30 +00:00
  • 23500fbf19 Ensure the internal DBFLAG_SchemaKnownOk flag is always cleared after a database schema is reset. Report [bugs:/info/2026-10-14T01:25:35Z | 2026-10-14T01:25:35Z]. dan 2026-10-14 13:39:28 +00:00
  • 9d1806e3c0 Merge bug fix from branch-3.54 into trunk. drh 2026-10-14 12:48:03 +00:00
  • 5d6a90889f Fix harmless compiler warnings from [a65c63c6a632d60c]. drh 2026-10-14 12:43:15 +00:00
  • b99380fccf Reduce per-cell bookkeeping in balance_nonroot. Use an advancing destination pointer in while loop. drh 2026-10-14 12:36:58 +00:00
  • 77e097ea68 Reduce per-cell bookkeeping in balance_nonroot. Use an advancing destination pointer in while loop. opt-balance-nonroot-cell-pointer jeffchen 2026-10-14 12:23:16 +00:00
  • eba536e8f2 The previous check-in was not quite correct. Both rLhsOrig and rLhs are vectors and so neither should be freed using sqlite3ReleaseTempReg(). Indeed, neither should be freed at all since both vectors remain in use. drh 2026-10-14 11:32:36 +00:00
  • 9266f1518b In check-in [8800c13deca3717c], fix a double-free of a byte-code register, resulting in the same register being on the reusable register list twice. [bugs:/info/2026-10-14T05:52:10Z|Bug 2026-10-14T05:52:10Z]. drh 2026-10-14 11:22:24 +00:00
  • 9919c36b55 Avoid incorrectly marking an index used by an OR-scan as a covering index leading to an "internal query planner error" error. Report [bugs:/info/2026-10-11T19:31:18Z | 2026-10-11T19:31:18Z]. dan 2026-10-13 19:04:06 +00:00
  • cf9555999e Merge all recent branch-3.54 fixes into trunk drh 2026-10-13 18:36:33 +00:00
  • 13c92f7522 Add test cases for CLI command parsing (cliparse.sql). drh 2026-10-13 18:19:05 +00:00
  • 0fbd83dc99 Avoid an assert() failure by clearing Vdbe.smimask when Vdbe.expmask is cleared. dan 2026-10-13 17:08:19 +00:00
  • cb1bf41aaa Restore 3.53.0 handling of codepoints u+fffe and u+ffff (they are separator characters) in fts3 and fts5. See forum post [forum:/info/9c6ec90d24 | 2026-10-13T08:37:16Z]. dan 2026-10-13 15:51:29 +00:00
  • c8922e6f6b Merge fixes to vec1 made on trunk into this branch. dan 2026-10-13 14:59:41 +00:00
  • 39315a4d35 Enhancements to the partial-index constraint reuse logic of check-in [8d4160910d651246] to take into account column affinity and STRICT tables. [bugs:/info/2026-10-11T20:18:09Z|Bug 2026-10-11T20:18:09Z]. drh 2026-10-13 14:00:20 +00:00
  • 5bab74a91b Merge the latest fixes on branch-3.54 into trunk drh 2026-10-13 11:05:00 +00:00
  • 76b61a60d3 Enhance OP_MustBeInt so that it is able to handle -9223372036854775808.0. [bugs:/info/2026-10-11T20:33:51Z|Bug 2026-10-11T20:33:51Z]. See also [987ba5a3dc5f2a22]. drh 2026-10-13 10:51:49 +00:00
  • 5ba0b0a4e0 Merge wasm-post-3.54 into branch-3.54: wasm build updates for emcc changes and an OPFS fix for an as-yet-hypothetical failure case. stephan 2026-10-13 06:45:28 +00:00
  • 4226522153 Fix the implementation of Tree-Tracker. [bugs:/info/2026-10-13T02:17:32Z|Bug 2026-10-13T02:17:32Z]. drh 2026-10-13 02:43:51 +00:00
  • ed9745eb7f Fix "csv" output mode in the CLI so that it responds to --colsep and --rowsep as it should. [forum:/info/2026-10-12T17:59:34Z|Forum post 2026-10-12T17:59:34Z]. drh 2026-10-13 02:14:25 +00:00
  • 264c92b923 Speed up substr() for the common case of ASCII text. drh 2026-10-12 23:38:03 +00:00
  • 77b2a47a20 Fix compiler warnings, mostly associated with the new ext/misc/optname.c extension. drh 2026-10-12 22:42:19 +00:00
  • 5e19f7e4bb Speed up substr() start scanning for ASCII text opt-substr-ascii8 jeffchen 2026-10-12 22:38:23 +00:00
  • 9de75a1245 Merge fixes from branch-3.54 onto trunk. drh 2026-10-12 22:05:35 +00:00
  • 394e7bc1ac Prevent scalar subqueries from ever returning a value with a non-zero subtype. Report [bugs:/info/2026-10-12T13:52:22Z | 2026-10-12T13:52:22Z]. Re-added after the addition of a necessary prerequisite in the previous check-in. drh 2026-10-12 21:33:49 +00:00
  • 7815214b6c An unknown function can be seen in exprNodeCanReturnSubtype(), but only if SQLite is compiled with SQLITE_ENABLE_UNKNOWN_SQL_FUNCTIONS. Adjust asserts accordingly. drh 2026-10-12 21:24:29 +00:00
  • 5e43afae7d Failed to increase the memory allocation size as required in the previous check-in. Fixed here. drh 2026-10-12 20:12:35 +00:00
  • d50d824d4d Improvements to [313ab6c4e517e599] to address the concern raised by [bugs:/info/2026-10-12T17:03:33Z|Bug comment 2026-10-12T17:03:33Z]. drh 2026-10-12 20:09:23 +00:00
  • 31c9762d0c Avoid leaking pages when remapping a database file on unix. Forum post [forum:3cfba36128 | 3cfba36128]. dan 2026-10-12 18:20:50 +00:00
  • e26021ed60 Temporarily back out the penultimate check-in on this branch in order to prevent an assertion fault. Need to reconsider this approach in light of [bug:/info/2026-05-18T14:04:01Z|Bug 2026-05-18T14:04:01Z]. That other bug might be fixed incorrectly, and might also need to be backed out. Both bugs reopened until we can complete the analysis. drh 2026-10-12 17:52:40 +00:00
  • 5bf1891464 Fix a problem causing "aggregate( t1.col1 ORDER BY t2.col2 )" where col1 and col2 are in the same positions in their tables to be treated as "aggregate( t2.col2 ORDER BY t2.col2 )". Report [bugs:info/2026-10-12T13:31:40Z | 2026-10-12T13:31:40Z]. dan 2026-10-12 16:29:30 +00:00
  • 3922c42423 Prevent scalar subqueries from ever returning a value with a non-zero subtype. Report [bugs:/info/2026-10-12T13:52:22Z | 2026-10-12T13:52:22Z]. dan 2026-10-12 16:08:07 +00:00
  • 1201b826e9 Fix a harmless compiler warning in [7f154192db5a3a79]. drh 2026-10-12 15:11:53 +00:00
  • e037ddd700 Avoid ever repreparing a statement if a call to sqlite3_bind_int64() does not actually change the bound value. dan 2026-10-12 14:05:08 +00:00
  • b853a8f042 Add test case for [bugs:/info/2026-10-11T16:09:34Z | 2026-10-11T16:09:34Z]. Bug was already fixed by [7f154192db]. dan 2026-10-12 13:44:50 +00:00
  • 48fedaa403 Avoid excessive reprepares when there is an unindexed "col=?" constraint on a join query. This should only be reprepared when the bound value toggles between integer values 0 or 1 and any other value. Report [bugs:/info/2026-10-11T16:06:46Z | 2026-10-11T16:06:46Z]. dan 2026-10-12 13:36:00 +00:00
  • 9d7c5b1472 Merge recent branch-3.54 fixes into trunk. drh 2026-10-12 12:51:45 +00:00
  • eb61c5229b When configuring with --editline, be sure to define HAVE_EDITLINE. Addresses [forum:8b9b30f6f4|forum post 2026-10-12T12:33:03Z]. stephan 2026-10-12 12:48:17 +00:00
  • 1c277afa32 When configuring with --editline, be sure to define HAVE_EDITLINE. Addresses [forum:8b9b30f6f4|forum post 2026-10-12T12:33:03Z]. stephan 2026-10-12 12:44:19 +00:00
  • 55373fee0d Improved detection of complete input in the CLI. [bugs:/info/2026-10-12T09:57:26Z|Bug 2026-10-12T09:57:26Z] drh 2026-10-12 11:42:47 +00:00