drh
da01757870
Fix requirements marks so that they match documentation corrections.
...
FossilOrigin-Name: 10d6189d23133006b39ea230045a918483721dd48f5558f77e57e23693097d16
2022-11-07 12:21:06 +00:00
drh
1407458c6f
Fix the documentation regarding negative length parameters for
...
sqlite3_result_text() interfaces, to point out that the length parameter
to sqlite3_result_text64() cannot be negative.
[forum:/forumpost/cf1d043b07|Forum post cf1d043b07].
Comment/documentation change only.
FossilOrigin-Name: 8016507651f377b08deb3a13cc559d56ce6e934c3073a8e63d05fd946b8403a4
2022-11-07 11:19:28 +00:00
stephan
6e8a3341ea
shell.c.in: on non-Windows platforms, check for $XDG_CONFIG_HOME/sqlite3/sqliterc before ~/.sqliterc, per request in [forum:7a16582b1e403c81|forum post 7a16582b1e403c81].
...
FossilOrigin-Name: 49c6e438a83b9ff40ebadd3dfd5f58e6eea053575e15335909f5ee59a6dba82c
2022-11-06 13:12:11 +00:00
drh
881f0f4114
Remove an unimportant testcase() macro that is no longer reachable due to the
...
improvement in corruption detection.
FossilOrigin-Name: cd7e3568a9b0c0f5ef5ca8a29c55cefe2bbad2dbc88a3718a87bb24a8ada3b7f
2022-11-04 12:59:04 +00:00
drh
093677add4
Enhance the ability of the OP_Found and similar opcodes to detect truncated
...
index records and report SQLITE_CORRUPT.
dbsqlfuzz 2b12f90aeff8e081706c7e9b58834f04869f446c. Test cases in TH3.
FossilOrigin-Name: 059a09da2c5fd9c7e723c713565fbaf71602079feef0704129cc5cbbd0033936
2022-11-04 11:54:42 +00:00
drh
2cdcc7f01a
Clarify documentation regarding the --recovery-db option to ".recover" and
...
the magic 789 configuration option it is associated with.
FossilOrigin-Name: f6fa0cffa921ccde8910e7fa4a63c2e4ef8ddb376c8ce99e436b27ac332c4498
2022-11-02 14:08:26 +00:00
drh
6da7cc9b4c
Fix harmless compiler warnings.
...
FossilOrigin-Name: de829770aa0f59b4cd3ab1dc5eec90be82663dca3199c2cf6d97f4c41ce9f799
2022-11-01 18:56:39 +00:00
dan
52d5d474f5
Instead of (const char*), use a special type - sqlite3_filename - as the filename argument passed to VFS method xOpen().
...
FossilOrigin-Name: bd1fe4de8a2e8b8de19a7f90b9fdafb641ad11a6f0c96c0b4495d5bf80885675
2022-11-01 17:43:19 +00:00
drh
dddec5cadd
Fix a #ifdef involving SQLITE_OS_KV that was adding code unnecessarily.
...
FossilOrigin-Name: b6c1b6e4a3bc21c40d6faca6f70842df5201f21c96a076a895410660630461c0
2022-11-01 13:12:20 +00:00
drh
dc5e8c63bd
Improvements to comments. Change the "optimization_control" TCL command
...
in the test harness so that it returns the new optimization mask, for
verification.
FossilOrigin-Name: a3a500127d4752ee05c183e9ac97a2bc27768bf7063b04b5c1405cd3fd3931f5
2022-11-01 12:01:10 +00:00
drh
b6d9167945
Do not flatten a UNION ALL subquery where the column affinities do not match
...
on all arms. Force that subquery to be materialized.
FossilOrigin-Name: 1b8a128832c1633cbb86999d347fef64ac45fe134dac61132112fc97f24676a0
2022-11-01 01:07:29 +00:00
drh
5fdb9a352c
Enforce column affinity on the materialization of a subquery or view.
...
FossilOrigin-Name: b6692de374d7f489d8cf8877bdfef19501bc5ecb0781d42750807eeb58f2e7cd
2022-11-01 00:52:22 +00:00
drh
c7dd9b60eb
Make the UPDATE method of the sqlite_dbpage virtual table rebust against
...
OOM errors. [forum:/forumpost/bbcf0dd6ca|Forum post bbcf0dd6ca]. Test case
in TH3.
FossilOrigin-Name: d15c9a4a323b825eb80e706e12e9df95e5db458024f51e6e537940efc8234d8b
2022-10-31 18:01:05 +00:00
drh
1e84e1e632
Extra OOM check in shell_error_context() of the CLI.
...
[forum:/forumpost/5708841db0|forum post 5708841db0].
FossilOrigin-Name: cb12ac5de17e677f089d7b0b46803efbd9a9178972ffb0454a8b557b06633658
2022-10-31 01:22:38 +00:00
drh
4853aa18f0
In the CLI, ensure that input to utf8_width_print is not NULL, or if it is,
...
change it to an empty string. For for the problem reported by
[forum:/forumpost/2961cf13eec61876|forum post 2961cf13eec61876].
FossilOrigin-Name: 9ecc9d25ea62a7777bbf621989a5c577b612784121a20465cda4d4023fa9634d
2022-10-27 18:20:08 +00:00
dan
f7fea5b4b8
Change the name of the ".recover" command option "--freelist-corrupt" to "--ignore-freelist".
...
FossilOrigin-Name: afce8443ace57c3c99c6810be98f05ed716ae504b68098726c869843c643bbf0
2022-10-27 18:19:45 +00:00
drh
fd6080637c
Automatically set temp_store=MEMORY if the VFS is kvvfs.
...
FossilOrigin-Name: a4d40f6346e7eb2a5239684dba86f297358122768a4d4bf6786b6028f4300e04
2022-10-27 14:28:15 +00:00
drh
9c17ee4f93
Do not accept a NULL pointer for the filename in KVVFS.
...
FossilOrigin-Name: fdecbd3b5bcdeb358015f461ac6c863f12ab180ab4624ed50734e41e557d8186
2022-10-27 14:00:21 +00:00
drh
f7b58da831
The kvvfs VFS should remember the page size when writing to the database.
...
FossilOrigin-Name: fc5503c8acb085042e877c9de43256a4fee27f63ab35e2ddad18e40734ed00d4
2022-10-27 12:46:17 +00:00
stephan
bb5136e5cb
Re-enable the .recovery and .dbinfo commands in shell.c.in in the fiddle build, as those were fixed by [3d20d77a3511] and [cd0aa27d1732].
...
FossilOrigin-Name: ba3a7a4a9997f62b78467d78d95fa5b58a03ecb2e2ccb68f4d316fc08fd02f86
2022-10-27 11:32:20 +00:00
stephan
3d420836fd
Restructure and simplify the feature-detection #defines of the recovery support in shell.c.in and disable it when building fiddle because it uses features we elide from the wasm build (e.g. utf16), leading to link errors.
...
FossilOrigin-Name: ddd10c05c5d16d7205c347c5c1e73a75faecb2b7ec88a4a15875856765e1b143
2022-10-27 03:56:01 +00:00
dan
195687f1bf
Disable the push-down optimization for sub-queries that are INTERSECT, UNION or EXCEPT compounds. dbsqlfuzz a34f455c91ad75a0cf8cd9476841903f42930a7a.
...
FossilOrigin-Name: 346a3b12b861ce7ba369e98cd336f79a1d4f7a7bb9acd7a4f63f37b391755bf5
2022-10-26 21:14:21 +00:00
dan
5ad03a486e
Merge further changes from trunk, including fix to dbdata.c.
...
FossilOrigin-Name: bcf6b48d52c1ce656899f50bd508c0920cae8cf2ef3c0758a7633981f0f0f484
2022-10-26 18:22:22 +00:00
drh
705d7be62d
Remove the sqlite3StdTypeMap global constant that was made
...
obsolete by [aa6e908619624867].
FossilOrigin-Name: 3dfdfb3f12edb3f4267942598efd05d573e13b7c5d6cdbc3404373f41b8993dd
2022-10-26 11:11:31 +00:00
drh
42dddb97de
Enhance the sqlite3_strglob() and sqlite3_strlike() interfaces so that they
...
will do sensible things with NULL string pointers. This is an extra layer
of defense against bugs such as reported by
[forum:/forumpost/730b554179|forum post 730b554179].
FossilOrigin-Name: 8ba9c884bded52e3e044ff39c826c04838e7c31f05d802f4a14d9ce5a01ab721
2022-10-25 13:44:18 +00:00
drh
d5ca2c4b3d
Make the ".dump" command of the CLI more robust against malformed databases.
...
See [forum:/forumpost/730b554179|forum post 730b554179].
FossilOrigin-Name: 0573edfb9e0b1fd51e8da20592c71b02040968c33fdec41c31a6b1b7d3e83262
2022-10-25 13:42:10 +00:00
dan
5f726694eb
Merge latest trunk changes with this branch.
...
FossilOrigin-Name: 757e3f585959f4f113fee48fe3d504f037604c53a95c8d47ce5c2bccfb2af8ff
2022-10-25 11:05:31 +00:00
drh
7704a535d0
Fix typo in comment.
...
FossilOrigin-Name: f65c95658fe4d30817da8de7eb88e823ea1cd8be40e347d626870bad3cc13359
2022-10-24 18:42:45 +00:00
drh
99a37ca779
Add a comment to a previously undescribed member of the Walker union.
...
FossilOrigin-Name: 69d704224e9ed022fcec591beff2ffcc4daf3e7fc586debfdcf00b25c1fddd87
2022-10-24 18:33:50 +00:00
dan
80b30f995e
Use the same "PRAGMA synchronous" setting for the output of a "VACUUM INTO" as are configured for the database being vacuumed.
...
FossilOrigin-Name: 86cb21ca12581cae9a29f42ba707bd9d789e667e5ddc0f64b24940d5d5c9a118
2022-10-24 15:51:24 +00:00
drh
4073706a47
Improve the ability of the query planner to recognize covering indexes even
...
on tables with more than 63 columns and where the index is over columns
beyond the 63rd column.
FossilOrigin-Name: f058773e41495ddbae698f9e9a4f62b7003112ea8614dfad69471340058735e4
2022-10-24 13:20:48 +00:00
drh
1f41a8c8a7
Fix built-in documentation for the ".mode qbox" command in the CLI.
...
FossilOrigin-Name: 3d7ea33be1076fd21681bdcff0c489646c017594b42b4a21a74e9e2d3947890b
2022-10-24 11:10:40 +00:00
drh
7d913e9aae
The wide-table covering index detection must take into account aggregate
...
queries.
FossilOrigin-Name: 9ac73f83c53b9fba10bb1b8bbfd1a8dc8a2dc4a655e811d5b96335dbf2b6fdac
2022-10-23 20:09:13 +00:00
drh
fb643592fe
More frequently send the complete SELECT statement into sqlite3WhereBegin()
...
so that it can more accurately determine index coverage.
FossilOrigin-Name: f6d09c5a0df940dbaa716df70df28218985b83540b34c468989729a3421ef38c
2022-10-22 23:09:29 +00:00
drh
54cc766b41
Enhance the query planner with the ability to discern when an index is
...
covering even when it indexes columns well beyond the 63rd column.
FossilOrigin-Name: 1390417be45dd84e9118f6e761f23b8ff7476d26411e165bbaab678881e4eadd
2022-10-22 20:13:46 +00:00
drh
f55a7dad19
This branch attempts to improve the detection of covering indexes. This
...
first check-in merely improves a parameter name to sqlite3WhereBegin() to
be more descriptive of what it contains, and ensures that a subroutine is
not inlines so that sqlite3WhereBegin() runs slightly faster.
FossilOrigin-Name: cadf5f6bb1ce0492ef858ada476288e8057afd3609caa18b09c818d3845d7244
2022-10-22 14:16:02 +00:00
drh
5723c659fd
Clarification on the meaning of SrcList and SrcItem and especially the
...
SrcItem.colUsed and Index.colNotIdxed fields. Comment changes only - no
changes to code.
FossilOrigin-Name: d96f6cc8475ae5509b8bff2db75e3c6f69a214d58d8979fbc0162ae488a040dc
2022-10-22 13:49:35 +00:00
stephan
3725af73b9
Add SQLITE_DQS to the compileoptions_used list, per request in [forum post 8b1060122b|forum:8b1060122b]. Force DQS=0 in sqlite3-wasm.c.
...
FossilOrigin-Name: fcd9e0dbe3226f3f7ccc15b11fc3aa3b8058571bef274c25a33e9753e22f7551
2022-10-21 17:48:49 +00:00
stephan
89ccfac0ac
Macro name typo fix in OS_KV builds.
...
FossilOrigin-Name: 9cf1142b0cdb13347e3f551c862cb4714cadfe5ad637f049cf0a4b8bb6125b32
2022-10-21 17:37:05 +00:00
drh
c046f6d4d9
Add a bit to the optimization disabling mask for the indexed expression
...
optimization.
FossilOrigin-Name: 56df1482ab45d4d41f937b27c5a877b52fa082bfc6809ea682b62b47a51333de
2022-10-20 16:30:05 +00:00
drh
e180564028
Only enable the bMaybeNullRow flag on IndexedExpr for an index on an
...
expression, not on a virtual column. But do enable it for the right operand
of a right join.
FossilOrigin-Name: a9657c87c53c19228a42559c82c54b504a5ad729e407e9e2c7dabcc0c949b261
2022-10-20 16:12:02 +00:00
drh
63b3a64ca6
The generalized indexed expression optimization of [2435112867fbd7b6] makes
...
the prior [a47efb7c8520a011] enhancement from 2017 obsolete. This check-in
removes the older optimization.
FossilOrigin-Name: 56442c9bdd7844454c79acf83323380ea3509cb2e0b9a3d538a6b51726ae6d07
2022-10-20 13:36:32 +00:00
dan
9b6a28330b
Fix minor problems in test1.c test code.
...
FossilOrigin-Name: 6e545e2b846795fc67f8a90c04de284861a8a429ac686a7476b41c8ed7aabf75
2022-10-20 10:46:17 +00:00
stephan
842c5ee849
Rework sqlite3_wasm_vfs_unlink(), add sqlite3_wasm_db_vfs(), update some docs.
...
FossilOrigin-Name: cdd46858f0e63bc7bfce8e339b3db9efdec43b6443ee76563a847f53d0176831
2022-10-20 05:14:37 +00:00
drh
bf70f1bd1a
In the CLI, never use strcmp() or strncmp() directly. Instead use
...
wrapper functions cli_strcmp() and cli_strncmp() that work correctly even
if the input is a NULL pointer.
[forum:/forumpost/142b868da7560d0b|Forum post 142b868da7560d0b].
FossilOrigin-Name: 7450a561f8577c3ee41f84074c6ef39e29e56876cab4fd763e6489c66f603223
2022-10-19 18:04:42 +00:00
dan
361fb98b5d
Move file /ext/misc/dbdata.c to the /ext/recover/ directory.
...
FossilOrigin-Name: f6d5ac807efcf6140016a8b8f0c74566c0bfc98ad92bd8fca03c5cc80ebf3dec
2022-10-19 18:03:39 +00:00
drh
3b88065d35
Fix references to "SrcList_item" in comments as that object has since
...
[bfd5bf2c73110fcb] (2021-02-21) been called "SrcItem". Comment changes
only. No changes to code.
FossilOrigin-Name: e3648a07f5607dbd4d6ad5b6e5a62a4a1d0b173d3f22aa36c74b768281fc86d8
2022-10-19 11:58:24 +00:00
drh
72ab366192
If a virtual column whose value is constant gets indexed, do not include
...
that column in the IndexedExpr list.
dbsqlfuzz 59ac17a99b9a5c4930ee71cc153c9428a0c0e794
FossilOrigin-Name: c21eb903f06a16d4fafa5f895be08414fa58e6a91c148030aec8676b40c2d66d
2022-10-18 22:37:07 +00:00
drh
7a2a8cee5a
Improved byte-code comments for the OP_Column opcodes used by the
...
indexed expression optimization.
FossilOrigin-Name: bf6d837fddbf74d5b3f40ad01ea4564edfac00b651d6f3f0e996cc5dc18bb06c
2022-10-18 20:27:02 +00:00
drh
a331cf7e57
Fix the indexed expression resolver for generated columns so that it picks
...
the correct table in a self-join.
FossilOrigin-Name: 54c3eb085aca92da2b819f3532ee4750b377265f7e1e914600ea3c3d535efe51
2022-10-18 16:47:41 +00:00