Commit Graph

  • 2a71db26fa Improved use of LIMIT in UNION operators. drh 2026-08-22 15:56:08 +00:00
  • ea9d7d9db1 New optimization bit SQLITE_UnionLimit. drh 2026-08-22 14:41:42 +00:00
  • 32db3f9843 Improved testability. drh 2026-08-22 11:10:24 +00:00
  • ccfd5e0941 Add an optimization that converts UNION into UNION ALL if there is a LIMIT 1 and no ORDER BY. drh 2026-08-22 10:39:18 +00:00
  • 3468c5b73e Fix check-in [468e730036edac22] so that it works with DESC indexes. [bugs:/info/2026-08-22T07:01:45Z|Bug 2026-08-22T07:01:45Z]. drh 2026-08-22 09:33:37 +00:00
  • 45f4f1c1cb A couple of fixes, one of them important, for the previous check-in. drh 2026-08-22 01:21:46 +00:00
  • 6f1110ce05 Faster implementation of sqlite3_bind_int64(). Reduce the need to reprepare when replacing one integer binding with a different integer value is many cases. drh 2026-08-21 20:32:06 +00:00
  • 8fafd53c09 Refactor. 2M cycles faster on x64. reduce-reprepares drh 2026-08-21 20:21:23 +00:00
  • 54508b2801 In the CLI, finer-grain control of what status information is displayed via the ".stats" command. Add the ability to reset peak measurements after each display. drh 2026-08-21 14:04:05 +00:00
  • a7969a001d Fix a harmless compiler warning in the non-deliverable normalize.c extension. [bugs:/info/2026-08-20T23:33:57Z|Bug 2026-08-20T23:33:57Z]. drh 2026-08-21 00:31:55 +00:00
  • 8d0cc5e4c6 Fix a faulty assert() in lemon, as reported at [forum:/info/2026-08-20T14:18:08Z|Forum post 2026-08-20T14:18:08Z]. drh 2026-08-20 16:47:20 +00:00
  • 48f575d0c0 Remove a literal 0x0d character from a sessions test script, using char(0x0d) in its place, to avoid false-positive mixed-line-ending warnings from Fossil. drh 2026-08-20 15:59:53 +00:00
  • 43a31a3f14 Merge the latest trunk enhancements into the reuse-schema branch. drh 2026-08-20 14:43:39 +00:00
  • d752ac6102 Merge the latest trunk enhancements into the bedrock branch via wal2. drh 2026-08-20 14:32:12 +00:00
  • e8a3513233 Merge the latest trunk enhancements into wal2 branch. drh 2026-08-20 14:21:31 +00:00
  • 326584bb73 Merge the latest trunk enhancements into the begin-concurrent branch. drh 2026-08-20 14:14:59 +00:00
  • 5d92a8f1b5 Merge the latest trunk enhancements into the reduce-reprepares branch. drh 2026-08-20 14:05:49 +00:00
  • 47774fd90b Performance enhancements (inlining and partial inlining) in the jsonbPayloadSize() routine of the JSON logic saves a little more than 10 million cycles (0.6%) on the standard benchmark (gcc 13.3, -Os, mint linux) while using less than 700 extra bytes of code space. drh 2026-08-20 13:25:12 +00:00
  • 6c4e218239 Use testcase() macros to prove coverage in jsonbPayloadSizeWide() opt-inline-jsonbPayloadSize drh 2026-08-20 13:12:16 +00:00
  • 912706d94a Latest upstream libcmpp.c for #eval and #include -resolve, and removal of the clumsy @'string' literals. stephan 2026-08-20 11:50:33 +00:00
  • 73e39488f7 Internal doc typo fix. No code changes. stephan 2026-08-20 11:12:56 +00:00
  • eb50028b75 Fix typo in comment. No code changes. drh 2026-08-20 10:24:54 +00:00
  • d7a233c837 Revise the OP_Int64, OP_Real, and OP_ColumnsUsed opcodes to split their 64-bit argument across two ordinary 32-bit arguments rather than storing the 64-bit value as a separate memory allocation. This gives a small performance boost and size reduction, and makes the code a little easier to maintain. drh 2026-08-20 10:08:42 +00:00
  • 16d41abcbd Fix a comment typo and add back a missing assert(). split-64bit-opcodes drh 2026-08-20 10:03:54 +00:00
  • d99abf5ced Add a comment on the OP_ColumnsUsed operator. drh 2026-08-20 09:41:13 +00:00
  • ed22d61dd2 Fix the order of 32-bit works on an OP_ColumnsUsed operator. drh 2026-08-20 09:26:01 +00:00
  • 408aeef166 Fix a harmless compiler warning. drh 2026-08-20 01:27:47 +00:00
  • 255f7220fd Modify the OP_Int64 and OP_Real opcodes so that their 64-bit immediate value is stored split across to arguments, P1 and P3, rather than being stored as a separate memory allocation pointed to by P4. Slightly smaller and slightly faster, but perhaps also easier to maintain. drh 2026-08-20 01:22:18 +00:00
  • 7e50e63de2 Disable three unimportant scanstatus tests on Windows to work around platform incompatibilities. [bugs:/info/2026-08-19T20:22:44Z|Bug 2026-08-19T20:22:44Z]. drh 2026-08-19 21:01:42 +00:00
  • 71e4da8bff Avoid unnecessary references to EP_IntValue. Use ExprUseUValue() and ExprUseUToken() macros instead. expr-int-improvements drh 2026-08-19 19:25:11 +00:00
  • 2b356863cc Merge recent trunk enhancements into the reduce-reprepares branch. drh 2026-08-19 17:25:54 +00:00
  • 91d0dbd25c Fix the zipvfs virtual table so that it works with UPDATE OR REPLACE. drh 2026-08-19 15:32:38 +00:00
  • c69f996361 Fix the zipvfs virtual table so that it works with UPDATE OR REPLACE. [bugs:/info/2026-08-19T01:52:09Z|Bug 2026-08-19T01:52:09Z]. drh 2026-08-19 15:29:15 +00:00
  • 17e0414503 In the (test and debug use only) qpvtab extension, terminate each string at the first 0x00 character. [bugs:/info/2026-08-19T02:29:00Z|Bug 2026-08-19T02:29:00Z]. drh 2026-08-19 15:06:04 +00:00
  • c3b9659a92 Detect and report FTS5 index corruption early enough to prevent CPU stack overflow. drh 2026-08-19 14:31:33 +00:00
  • 93f6407070 Detect and report FTS5 index corruption early enough to prevent CPU stack overflow. [bugs:/info/2026-08-19T01:42:02Z|Bug 2026-08-19T01:42:02Z]. drh 2026-08-19 14:27:45 +00:00
  • 55bf04a530 Fix the (test and debug use only) vtablog.c extension so that it avoids NULL pointer dereferences following an OOM fault. [bugs:/info/2026-08-19T02:38:14Z|Bug 2026-08-19T02:38:14Z]. drh 2026-08-19 13:01:34 +00:00
  • 41d42bf5aa Limit the depth of recursion in the internal clearDatabasePage() routine. Raise a database corruption error if it goes too deep. drh 2026-08-19 12:02:26 +00:00
  • 2da02239d1 Limit the depth of recursion in the internal clearDatabasePage() routine. Raise a database corruption error if it goes too deep. [bugs:/info/2026-08-19T02:05:18Z|Bug 2026-08-19T02:05:18Z]. drh 2026-08-19 11:59:36 +00:00
  • 9b438bee82 In Lemon, do not invoke qsort() with a NULL array pointer even if the number of elements is zero. That is harmless in practice, but is technically undefined behavior. This change does not affect SQLite. [bugs:/info/2026-08-19T05:56:54Z|Bug 2026-08-19T05:56:54Z]. drh 2026-08-19 11:15:38 +00:00
  • 857f41a4ae Fix a minor error in [d287358b8d356d4f] that was causing an assertion fault. drh 2026-08-19 10:38:49 +00:00
  • d3d39ef12f Merge the latest trunk enhancements into the opt-inline-jsonbPayloadSize branch. drh 2026-08-18 23:04:22 +00:00
  • bb7c3e8eac Refactor the new code on this branch. dan 2026-08-18 21:12:12 +00:00
  • 2018b9c3f6 Ensure that Vdbe.smimask is correctly set after a reprepare. dan 2026-08-18 20:22:37 +00:00
  • c60dd4af07 Experimental attempt to reduce reprepares caused by bound variables and "=" constraints in WHERE clauses. dan 2026-08-18 18:22:47 +00:00
  • 9e5727e51d Correctly process "x IS TRUE" and similar expressions that appear in the second or later rows of a VALUES() clause. Report [bugs:/info/2026-08-18T05:06:40Z | 2026-08-18T05:06:40Z]. dan 2026-08-18 15:13:10 +00:00
  • 7fa8cff00c Fix a buffer overread in the fts5vocab virtual table when processing "term < 123" constraints. Problem recently introduced by [db05b203f4]. dan 2026-08-18 15:06:31 +00:00
  • 6252e83bec Also correctly process "x IS NOT TRUE" expressions that appear in the second or later rows of a VALUES() clause. values-is-fix dan 2026-08-18 14:40:24 +00:00
  • 6227f9abd7 Correctly process an "x IS TRUE" expression that appears in the second or later rows of a VALUES() clause. Possible fix for report [bugs:/info/2026-08-18T05:06:40Z 2026-08-18T05:06:40Z]. dan 2026-08-18 14:21:27 +00:00
  • 048112def6 The geopoly_regular() SQL function now returns NULL if the radius argument is too large (+1.0e+300 or larger). [bugs:/info/2026-08-18T09:12:02Z|Bug 2026-08-18T09:12:02Z] drh 2026-08-18 14:15:25 +00:00
  • f919d99246 Filter the rtree tests out of speedtest1's default configuration when built without SQLITE_ENABLE_RTREE. Resolves [forum:e19d434249|forum post 2026-08-18T11:15:33Z]. stephan 2026-08-18 14:00:25 +00:00
  • c47743de13 Prevent a corrupt database from causing a CPU stack overflow in PRAGMA integrity_check. Report the excess btree depth instead. drh 2026-08-18 13:11:05 +00:00
  • fe8153124a Prevent a corrupt database from causing a CPU stack overflow in PRAGMA integrity_check. Report the excess btree depth instead. [bugs:/info/2026-08-18T10:33:10Z|Bug 2026-08-18T10:33:10Z]. drh 2026-08-18 13:07:33 +00:00
  • 9ac0c79e11 Use a typecast to fix a possible integer overflow in the (unsupported) ext/misc/compress.c extension. [bugs:/info/2026-08-18T09:33:57Z|Bug 2026-08-18T09:33:57Z]. drh 2026-08-18 10:33:46 +00:00
  • 66dbfda34c Limit the number of nested RIGHT JOINs (or FULL JOINs) that can occur in a single query. drh 2026-08-18 10:14:28 +00:00
  • 714ab82489 Limit the number of nested RIGHT JOINs (or FULL JOINs) that can occur in a single query. Report [bugs:/info/2026-08-18T07:03:05Z|2026-08-18T07:03:05Z]. drh 2026-08-18 10:12:46 +00:00
  • 2cf6637c40 Limit the number of statements in a trigger to 65000. drh 2026-08-18 09:23:44 +00:00
  • 9fd4cbde74 Add SQLITE_LIMIT_TRIGGER_STEPS and -DSQLITE_MAX_TRIGGER_STEPS=n. Default maximum is 65000. drh 2026-08-18 09:17:48 +00:00
  • 0489a60a42 Plaform portability improvements for autosetup/find_tclconfig.tcl, from Dan Shearer at forum post [bugs:778223d22549a1a1|2026-08-13T20:55:18Z]. stephan 2026-08-18 07:51:01 +00:00
  • d51b899263 Fix the include guard on pcache.h, as requested by Report [bugs:/info/2026-08-17T20:09:10Z|2026-08-17T20:09:10Z]. drh 2026-08-18 00:36:18 +00:00
  • ec1ee47f4c Declare fts5 structure records corrupt if they contain a page number greater than 0x7FFFFF00. drh 2026-08-18 00:30:58 +00:00
  • aa661c2e67 Avoid a problem causing a use-after-free in the fts3 snippet() function. drh 2026-08-18 00:23:42 +00:00
  • 5a16bb33d6 Further optimizations to jsonbPayloadSize(). The code is now faster than the first check-in on this branch, but less than 700 bytes larger than trunk (on x64 with gcc -Os). drh 2026-08-18 00:17:48 +00:00
  • 5271f86cfa Declare fts5 structure records corrupt if they contain a page number greater than 0x7FFFFF00. Report [bugs:/info/2026-08-17T20:07:33Z | 2026-08-17T20:07:33Z]. dan 2026-08-17 21:26:44 +00:00
  • 13bcd6f6b2 New -pgo option to test/speedtest.tcl compiles using gcc-style PGO. drh 2026-08-17 15:31:20 +00:00
  • a87bd2471a Avoid a problem causing a use-after-free in the fts3 snippet() function. Report [bugs:/info/2026-08-17T09:18:24Z | 2026-08-17T09:18:24Z]. dan 2026-08-17 13:55:38 +00:00
  • 48b66b36fe Fix harmless missing end-comment. threaded-bytecode-experiment drh 2026-08-17 13:25:49 +00:00
  • 5ee2e75db2 Merge recent trunk enhancements into the threaded bytecode branch. drh 2026-08-17 13:07:18 +00:00
  • fe650fa6e3 Increment the patch level to 5. drh 2026-08-17 13:02:42 +00:00
  • ca7a4778be Avoid a buffer overrun when processing a strategically corrupted changeset. drh 2026-08-17 12:59:08 +00:00
  • 0085ea1443 Have the fts5term and fts3aux virtual table modules only process constraints on the term column that use binary collation. Report [bugs:/info/2026-08-17T10:17:15Z | 2026-08-17T10:17:15Z]. dan 2026-08-17 11:52:13 +00:00
  • 64459c87cc Avoid a buffer overrun when processing a strategically corrupted changeset. Report [bugs:/info/2026-08-16T10:15:25Z | 2026-08-16T10:15:25Z]. dan 2026-08-17 11:31:59 +00:00
  • 4616815533 Partial in-lining of jsonbPayloadSize(), happens in only 5 performance critical places instead of everywhere. This gives 96% of the performance increase with only 18% of the object code size increase. drh 2026-08-16 23:05:00 +00:00
  • 58332de7a6 Add the "Variable Number Bitmap Cache" to speed up parsing of queries that have a large number of "?NNN" style variables. drh 2026-08-16 19:54:09 +00:00
  • 464f5129c2 Change the variable name for the variable-number bitmap cache. Make the size of the cache configurable at compile-time. opt-add-bitmap-scan-VList drh 2026-08-16 19:50:46 +00:00
  • 3de1035b3b Add a small bitmap to the Parse object recording which variable numbers below 128 are already in Parse.pVList, so that repeated or out-of-order ?NNN parameters avoid a linear scan of the VList on each occurrence. Optimize particularly well on ORM testset. jeffchen 2026-08-16 12:04:16 +00:00
  • 8568bb4a23 Mark jsonbPayloadSize() with SQLITE_OPT_INLINE, so that each JSONB node-header decode site absorbs a specialized copy in amalgamation builds. Reduces JSON testset time at a cost of about 9-10KB of code space in speed builds jeffchen 2026-08-16 11:52:54 +00:00
  • cff880190d When reading a frame from a WAL file where the WAL pagesize and the database pagesize disagree, be sure to fully initialize the page that is read. drh 2026-08-16 10:52:21 +00:00
  • e5bf119821 When reading a frame from a WAL file where the WAL pagesize and the database pagesize disagree, be sure to fully initialize the page that is read. drh 2026-08-16 10:49:39 +00:00
  • 7f630d12f8 Merge trunk into the tcl-init branch. tcl-init stephan 2026-08-16 06:00:58 +00:00
  • 67c202ab67 Add -DBUILD_sqlite to the T.compile.tcl makefile definition for the sake of Unix-on-Windows environments as a partial resolution to [forum:fe9e99eb27c8c2ba|forum post fe9e99eb27]. stephan 2026-08-16 05:19:47 +00:00
  • f17a2ee06b Fix the fts5vocab virtual table so that columns always behave as if they have blob affinity. Report [bugs:/info/2026-08-15T07:03:55Z | 2026-08-15T07:03:55Z]. dan 2026-08-15 14:24:18 +00:00
  • c578ca7270 In the CLI, fix the internal modeDup() routine so that it correctly handles zIFmt and zFpFmt. drh 2026-08-15 12:35:27 +00:00
  • 3d18207a6f Fix typos. Turn off -fpfmt and -ifmt using "auto" instead of "default". drh 2026-08-15 12:22:31 +00:00
  • c799c15dbe Refactor "realfmt"&rarr;"fpfmt" and "intfmt"&rarr;"ifmt". drh 2026-08-15 10:10:17 +00:00
  • 753df3d91a Remove redundant offsetof definition from qrf.c. drh 2026-08-14 18:49:42 +00:00
  • 92a1fc50b9 Enhance QRF with options to supply format strings used to render integers and floating point numbers. Make those options accessible in the shell using the ".mode --intfmt" and ".mode --realfmt" respectively. Also make those options available to the "format" method of the sqlite3 object in the TCL interface. drh 2026-08-14 17:31:48 +00:00
  • 0fc163ea1f Add support for integer and float-point format strings to the "format" method of the sqlite3 object in the TCL interface. qrf-num-format drh 2026-08-14 17:22:08 +00:00
  • 6f23a689c1 We don't actually need to increment the version number of QRF as version 2 has not yet been released. Updates to the QRF README.md file. drh 2026-08-14 16:58:20 +00:00
  • a6a26aa3f5 Fix an off-by-one bug in --intfmt. Add some test cases. drh 2026-08-14 16:34:00 +00:00
  • d1e066bf3f Initial code for an enhancement to QRF that allows for app-defined format strings used to render integer and floating-point values. drh 2026-08-14 15:57:32 +00:00
  • 14385e5a25 Build portability improvements for buildtclext.tcl, from [bugs:2026-08-13T19:40:39Z|bug forum post 2026-08-13T19:40:39Z]. stephan 2026-08-14 15:17:24 +00:00
  • bb7e3ddc61 Adjust the bytecode generated for RIGHT JOIN so that it checks for duplicate RHS rows when the LHS is NULL. [bugs:/info/2026-08-14T04:56:02Z|Bug 2026-08-14T04:56:02Z] drh 2026-08-14 14:03:07 +00:00
  • 14031447d4 Adjust the bytecode so that in a RIGHT OUTER JOIN, whenever a row from the RHS table is added to the output set, the "match" index is updated to avoid duplicate rows. 2026-08-14T04_56_02Z drh 2026-08-14 13:07:17 +00:00
  • b1c41f40b0 Fix the fts4aux virtual table so that it consistently behaves as if its columns have blob affinity. Report [bugs:/info/2026-08-14T07:27:28Z | 2026-08-14T07:27:28Z]. dan 2026-08-14 10:57:58 +00:00
  • 9e3e03dfcf Try to make test/testrunner.tcl work on other BSD variants. This change is untested as I don't have access to any of those BSDs. [bugs:/info/2026-08-13T17:55:42Z|Bug 2026-08-13T17:55:42Z]. drh 2026-08-13 18:55:01 +00:00
  • 1238b6d4f7 Disable the seekscan optimization for IN(...) expressions when the RHS is a SELECT that returns more than one column. This was previously only possible if the sqlite_stat1 table was populated with inconsistent information, and was malfunctioning in some circumstances. Report [bugs:/info/2026-08-13T08:45:47 | 2026-08-13T08:45:47Z]. dan 2026-08-13 18:50:59 +00:00
  • cb928efd50 Disable the seekscan optimization for IN(...) expressions when the RHS is a SELECT that returns more than one column. This was previously only possible if the sqlite_stat1 table was populated with inconsistent information, and was malfunctioning in some circumstances. Report [bugs:/info/2026-08-13T08:45:47 | 2026-08-13T08:45:47Z]. seekscan-fix dan 2026-08-13 18:37:39 +00:00
  • 2665df90e7 Disable misuse testing unless the ENABLE_MISUSE environment variable is set. [bugs:/info/2026-08-13T13:27:50Z|Bug 2026-08-13T13:27:50Z] drh 2026-08-13 17:49:11 +00:00
  • 7b83f65a33 The OP_Affinity opcode with argument E should not try to preserve IntReal but should cast the value to a pure Real. [bugs:/info/7f7431180a3b08d1|Bug 2026-08-13T08:12:13Z]. drh 2026-08-13 16:10:04 +00:00