master
Mark an always-true conditional as such.
Back out the "low-quality index" query planner hack of check-in [bcac937526d9a6ef]. Subsequent query planner enhancements for dealing with star-queries make that change unnecessary and the change was recently found to cause a performance regression in an unrelated query. Also fix a typo in a debugging message.
Experimental change to allow triggers in the temp schema to use fully qualified table names in INSERT/UPDATE/DELETE statements.
Immediately reset all pending prepared statements on any call to sqlite3_set_authorizer(), even if the authorizer is being disabled.
Fix a segfault that could occur if a non-empty in-memory database was the destination of a backup operation from a database with a smaller page size.
Improved selection of the divisor when subdividing nested Bitvec objects. This fixes a potential stack overflow that can occur when the database size is within 60 pages of the maximum allowed by the file format.
Tamp down various harmless compiler warnings. Use "int" in places instead of "u16" or "i16" since the compiler complains less and generates faster code.
More code simplifications.
Early exit if one of the inner loops of a 3-way or larger join is an empty table.
Avoid signed integer overflow that may occur in a non-default build when processing a very large CREATE TABLE AS ... statement.
A better fix for the issue with RETURNING triggers on eponymous virtual tables and SQLITE_SCHEMA errors first addressed by [45d820ca22].
Add alternative sqlite3_carray_bind_v2() interface.
Enhance ability to debug out-of-memory errors.
Fix harmless typo in a comment.
In dbpage.c, disable truncation on any update error, including errors in sqlite3PagerWrite().
Add the SQLITE_INDEX_SCAN_HEX bit to the sqlite3_index_info.idxFlags bitmask. When set, this bit causes the EXPLAIN QUERY PLAN output to show the idxNum value in hex rather than in decimal. This is purely a debugging aid.
Do a better job of not generating unnecessary Bloom filters associated with IN operators.
Rename the SQLITE_OMIT_BUILTIN_TEST compile-time option to SQLITE_UNTESTABLE.
Refactor the implementation of this enhancement to keep all the code inside the query planner, not leaking out into SQL function implementations. Expand the enhancement to cover MATCH and REGEXP operators and overloads of LIKE and GLOB.
Remove all code that makes use of the C-language "long double" datatype.
Fix hwtime.h (broken by [305bb022368bac9f]) so that unamalgamated windows builds work again.
Refactor the sqlite3ExprCodeIN() routine for improved maintainability.
Enforce judgmental typing on STORED generated columns for STRICT tables. [forum:/forumpost/6caf195248a849e4|Forum post 6caf195248].
Avoid unsigned integer overflow when evaluating an array index in a JSON path expression. [forum:/forumpost/2026-01-27T14:18:49z|Forum post 2026-01-27T14:18:49z].
Ensure that the sqlite3_exec() callback gets the correct number of columns for a query, even if the schema changes out from under it.
Fix the initialization of the sqlite3Api[] constant to conform with the previous check-in.
Add an SQLITE_API_ARMOR check to sqlite3_get_clientdata(), per request in [forum:a011a001f4|forum post a011a001f4].
Guard against oversized index entries in databases larger than 2GiB.
Remove the obsolete "$Id:$" RCS identifier strings from the source code.
Add a C-source spell-checking facility. make misspell (on Nix)
Fix another harmless compiler warning for MSVC.
Extend the refactoring into extensions. Clean up stray newlines.
Fix a missing 0 at the end of an integer literal in check-in [8da0f0c38a458c57]
Code changes that make it easier to prove that no 32-bit integer overflows happen during memory allocation. No problems fixed; this change is just to make future maintenance easier.
Add assert() statements to verify that the SQLITE_OPEN_EXCLUSIVE flag is always passed to the VFS when opening a temporary file.
Fix compilation issues seen with older versions of MSVC.
Disable the debug-use-only functions sqlite3_mutex_held() and sqlite3_mutex_notheld() when compiling with TSAN in as much as those routines cause TSAN to complain. Response to [https://issues.chromium.org/issues/41427446].
Disable sqlite3_drop_module() tests when virtual tables are omitted from the build.
Add static mutexes for use by the built-in / third-party VFSs and use the built-in VFS mutex where appropriate.
Change 3 instance of #if SQLITE_ENABLE_API_ARMOR to #ifdef for consistency with how it is normally used.
Remove #ifdefs intended to make SQLite compatible with Windows RT. WinRT was short-lived and has been discontinued for a long time.
Round one of an audit for SQLITE_ENABLE_API_ARMOR for functions exposed by JNI and those functions missing armor, as [forum:5e3fc453a69b49ca|reported in several forum posts].
For the unix VFS, rewrite the xFullPathname method so that it automatically resolves all symbolic links, rendering a canonical pathname that contains no symlinks.
Change the handling of hwtime.h to make it easier to compile performance measurement builds that make use of hwtime.h. This should not affect productions builds.
Extend kvvfs export to optionally export the raw binary db pages as a list of Uint8Array instead of kvvfs-encoded strings. This is typically much larger but the pages can then be used as-is.
Fix -DSQLITE_OS_OTHER=0 builds.
Enhance the unixIsSharingShmNode() code (check-in [6385a1962c69c69c]) so that it more understandable by humans, and so that it does not trigger false positive deadlock warnings in TSAN.
Fix spurious error log reports caused by [d25c8a6222d4e3f2]. See [forum:/forumpost/d2326687662430c1|forum post d2326687662].
Add some UNUSED_PARAMATER()s for the sake of -pedantic -DSQLITE_OMIT_WAL.
Changes for better alignment with the wal2 branch.
Fix an error introduced by the previous check-in.
Add extra assert() statements to the fixes on this branch.
Increase the size of ref-count values in the pager layer to 64-bits, to avoid any reasonable possiblity of overflowing the counters. There is a performance and memory penality for this. [forum:/forumpost/b741f15a35|Forum post b741f15a35].
Use AtomicRead() and AtomicWrite() to access the pcache1_g.bUnderPressure global, to forestall unnecessary angst from thread analyzers.
Improvements to imposter tables: (1) They are read-only unless writable-schema is enabled. (2) Because they are now read-only, the ".imposter" command in the CLI no longer requires the --unsafe-testing command-line option. (3) Imposter tables do not participate in a PRAGMA integrity_check and hence do not cause false-positive errors. However, you can still do an integrity_check on the the imposter table itself by naming the imposter table as the argument to integrity_check.
Improvement implementation of the previous check-in: runs faster.
Fix a harmless compiler warning.
Remove unnecessary tabs in the ChaCha20 implementation. [forum:/forumpost/0cdce5db8c|Forum post 0cdce5db8c].
Enable an ORDER BY clause to refer to columns in outer queries.
Do not allow table-function argument expressions on the RHS of an OUTER join to refer to FROM clause elements to their right.
Fix harmless compiler warning when the CLI is compiled with SQLITE_OMIT_PROGRESS_CALLBACK.
Remove unnecessary "www." prefixes on domain names in URLs.
Reestablish APIARMOR for the sqlite3_db_status() interface.
Use the sqlite3Realloc() interface internally, rather than the public sqlite3_realloc64() equivalent, to avoid unnecessary calls to sqlite3_initialize().
Add the nTitleLimit option to QRF. Also change "line" style so that it uses zColumnSep as the divider between the title and the value.
Add config as an alias for the reconfigure makefile target. Minor makefile doc tweaks. Random typo fixes in shell.c.in and tclsqlite.h pointed out by the misspell makefile target. No code changes.
Test app/script patches from Jan Nijtmans for cygwin. Add/replace many more sentinel arguments for TCL variadic functions which specifically need a NULL trailing argument. With this, 'make test' on cygwin runs to completion for me, with 134 of 329227 tests failing. MSC build fails the same 13 tests which fail for me in trunk.
First attempt at getting the build to work with Tcl 9.0.
Cygwin-centric fixes from Jan Nijtmans.
Fix a harmless compiler warning in testing code.
Merge trunk. Some additional test-fixes for Cygwin
Remove the clunky test_windirent.h and test_windirent.c files from src/ and replace them with a much cleaner and more compact ext/misc/windirent.h.
Increase the maximum number of arguments on an SQL function to 1000 with the capability to increase it further up to 32767 using a compile-time option.
GCC 13 has become more quite pedantic about the signature of functions matching the type of pointers through which the functions are called. Make adjustments to extension functions and test procedures to work around this. No changes to the core.
Update an assert() in test_journal.c to take the new "VACUUM INTO" functionality into account.
Fix some more harmless compiler warnings.
Change the name to SQLITE_DBSTATUS_TEMPBUF_SPILL.
Fix a problem with the handling of SQLITE_FCNTL_PRAGMA in the test_onefile.c demo.
Fixes for platforms with 32-bit pointers that require 64-bit values to be aligned.
Further work on Windows header file reform.
Omit the antiquated and long-unsupport async extension since it has been superseded by WAL mode for over a decade.
Fix a few minor TCL9 compatibilities issues.
Change a single integer variable to 64-bit in the tokenizer to avoid any possibility of an integer overflow.
Improved output from calls to sqlite3ShowSrcList() made from a symbolic debugger.
Add experimental compile-time option SQLITE_ALLOW_TRIGGERS_ON_SYSTEM_TABLES.
Use the sqlite3ColumnIndex() routine to look up a column in a table, rather than using a custom loop. Performance improvement, size reduction, and complexity decrease.
Give unique names to fields in the SrcItem object, to facilitate analysis of how those fields are used using "grep".
Fix a harmless comment typo
Internal doc typo fixes reported in [forum:01d15f21b6|forum post 01d15f21b6].
In the reserve=N query parameter on the VACUUM INTO target file, the parameter is a silent no-op if N is out of range.
Add the SQLITE_PREPARE_FROM_DDL flag to sqlite3_prepare_v3(). Use this to prevent fts3/4 tables in non-trusted schemas from calling unsafe SQL functions.
Add a new encoding constant SQLITE_UTF8_ZT, which if used with sqlite3_result_text64() or sqlite3_bind_text64() declares that the string provided is UTF8 and zero-terminated at the length specified.
Assert() statements added to sqlite3_result_text64() and sqlite3_bind_text64() to detect misuse of SQLITE_UTF8_ZT that can result in undefined behavior.
Avoid invoking the preupdate hook from within sqlite3_blob_write() if the cursor is already invalid.
Add a comment to sqlite3Stat4Value() explaining that it read a few bytes past the end of the specified buffer.
Include writes to temp files by sort operations in the SQLITE_DBSTATUS_SPILL values.
Enhance the tokenizer so that it is able to deal with individual tokens larger than 2GiB.
Avoid 32-bit overflow when calculating ncycle for ".scanstats vm".
Add the ability to compile with -DOS_VXWORKS=1 on Linux systems, in an effort to debug the VxWorks capabilities without actually having to run VxWorks.
Add (void) to two places for the sake of SQLITE_OMIT_WAL builds. Why these do not complain on tests in this tree, but do on a downstream tree (same machine, same compiler), is a mystery.
ifdef adjustments so that SQLITE_OMIT_WAL works with SQLITE_USE_SEH.
Refactor the SrcItem object so that information about subqueries is stored in a separately allocated Subquery object. This reduces the memory requirements for SrcItem and makes the code run faster. It also provides an expansion path for subquery processing that does not burden simple queries. The current checking mostly works, but there are still issues that need to be tracked down and fixed.
Improved comments on this enhancement. No code changes.
Compute WhereLevel.addrBrk and .addrHalt early so that those labels can be used to abort loops early. Use this to improve performance on two more of the cases described by [forum:/forumpost/52651713ac|forum post 52651713ac].
Create a new internal subroutine specifically designed to allocate Expr nodes that hold a 32-bit integer.