drh
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).
FossilOrigin-Name: 870313fea04d4921e60fe841250a77402d4e2c370dbf681cf5901fed7df5d790
2026-08-18 00:17:48 +00:00
dan
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].
...
FossilOrigin-Name: c97a940ceb4c21adc68123e084c8b8b688bcd309579a82951b2e160dc7bacf44
2026-08-17 21:26:44 +00:00
drh
13bcd6f6b2
New -pgo option to test/speedtest.tcl compiles using gcc-style PGO.
...
FossilOrigin-Name: b460488d0572f4fecf45d213932560f83b789fe1c8847d767c9415b19fc7a33c
2026-08-17 15:31:20 +00:00
dan
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].
...
FossilOrigin-Name: e4635c41536a0b3620780c3f1c872de33121370bafb608fce9fe7e3113e2ae01
2026-08-17 13:55:38 +00:00
dan
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].
...
FossilOrigin-Name: f26099b7fad1eab2791b574c9371021d4f05fbf824141e77cdff921a2819866a
2026-08-17 11:52:13 +00:00
dan
64459c87cc
Avoid a buffer overrun when processing a strategically corrupted changeset. Report [bugs:/info/2026-08-16T10:15:25Z | 2026-08-16T10:15:25Z].
...
FossilOrigin-Name: 3f57024aecea0f3b565ed823cf94b085031c481fd6323c1f2e4319a53500864f
2026-08-17 11:31:59 +00:00
drh
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.
FossilOrigin-Name: e934c4a7aa66bf9d0214a7946b5ea51b92c11996c920ea8e2ed2513319518f43
2026-08-16 23:05:00 +00:00
drh
58332de7a6
Add the "Variable Number Bitmap Cache" to speed up parsing of queries that
...
have a large number of "?NNN" style variables.
FossilOrigin-Name: 2955ac426424e3ba24568a146236e72eb0ff1efc79e47b327c1fc1bc44e74c26
2026-08-16 19:54:09 +00:00
drh
464f5129c2
Change the variable name for the variable-number bitmap cache. Make the size
...
of the cache configurable at compile-time.
FossilOrigin-Name: 35c9c6e6352ff855eea4782da2270ff2937a969116db9d481bc0701375749c2b
2026-08-16 19:50:46 +00:00
jeffchen
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.
...
FossilOrigin-Name: 306f8f3ccbd7d5c4993f0f084db73950b2c00fb356c10f00e579c7d413ddab6b
2026-08-16 12:04:16 +00:00
jeffchen
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
...
FossilOrigin-Name: 6d8e8474c516fdb1cf9355846fa09098fb5f8f5fbd94d99d8d1b5778138b243d
2026-08-16 11:52:54 +00:00
drh
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.
FossilOrigin-Name: f9b4ee369557c36c606666bd7e6d8dc4685d87531993d3ce4e7a718aa814a5ac
2026-08-16 10:49:39 +00:00
stephan
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].
...
FossilOrigin-Name: aff3e43ed52c6cfe434919b580c5546339e8b539574de2884c979a9cbb72f85b
2026-08-16 05:19:47 +00:00
dan
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].
...
FossilOrigin-Name: db05b203f47e6ed0792ac011b18e0da98275e900407436798ca28d5f7dd2e094
2026-08-15 14:24:18 +00:00
drh
c578ca7270
In the CLI, fix the internal modeDup() routine so that it correctly handles
...
zIFmt and zFpFmt.
FossilOrigin-Name: aa5a515490dabb07776086099a2f6ae120bccde2fd15dc260b04bb8f5d5e3fb8
2026-08-15 12:35:27 +00:00
drh
3d18207a6f
Fix typos. Turn off -fpfmt and -ifmt using "auto" instead of "default".
...
FossilOrigin-Name: 530b55da56326f4816d43893d05f57b10541605a9508b0b37c46df21ecd22b76
2026-08-15 12:22:31 +00:00
drh
c799c15dbe
Refactor "realfmt"→"fpfmt" and "intfmt"→"ifmt".
...
FossilOrigin-Name: 17277813d101187d85755b7bad3f1c95380335021e13ee368be0add0c8c346b3
2026-08-15 10:10:17 +00:00
drh
753df3d91a
Remove redundant offsetof definition from qrf.c.
...
FossilOrigin-Name: 5d230cafc6abf48dd623385df106e61fa5bf15a9cff855eb27680aa0f7533c8b
2026-08-14 18:49:42 +00:00
drh
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.
FossilOrigin-Name: 61b0157686da3e6700ddcb7273b91eba69ff3015f8185470fd4fa02e52205401
2026-08-14 17:31:48 +00:00
drh
0fc163ea1f
Add support for integer and float-point format strings to the
...
"format" method of the sqlite3 object in the TCL interface.
FossilOrigin-Name: 49778c334aaed6d05342a2063cf7f9f8caa1ec9aac0d49ac1db491ddd3d564b5
2026-08-14 17:22:08 +00:00
drh
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.
FossilOrigin-Name: 3ccc25a06fd247da0ffd273c331ad992334d7e397e32a625dabe155eb37425f3
2026-08-14 16:58:20 +00:00
drh
a6a26aa3f5
Fix an off-by-one bug in --intfmt. Add some test cases.
...
FossilOrigin-Name: 4e86fc1922e347825e1160652a2d5e6c60d04eabe847621b08f03b05b66904ea
2026-08-14 16:34:00 +00:00
drh
d1e066bf3f
Initial code for an enhancement to QRF that allows for app-defined format
...
strings used to render integer and floating-point values.
FossilOrigin-Name: 067083e973b195f50fa0d199e24a3b01d1b2780a0812fda63d3747c4c75662bf
2026-08-14 15:57:32 +00:00
stephan
14385e5a25
Build portability improvements for buildtclext.tcl, from [bugs:2026-08-13T19:40:39Z|bug forum post 2026-08-13T19:40:39Z].
...
FossilOrigin-Name: 2530b5ada6e814931db257d3b5ca756032f2c004a2d96cb2d998619e79ce0958
2026-08-14 15:17:24 +00:00
drh
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]
FossilOrigin-Name: f4f57ca539520b687cf00b0034cb20868cafa5f6c7602c1db71e1a7f885f3daf
2026-08-14 14:03:07 +00:00
drh
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.
FossilOrigin-Name: 9d39b0973bff5af1787fafdd49e455c6c27d493c3bce997ae0fdf88eb9adb1d2
2026-08-14 13:07:17 +00:00
dan
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].
...
FossilOrigin-Name: d5b57f76b63552b23ba3e5e372a3773118b929a4116f60f374a91cba87c1152e
2026-08-14 10:57:58 +00:00
drh
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].
FossilOrigin-Name: c406ce3f1e3b1a8edea2dbb03aff5649d5217019b23c88b0ae73e627a3a983ee
2026-08-13 18:55:01 +00:00
dan
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].
...
FossilOrigin-Name: 601615fd00574a22724bb8ac93513072c2061b0e32b05f927378426c5ec73d50
2026-08-13 18:50:59 +00:00
dan
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].
...
FossilOrigin-Name: 9544d46a6d51dbc12057e33ec1a635cd2cd48101c46d4b92171b56b70ea23f53
2026-08-13 18:37:39 +00:00
drh
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]
FossilOrigin-Name: 273e1bcc2c669bc9dc3de3752bdf9c0b6ce26a6a0937f35d2da47e687542d521
2026-08-13 17:49:11 +00:00
drh
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].
FossilOrigin-Name: 5a4e6920afce4a5b63f8ad4e183506a5dd738dd191027395b710a2904eb7f296
2026-08-13 16:10:04 +00:00
dan
939165ae51
Ensure that if a seek-scan is used for an expression like (x, y) IN (SELECT a, b FROM ...) then the SELECT delivers rows in order of (a, b).
...
FossilOrigin-Name: c9661d928e9002771b586f09e7b6bad15ffba4466a52a7ca441a661ea2ffdbec
2026-08-13 15:16:49 +00:00
dan
acc18b80ef
Fix a problem in the fts4aux virtual table causing it to sometimes return spurious SQLITE_CORRUPT errors for fts4 tables with more than 1 column. Report [bugs:/info/2026-08-13T05:56:36Z | 2026-08-13T05:56:36Z].
...
FossilOrigin-Name: 06f3f9f93be17584982b5fbd84eb1f35b6e15e9271e8d128df5452226fb3b5b9
2026-08-13 11:29:33 +00:00
drh
bea60d9466
Disable recently added test cases for immutable=1 when running
...
the inmemory_journal permutation.
FossilOrigin-Name: 198e602053e0f9e7d09cfa2238d0fe45d3120c0a7a6e2d770bebfc8655ea7737
2026-08-13 00:21:08 +00:00
drh
e59c4f9ddd
Fix an MSVC compiler warning in the amatch.c extension.
...
FossilOrigin-Name: 43b23132a1288979063b3121b3f4f0d9d7805323b8e8496508426fa371425338
2026-08-12 20:26:57 +00:00
drh
2227372b25
Simplification and size reduction for sqlite3GetVarint(). Add and use a new
...
routine sqlite3VarintValue() that works similarly but returns the value
rather than the number of bytes consumed, for a performance improvement.
Improvements inspired by [48132f815508b6e1].
FossilOrigin-Name: 2d7ac2095e4a9d774aabd408fa2855fa4281a3aa27c405451ade5d545f5ce382
2026-08-12 20:17:03 +00:00
drh
7e5188ceac
Simplify the implementation of sqlite3GetVarint().
...
FossilOrigin-Name: d3dfaeb8b901d290c14b46c9e2970cc6a17a7bba2637bfdd353f49bcf41bd0dc
2026-08-12 20:04:07 +00:00
drh
7e15154660
Create a new varint decoder that does not need to return the size of the
...
varint, and use that in sqlite3BtreeTableMoveto(). Omit the pointless
getVarint and putVarint macros and use the actual function names instead.
FossilOrigin-Name: f845ede54c065ebd222f3f3488f655f2cbbf2c40bae782b3f4eac76cbb0525ad
2026-08-12 19:42:02 +00:00
dan
eeea6c76e3
Fix tests recently added to nolock.test so that they run on windows.
...
FossilOrigin-Name: bc57a14ab92dd8c247a893cf4cec7c0dccaa7e8407854a63aa3af699c60bacd5
2026-08-12 13:41:46 +00:00
drh
f1a8574eef
Do not use the propagate-constant optimization on a constant that is
...
really a function that might return a subtype.
FossilOrigin-Name: a5bf606f3b76b66988d9f4ce97ca48827c2583e2e275f50a2fdfc8bb08719779
bug-2026-08-12T09_26_04Z
2026-08-12 13:23:52 +00:00
drh
da7dc33fb2
Enhance the CARRAY interface so that it raises an SQLITE_TOOBIG error
...
if the iov_len value of a BLOB is bigger than a 32-bit signed integer
can hold. [forum:/info/2026-08-12T00:07:44Z|Forum 2026-08-12T00:07:44Z].
FossilOrigin-Name: 39ae2b7c59505aeb198fb16eab3f3ea1b42eb35bc38776f3579000595cc9a572
2026-08-12 00:51:14 +00:00
drh
92f270eb0a
Small performance enhancement and size reduction in the page cache.
...
FossilOrigin-Name: 0910cf8ef477eb8d4b6c9daf7675755c8daa00f4b2199c2ad9db1f36be5f6e99
2026-08-11 23:40:31 +00:00
jeffchen
6c085d9745
Avoid integer divides in the remaining pcache1 hash-bucket computations, extending check-in [750c37d4044c0957] from the lookup fast path to the other eight sites. Small size reduction.
...
FossilOrigin-Name: 0f814ec505dc55cf586946d1628fb156dbe64f69b109e666327e47fe6276b635
2026-08-11 21:48:14 +00:00
dan
a393a5e05d
Ensure that databases opened with immutable=1 specified are opened read-only at the OS level. Report [bugs:/info/2026-08-11T17:21:54Z | 2026-08-11T17:21:54Z]
...
FossilOrigin-Name: 702cdeb78c19ac971892093bf9d9c90d3c6b7193518db2437d89123fffd9c5f9
2026-08-11 18:22:01 +00:00
dan
d9de6eedbe
Fix a problem in fts5 secure-delete code that could lead to a buffer overrun when dealing with a strategically corrupted database. Problem reported by YEONBA.
...
FossilOrigin-Name: 9cd4f9e9205c5a5096388397a39349db9ff5377d19095c6b20388ff799969c31
2026-08-11 14:16:12 +00:00
dan
4267bbf920
Update preprocessor logic in test file fts5_tcl.c to use intptr_t when available.
...
FossilOrigin-Name: fee71cd6f7294ffd02784d26811a9d11d80e83d4075e1233b8ec0289519bb891
2026-08-11 10:46:12 +00:00
drh
e45771a540
Performance improvement and size reduction in the vdbeRecordCompareInt()
...
routine.
FossilOrigin-Name: 15f719dde4bd84d02c40301d6639bec9482f5475f3f5c2dee48910c710730363
2026-08-10 20:17:00 +00:00
drh
9163bd79c2
Performance improvement and size reduction in the OP_MakeRecord opcode.
...
FossilOrigin-Name: 8b1f4923748cdcd6dc2ced81805c844e7d0ba84354f8c0c3bb79a0fec2137493
2026-08-10 20:05:36 +00:00
dan
f45af6ac7e
Add "include <stdint.h>" to test file fts5_tcl.c.
...
FossilOrigin-Name: 9cf3f0079a7f9a4f02a6a86bd50f4ffc5645625eaa6de8cd9d09dd6a40d11176
2026-08-10 19:49:25 +00:00