1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-23 21:49:02 +03:00
Commit Graph

32696 Commits

Author SHA1 Message Date
drh
0dad7f20e2 Use box-drawing characters to highlight the "Expected" and "Got" output
from failed ".check" lines in the CLI, for improved debug support.

FossilOrigin-Name: 09e1f16661e10639db6f114e26bfcad42d9de3acd4bed66e7c0ec4edd537b86a
2026-10-17 18:29:00 +00:00
drh
3ca476654f Augment the AST for *-expansion of a column in the left table of a RIGHT
JOIN that is joined via USING.  Working toward a fix for
[bugs:/info/2026-10-08T15:50:07Z|Bug 2026-10-08T15:50:07Z].  Experimental
and incomplete.  Saved to work on other things.

FossilOrigin-Name: 4c31bf288a40294e6b36f7ad82ee07cd97a7c54c6c663e5939acbcaa573c0f92
2026-10-16 23:32:43 +00:00
drh
34e5f2ee47 Add two new assert()s to document invariants within selectExpander().
FossilOrigin-Name: 69d51c35426f8c93b9e19a68b022beb0fb3d275121833fce35e9099c8f97976c
2026-10-16 20:31:38 +00:00
drh
7fd436eaf9 Fix a problem with reading large UTF16 strings with a BOM out of the
VDBE column cache.
[bugs:/info/2026-10-13T01:16:49Z|Bug 2026-10-13T01:16:49Z]

FossilOrigin-Name: 5bd093e261a7d583fd8dc91d9ed36c175635f9e75291504862be008ba4375791
2026-10-16 18:11:30 +00:00
drh
6444bb328b Fix a harmless C90 compiler warning in the decimal extension.
FossilOrigin-Name: a7f6aa448f35553952a15608c9b88a03be910304200bcce61e7c38e9a9d9ea0e
2026-10-16 17:58:38 +00:00
dan
88c7cc0a27 Fix a problem handling zero-length strings in some cases in group_concat() when it is used as a window function. Report [bugs:/info/2026-10-16T15:51:51Z | 2026-10-16T15:51:51Z].
FossilOrigin-Name: 2f794cf18ac9e55a9a05349187d4322e160c99f9c6068aaf33d190cda929bc82
2026-10-16 17:42:42 +00:00
dan
c3e073420f In test file test1.c, use a static SQLite mutex to protect the hash table instead of a Tcl mutex. A Tcl mutex is a no-op on unix unless TCL_THREADS is defined at runtime, and SQLite test configurations do not define this, which was causing errors in multi-threaded tests like notify2.test.
FossilOrigin-Name: 668541c592b89d32716420615450d55d9faf89da8a8e389c673973d8383cca98
2026-10-16 14:31:53 +00:00
drh
6c2d8c88f7 Avoid unnecessary zero-length calls to memmove().
FossilOrigin-Name: 155b341bb4f1fa65bb6801fea982cfd81a4dcf5e2e75eaa56e22c0091406652d
2026-10-16 13:14:42 +00:00
drh
b495f75d81 New optimizations to GLOB/LIKE and to mutex locking on shared-cache.
FossilOrigin-Name: a787e60de2592e4000cf9717296ade45e246e4f499af249e778fc9e552918c16
2026-10-16 10:00:28 +00:00
jeffchen
739ac505c3 Avoid zero-length memmove() calls when appending B-tree cells.
FossilOrigin-Name: d75a9fd3cf5d805e57173356bf60c100e2c089a0fc94d7fccdc777fe6cc27da7
2026-10-16 08:43:47 +00:00
jeffchen
aa39569616 Enable the noSharedCache fast path in SQLITE_THREADSAFE=0 builds.
FossilOrigin-Name: 312286399000e3582e086419b9aecfbfa064c06aca3b2dd0b413ef530d917730
2026-10-15 23:22:07 +00:00
jeffchen
f8a62a56e1 Avoid unnecessary recursive calls in LIKE and GLOB matching by checking the next ASCII literal before recursing.
FossilOrigin-Name: f88d33b190bf96c22a17f32d901bf3882d464c44040df1d3a7b1b6ff0699ddf9
2026-10-15 23:15:39 +00:00
drh
848cad0ec0 Deal with harmless 32-bit integer overflow on parameters to some extension
SQL functions.
[bugs:/info/2026-10-15T04:34:08Z|Bug 2026-10-15T04:34:08Z]

FossilOrigin-Name: ca52702835d16afd04e936bc4d57f78f0c4d37f83b19b632122f6a699009ca3c
2026-10-15 21:46:13 +00:00
dan
14913b9e28 Avoid a crash processing "ORDER BY rowid NULLS LAST" introduced by the previous commit.
FossilOrigin-Name: 90cab4aceaee8955e57694231f025a22ad86924e036f3ce271cbb332cbd1bb4b
2026-10-15 19:59:06 +00:00
dan
8351ef7256 Avoid a spurious corruption report in some cases when processing an ORDER BY .. NULLS LAST query against a WITHOUT ROWID table that has had columns added to it using ALTER TABLE. Forum post [forum:2026-10-15T03:54:19Z | 2026-10-15T03:54:19Z].
FossilOrigin-Name: a2a20c54a2ce7a43a253f496210e8ff39215cd18b17895b62ef963fe449f3ab2
2026-10-15 19:07:48 +00:00
drh
ef3e33c3df Fix DEFAULT so that BLOB values cast to text use the database encoding.
[bugs:/info/2026-10-14T17:33:12Z|Bug 2026-10-14T17:33:12Z].

FossilOrigin-Name: 178677e14188117aada456fb068f6c9c6acf577ff6ebb211303e9227dd874e8f
2026-10-15 17:36:23 +00:00
drh
4132f00833 Fix a missing term on an assert() added by the previous check-in.
FossilOrigin-Name: 59dec753df9eef252776b7d9937db43b0e0843c9791d6dcccda2ed4dad31ee2b
2026-10-15 17:09:41 +00:00
dan
e4facb4585 When a single loop uses an IN(...) expression and a LIKE/GLOB expression with an index, nest the 2-iteration loop that scans ranges of text and blob values using the LIKE/GLOB pattern inside the IN(...) loop in order to ensure that results are scanned in index order. Report [bugs:/info/2026-10-13T18:54:28Z | 2026-10-13T18:54:28Z].
FossilOrigin-Name: 08e979525ff1eef80c8e824c80cca7b6a3dfb320122258803673ace43c806c9a
2026-10-15 15:33:09 +00:00
drh
c2d796b3f2 Remove code that is no longer reachable after [bbdd13370de93035]. Add
an assert() to verify that the code is unreachable.

FossilOrigin-Name: a0f9daf75b2fc0b230e9d2b79eab9e495a911f39d7427eb5ec09f5414d8703b7
2026-10-15 13:55:05 +00:00
drh
e9183c57f2 Merge the 24:00:00 fix from branch-3.54 into trunk
FossilOrigin-Name: 3ce64081cab882b60ad73db77da961e479cd84eb151444f420da9fcc370f740d
2026-10-15 13:33:20 +00:00
drh
1bf6883244 Fixes to the handling of time 24:00:00.
[forum:/info/2026-10-15T10:26:06Z|Forum post 2026-10-15T10:26:06Z]

FossilOrigin-Name: 69071e25cad52b7fe15749f5fb969e847f9cd65e66341e8d1d4e5f5282283cd4
2026-10-15 13:19:18 +00:00
dan
90687aa700 Ensure the correct collation sequence is used for expressions like "a IN (SELECT b COLLATE ...)" when using an index on "a". Bug [bugs:/info/2026-10-14T18:00:55Z | 2026-10-14T18:00:55Z].
FossilOrigin-Name: bbdd13370de9303561bf501f88bf62d2ba363c6e5d950d8d7416e59874768ee0
2026-10-14 20:07:19 +00:00
drh
fb0878ac38 Fix indexes on typeless generated columns that pull from REAL columns so
that they correctly return REAL values.
[bugs:/info/2026-10-14T17:34:30Z|Bug 2026-10-14T17:34:30Z].

FossilOrigin-Name: 7408f90ecc2dd26aceb52f92de78b8e1521cb5a294d3231fd32a903afe1db41d
2026-10-14 18:39:44 +00:00
drh
2023a2b375 Fix json_tree() when it is given a root that ends with an array index so
that it returns the correct "key" for the first root.  This was broken
by check-in [858b76a00e8ff552] and in version 3.45.0.  Problem reported
by [forum:/info/2026-10-14T08:42:26Z|Forum post 2026-10-14T08:42:26Z].

FossilOrigin-Name: eaf646e376a5a3e10a874ed1c07ca1382f0ccb7cdf1cc963697638a54b98c779
2026-10-14 17:52:44 +00:00
dan
3098b95515 Have testrunner.tcl unset environment variable DEBUGINFOD_URLS. Leaving it set slows down some sanitizer release tests.
FossilOrigin-Name: b7ebfea1c1fd4a4d70f1e429c4ad5d21502e10ab28f90bdb7ae1da2df417cf8b
2026-10-14 17:52:21 +00:00
dan
fff257d3ed Improve the error messages emitted by fts5 in some cases. Report [forum:2026-10-13T21:57:58Z | 2026-10-13T21:57:58Z].
FossilOrigin-Name: dabff5c1cde60883f23d41f713f44a5942ae229c3abe280778dc2df41c894907
2026-10-14 16:11:09 +00:00
drh
77a30f6648 Ensure the internal DBFLAG_SchemaKnownOk flag is always cleared
after a database schema is reset.

FossilOrigin-Name: 96a56e7cf9fe91ee8519e5a991c206cea74c53ad596cd78873b74954b2afef9a
2026-10-14 15:02:55 +00:00
dan
23500fbf19 Ensure the internal DBFLAG_SchemaKnownOk flag is always cleared after a database schema is reset. Report [bugs:/info/2026-10-14T01:25:35Z | 2026-10-14T01:25:35Z].
FossilOrigin-Name: e6b9a40732900d0b7f83ec262ddc81bb47d4230de55d6db319689906e2bb3716
2026-10-14 13:39:28 +00:00
drh
9d1806e3c0 Merge bug fix from branch-3.54 into trunk.
FossilOrigin-Name: c2df85dd6e750e84ea64a464d65a315e702cd16c1b4a51cb212ae547dfaea673
2026-10-14 12:48:03 +00:00
drh
5d6a90889f Fix harmless compiler warnings from [a65c63c6a632d60c].
FossilOrigin-Name: 57efbeb73e69fa4c2aa1ad4e95a1ae13046418138f23024165e334292247f917
2026-10-14 12:43:15 +00:00
drh
b99380fccf Reduce per-cell bookkeeping in balance_nonroot.
Use an advancing destination pointer in while loop.

FossilOrigin-Name: fd68b587e926c935d7bf160ceea62bc9c378e3959f8f3a1b2e319ad0332d6f6c
2026-10-14 12:36:58 +00:00
jeffchen
77e097ea68 Reduce per-cell bookkeeping in balance_nonroot. Use an advancing destination pointer in while loop.
FossilOrigin-Name: a422babef7b64e43f32776f6f7a42674aaaacf0cfd59b65f41ba6f27d2b19162
2026-10-14 12:23:16 +00:00
drh
eba536e8f2 The previous check-in was not quite correct. Both rLhsOrig
and rLhs are vectors and so neither should be freed using
sqlite3ReleaseTempReg().  Indeed, neither should be freed at all since
both vectors remain in use.

FossilOrigin-Name: fc7b959f45a55d95c9cb37692e82b811e3ef286a6d826895dfee9a1f2abfdcc8
2026-10-14 11:32:36 +00:00
drh
9266f1518b In check-in [8800c13deca3717c], fix a double-free of a byte-code register,
resulting in the same register being on the reusable register list twice.
[bugs:/info/2026-10-14T05:52:10Z|Bug 2026-10-14T05:52:10Z].

FossilOrigin-Name: 930df67b442ed677dbe5b22afe4fb91c907c721592a8090f0a70ebea79f3a854
2026-10-14 11:22:24 +00:00
dan
9919c36b55 Avoid incorrectly marking an index used by an OR-scan as a covering index leading to an "internal query planner error" error. Report [bugs:/info/2026-10-11T19:31:18Z | 2026-10-11T19:31:18Z].
FossilOrigin-Name: 3e41413d32122635837ba487bb0b6176ff7c3e4ae50c1c0a179ed0d450a6a2f4
2026-10-13 19:04:06 +00:00
drh
cf9555999e Merge all recent branch-3.54 fixes into trunk
FossilOrigin-Name: 74a6182a0c90d0a035cb23e5237780f0470e0af9d140c52b6f686687f40f8dd3
2026-10-13 18:36:33 +00:00
drh
13c92f7522 Add test cases for CLI command parsing (cliparse.sql).
FossilOrigin-Name: a65c63c6a632d60c49f5ddc1ed482d71436da8f4e8dd3106b13c5f6a281ae287
2026-10-13 18:19:05 +00:00
dan
0fbd83dc99 Avoid an assert() failure by clearing Vdbe.smimask when Vdbe.expmask is cleared.
FossilOrigin-Name: 6399cc43b5927eaaef855fd0daab0cffc90c559266ca6ecc41ffcd5609007976
2026-10-13 17:08:19 +00:00
dan
cb1bf41aaa Restore 3.53.0 handling of codepoints u+fffe and u+ffff (they are separator characters) in fts3 and fts5. See forum post [forum:/info/9c6ec90d24 | 2026-10-13T08:37:16Z].
FossilOrigin-Name: f5ed4850175263ef66fade0d54193dfa96935ae63e2516922b7aae816924726a
2026-10-13 15:51:29 +00:00
dan
c8922e6f6b Merge fixes to vec1 made on trunk into this branch.
FossilOrigin-Name: 2ca1a93f01b777276494cf2bd6f7aaa86deeb2d8a43dbcd5dccc3a31318482a3
2026-10-13 14:59:41 +00:00
drh
39315a4d35 Enhancements to the partial-index constraint reuse logic of
check-in [8d4160910d651246] to take into account column affinity
and STRICT tables.
[bugs:/info/2026-10-11T20:18:09Z|Bug 2026-10-11T20:18:09Z].

FossilOrigin-Name: cb7816d72cd340def63987c014726f088e06198174bd1f20f402c1aacac17fe2
2026-10-13 14:00:20 +00:00
drh
5bab74a91b Merge the latest fixes on branch-3.54 into trunk
FossilOrigin-Name: c57525b36a4a07ef2080824913effef614f545c3d85377376fe04238f7cddf2d
2026-10-13 11:05:00 +00:00
drh
76b61a60d3 Enhance OP_MustBeInt so that it is able to handle -9223372036854775808.0.
[bugs:/info/2026-10-11T20:33:51Z|Bug 2026-10-11T20:33:51Z].  See
also [987ba5a3dc5f2a22].

FossilOrigin-Name: 5e488c8da369cdf43e945078f3c9475f2cc5d71c099c85424f7c28ff0d4a7d61
2026-10-13 10:51:49 +00:00
stephan
5ba0b0a4e0 Merge wasm-post-3.54 into branch-3.54: wasm build updates for emcc changes and an OPFS fix for an as-yet-hypothetical failure case.
FossilOrigin-Name: c32cf3e355c4656a4415c7f3cf4de4701f9da6aa5f928487e257293b6e78b274
2026-10-13 06:45:28 +00:00
drh
4226522153 Fix the implementation of Tree-Tracker.
[bugs:/info/2026-10-13T02:17:32Z|Bug 2026-10-13T02:17:32Z].

FossilOrigin-Name: bfe473ab60f666449b819f0a55e936cef5359e32fd61683437d2ee3e0f3ff6c6
2026-10-13 02:43:51 +00:00
drh
ed9745eb7f Fix "csv" output mode in the CLI so that it responds to --colsep and --rowsep
as it should.
[forum:/info/2026-10-12T17:59:34Z|Forum post 2026-10-12T17:59:34Z].

FossilOrigin-Name: d0fe92e0ce8662b9f3391769e4602a5495c2c69591ded7d4e464e90517c1f407
2026-10-13 02:14:25 +00:00
drh
264c92b923 Speed up substr() for the common case of ASCII text.
FossilOrigin-Name: f69fd5f5c301c3068d0f9530563cb5822df2c87606b8271d4ba4339048ff217a
2026-10-12 23:38:03 +00:00
drh
77b2a47a20 Fix compiler warnings, mostly associated with the new ext/misc/optname.c
extension.

FossilOrigin-Name: 9d1bc870de51a35d2ecb362a728643d751f33efef2399dccd0d64438e8e48979
2026-10-12 22:42:19 +00:00
jeffchen
5e19f7e4bb Speed up substr() start scanning for ASCII text
Skip bounded groups of eight nonzero ASCII bytes while advancing the start position. Keep the existing scalar handling for NUL, non-ASCII bytes, and short tails.


FossilOrigin-Name: 5749b0489c50a9ea3ee576cb565810cb2f6d766635c6f1dd38cdc65a76a6d237
2026-10-12 22:38:23 +00:00
drh
9de75a1245 Merge fixes from branch-3.54 onto trunk.
FossilOrigin-Name: 5a05aded7f54507305edeabbcb54e25d67299769557ae5dc54d0f59d639ac2c6
2026-10-12 22:05:35 +00:00