]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Fri, 31 Dec 2021 19:20:42 +0000 (19:20 +0000)]
Simplify the sqlite3RunParser() routine by omitting the third parameter.
Results in a binary that is about 100 bytes smaller and 1.4M cycles faster.
FossilOrigin-Name:
6fb2a1bb0280d6e31291e3fd06bbcbbb28ef5fb27d3898e2327a50ac738ae1f3
mistachkin [Fri, 31 Dec 2021 19:08:20 +0000 (19:08 +0000)]
Fix harmless compiler warnings in the shell.
FossilOrigin-Name:
f3ea36d79b6aa95470bf13e8d4ed5250a6b19bc16032b29e4dcdfc49b47a1edf
mistachkin [Fri, 31 Dec 2021 18:26:50 +0000 (18:26 +0000)]
Fix harmless compiler warnings seen with MSVC.
FossilOrigin-Name:
a9bfb621091b6d92d1caeb69134d3809d9e0b43fe764608c5995db277ac785be
drh [Fri, 31 Dec 2021 17:54:48 +0000 (17:54 +0000)]
Performance optimization and size reduction in sqlite3RunParser().
FossilOrigin-Name:
41ee2bac5731d8434322e92abba580f7c759a137e576dd286fe01ab23fc440ea
drh [Fri, 31 Dec 2021 16:37:46 +0000 (16:37 +0000)]
Move the pTriggerPrg and pCleanup elements of the Parse object up into the
section of that object that is persisted across calls to sqlite3NestedParse().
This fixes a memory leak
[forum:/info/
24bd1fef7e9323ef |reported in forum post
24bd1fef7e9323ef ].
FossilOrigin-Name:
562805cf488a455cdc57adcb110fef9b5416d813d5eaeabacd28bccb76d7f39d
drh [Thu, 30 Dec 2021 17:46:15 +0000 (17:46 +0000)]
Remove unnecessary conditionals around the ORDER BY resolver calls in
multiSelectOrderBy().
FossilOrigin-Name:
f2887e018be71bc406526935c7e99e42f12fc5d1d1c65a89dc2b9bfbca01d43d
drh [Thu, 30 Dec 2021 17:36:54 +0000 (17:36 +0000)]
When constructing the sqlite3_index_info object for the xBestIndex method
of a virtual table, omit constant trims from the ORDER BY clause, as they
will always be in the correct order.
FossilOrigin-Name:
524c2b87d74c8cad6fb377aed7275788d61beafe61e675480de732519987102c
drh [Thu, 30 Dec 2021 02:38:43 +0000 (02:38 +0000)]
When a table has an INTEGER PRIMARY KEY ON CONFLICT REPLACE and some other
uniqueness constraint, and it participates in an upsert on that other
constraint, ensure that code that checks for conflicts on the INTEGER PRIMARY
KEY is well-formed. Fix for the problem reported by
[forum:/forumpost/
06b16b8b29f8c8c3 |forum post
06b16b8b29f8c8c3 ].
FossilOrigin-Name:
2f09b51b1ff37bf98f958564cc1224968caa7e33147e6666b5c1ba20b2a7813b
drh [Thu, 30 Dec 2021 00:37:11 +0000 (00:37 +0000)]
When implementing a multi-way compound SELECT using merge, try to balance
the merge tree.
FossilOrigin-Name:
bb8522fe0dc54282ec13672eba9b44ee08f9cb55c1663f1699a61bf96ec1fd04
drh [Wed, 29 Dec 2021 13:32:36 +0000 (13:32 +0000)]
Minor changes to shell1.test test results to account for the new feature
of the shell that points to the specific part of the input line where the
error occurs.
FossilOrigin-Name:
d4870c08893ea9984b1fa1c3a7d04893ad5ed4a2130e9287d169a306cc8ef0a4
drh [Wed, 29 Dec 2021 04:31:54 +0000 (04:31 +0000)]
Ensure that the affinity of columns is honored in the RETURNING clause.
See [forum:/forumpost/
e0c7574ab2 |forum post
e0c7574ab2 ] for the bug report.
FossilOrigin-Name:
4711fb69547f4f17653ab116030c32fdcc2c836410349d1d025866ffc15704da
drh [Wed, 29 Dec 2021 04:13:37 +0000 (04:13 +0000)]
Add the sqlite3_error_offset() interface. Use it to enhance error reporting
in the CLI.
FossilOrigin-Name:
416602a85101c2cd1705eb5306a8933e54cb05ae1562400395ec2769173dec01
drh [Wed, 29 Dec 2021 04:10:49 +0000 (04:10 +0000)]
drh [Wed, 29 Dec 2021 04:10:03 +0000 (04:10 +0000)]
Change an assert() in FTS3 into assert_fts3_nc(), since it is a harmless
condition that can occur when processing a corrupt database file.
FossilOrigin-Name:
e773d6219bded9a5dfa9930882682dadaa7f1c6be344dbde904c9477a89f2d2c
drh [Wed, 29 Dec 2021 04:08:11 +0000 (04:08 +0000)]
Fix the build-breaker bug in test1.c introduced by check-in [
7fa20ca4c09ab024 ].
FossilOrigin-Name:
5f804da1820c98e7ff5c377e57e30b5154844b92ce622ed2ff888fe2c887e1ca
larrybr [Tue, 28 Dec 2021 05:08:38 +0000 (05:08 +0000)]
drh [Sat, 25 Dec 2021 23:59:54 +0000 (23:59 +0000)]
Change an assert() in FTS3 into assert_fts3_nc(), since it is a harmless
condition that can occur when processing a corrupt database file.
FossilOrigin-Name:
c03205aee9015fd886b8db02c8190899cee699255ca370f939e547deaf5ba9e8
drh [Sat, 25 Dec 2021 00:26:51 +0000 (00:26 +0000)]
Add the sqlite3_error_offset() interface. Use it to enhance error reporting
in the CLI.
FossilOrigin-Name:
7fa20ca4c09ab0249de0363691541fa836120ec277e72feb0e1516b9bfbdd97a
drh [Sat, 25 Dec 2021 00:19:46 +0000 (00:19 +0000)]
One minor change for an exceptional case in sqlite3_error_offset().
FossilOrigin-Name:
c93609a8b9dc2e656bb4360138606e269fd323469f7666dbc3bbc699e431313e
drh [Fri, 24 Dec 2021 20:22:13 +0000 (20:22 +0000)]
Add the sqlite3_error_offset() interface. Use it in the CLI to provide
better context for error messages.
FossilOrigin-Name:
b518ce77439852759bc0901071f36d622b1314c9bf3d29c279dfcc405188b975
drh [Fri, 24 Dec 2021 19:44:11 +0000 (19:44 +0000)]
Fix a minor problem in the CLI introduced by [
d156123885abe6bf ], apparently.
FossilOrigin-Name:
37e6e10f4364f556c7503c80408fc62895cdccdd0372fb2b63aaca02c3a1ee30
drh [Fri, 24 Dec 2021 13:30:22 +0000 (13:30 +0000)]
Raise an error if a schema name is attached to the table-alias name of a
subquery or view. See
[forum:/forumpost/
021a33600b |forum post
021a33600b ] for the bug report.
FossilOrigin-Name:
8af8c153f8c3fe16db1c2280571e005838c4ea3c48929ad7660a1686e49ed255
drh [Thu, 23 Dec 2021 00:16:06 +0000 (00:16 +0000)]
Reduce the size of the compiled binary by a couple of hundred bytes by
using a thigher packing of a transformation table in date.c.
Suggested by [forum:/forumpost/
4f6efbb2a9 |forum post
4f6efbb2a9 ].
FossilOrigin-Name:
c75ba4fa644d338d22813c17172b9975411fe6197e07fd584e3209e3beb78036
drh [Tue, 21 Dec 2021 16:59:45 +0000 (16:59 +0000)]
Update the README.md to instruct the user to remove the final comment line
from the "manifest" file before using it to compute the check-in hash.
FossilOrigin-Name:
7b4f9d95a95f685ea4ee045e43c67b1a5c70e908e357b0b41d522699255663ce
drh [Mon, 20 Dec 2021 23:46:44 +0000 (23:46 +0000)]
In the json1 extension, which compiling it separately, ensure that either
SQLITE_DEBUG macro or the NDEBUG macro is set prior to including assert.h.
If neither macro is defined, then assert() statement do generate code but
VVA() statements do not, and that is a deadly combination.
[forum:/forumpost/
858dee399e |forum post
858dee399e ]
FossilOrigin-Name:
d9f814a6402ca7fd999bbb847dc354b52ab9b97cae0c932344584d26c9430f24
dan [Mon, 20 Dec 2021 17:00:42 +0000 (17:00 +0000)]
Remove old script ext/fts3/mkfts3amal.tcl, as it doesn't work.
FossilOrigin-Name:
9e33ee24b3793b3d7faf7421279d16217f8b09b1e92bfdc771f902f2f1e1b7d6
drh [Fri, 17 Dec 2021 23:56:43 +0000 (23:56 +0000)]
Improved documentation for the sqlite3_vtab_collation() interface.
FossilOrigin-Name:
826f84a92d3b1f760560bff72c911a2c664737820af0c9114eb3494df7b8e878
drh [Thu, 16 Dec 2021 19:50:02 +0000 (19:50 +0000)]
Fix windowC tests to specify little-endian or big-endian UTF16, for
cross-platform portability.
[forum post
559b84a5c6 |forum:/forumpost/
559b84a5c6 ]
FossilOrigin-Name:
adf3a1e6f7575964e467f6813ff980e802cf5a37aaa9e1736af702c493f276b1
drh [Thu, 16 Dec 2021 19:43:16 +0000 (19:43 +0000)]
Give the correct prefix to tests in the windowC.test module.
FossilOrigin-Name:
fb43456324c26879767b08febf1b5a2b46a289f25398a3872f81d845afd5d84e
drh [Thu, 16 Dec 2021 17:57:21 +0000 (17:57 +0000)]
In the CLI, omit the ".oom" command (only available in debug builds) and
disable the experimental ".expert" commmand in --safe mode.
FossilOrigin-Name:
5cda1f7da885afdfda8683c59e78fec8da1a05c7a4fde573e89db5f872fcfb20
drh [Thu, 16 Dec 2021 17:35:27 +0000 (17:35 +0000)]
New defenses against OOM and corrupt database problems in the CLI.
FossilOrigin-Name:
5c9fd7fde16d8e335488b8bf5c691961d2636201b034d1f29d25de8708de291d
drh [Thu, 16 Dec 2021 17:21:34 +0000 (17:21 +0000)]
Fix a typo in the result of one of the new test cases.
FossilOrigin-Name:
4d02a129c4781c97981748f3c69564e1320d8085dfba4c207e54793390cd64ab
dan [Thu, 16 Dec 2021 15:29:49 +0000 (15:29 +0000)]
Fix fts3 and fts4 so that they can still be used even if the other is dropped by a call to sqlite3_drop_modules().
FossilOrigin-Name:
a0a8d6c9f0e91996003626e4f80dfac278e3c5bddd9ace5d442061e6c95e49dc
drh [Thu, 16 Dec 2021 14:59:25 +0000 (14:59 +0000)]
Fix a memory leak in the CLI that occurs after an error in the ".open" command.
FossilOrigin-Name:
d156123885abe6bf23c3530de99be257f82ef85b89fbe019568ac60fa1ed5bb7
drh [Thu, 16 Dec 2021 14:36:36 +0000 (14:36 +0000)]
Fix harmless compiler warning in the new Bloom filter logic.
FossilOrigin-Name:
9406d95d3fbaf0d8e65623adb790845f78a7456fb32aafd7fa4f74eda2f2dacc
drh [Thu, 16 Dec 2021 14:26:16 +0000 (14:26 +0000)]
Improved robustness against OOM in the expert extension.
FossilOrigin-Name:
e732c429bafeffaf7e0f458213089c073c262a39eabb41b291e5006078ca7f98
drh [Thu, 16 Dec 2021 13:56:04 +0000 (13:56 +0000)]
Fix a potential NULL pointer dereference in the CLI logic for printing the
schema of virtual tables.
FossilOrigin-Name:
fe44ebf6be47e1c7f2458297669dbd2b882a31595ea8759f7e8bb024ffc44d11
drh [Thu, 16 Dec 2021 13:29:28 +0000 (13:29 +0000)]
Add more tests for OOM conditions in the CLI.
FossilOrigin-Name:
b6fa402d159b2475a7b99ef6a5180d7bf800f90afe28cea726d346d071405045
drh [Wed, 15 Dec 2021 20:48:15 +0000 (20:48 +0000)]
Simplify the generation of the sqlite3_index_info object during query planning
for virtual tables.
FossilOrigin-Name:
241dc0428a6e0238c57e2449e98ea60047e777e29c83a4ebe6da16f7cba40e19
drh [Tue, 14 Dec 2021 20:13:28 +0000 (20:13 +0000)]
Enhance the virtual table query planner so that it is able to deal with
ORDER BY terms that contain COLLATE clauses as long as the specified
collation matches the virtual table. This is especially important for
UNION ALL since a "COLLATE binary" is added to ORDER BY clauses if no
COLLATE clause exists in the original SQL.
FossilOrigin-Name:
5c3d398d20b86a1558720e995eddf11403aec2d160590571fa9525fe8f6efff9
drh [Tue, 14 Dec 2021 18:11:46 +0000 (18:11 +0000)]
Minor fix to the ORDER BY elimination logic in generate_series().
FossilOrigin-Name:
a2e50712fca9dff1b8d19631f792270c82da3c8696a5d9890cf0d1e13e950d60
drh [Tue, 14 Dec 2021 00:36:09 +0000 (00:36 +0000)]
Omit the return value from sqlite3VdbeSerialGet() for a size reduction
and performance improvement.
FossilOrigin-Name:
788e79f881d443fc1b3a213a7ba4f19bfd245e96c15bb21fcb6bffd92c4320b8
drh [Mon, 13 Dec 2021 19:59:55 +0000 (19:59 +0000)]
Small performance optimization and code size reduction in moveToRoot().
FossilOrigin-Name:
cdcde00b2d68eeb35c472fdfd4c4508551f6722054394b43cc97eaf01ad7181d
drh [Mon, 13 Dec 2021 18:53:10 +0000 (18:53 +0000)]
Add NEVER() on an unreachable branch in the Bloom filter pull-down logic.
FossilOrigin-Name:
471070462593faba865d8d05ee89161b340145351e2fa0bfbaa766d974e932d6
drh [Mon, 13 Dec 2021 18:43:46 +0000 (18:43 +0000)]
Fix an off-by-one error in the Bloom filter pulldown logic, found by OSSFuzz.
Also fix over-length source code lines in the immediate vicinity.
FossilOrigin-Name:
027626521c02be06ef61e8229bde49d20cb3f1cb600c4cb127c5f139b9de8858
drh [Mon, 13 Dec 2021 00:02:59 +0000 (00:02 +0000)]
drh [Sat, 11 Dec 2021 17:10:58 +0000 (17:10 +0000)]
Do not allow early evaluation of Bloom filters that use the IN operator as
the machinery to deal with the IN operator is not available.
dbsqlfuzz
5b51c247518278f79a45cea978702e86e86cd4f9 .
FossilOrigin-Name:
799db7cb2e0d73031182d26a0e5919368f9f9823df81cb2863bfe79eca344f5c
drh [Fri, 10 Dec 2021 21:01:24 +0000 (21:01 +0000)]
Factor out the logic that does quoting for the SQL quote() function, so that
it might be reused for other purposes.
FossilOrigin-Name:
8e98ba1eeb1a5a61b7cb2de337ef8bca3d07494266a50d62b9c6bc60ad0a955f
drh [Fri, 10 Dec 2021 17:36:16 +0000 (17:36 +0000)]
Rename the internal routine constructBloomFilter() to
sqlite3ConstructBloomFilter(). OSSFuzz is reporting a crash with a garbled
stack that we cannot reproduce. Perhaps the original "constructBloomFilter()"
name is colliding with some internal name used by OSSFuzz. We'll see if this
rename clears the problem.
FossilOrigin-Name:
403e7312dd9a3fe493a21aceb82e387d6f152622d66c1b403c881597713e8cc3
drh [Thu, 9 Dec 2021 20:06:18 +0000 (20:06 +0000)]
Add support for Bloom-filters as a performance optimization for joins.
FossilOrigin-Name:
633bfeeea2bccdd44126acf3f61ecca163c9d933bdc787a2c18a697dc9406882
drh [Thu, 9 Dec 2021 19:42:52 +0000 (19:42 +0000)]
Remove unused code and fix comments. Final cleanup before merging.
FossilOrigin-Name:
ce42039f5647b1f276acf5d9911528ecb47df1544a587def72c8cd6b2f664289
drh [Thu, 9 Dec 2021 18:44:03 +0000 (18:44 +0000)]
Enable bloom filters for the right table of a LEFT JOIN. Fix unreachable
branches.
FossilOrigin-Name:
d342ab722de1fc3f34219c9755253db9d88eb50a6fa5cc257207008b00e7fc03
drh [Thu, 9 Dec 2021 16:26:45 +0000 (16:26 +0000)]
Add ".mode off" and ".mode count" to the CLI.
FossilOrigin-Name:
1eefd957ff35e961685db565f7ef116c566a04574c5bedad7298b3cc69dd72d2
drh [Thu, 9 Dec 2021 16:17:43 +0000 (16:17 +0000)]
Add ".mode off" and ".mode count" to the CLI.
FossilOrigin-Name:
b11f4d080aa9e6f694e2ec401e871f42bf25997e8e8bf77fa9b6014a50466e3c
drh [Thu, 9 Dec 2021 14:15:39 +0000 (14:15 +0000)]
drh [Thu, 9 Dec 2021 14:09:47 +0000 (14:09 +0000)]
Do not attempt to reprepare a prepared statement that returns SQLITE_SCHEMA
if there was an OOM. This enhancement supercedes check-in
[
fee469925231d074 ].
FossilOrigin-Name:
94fdbeffaf501daf30dc7fae7cef5c2bfdb3a9b055562adfc04374a9fc899c8d
drh [Thu, 9 Dec 2021 01:28:15 +0000 (01:28 +0000)]
Add SQLITE_TESTCTRL_LOGEST and enhance the LogEst utility program.
Improvements to testability of bloom filters.
FossilOrigin-Name:
88b43d798cc5aa59855e92d3e658aee9f0a5def6ffbc5db77af048d75ecdf8cc
larrybr [Wed, 8 Dec 2021 20:36:08 +0000 (20:36 +0000)]
drh [Wed, 8 Dec 2021 19:50:45 +0000 (19:50 +0000)]
Improvements on the decision of whether or not to use a Bloom filter.
FossilOrigin-Name:
0fb2a4e08f518cb38ea3edc6a084d1e4874fd622ba3cf9101b49b3e7dc1a3f2b
drh [Wed, 8 Dec 2021 18:50:30 +0000 (18:50 +0000)]
Enhance the sqlite3SrcListAppendFromTerm() routine so that it sets the
Parser error on an OOM, causing an earlier unwind of the stack.
FossilOrigin-Name:
fee469925231d074c17b948605143cfbb2e9595851a797995e7331f1ab2a61ca
drh [Wed, 8 Dec 2021 16:15:41 +0000 (16:15 +0000)]
drh [Wed, 8 Dec 2021 16:07:22 +0000 (16:07 +0000)]
In the WhereClause object, do not assume that all TERM_VIRTUAL terms appear
at the end of the list, because that is no longer true. Instead, keep a
separate nBase count that is the size of the list excluding the tail of
virtual terms. Use nBase instead of nTerm when scanning terms that are not
virtual. Add assert()s to validate correctness of WhereClause.
FossilOrigin-Name:
6024682ca467fa4fe49608772b0bbfa2f8a419b32cebfa715941073c8b29da49
drh [Tue, 7 Dec 2021 22:37:50 +0000 (22:37 +0000)]
Do not generate a Bloom filter if it cannot be used prior to the next seek,
as that leads to a misleading EXPLAIN QUERY PLAN.
FossilOrigin-Name:
2739ed5192058fbcc816ecbc252be687efc606e038bfcd6cf71194a3f4f5684e
drh [Mon, 6 Dec 2021 23:07:59 +0000 (23:07 +0000)]
Improved EXPLAIN QUERY PLAN output for Bloom filters.
FossilOrigin-Name:
00070e1fff6aec3d7c7b121f2b02bbca38a1664aca9afc3fb7e293f07fd1704f
drh [Mon, 6 Dec 2021 21:45:31 +0000 (21:45 +0000)]
Add SQLITE_STMTSTATUS_FILTER_HIT and _MISS for tracking the effectiveness
of Bloom filters.
FossilOrigin-Name:
24ba535d200fc8a99dd8e66c6d100b5f6ae442098bafb152008429398eefe3e7
drh [Mon, 6 Dec 2021 20:16:53 +0000 (20:16 +0000)]
Omit the OP_FilterInit opcode. Use OP_Blob to initialize each Bloom filter
instead. Size the Bloom filter based on sqlite_stat1 size estimates rather
than a run-time measurement for improved testability.
FossilOrigin-Name:
8a9036ee617a6ad93bfe827b0789773c49d3d45b085cb76fa4b9b20a41b79b97
drh [Mon, 6 Dec 2021 19:11:31 +0000 (19:11 +0000)]
Merge trunk fixes into the bloom-filter branch.
FossilOrigin-Name:
edacf8034dc6bd892038c220c480ea512dbb4005db2a6b1f8e679e8a4929c6ed
dan [Mon, 6 Dec 2021 18:57:02 +0000 (18:57 +0000)]
Fix an OOB read that could occur in fts5 when processing corrupt records.
FossilOrigin-Name:
bb9b1a15f7e80483162049dfd981d059dc69d03348b521f7ac164a8cd3ae3cc4
drh [Mon, 6 Dec 2021 15:40:24 +0000 (15:40 +0000)]
Do not allow SQLITE_LIMIT_LENGTH to be set lower than 1 as an
SQLITE_LIMIT_LENGTH of 0 causes lots of unnecessary problems for
users of the sqlite3_str object.
FossilOrigin-Name:
8fd5b8ec4ab9b5554d27f25a4638d56e347eab78b60900f24b15a815d3731330
drh [Mon, 6 Dec 2021 15:24:36 +0000 (15:24 +0000)]
Do not allow certain dangerous ".testctrl" commands in safe mode.
FossilOrigin-Name:
080e72d119b836c49916201bf135445aa7d53cefe40a47437a93448c4d0f41cd
drh [Mon, 6 Dec 2021 15:08:30 +0000 (15:08 +0000)]
Fix SQLITE_TESTCTRL_IMPOSTER so that it is a harmless no-op if the schema
parameter is invalid.
FossilOrigin-Name:
2d9a45ab10aaad681e11d639195430c0988b6ca1b96db6bf0b31b889e88a5430
drh [Mon, 6 Dec 2021 13:07:28 +0000 (13:07 +0000)]
Attempt to vary the size of Bloom filters based on an estimate of how many
keys the filter will hold.
FossilOrigin-Name:
a7adcf69088cba4b86cc5731a45c9a5263af4355bc0a38f5225cab421c915f7f
drh [Sun, 5 Dec 2021 20:19:47 +0000 (20:19 +0000)]
Run as many Bloom filters as possible before index lookups.
FossilOrigin-Name:
06f6fefd67086896bc49272c6319545ff6c6792f18babe23aced27b60b032119
drh [Sun, 5 Dec 2021 00:45:55 +0000 (00:45 +0000)]
Try to run all Bloom filters before any Seeks. This gives a small performance
gain on the Star-Schema Benchmark.
FossilOrigin-Name:
5be2470f8755ef454f813c880e659bdbf82f2396be9320cf3079cd4ca8e81a19
drh [Sat, 4 Dec 2021 21:11:18 +0000 (21:11 +0000)]
Miscellaneous cleanup of the new Bloom-filter code.
FossilOrigin-Name:
201b6dd875b0ae2bbc9969b098e88abfc09e37b59e857decd41f2dcbeeb13e01
drh [Sat, 4 Dec 2021 18:45:08 +0000 (18:45 +0000)]
Add VdbeCoverage() macros. Adjust the Bloom-filter hash function so that it
correctly deals with zero-blobs.
FossilOrigin-Name:
629ee2e3e3125bfd2af435c6713d49e46691213ad15db0a5e93a63a77f1130c2
drh [Sat, 4 Dec 2021 14:24:30 +0000 (14:24 +0000)]
Apply the Bloom filter only on those terms of an index that have equality
constraints.
FossilOrigin-Name:
a70429596a3c6a413b03118b0d800521b3526d99dcf88a48acc3189b51518d82
drh [Sat, 4 Dec 2021 13:52:08 +0000 (13:52 +0000)]
Add the "WITH BLOOM FILTER" clause to the EXPLAIN QUERY PLAN output for
cases were a Bloom filter is used.
FossilOrigin-Name:
8e078c0e404fe4b3661dd4a11a992a8914c99e2a144cecc417421cbd68fa08cc
drh [Sat, 4 Dec 2021 13:43:57 +0000 (13:43 +0000)]
First attempt to use Bloom filters to optimize star-schema queries.
FossilOrigin-Name:
28161fba9bcde5ae4b36b22d766c881b795af111a3a323c90f6149d0fea9297d
drh [Fri, 3 Dec 2021 19:10:17 +0000 (19:10 +0000)]
Merge the sqlite3WhereBegin() simplification from trunk.
FossilOrigin-Name:
41ba2dfdd3a18671fc78d60935a16fa50f36af3d6481eff2ca9fba88e7093997
drh [Fri, 3 Dec 2021 18:53:53 +0000 (18:53 +0000)]
Factor the noop-join-elimination optimization out of the sqlite3WhereBegin()
routine and into a separate "no-inline" subroutine, in order to reduce the
complexity of sqlite3WhereBegin() and thereby encourage C compilers to
inline sqlite3WhereCodeOneLoopStart().
FossilOrigin-Name:
6225e9abcb0261fefca4a26530524ffc449f937f8ae1ece718af2c3c3d73d78d
drh [Fri, 3 Dec 2021 16:02:05 +0000 (16:02 +0000)]
Merge recent trunk enhancements into the bloom-filter branch.
FossilOrigin-Name:
11d97fb8be6b5155f38df130d7e828edd0f381e32f651458939b1cb9cb973fff
drh [Fri, 3 Dec 2021 15:48:42 +0000 (15:48 +0000)]
Fix exprAnalyze() after recent performance enhancements so that it is able
to handle IF_NULL_ROW opcode correctly, again.
FossilOrigin-Name:
8029e6bab508bf0b8ec1df00a829c5d4de2a84d66dc56b9ff03da879ceef7788
drh [Fri, 3 Dec 2021 14:57:05 +0000 (14:57 +0000)]
Fix unreachable branches resulting from prior optimizations.
FossilOrigin-Name:
f3d6853ee80be2dc6d7236d98b850beb0e1931a624d4f5b194c8db742cde7ec5
drh [Fri, 3 Dec 2021 14:43:49 +0000 (14:43 +0000)]
Fix an over-length source code line in build.c. No logic changes.
FossilOrigin-Name:
b9db5c5fc618a36d70ea2aced9c96094d665935b5c15a987013334f1bd79eb00
drh [Fri, 3 Dec 2021 13:42:41 +0000 (13:42 +0000)]
Performance optimization in the B-Tree cursor allocator btreeCursor(), making
it about 800K CPU cycles faster in speedtest1, and reducing the executable
size by about 100 bytes.
FossilOrigin-Name:
9df939716ace8cfe60340bbe83fc52d452ea40c29c856c588f9a1b8973282391
drh [Thu, 2 Dec 2021 18:15:16 +0000 (18:15 +0000)]
Optimizations to exprAnalyze() and sqlite3WhereExprUsage() save about 1.5
million CPU cycles for speedtest1, and result in a smaller binary.
FossilOrigin-Name:
1f2252e65dc5847c82246fab87dcad035bf594ba7c45362de87a009b7ebcf2d6
drh [Thu, 2 Dec 2021 14:28:36 +0000 (14:28 +0000)]
Move the TK_IS token so that it is adjacent to the TK_IN token, as this
allows the C compiler to optimize better, resulting in a slightly smaller
and faster executable.
FossilOrigin-Name:
8832fa9088414a8d285a457a4effad0b7d610a87ca73cfb5c5812e784649761e
dan [Thu, 2 Dec 2021 14:16:30 +0000 (14:16 +0000)]
In the shell tool, avoid modifying internal data structures until after the arguments to ".open" have been parsed.
FossilOrigin-Name:
fcc509d325dabe06275e7804183bb8b4ba6470a45b443bc8292eecd0974e6367
drh [Thu, 2 Dec 2021 13:45:10 +0000 (13:45 +0000)]
Remove an unnecessary branch from exprAnalyze(), resulting in a small
performance gain.
FossilOrigin-Name:
3312be1db3519074393573265459f6a1eeabce541a9ef4d93689529ea2b8f739
drh [Thu, 2 Dec 2021 12:55:05 +0000 (12:55 +0000)]
Small performance optimization in sqlite3WhereClauseClear().
FossilOrigin-Name:
080b35e62e5c6bb4ea162bc75232b81e54da5e3e01e762127e228400e8afef1d
drh [Thu, 2 Dec 2021 12:34:05 +0000 (12:34 +0000)]
More small performance optimizations for sqlite3WhereGetMask().
FossilOrigin-Name:
3de2c557d915d1b4a9b0e540d5e80ffb243e7123d0ec65c5052f4d6f1cce56b2
drh [Thu, 2 Dec 2021 04:00:45 +0000 (04:00 +0000)]
Small performance optimization in sqlite3WhereGetMask().
FossilOrigin-Name:
7edec54ab045c0493fc5d27d47d7bf0e08d3b0b298f428646fd3f0ee24dfcade
drh [Thu, 2 Dec 2021 02:22:35 +0000 (02:22 +0000)]
Small performance enhancement for whereScanInit().
FossilOrigin-Name:
ed84e124c6097b756ca687ac64df7ee801d14b16c835f1a9e8b336f785157d85
drh [Thu, 2 Dec 2021 01:30:16 +0000 (01:30 +0000)]
drh [Wed, 1 Dec 2021 21:07:05 +0000 (21:07 +0000)]
Merge trunk fixes into the bloom-filter branch.
FossilOrigin-Name:
0864bfbf079a98beaa484911edb17c3dc728e78eca231d4247b282fd824cc098
drh [Wed, 1 Dec 2021 19:17:14 +0000 (19:17 +0000)]
Check for foreign key constraint errors prior to returning the results from
a RETURNING clause. See [forum:/forumpost/
793beaf322 |forum post
793beaf322 ].
FossilOrigin-Name:
a818ba2ed635b91e279dde44236fc7446a33db2b46c9409b67021248c01bf4e5
drh [Wed, 1 Dec 2021 16:31:02 +0000 (16:31 +0000)]
Add a Bloom filter to the automatic-index mechanism.
FossilOrigin-Name:
50ac4de1d7cbb586ea7969e1ae80ea8b021e194edc2fa7db19374b4ee9369bee
dan [Wed, 1 Dec 2021 11:03:50 +0000 (11:03 +0000)]
Add the "static" qualifier to some internal functions in code for various SQLite extensions.
FossilOrigin-Name:
8c986782547211098eb0e4e722eda0097421223af279381373d0055211b5e9d2
drh [Tue, 30 Nov 2021 14:07:58 +0000 (14:07 +0000)]
In the automatic index generator logic, be more precise about when a
partial automatic index is allowed in order to capture more cases where it
is legal to use a partial automatic index.
FossilOrigin-Name:
664b461bb5063d98047fc2e51a3827235cd9f55ca2e23cb66e719eac53fb5437