1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-20 13:03:09 +03:00

Commit Graph

  • 2445ee0e37 Factor out the unusual encoding-change case from vdbeCompareMemString() for a performance improvement in the common case, and a small size reduction. master drh 2025-07-19 20:10:07 +00:00
  • ea8f9708c5 Small performance optimization in sqlite3VdbeRecordUnpack(). drh 2025-07-19 19:54:44 +00:00
  • bcd14a0a3e Split the (internal) sqlite3VdbeCheckFk() routine into two variants, sqlite3VdbeCheckFkImmediate() and sqlite3VdbeCheckFkDeferred(), which run faster than the combined general-purpose variant. drh 2025-07-19 18:46:03 +00:00
  • c585e03a4b Use fewer CPU cycles to commit a read transaction. drh 2025-07-19 18:17:06 +00:00
  • 1f436ad563 Add SQLITE_SELFORDER1 to JS's sqlite3.capi namespace. It's only useful when built with an sqlite3.c which itself was created with -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES, which the canonical build does not do but custom builds may. stephan 2025-07-18 22:18:41 +00:00
  • daa4cdf84a Fix a minor comment inaccuracy. drh 2025-07-18 19:17:32 +00:00
  • bae748a76e Increase the precision of the "real time" output from the ".timer" command in the CLI from milliseconds to microseconds. drh 2025-07-18 17:40:34 +00:00
  • b3718ccd92 Ensure that the accumulator for an aggregate always gets initialized, even when the aggregate is on the right side of a LEFT JOIN and never gets evaluated. Also increment the version number. branch-3.50 drh 2025-07-18 12:22:41 +00:00
  • 74cc109780 Ensure that the accumulator for an aggregate always gets initialized, even when the aggregate is on the right side of a LEFT JOIN and never gets evaluated. This fixes a problem introduced by [663f5dd32d9db832] and found by dbsqlfuzz. Test cases in TH3. drh 2025-07-18 12:10:15 +00:00
  • 01a2953350 Pedantic internal build doc fix. stephan 2025-07-17 19:18:01 +00:00
  • 4402f35000 Merge the latest trunk enhancments into the reuse-schema branch. reuse-schema drh 2025-07-17 15:38:46 +00:00
  • b46738f169 Merge all of the trunk enchancements into the bedrock branch. bedrock drh 2025-07-17 15:31:16 +00:00
  • 825751eb69 Merge the latest trunk enhancements into the wal2 branch. wal2 drh 2025-07-17 15:24:19 +00:00
  • 90ca27d507 Merge the latest trunk enhancements into the begin-concurrent branch. begin-concurrent drh 2025-07-17 15:18:14 +00:00
  • 5b0592a36f Merge the 3.50.3 changes into the reuse-schema-3.50 branch reuse-schema-3.50 drh 2025-07-17 14:02:44 +00:00
  • a4643b451a Version 3.50.3 version-3.50.3 release drh 2025-07-17 13:25:10 +00:00
  • cf05295a85 Diverse wasm build cleanups. stephan 2025-07-16 20:50:40 +00:00
  • 5b4bbf6dbb Code style conformance tweaks and remove a ref to a now-dead makefile var. wasm-build-parallel stephan 2025-07-16 18:51:07 +00:00
  • 91db1c413b Fix vtabH.test so that it works on windows even if there are files that begin with "$" in the root directory. dan 2025-07-16 17:24:31 +00:00
  • ea17024eed Build .wasm/.js files into a build-mode-specific subdir, the goal being to be able to build them in parallel. This works, but (A) adds a bit of build ugliness and (B) is not actually parallelizing, so needs a closer look after a break. stephan 2025-07-16 17:00:38 +00:00
  • 10687e283a Remove some stray makefile debug output. stephan 2025-07-16 16:56:33 +00:00
  • 074b1aa42d In the wasm makefiles, replace X:=Y with X=Y because := has different semantics depending on the make impl and its use is arguably a bad muscle-memory habit worth breaking. These makefiles are very specifically for GNU make, but long-term it would be nice to eliminate that requirement. stephan 2025-07-16 14:51:23 +00:00
  • 522ce56734 wasm: remove some extraneous levels of makefile var and fix the (unsupported) wasmfs speedtest1 build to account for var renaming which happened long before this. stephan 2025-07-16 13:22:38 +00:00
  • 68b74e2c42 Remove an unnecessary step from the wasm builds and account for a recent Emscripten-internal code-generation change which caused a post-build cleanup step to not actually clean up (harmless, but adds about 26k of useless stuff to the resulting JS). stephan 2025-07-16 11:56:16 +00:00
  • e5a7b815af Further internal wasm build cleanups. No functional changes. stephan 2025-07-16 11:09:18 +00:00
  • f98148be9c Internal refactoring of the WASM build makefile rule generator, working towards parallelizing the various build modes (which is not currently possible because most modes share the same sqlite3.wasm output file name). stephan 2025-07-16 10:34:14 +00:00
  • 27e13f4f3a Teach the sqlite3 CLI shell to look in XDG_STATE_HOME for the CLI history file before falling back to its historical location in the user's home directory. stephan 2025-07-16 09:27:55 +00:00
  • 3a97a1ba8c Squelch a legitimate but harmless 'discards const' warning. shell-xdg-vars stephan 2025-07-16 09:20:02 +00:00
  • 81e9bbf8da Avoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses attached to left joins from being evaluated too early. Fix for [forum:/forumpost/428ef7c468 | forum post 428ef7c468]. dan 2025-07-15 19:00:01 +00:00
  • 7d20c2e8a3 Add test case to between.test. vtab-leftjoin-fix dan 2025-07-15 18:51:46 +00:00
  • f121227f87 Have SQLite request a plan with no setup-cost from xBestIndex if the plan in question may only be used as the outermost loop of the query. vtab-setup-cost dan 2025-07-15 17:03:51 +00:00
  • 75b03b9c11 Optimize allocation of large tombstone arrays in fts5. drh 2025-07-15 14:21:08 +00:00
  • 192d0ff8cc Optimize allocation of large tombstone arrays in fts5. dan 2025-07-15 14:06:15 +00:00
  • 812c015515 Fix the date in bestindexE.test. dan 2025-07-15 11:27:16 +00:00
  • 44db9fcb1e Add comments to sqlite.h.in describing the change on this branch. dan 2025-07-14 18:59:45 +00:00
  • 97e6368abc Add the snapshot-zip makefile targets for both Windows and Posix. drh 2025-07-14 18:27:32 +00:00
  • d74e285046 Merge latest trunk changes into this branch. dan 2025-07-14 18:03:23 +00:00
  • 1c11aa3da2 Enhance the "mktoolzip.tcl" script (used by the "tool-zip" makefile target) so that it uses "fossil test-filezip" to build the ZIP archive if available, and so that it also generates windows-dll-*.zip on Windows platforms. drh 2025-07-14 16:05:59 +00:00
  • bf5f1f5172 In rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag is cleared. Fix for [forum:/forumpost/3e45ed31d8 | forum post 3e45ed31d8]. dan 2025-07-14 15:40:25 +00:00
  • 194f0bada7 In rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag is cleared. Possible fix for [forum:/forumpost/3e45ed31d8 | forum post 3e45ed31d8]. rtree-aux-column-fix dan 2025-07-14 15:34:11 +00:00
  • 08f8111bd8 Add new sessions function sqlite3changeset_apply_v3() and its streaming equivalent. This allows changesets to be filtered on a per-change basis, not just per-table. dan 2025-07-14 14:51:43 +00:00
  • f8addcf937 Fix harmless compiler warnings in builds that use SQLITE_OMIT_DATETIME_FUNCS. drh 2025-07-14 09:41:59 +00:00
  • bcfe38b96a Avoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses attached to left joins from being evaluated too early. Possible fix for [forum:/forumpost/428ef7c468 | forum post 428ef7c468]. dan 2025-07-12 18:14:41 +00:00
  • 80a19cab88 Experimental change to allow virtual table xBestIndex() methods to specify an initial setup cost for a plan. dan 2025-07-12 16:35:54 +00:00
  • 1b8f6558f8 wasm: introduce the sqlite3.oo1.DB.wrapHandle() and Stmt.wrapHandle() APIs, which enable clients to wrap (sqlite3*) resp. (sqlite3_stmt*) pointers in their oo1 API counterparts, optionally with or without taking over ownership of the pointer. stephan 2025-07-11 19:52:36 +00:00
  • 1f68085849 Clearer docs for the unowned db/stmt handle mechanism. oo1-unowned-handles stephan 2025-07-11 19:44:42 +00:00
  • c493e4516a Correct a one-too-many-exclamation-points bug which caused the opposite of intended semantics in oo1.Stmt.pointer ownership. stephan 2025-07-11 19:34:30 +00:00
  • 69b5674b40 Additional header comment documentation in the ext/misc/vtablog.c test extension. drh 2025-07-11 17:02:11 +00:00
  • 868f32abbd Merge trunk into column-text-blob-v2 branch. column-text-blob-v2 stephan 2025-07-11 14:18:19 +00:00
  • 08103b6aa8 Add column/value_text/blob_v2() to the sqlite3_api object. stephan 2025-07-11 12:56:59 +00:00
  • 0eca9db776 speedtest1: in WASM builds, disable the "app" test set by default because that one set is triggering file-not-found errors for the db file for reasons not yet understood. stephan 2025-07-11 11:06:25 +00:00
  • c066f2af9c Do not export the numerous Emscripten HEAPxy symbols and remove the last remaining JS code which references them. They have long-since been replaced by internal equivalents and a specific feature check on one of them (which is also no longer needed) is triggering an exception from Emscripten. More details are in [https://github.com/emscripten-core/emscripten/issues/24656 | Emscripten ticket #24656], noting that this is not an Emscripten bug but an Emscripten behavior change brought it to light. stephan 2025-07-11 10:27:06 +00:00
  • 625d0b70fe Improve the accuracy of the ETC on both devtest and releasetest. drh 2025-07-10 20:45:00 +00:00
  • 45bff0ea64 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. drh 2025-07-10 17:19:08 +00:00
  • 07b483c48e Minor internal doc correction in vdbeInt.h. stephan 2025-07-10 09:27:57 +00:00
  • 6fd9469a32 Minor JS doc tweaks. stephan 2025-07-10 09:25:57 +00:00
  • 33c2e37f98 Fix the empty-table optimization on INTERSECT so that it does not try to use an uninitialized register for LIMIT processing. drh 2025-07-09 20:11:49 +00:00
  • 2ba5a93e8f wasm: DB.wrapHandle() no longer accepts a DB object as its first argument, as there's no apparent use case for proxying one DB object with another. Doc improvements for the new code. stephan 2025-07-09 13:43:53 +00:00
  • 6276637075 wasm: add a few tests demonstrating that oo1.Stmt.paramaterCount's new impl does not change visible behaviors. Add the c-pp-filtered files to 'make clean'. stephan 2025-07-09 13:13:01 +00:00
  • 8663a78ec9 Fix a possible user-after free following OOM in the EXISTS-to-JOIN optimization. drh 2025-07-08 22:11:39 +00:00
  • aa12f0027b 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. drh 2025-07-08 20:28:35 +00:00
  • 9a13a21223 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. drh 2025-07-08 19:53:36 +00:00
  • 9b91aac83b Fix a problem with the fix in [5cb8e342e1]. dan 2025-07-08 19:02:26 +00:00
  • acd1d93497 Fix another problem with running fts5 integrity-check in SQLITE_DEBUG builds, this one causing an assert() failure. dan 2025-07-08 18:44:56 +00:00
  • 449b34571e Enable the EXISTS-to-JOIN optimization if the outer query has no FROM clause. empty-table-optimizations drh 2025-07-08 17:28:09 +00:00
  • 9615cf93c8 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. dan 2025-07-08 14:54:20 +00:00
  • 925b79039c Fix test case results in FTS5 that were changed error message improvements in [48044a6b57c0a16c] but which were omitted from that check-in. drh 2025-07-08 12:37:25 +00:00
  • 7fc6e6a272 Only run preupdate-hook tests in incrblob4.test if the preupdate-hook is enabled in the build. dan 2025-07-07 20:47:23 +00:00
  • 8c8443a38a Small performance optimization in the resolver. drh 2025-07-07 19:03:50 +00:00
  • 44a03671c4 Merge the latest trunk enhancements and fixes into the empty-table-optimizations branch. drh 2025-07-07 18:35:51 +00:00
  • 65ffbcd7c0 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. drh 2025-07-07 16:28:59 +00:00
  • 0a5508aeb4 Rework the fix to the problem described by [forum:/forumpost/b9647a113b465950|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. drh 2025-07-07 16:19:44 +00:00
  • 4fe1ac8fe1 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. redundant-idx-columns drh 2025-07-07 15:40:53 +00:00
  • 1587604c6b Work around the Emscripten 4.10 regression described in [https://github.com/emscripten-core/emscripten/issues/24656 | Emscripten ticket #24656]. stephan 2025-07-07 14:42:30 +00:00
  • 24d290e7b0 Work around the Emscripten 4.10 regression described in [https://github.com/emscripten-core/emscripten/issues/24656 | Emscripten ticket #24656]. Problem reported off-list by BrickViking. stephan 2025-07-07 12:11:26 +00:00
  • 8504d37b99 Avoid invoking the preupdate hook from within sqlite3_blob_write() if the cursor is already invalid. dan 2025-07-07 11:37:55 +00:00
  • 4aacd1ef8e 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. drh 2025-07-07 10:54:00 +00:00
  • 8bf6452870 Fix a parsing error introduced by the addition of the ability to disable comments. drh 2025-07-07 02:23:40 +00:00
  • 0840460689 Fix parser error introduced by [325e547a2195571e]. See [forum:/forumpost/095dbfc06e5b1f7e|forum post 095dbfc06e5]. drh 2025-07-07 02:18:27 +00:00
  • 240319decd Remove some dead JS code and some extraneous debug output from test code. stephan 2025-07-06 15:36:28 +00:00
  • 787f4c3f09 JS doc additions. stephan 2025-07-06 15:13:06 +00:00
  • 4d453cc2ed 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. stephan 2025-07-06 15:01:44 +00:00
  • c701d17366 Improvements to the EXPLAIN QUERY PLAN output for EXISTS-to-JOIN. drh 2025-07-06 01:19:09 +00:00
  • 8bc112e3e4 Enhance the EXISTS-to-JOIN optimization so that it works on EXISTS subqueries that do not have a WHERE clause, and so that it works on nested EXISTS subqueries. drh 2025-07-05 23:33:21 +00:00
  • 7a6ff62658 Propagate the -ldl and -lpthread flags, if needed, into sqlite3.pc, per request in [forum:44a58c807353162f | forum post 44a58c807353162f]. This resolves usage of that pkgconf file on some OSes. stephan 2025-07-04 18:38:23 +00:00
  • 27408ab9c9 Add 'reconfigure' target to Makefile.in to re-run the configure script with the same flags it was generated with. stephan 2025-07-04 18:32:18 +00:00
  • d9eae6b75a Propagate the -ldl and -lpthread flags, if needed, into sqlite3.pc, per request in [forum:44a58c807353162f | forum post 44a58c807353162f]. stephan 2025-07-04 17:20:37 +00:00
  • 45bc9b9f97 Merge fixes from trunk into the empty-table-optimizations branch drh 2025-07-04 14:24:18 +00:00
  • e33ea17d24 Fix harmless compiler warnings. drh 2025-07-04 12:25:24 +00:00
  • a12e92d2f7 Remove an ALWAYS() added by [960a8e6fc91f4] that turns out to be false in some cases of malformed SQL. drh 2025-07-04 11:48:11 +00:00
  • 478dfc7e74 Do not allow the EXISTS-to-JOIN optimization if the EXISTS clause is based on a view, since that view might expand into a join. drh 2025-07-04 11:06:34 +00:00
  • 1b62720fa8 Improve the early-termination optimization so that it works in queries which use the LIKE optimization in the outer loop. drh 2025-07-04 10:26:55 +00:00
  • a1a2269ab0 Merge trunk into column-text-blob-v2 branch. stephan 2025-07-04 10:17:25 +00:00
  • 67090e987b Tweak for coverage testing of valueToTextV2(). This changes passes through coverage testing but doesn't look quite right to me, in that this part now differs from its counterpart in valueToText() (which doesn't need this to get coverage for what amounts to the same path). stephan 2025-07-04 10:10:32 +00:00
  • 1e3a862b79 Merge the latest trunk fixes and enhancements into the empty-table-optimizations branch drh 2025-07-03 20:51:08 +00:00
  • bd05edd98f 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. dan 2025-07-03 16:05:41 +00:00
  • a24a397b8b Improvements to sqlite3_vtab_rhs_value() logging in the ext/misc/vtablog.c extension. vtab-limit-fixes drh 2025-07-03 15:50:18 +00:00
  • 0e6e05d4d5 Make the value of an explicit LIMIT clause on a scalar sub-query available to xBestIndex for simple "LIMIT 0" and "LIMIT 1" queries. dan 2025-07-03 15:32:27 +00:00
  • c525e6e817 Make handling of LIMIT clauses in correlated sub-queries on virtual tables more efficient. dan 2025-07-03 14:28:47 +00:00
  • 1ff6f19d8b Enhancements to the xBestIndex output from the ext/misc/vtablog.c extension. drh 2025-07-03 14:10:03 +00:00