SQLite

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

100 most recent check-ins related to "trunk"

2025-07-10
20:45
Improve the accuracy of the ETC on both devtest and releasetest. (Leaf check-in: a3f96cafdc user: drh tags: trunk)
17:19
Add the estkey column to the jobs table of testrunner.db. The plan is to use this to collect measurements that will help generate improved ETAs for a test run. (check-in: 9eccf5267c user: drh tags: trunk)
09:27
Minor internal doc correction in vdbeInt.h. (check-in: c3a2ef639c user: stephan tags: trunk)
2025-07-09
20:11
Fix the empty-table optimization on INTERSECT so that it does not try to use an uninitialized register for LIMIT processing. (check-in: 6918ada008 user: drh tags: trunk)
2025-07-08
22:11
Fix a possible user-after free following OOM in the EXISTS-to-JOIN optimization. (check-in: 498ee8d514 user: drh tags: trunk)
20:28
Adjustments to test/incrblob4.test so that it works on both Linux and Mac in spite of error message differences between those platforms. Minor change to termIsEquivalent() to provide 100% MC/DC. (check-in: 720387f860 user: drh tags: trunk)
19:53
New optimizations to detect early when queries return no rows due to tables being empty. This includes the EXISTS-to-JOIN optimization that tries to transform EXISTS constraints into additional terms of the FROM clause. (check-in: e33da6d5dc user: drh tags: trunk)
19:02
Fix a problem with the fix in [5cb8e342e1]. (check-in: 043ff54fb7 user: dan tags: trunk)
18:44
Fix another problem with running fts5 integrity-check in SQLITE_DEBUG builds, this one causing an assert() failure. (check-in: 5cb8e342e1 user: dan tags: trunk)
17:28
Enable the EXISTS-to-JOIN optimization if the outer query has no FROM clause. (Closed-Leaf check-in: 1b9b124f9a user: drh tags: empty-table-optimizations)
14:54
If SQLITE_DEBUG is defined, fts5 does extra checks as part of integrity-check. Ensure that errors from these extra checks are only reported if the other, normal, tests all pass. This fixes a test case in fts5corrupt3.test that was failing if SQLITE_DEBUG was defined. (check-in: 98a53fb276 user: dan tags: trunk)
12:37
Fix test case results in FTS5 that were changed error message improvements in [48044a6b57c0a16c] but which were omitted from that check-in. (check-in: e1f8e0240b user: drh tags: trunk)
2025-07-07
20:47
Only run preupdate-hook tests in incrblob4.test if the preupdate-hook is enabled in the build. (check-in: 56314b6b53 user: dan tags: trunk)
18:35
Merge the latest trunk enhancements and fixes into the empty-table-optimizations branch. (check-in: f15cdf0757 user: drh tags: empty-table-optimizations)
16:28
Rework the fix to the problem described by forum post b9647a113b so that it provides a more complete fix that covers cases that were not resolved by the original fix, and so that it does not cause performance regressions. (Leaf check-in: 4084ac20f4 user: drh tags: branch-3.50)
16:19
Rework the fix to the problem described by forum post b9647a113b so that it provides a more complete fix that covers cases that were not resolved by the original fix, and so that it does not cause performance regressions. (check-in: 28db0d152d user: drh tags: trunk)
15:40
Simplifications to the row-value IN operator logic. Do not let the query planner accept a WhereLoop for a row-value IN operator that uses the same index column more than once. (Closed-Leaf check-in: d2adf61f21 user: drh tags: redundant-idx-columns)
14:42
Work around the Emscripten 4.10 regression described in Emscripten ticket #24656. (check-in: db96ff7bbc user: stephan tags: branch-3.50)
12:11
Work around the Emscripten 4.10 regression described in Emscripten ticket #24656. Problem reported off-list by BrickViking. (check-in: c385475b25 user: stephan tags: trunk)
11:37
Avoid invoking the preupdate hook from within sqlite3_blob_write() if the cursor is already invalid. (check-in: 9f335b9a4e user: dan tags: trunk)
10:54
Back out the fix at [ba7d5bad32ad6aac] because it does not always work and because it causes a performance regression. Add new test cases for row-value lookups of indexes that contain redundant columns, three of which are currently failing. This branch is seeking an improved solution to the redundant index column problem for row-value lookups. (check-in: ad8ddcefab user: drh tags: redundant-idx-columns)
02:23
Fix a parsing error introduced by the addition of the ability to disable comments. (check-in: 602f8a639c user: drh tags: branch-3.50)
02:18
Fix parser error introduced by [325e547a2195571e]. See forum post 095dbfc06e5. (check-in: 4eefab4494 user: drh tags: trunk)
2025-07-06
15:01
Experimentally add sqlite3.oo1.DB/Stmt.wrapHandle(), which allow DB/Stmt instances to wrap a (sqlite3*)/(sqlite3_stmt*) optionally with or without taking ownership of it. The intent is to enable mix-and-match use of the C API, the oo1 API, and any other hypothetical API which exposes those pointers. oo1.Stmt.parameterCount is now a property access interceptor like Stmt.columnCount is, but that doesn't change how it's used. (check-in: 1227543b87 user: stephan tags: oo1-unowned-handles)
2025-07-04
18:38
Propagate the -ldl and -lpthread flags, if needed, into sqlite3.pc, per request in forum post 44a58c807353162f. This resolves usage of that pkgconf file on some OSes. (check-in: b4db6ddeed user: stephan tags: branch-3.50)
18:32
Add 'reconfigure' target to Makefile.in to re-run the configure script with the same flags it was generated with. (check-in: c60907e77b user: stephan tags: trunk)
17:20
Propagate the -ldl and -lpthread flags, if needed, into sqlite3.pc, per request in forum post 44a58c807353162f. (check-in: 64f5f14322 user: stephan tags: trunk)
14:24
Merge fixes from trunk into the empty-table-optimizations branch (check-in: 6f98b16d21 user: drh tags: empty-table-optimizations)
12:25
Fix harmless compiler warnings. (check-in: 13af4acebe user: drh tags: trunk)
11:48
Remove an ALWAYS() added by [960a8e6fc91f4] that turns out to be false in some cases of malformed SQL. (check-in: cc8171461b user: drh tags: trunk)
10:17
Merge trunk into column-text-blob-v2 branch. (Leaf check-in: f73460d4f0 user: stephan tags: column-text-blob-v2)
2025-07-03
20:51
Merge the latest trunk fixes and enhancements into the empty-table-optimizations branch (check-in: d4f47e04f5 user: drh tags: empty-table-optimizations)
16:05
Fix a few cases where LIMIT clauses that were part of scalar sub-queries on virtual tables were not being passed to xBestIndex methods correctly. (check-in: 960a8e6fc9 user: dan tags: trunk)
15:50
Improvements to sqlite3_vtab_rhs_value() logging in the ext/misc/vtablog.c extension. (Closed-Leaf check-in: 25131ee84f user: drh tags: vtab-limit-fixes)
14:28
Make handling of LIMIT clauses in correlated sub-queries on virtual tables more efficient. (check-in: 7214cb2a5b user: dan tags: vtab-limit-fixes)
14:10
Enhancements to the xBestIndex output from the ext/misc/vtablog.c extension. (check-in: 8b31acc0b1 user: drh tags: trunk)
11:52
Fix an uninitialized variable added yesterday by [d27d34fb746280e7]. This problem was discovered overnight by OSSFuzz. (check-in: 6db4703f11 user: drh tags: trunk)
2025-07-02
13:19
If the LHS for an EXCEPT or INTERSECT operator is empty, skip over the computation of the RHS. (check-in: 13f096ae8a user: drh tags: empty-table-optimizations)
11:47
Improve the bytecode for joins such that it exits earlier if it determines that no output is possible. (check-in: 2d2b61cba4 user: drh tags: trunk)
02:03
Ensure that Expr.op2 values for TK_AGG_FUNCTION nodes are adjusted when query flattening. (check-in: d27d34fb74 user: drh tags: trunk)
2025-07-01
23:17
Improved comments on bytecode used to implement aggregate queries, to aid in debugging. (check-in: a1a8b85cdb user: drh tags: trunk)
20:32
Improved byte-code comments for the short-circuit optimization of [0083d5169a46104a], to aid in debugging. (check-in: 113f9d10e3 user: drh tags: trunk)
17:36
Cache and reuse virtual table cursors in the bytecode engine. (check-in: 2d187d4232 user: drh tags: trunk)
16:21
Avoid an assert() failure in fts5 that may occur when processing corrupt records. (check-in: 8afd6ca857 user: dan tags: trunk)
15:13
Merge trunk fixes into the empty-table-optimizations branch. (Closed-Leaf check-in: 63306e447e user: drh tags: empty-table-optimizations)
12:49
When attempting to optimize "expr AND false" to "false" and "expr IN ()" to "false", take care not to delete aggregate functions in the "expr" as doing so can change the meaning of the query. (check-in: 355c7902de user: drh tags: branch-3.50)
12:43
When attempting to optimize "expr AND false" to "false" and "expr IN ()" to "false", take care not to delete aggregate functions in the "expr" as doing so can change the meaning of the query. See forum thread f4878de3e7. (check-in: 77397bd67d user: drh tags: trunk)
2025-06-30
23:17
Restart this branch using a different take: add new "v2" routines instead of refactoring the old ones, which eliminates any performance impact or risk of behavior change for existing APIs. None of this code is actually called from anywhere yet. (check-in: b0b1b4ccb9 user: stephan tags: column-text-blob-v2)
22:15
Initial experimental internal changes needed to support a hypothetical sqlite3_column_text/blob_v2(), as discussed in forum post 402a837960d9de45. This is just the first step: this change needs to cascade upwards a couple of levels, remove one level of porting-crutch API, and go through performance comparisons before we'll know whether it's really feasible. make devtest passes but there are corner error cases which require more precise testing to ensure that there are no visible changes in behavior. (Closed-Leaf check-in: 730c6a623e user: stephan tags: column-text-blob-v2)
20:19
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 post 52651713ac. (check-in: 6fc0b9ac23 user: drh tags: empty-table-optimizations)
16:41
Strive to skip the evaluation of scalar subqueries that are part of a larger expression if the result from the scalar subquery does not change the result of the overall expression. (check-in: 0083d5169a user: drh tags: trunk)
12:14
For all binary operators, try to avoid computing subquery operands if the other operand is NULL. (Closed-Leaf check-in: d86eb16283 user: drh tags: optimize-null-values)
11:46
Preliminary refactoring of the XDG_CONFIG_HOME support to support the pending addition of other XDG-configurable options. In response to forum post 31db1a23f9. (check-in: 69b9244e3a user: stephan tags: shell-xdg-vars)
11:01
Minor API doc typo fixes from brickviking. (check-in: 581a088df7 user: stephan tags: branch-3.50)
11:00
Minor API doc typo fixes from brickviking. (check-in: b48d951916 user: stephan tags: trunk)
2025-06-29
07:32
Minor API doc typo fixes from brickviking. (check-in: 45acc26bb0 user: stephan tags: branch-3.50)
07:32
Minor API doc typo fixes from brickviking. (check-in: c7cf9dcb69 user: stephan tags: trunk)
2025-06-28
17:59
Improve the bytecode generated for comparisons so that if one operand is a subquery and the other operand evaluates to NULL, the subquery operand is not even computed. This fixes 5 of the 11 slow queries described in forum post 52651713ac. (check-in: f147bc0477 user: drh tags: optimize-null-values)
14:36
Merge all the latest trunk fixes and enhancements into the reuse-schema branch. (Leaf check-in: 6e1f97d99b user: drh tags: reuse-schema)
14:24
Merge the latest trunk enhancements into the wal2 branch. (Leaf check-in: e7867c3992 user: drh tags: wal2)
14:16
Merge the latest trunk enhancements into the begin-concurrent branch. (Leaf check-in: 1ae8d60237 user: drh tags: begin-concurrent)
2025-06-27
19:56
Raise an error right away if the number of aggregate terms in a query exceeds the maximum number of columns. (check-in: 4ae45291e6 user: drh tags: branch-3.50)
19:02
Raise an error right away if the number of aggregate terms in a query exceeds the maximum number of columns. (check-in: 5508b56fd2 user: drh tags: trunk)
12:51
API doc typo fixes and closing DD element tags from brickviking. (check-in: 6113572247 user: drh tags: branch-3.50)
12:46
API doc typo fixes and closing DD element tags from brickviking. (check-in: c9ddd15b01 user: stephan tags: trunk)
2025-06-26
18:57
Work around an apparent GCC UBSAN bug. See forum thread 1d7c25d4a2d for details. (check-in: 23056532e5 user: drh tags: trunk)
15:41
Minor API doc fixes sent off-list from brickviking. (check-in: a9e9cefd05 user: drh tags: branch-3.50)
2025-06-25
20:42
Minor API doc fixes sent off-list from brickviking. (check-in: cb4d05633a user: stephan tags: trunk)
2025-06-24
18:27
Similar fix to the previous check-in, but this time for sqlite3_preupdate_new(). (check-in: 9aaff764d5 user: drh tags: trunk)
15:58
Range check the column index on the sqlite3_preupdate_old() interface and return SQLITE_MISUSE if too large. Forum post b617e49728. (check-in: 6a5701e6c7 user: drh tags: trunk)
07:38
API doc typo fixes and one rephrasing improvement from brickviking. (check-in: 85e8060c47 user: stephan tags: trunk)
2025-06-23
19:38
Improve some of the error messages emitted by fts5 when it encounters corruption. (check-in: 48044a6b57 user: dan tags: trunk)
19:00
Fix an SQL typo introduced by the previous check-in. (check-in: 72a81d247b user: drh tags: trunk)
16:51
Escape the "_" character in LIKE patterns in the CLI. Forum post 6a89702f5d. (check-in: cf61cd359e user: drh tags: trunk)
13:42
Fix a harmless compiler warning injected by [c978aed3b6f82b3d]. (check-in: f46500247b user: drh tags: trunk)
13:28
Improved "statement aborts at ..." log-file messages that identify the trigger that caused the abort. (check-in: 7691264fe3 user: drh tags: trunk)
2025-06-22
22:48
Add the --disable-rpath configure script flag to address forum post 13cac3b56516f849. (check-in: a59d9bb25e user: stephan tags: trunk)
12:04
API doc typo fixes from brickviking. (check-in: 18e07f8f53 user: stephan tags: trunk)
2025-06-21
16:33
Minor JS test cleanups prompted by a linter. (check-in: 764235a3d1 user: stephan tags: trunk)
16:18
Remove some duplicated JS tests. (check-in: d1cb9ed79d user: stephan tags: trunk)
16:02
Reduce the maximum --size flag for JS kvvfs speedtest1 from 4 to 2, as --size 3 and 4 are overflowing the kvvfs storage limits. (check-in: b77b3adc82 user: stephan tags: trunk)
15:58
Give oo1.Stmt.get() similar treatment to [8c187140a60b]. This is an internal change only - the API is unaffected. (check-in: f5a7abc0a4 user: stephan tags: trunk)
15:38
Extend the SEE-via-kvvfs tests to include all three key types. (check-in: fc001aa5ee user: stephan tags: trunk)
14:38
Rework how JS's oo1.DB.exec() flags its Stmt objects to make certain Stmt APIs illegal (i.e. throwing) if called while that Stmt is being step()ped by DB.exec() (which can happen via client-provided per-result-row callbacks). This is an internal change only - the API is unaffected. Remove some unrelated dead code. (check-in: 8c187140a6 user: stephan tags: trunk)
06:07
Numerous small doc typo from BrickViking. (check-in: 3aab4415de user: stephan tags: trunk)
2025-06-20
13:12
Enhance sqlite3BtreeSetPageSize() so that it detects early if no changes are needed and exists with SQLITE_OK. (check-in: c978aed3b6 user: drh tags: trunk)
2025-06-19
20:19
Fix an out-of-order local variable declaration in ext/misc/fileio.c. (check-in: a88bb75288 user: drh tags: trunk)
20:00
Improve the accuracy of sqlite3BtreeRowCountEst(). (check-in: e553fb538e user: drh tags: trunk)
19:33
Generalize the indexCellCompare() so that works on any index page, not just the current page that a cursor is pointing to. (check-in: b305a7f5db user: drh tags: trunk)
13:48
Cherry-pick of documentation updates from trunk - no code changes. (check-in: c53906260e user: drh tags: branch-3.50)
12:35
A slight doc rephrasing for clarity, suggested in the forum. (check-in: 0d6084a398 user: stephan tags: trunk)
10:46
Doc typo fixes from forum post 0bce273669. (check-in: 8f97e3f00d user: stephan tags: trunk)
10:25
Expose the column metadata APIs to WASM (which does not require a non-default sqlite3.c build, contrary to my prior mistaken claims). This adds only 424 bytes to sqlite3.wasm and 660 bytes to sqlite3.js. (check-in: 3cf983816c user: stephan tags: trunk)
2025-06-18
19:04
Extend the pedantic enforcement of type in STRICT tables to cover VIRTUAL columns. (check-in: b734c74e55 user: drh tags: trunk)
16:17
Enforce judgmental typing on STORED generated columns for STRICT tables. Forum post 6caf195248. (check-in: 5e9279bff0 user: drh tags: trunk)
15:37
Export the column-metadata APIs to WASM. Doing so requires a non-default build of sqlite3.c, so this is a proof-of-concept branch saved just in case SQLITE_ENABLE_COLUMN_METADATA ever becomes the default for sqlite3.c. Edit: that was a misunderstanding on my part. This build increases the .wasm file by only 424 bytes and the JS by 660, so there's no blocker to merging this. (Closed-Leaf check-in: 59db3f639d user: stephan tags: wasm-column-metadata)
15:22
Add the --enable-column-metadata flag to the configure script (off by default). It's only available in the canonical build, not the autoconf build, because it changes how sqlite3.c gets generated. (check-in: 986b601db1 user: stephan tags: trunk)
14:17
Eliminate configure/build discrepancies in how 'make tclextension-...' works vs other makefile-side handling of the extension, conforming to the former. (check-in: 7ca545fd3b user: stephan tags: trunk)
14:14
Change the definition of SQLITE_DYNAMIC to a function that has exactly the same type as sqlite3_destructor_type, in an effort to work around possible legacy compiler bugs. (check-in: 83553edf78 user: drh tags: trunk)
11:11
Add the --tclConfig.sh FILE flag to buildtclext.tcl to eliminate the discrepancy between the configure-time-detected tclConfig.sh and the one auto-detected by the tclextension family of makefile targets. Add the tclextension-all target to run all of the various tclextension-... targets in their natural order to facilitate testing changes like this one. Update the --help text to note that --with-tclsh should only be used if there's a specific need, and that --with-tcl is generall preferred. This is in response to Termux ticket 23268. (check-in: 928976abcb user: stephan tags: trunk)