6245e5a46b
Improve the bytecode for joins such that it exits earlier if it determines
...
that no output is possible.
FossilOrigin-Name: 2d2b61cba44a756a3a41ef5c95bbb0c0b7111f4b679c578fec9bd0b214cca367
2025-07-02 11:47:54 +00:00
69e5993280
Add test1.c tcl bindings for sqlite3_column_text/blob_v2(). Replace, essentially randomly, some of the v1 API calls in capi2.test and capi2.test with the v2 calls to ensure identical results. Add a couple new tests comparing results between v1 and v2.
...
FossilOrigin-Name: a3ca0adbaf7da8d79341fa88919b11d49a040e5125c67962b93a98ea43f539c9
2025-07-02 07:52:30 +00:00
caf0473652
Ensure that Expr.op2 values for TK_AGG_FUNCTION nodes are adjusted when
...
query flattening.
FossilOrigin-Name: d27d34fb746280e7e81335db4e195914b15403ef0da7b2955550553dd78fbe9a
2025-07-02 02:03:43 +00:00
2427ce16d9
Improved comments on bytecode used to implement aggregate queries, to aid
...
in debugging.
FossilOrigin-Name: a1a8b85cdba64a17dcdcd4e6b42b872957cec2dc05b0ac34dfcd82f59344034b
2025-07-01 23:17:36 +00:00
69e123fd25
Remove an #if 0 block.
...
FossilOrigin-Name: 0363c430b5ab8eb8cec526933da2b32263b1959c8a2210bb0e0b1529e72c6f63
2025-07-01 21:33:26 +00:00
7f030542c3
Have sqlite3_value/column_text/blob_v2() return MISUSE for a NULL input object or output target only if SQLITE_ENABLE_API_ARMOR is in effect, for consistency with their sibling APIs.
...
FossilOrigin-Name: 6290a8eaddd97acd02ee417e28c2815e5f3af67acdfc1d97a2cd88b0aee823c0
2025-07-01 21:06:58 +00:00
768714c136
Have sqlite3_value/column_text/blob_v2() unconditionally return MISUSE for a NULL input object or output target, rather than only when API_ARMOR is in effect. This is debatable.
...
FossilOrigin-Name: c8edbfc7e8b57e7b1c9a4a5cdfdc00cd7216b6ccc36ff983f85ad94865f6288f
2025-07-01 20:56:49 +00:00
46bfcc1a21
Improved byte-code comments for the short-circuit optimization of
...
[0083d5169a46104a], to aid in debugging.
FossilOrigin-Name: 113f9d10e347eeaa893ff8b47a461009e0b12589374b93cf3e0bddd19c702dea
2025-07-01 20:32:45 +00:00
417876bd8b
Parameter number doc corrections for the previous check-in.
...
FossilOrigin-Name: 97b06c4594dc3d056334dfba6f310fb6d058456adde6abacfef29f0244637d39
2025-07-01 18:38:02 +00:00
92a54853d9
Add API docs for sqlite3_column_text_v2() and sqlite3_column_blob_v2().
...
FossilOrigin-Name: 60614fed447270b8342f6ee04f4ed9d5c81393c5344a917820a0a7e571de19a9
2025-07-01 18:36:11 +00:00
3515783d55
Random JS cleanups and docs.
...
FossilOrigin-Name: 5a2734bbf8b471fa27f8f4b687e4d24f64c7663b823908f1ee8cd21bb93beb98
2025-07-01 17:38:08 +00:00
5e71497404
Cache and reuse virtual table cursors in the bytecode engine.
...
FossilOrigin-Name: 2d187d4232d750cb1840f1d89c8aed65962cb0883c1d7f91c554b451e475c514
2025-07-01 17:36:55 +00:00
c5e9645e1b
Experimentally add another output pointer to the text/blob_v2() family which gets the sqlite3_value_type() assigned to it if it's not NULL, based on feedback in the forum.
...
FossilOrigin-Name: 4aab781d2abc64a39c53acd0faf6d60bb38afcce42f25bc8c0fa52b73df05312
2025-07-01 16:38:58 +00:00
526399b0fd
Avoid an assert() failure in fts5 that may occur when processing corrupt records.
...
FossilOrigin-Name: 8afd6ca85724a69970181042d6aac53742ea2b76ded5966b2541c3afe1121fb9
2025-07-01 16:21:47 +00:00
e1910ed1d2
Merge trunk fixes into the empty-table-optimizations branch.
...
FossilOrigin-Name: 63306e447efb3ac17e789a331ed3bb65459eb8b79d66e9c185ba3bd852f34ce3
2025-07-01 15:13:37 +00:00
3daba35147
Simplify the column_text/blob_v2() JS tests a bit and correct the text_v2() tests to call into both the column and value variants.
...
FossilOrigin-Name: d5cb8080434bc13616d70aac516762ca8be622bf51a07f8c36d8657c410e03ce
2025-07-01 14:44:12 +00:00
35237b91b7
Initial implementations of sqlite3_column_text_v2(), sqlite3_column_blob_v2(), and their JS/WASM bindings/tests.
...
FossilOrigin-Name: 1d065231aba8080ffd024497ad858eed22ece45fe82a749494a3efaa10f91389
2025-07-01 13:01:07 +00:00
d82c6a2cf7
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:/forumpost/f4878de3e7dd4764|forum thread f4878de3e7].
FossilOrigin-Name: 77397bd67d918db57d5ac545d6d963194806fdabcdaa8f822b6b09e4cfe8b715
2025-07-01 12:43:13 +00:00
c4c7d9ac89
Add tests which demonstrate the difference in behavior for zero-length results in sqlite3_value_text_v2() (empty string) vs sqlite3_value_blob_v2() (NULL).
...
FossilOrigin-Name: 2e7cf00d161e151d49113928fd3ef05069ecbe0635eddd844e9220bd015fe6f9
2025-07-01 09:02:27 +00:00
19bad512e5
Add JS tests for SQLITE_ENABLE_API_ARMOR-shielded sqlite3_value_blob/text_v2() misuse.
...
FossilOrigin-Name: 3c0de5b33ce5c41363d004f8359ba41486d014bb04ec7806ba8eb8636fbbdd4c
2025-07-01 00:34:15 +00:00
72f2dd0673
Add JS basic tests for sqlite3_value_blob_v2(). Simplify the sqlite3_value_text_v2() tests a bit.
...
FossilOrigin-Name: c371f92d5b42f2436d2dc92f244e11748fa8cf00e3818b613cce7ea0cfe09c87
2025-07-01 00:17:30 +00:00
3cd904cc97
Add JS bindings for sqlite3_value_text/blob_v2() and add basic JS tests for text_v2().
...
FossilOrigin-Name: 096c745f38c487c29948e4578fea61085f4a324b187d5b6e9ab32d7b14e503c3
2025-06-30 23:49:21 +00:00
59890ab8c7
Restart this branch using a different take: add new "v2" routines instead of refactoring the old ones, which eliminating any performance impact or risk of behavior change for existing APIs. None of this code is actually called from anywhere yet.
...
FossilOrigin-Name: b0b1b4ccb9b135a6feab73113a31064bac0895464ae36e936fcdcffeaa0933d3
2025-06-30 23:17:57 +00:00
3d21dcc924
More aggressive optimization of addrHalt for RIGHT JOIN.
...
FossilOrigin-Name: 5e51d1c0dfcafef9e71c99de3f626dee157c935724b84c6e0c630299a880446f
2025-06-30 21:07:08 +00:00
ba56f7020d
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:/forumpost/52651713ac|forum post 52651713ac].
FossilOrigin-Name: 6fc0b9ac23be6840542982de4bb282ebca1db8b5ab3baefdde95a997c1506e81
2025-06-30 20:19:19 +00:00
99f1aa03fb
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.
FossilOrigin-Name: 0083d5169a46104a25355bdd9d5a2f4027b049191ebda571dd228477ec217296
2025-06-30 16:41:40 +00:00
280559b446
For all binary operators, try to avoid computing subquery operands if the
...
other operand is NULL.
FossilOrigin-Name: d86eb16283c4b573c506d4faa422d5d9aeb6abc279d8e6a8e2104737162d417f
2025-06-30 12:14:47 +00:00
e2e81e6983
Slightly smaller and faster version of the previous check-in.
...
FossilOrigin-Name: f6e6fd02f4ad49c390a2d3c9626d57f9b2fff1f67eb361b30074cc1f5121810e
2025-06-30 11:04:55 +00:00
b8c81790b2
Minor API doc typo fixes from brickviking.
...
FossilOrigin-Name: b48d95191662e09659b5b55ae65cd462c9e1700c4f92dd9d40b59548f0797c02
2025-06-30 11:00:59 +00:00
e24f20a4f5
Factor out the code that tries to avoid evaluating subquery operands if the
...
other operand is NULL into a subroutine, so that it can be more easily reused
by other parts of the code generator.
FossilOrigin-Name: 3c6c71bcea16443b82234414137dfa1b59e2ee8fe5097906c738fc1228fec4e6
2025-06-30 10:30:47 +00:00
f0991c416b
Minor API doc typo fixes from brickviking.
...
FossilOrigin-Name: c7cf9dcb69ce558ba6b81b2787f92ed7383e37f08b199faeb14f7adb4e494532
2025-06-29 07:32:20 +00:00
311d73efc2
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 12 slow queries described
in [forum:/forumpost/52651713ac|forum post 52651713ac].
FossilOrigin-Name: f147bc04776ac0056412f69dfc518016c0d5b4e9d964664e3d88f595fb29dbe0
2025-06-28 17:59:15 +00:00
c52e9d97d4
Raise an error right away if the number of aggregate terms in a query
...
exceeds the maximum number of columns.
FossilOrigin-Name: 5508b56fd24016c13981ec280ecdd833007c9d8dd595edb295b984c2b487b5c8
2025-06-27 19:02:21 +00:00
fbf1c0526e
API doc typo fixes and closing DD element tags from brickviking.
...
FossilOrigin-Name: c9ddd15b0197e6e5c5a74581d94cf986523514ffdb28c66ba18de9a22aec97e9
2025-06-27 12:46:50 +00:00
e77e589a35
Work around an apparent GCC UBSAN bug. See
...
[forum:/forumpost/1d7c25d4a2d6f5e2|forum thread 1d7c25d4a2d] for details.
FossilOrigin-Name: 23056532e51abcff486e38a3319545e6663b4a855abe1bc443e2cd7e0473748c
2025-06-26 18:57:20 +00:00
981022b7ff
Minor API doc fixes sent off-list from brickviking.
...
FossilOrigin-Name: cb4d05633a0c9cdf146f3108e1b4b10754cd79d72a425d8cc9cd21836037a01b
2025-06-25 20:42:40 +00:00
a67c71224f
Similar fix to the previous check-in, but this time for
...
sqlite3_preupdate_new().
FossilOrigin-Name: 9aaff764d508cbd9823f23cdf0c510255721bc5c09be481ebc60bd8902ceb8c5
2025-06-24 18:27:59 +00:00
66cd200ede
Range check the column index on the sqlite3_preupdate_old() interface
...
and return SQLITE_MISUSE if too large.
[forum:/forumpost/b617e497287235d0|Forum post b617e49728].
FossilOrigin-Name: 6a5701e6c7be25cba93e55438f950966e1dacb32eb2b23a8acc8ac53da6f0a85
2025-06-24 15:58:32 +00:00
513fff88c4
API doc typo fixes and one rephrasing improvement from brickviking.
...
FossilOrigin-Name: 85e8060c4701a601d4bc8a639acd268ee4f2736193820d55ecd9b8abf864132f
2025-06-24 07:38:52 +00:00
fe182f74b2
Improve some of the error messages emitted by fts5 when it encounters corruption.
...
FossilOrigin-Name: 48044a6b57c0a16cb75139c103ad88ca4ab64d74f70a3dee0d8b817fbfbec3c6
2025-06-23 19:38:22 +00:00
b1560be826
Fix an SQL typo introduced by the previous check-in.
...
FossilOrigin-Name: 72a81d247bc74a21d077d311969ac585d0f26bffbd210ec60f03c38bf138790e
2025-06-23 19:00:30 +00:00
28789029ee
Escape the "_" character in LIKE patterns in the CLI.
...
[forum:/forumpost/6a89702f5d|Forum post 6a89702f5d].
FossilOrigin-Name: cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a
2025-06-23 16:51:33 +00:00
f453e8d84e
Fix a harmless compiler warning injected by [c978aed3b6f82b3d].
...
FossilOrigin-Name: f46500247b3a2f8b4a2f0f032cc4066af9cb3918e38a09c59db0a1da5747a25c
2025-06-23 13:42:59 +00:00
4c1c400d64
Improved "statement aborts at ..." log-file messages that identify the
...
trigger that caused the abort.
FossilOrigin-Name: 7691264fe37300c880d612c91cf093327841fbe85fb7ec67e777e911d2cfc9ee
2025-06-23 13:28:13 +00:00
87c807c6dd
Add the --disable-rpath configure script flag to address [forum:13cac3b56516f849 | forum post 13cac3b56516f849].
...
FossilOrigin-Name: a59d9bb25e518f5d79f654615b92f6c50cfb704b5abee0f820912644b89366c5
2025-06-22 22:48:11 +00:00
b5aa9593ac
API doc typo fixes from brickviking.
...
FossilOrigin-Name: 18e07f8f53693d0dace3c4025a572c1a10582290a338aa7f0913c83842a69b05
2025-06-22 12:04:47 +00:00
5806a922ba
Minor JS test cleanups prompted by a linter.
...
FossilOrigin-Name: 764235a3d15fda55af85ebe3b5885fa27336cc0e979f1be2f6770b66a84bbe87
2025-06-21 16:33:05 +00:00
427d2cd57d
Remove some duplicated JS tests.
...
FossilOrigin-Name: d1cb9ed79d806f667c22f5ba9861451d4d0765aa3072e085831045cf3a39f8b4
2025-06-21 16:18:23 +00:00
db37e6097c
Reduce the maximum --size flag for JS kvvfs speedtest1 from 4 to 2, as --size 3 and 4 are overflowing the kvvfs storage limits.
...
FossilOrigin-Name: b77b3adc828ce543e880e230701edd5e0ccb681e4c3c724ea8ad5ecbd69c73a6
2025-06-21 16:02:20 +00:00
6fcb7f22a1
Give oo1.Stmt.get() similar treatment to [8c187140a60b]. This is an internal change only - the API is unaffected.
...
FossilOrigin-Name: f5a7abc0a447273de40dacc463d267d26d4b62be56ee15baf05825791c2a7a6e
2025-06-21 15:58:20 +00:00