]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Thu, 27 Jun 2024 15:03:14 +0000 (15:03 +0000)]
Merge all the latest trunk enhancements into the
recursive-cte-orderby-fix branch.
FossilOrigin-Name:
5f159e542552bb2c589ddb167f38157f1fbb9731b7c336f28eb11b336bbeddfa
drh [Thu, 27 Jun 2024 14:54:15 +0000 (14:54 +0000)]
Merge the latest trunk enhancements into the exists-to-join branch.
FossilOrigin-Name:
fc643f8a12e9b7448136b281f798e18dfebe0a3df5115d930b965c8a33933e2d
dan [Mon, 24 Jun 2024 18:06:15 +0000 (18:06 +0000)]
Fix an incorrect tcl comment that appeared in many fts5 test files.
FossilOrigin-Name:
d07085e2035b52a7edd27980523225e59c5bf851fb4a6de975f03e653b937c9c
dan [Mon, 24 Jun 2024 16:08:01 +0000 (16:08 +0000)]
Fix some problems with calling fts5 api functions from within non-full-text queries.
FossilOrigin-Name:
56d265f956fe6433b625c6d732e55f387af3f643e705316f5a6f709d63731669
dan [Mon, 24 Jun 2024 14:53:14 +0000 (14:53 +0000)]
Enhance the output of ".scanstats vm" to include the absolute number of ticks for each VM instruction, instead of just the percentage of the total.
FossilOrigin-Name:
1535828335d2b0eccebae952ed2bc70cc0cd893bd4b079d26b80deff9b5f752b
drh [Thu, 20 Jun 2024 12:07:25 +0000 (12:07 +0000)]
Do not attempt the exists-to-join optimization if the FROM clause is full.
FossilOrigin-Name:
8e3a1d2850337a902ab36b1d6a0dad4ae35030b71d1e15547f6e7487c1f86d18
drh [Wed, 19 Jun 2024 18:54:04 +0000 (18:54 +0000)]
Revert Lemon so that it only shows -D options that are actually used. Though
the change to display the options in sorted order is retained.
FossilOrigin-Name:
e54eb217c9508c19aee085b111a1323c9009f014ba4db6019918e27002c4ca8c
drh [Wed, 19 Jun 2024 18:46:44 +0000 (18:46 +0000)]
In lemon, show all the -D options in the generated header, even if none of them
are used.
FossilOrigin-Name:
2aa009c38bb207ac59b9bbd6f8e0d7315697b3fd6a01f9431f29a3c7ccad53e7
drh [Wed, 19 Jun 2024 16:38:17 +0000 (16:38 +0000)]
Enhance lemon.c so that when it shows the compile-time options in the header
comment of the generated output file, it shows all options, even those not
used, and it shows them in sorted order.
FossilOrigin-Name:
eed76e6698eabe47c6bf9696599ce1c2f7aa428cf60f39d0566fbd0d1f6c4c62
stephan [Wed, 19 Jun 2024 11:08:58 +0000 (11:08 +0000)]
Remove some extraneous flags from the fiddle-debug build. Internal doc tweaks in the main wasm makefile.
FossilOrigin-Name:
afae2c9e6fba0820c9be8d06a2e301a74167e4457bada45fe57b5fd9287d2e8b
stephan [Tue, 18 Jun 2024 22:03:28 +0000 (22:03 +0000)]
Minor cleanups in the new fiddle build code.
FossilOrigin-Name:
d356aebdd450bedc1ecbbdd266effe53c7badbd74ed7e6db8d0c31318d99a35f
stephan [Tue, 18 Jun 2024 21:50:30 +0000 (21:50 +0000)]
Rework the fiddle build to build separate debug and non-debug bundles, with the latter in ./fiddle-debug.
FossilOrigin-Name:
a9f1758f1cbe7b7d0c87dfb060f52d03c6ea0e066c079891a8ff354073997f9e
stephan [Tue, 18 Jun 2024 20:47:05 +0000 (20:47 +0000)]
Remove an extraneous CSS file and import its CSS into the one HTML file which uses it.
FossilOrigin-Name:
66085ca42388e8de741712150541a3e0afb06b3e23e738aa9ff687e9fc494c50
stephan [Tue, 18 Jun 2024 20:40:11 +0000 (20:40 +0000)]
Add fiddle-debug make target to ext/wasm. It builds the same target files as a non-debug build, as opposed to a new copy, but adds various debug-related flags.
FossilOrigin-Name:
993143c5c39fb6ee15b0661cec8fed436ff04543b528a3796534f5e3a44799f5
drh [Tue, 18 Jun 2024 19:36:04 +0000 (19:36 +0000)]
Add instructions for how to do debugging builds of the CLI on Windows.
FossilOrigin-Name:
abe81c18614b41c78cf3edeaaf8d85d5d2dbdcf331b580f1c98f80d3726d8189
drh [Tue, 18 Jun 2024 12:19:13 +0000 (12:19 +0000)]
Update sqlite3_analyzer to report on the number of WITHOUT ROWID tables and
to provide separate aggregate statistics for WITHOUT and WITH ROWID tables.
FossilOrigin-Name:
4152894433c3a292d983b1c196664a0c46e406eccd7e644a64fa443fdb204825
stephan [Tue, 18 Jun 2024 09:58:39 +0000 (09:58 +0000)]
Internal doc typo fixes, as reported in the forum. No code changes.
FossilOrigin-Name:
ea16b286b4344c1833ca3d17b6d315fb4ddcb99bcc232ff6444debeb634881f2
stephan [Sun, 16 Jun 2024 17:06:50 +0000 (17:06 +0000)]
drh [Fri, 14 Jun 2024 23:13:54 +0000 (23:13 +0000)]
Do not omit the ORDER BY clause from a recursive CTE just because the
query that contains the CTE also contains an ORDER BY clause. Plus
other changes imported from the recursive-cte-orderby-fix branch.
FossilOrigin-Name:
13242289c5d412b706f50fc7e1553032ea3a52d41a3e34e155432adaf0551481
drh [Fri, 14 Jun 2024 19:27:25 +0000 (19:27 +0000)]
drh [Fri, 14 Jun 2024 18:33:15 +0000 (18:33 +0000)]
Improvement to treeview.c: Show the DESC and BIGNULL flags when printing out
ExprList objects.
FossilOrigin-Name:
e87966cf63af78a8cc0188d9476a2003a0be1ca1be2b305af97add0428ace2c7
dan [Fri, 14 Jun 2024 18:06:25 +0000 (18:06 +0000)]
drh [Fri, 14 Jun 2024 17:16:33 +0000 (17:16 +0000)]
Do not omit the ORDER BY clause from a recursive CTE just because the
outer query that uses the CTE also contains an ORDER BY clause.
FossilOrigin-Name:
5e700f2cc22bafa51928084454b374858eee3e2b00b58454cb97948d1691d276
stephan [Wed, 12 Jun 2024 22:15:25 +0000 (22:15 +0000)]
Remove some dead JS code. Improve the exception-to-C-result-code conversion to account for the case of a file disappearing while the OPFS VFS is waiting to acquire a lock on it.
FossilOrigin-Name:
5bd9fd5f61e7cd1ed3b44c5cabc759c154c98eb40ad10d29e61f142aaa062ddf
stephan [Wed, 12 Jun 2024 21:01:44 +0000 (21:01 +0000)]
Remove some JS docs which no longer apply. No code changes.
FossilOrigin-Name:
f253cab3359270045a3ae9f5e9eadc1cfc8844181db127165bfdf49d5f99efb1
dan [Wed, 12 Jun 2024 17:01:00 +0000 (17:01 +0000)]
Do not attempt the exists-to-join optimization for expressions from the ON clause of joins.
FossilOrigin-Name:
4666433cbd9af21c2e0440b10bcb39878624a39485e2bb514553b276acb8a401
dan [Wed, 12 Jun 2024 15:50:35 +0000 (15:50 +0000)]
Fix a problem with rolling back hot journals using the unix-dotfile VFS.
FossilOrigin-Name:
a44703135e8dd3cc67e548e1aa3c42e71df127fb7b593ccfc06025ec42a501fd
dan [Wed, 12 Jun 2024 15:29:37 +0000 (15:29 +0000)]
Omit tests that depend on sqlite3_release_memory() in lock5.test when running the memsubsys1 or memsubsys2 permutations.
FossilOrigin-Name:
9d63033bf46ddf0f4d9d4ef06d56357fe6165f2370cd19cf81c2f7f61ce224fc
stephan [Wed, 12 Jun 2024 12:36:02 +0000 (12:36 +0000)]
OPFS VFS: change the xCheckReservedLock() impl to always return false, as discussed in [forum:
a2f573b00cda1372 |forum thread
a2f573b00cda1372 ]. This does not impact any current tests, and may have no direct impact at all because of how that VFS handles locking, but is hypothetically a more correct solution than the previous one.
FossilOrigin-Name:
c298b8ba2dcd01fa28b79a78bb4986fa0282755a0a36b7f38b93096ac31f521e
stephan [Wed, 12 Jun 2024 12:17:03 +0000 (12:17 +0000)]
Doc updates in JS code. No functional changes.
FossilOrigin-Name:
587ed3a5d283898ad0e67ccee86a0a4ccc432fa292c0a3534e9e6ec70a7b7780
dan [Wed, 12 Jun 2024 11:41:18 +0000 (11:41 +0000)]
Do not attempt to run hot journal rollback tests in lock5.test with the "inmemory_journal" permutation, which cannot generate hot journals.
FossilOrigin-Name:
1e6fa95b88cace9e6cac476863d57cfd8de483f83c922ff964b77cbaee6e9ae4
stephan [Wed, 12 Jun 2024 11:39:29 +0000 (11:39 +0000)]
Slight API doc tweak for xCheckReservedLock(), based on forum feedback. No code changes.
FossilOrigin-Name:
2af7a96f6868a4529d689702926b350a4c00082f14da0ded5a8eaea295682d17
dan [Tue, 11 Jun 2024 20:28:56 +0000 (20:28 +0000)]
Handle the case where unix-dotfile is used with URI parameter nolock=1.
FossilOrigin-Name:
3925a5b904e159d54455cfc73fe837a9c6ea3a6d60da63afde3242b4d6f67c90
dan [Tue, 11 Jun 2024 20:03:32 +0000 (20:03 +0000)]
Fix a problem with rolling back hot journals using the unix-dotfile VFS.
FossilOrigin-Name:
4ae3300b79e03381fd7f1033bb7978bb6367369790f17c3bdacac51e205edaf9
drh [Tue, 11 Jun 2024 18:22:48 +0000 (18:22 +0000)]
Provide the ability to disable the exists-to-join optimization using
SQLITE_TESTCTRL_OPTIMIZATIONS. Provide tree-trace output for the optimization.
FossilOrigin-Name:
33a3f327855b427ae6ba0057218d043a1417bc9d780728f47f23acdd836e1686
drh [Tue, 11 Jun 2024 17:37:36 +0000 (17:37 +0000)]
Merge trunk enhancements into the exists-to-join branch.
FossilOrigin-Name:
5f25a9518a675efbd0525cc2f5595ee7bc7122be7cfecdf6b20c909185dea370
stephan [Tue, 11 Jun 2024 17:04:43 +0000 (17:04 +0000)]
Remove some dead JS code and update some JS docs.
FossilOrigin-Name:
6935ac71bad3d36cc519f0325ae4447a674f257309d020cdc0741160fcce0580
stephan [Tue, 11 Jun 2024 17:04:02 +0000 (17:04 +0000)]
When compiling shell.c in SQLITE_SHELL_FIDDLE mode, ensure that the shell_main_exit goto label is reachable.
FossilOrigin-Name:
06e6f64533563ab9c059b773e5f0d78085df716f2624e547b7259f6789c3ffe0
drh [Tue, 11 Jun 2024 14:36:56 +0000 (14:36 +0000)]
Change constant expressions to pre-computed constants, because apparently
MSVC on ARM requires that.
[forum:/forumpost/
4feb1685cced0a8e |Forum thread
4feb1685cced0a8e ].
FossilOrigin-Name:
6c103aee6f146869a3e0c48694592f2e4c6b57ecdb4450f46e762c38b4e686f1
dan [Mon, 10 Jun 2024 19:45:33 +0000 (19:45 +0000)]
Add missing calls to sqlite3exprSkipCollateAndLikely() to the enchancement on this branch.
FossilOrigin-Name:
078537d057d638389e3ab3bc04bcac53f342c7bf1d8d75222296ef42d09e9ee7
dan [Mon, 10 Jun 2024 19:31:18 +0000 (19:31 +0000)]
Fix a crash that could occur when the SELECT in an EXISTS(SELECT ...) used an unknown collation sequence.
FossilOrigin-Name:
f3009a6d7facd1ead520d588c5ad089db76d8641cd3dae076f2405492d7defcd
drh [Mon, 10 Jun 2024 12:43:03 +0000 (12:43 +0000)]
Improved header comment on the sqlite3FpDecode() implementation.
For the fpdecode() SQL function (available in debug builds only) limit
the value of the third parameter (mxRound) to be positive.
FossilOrigin-Name:
56af06fa12104a1fe119d7087746011183af053834eac72d0fb69f60d98054c6
drh [Sun, 9 Jun 2024 17:34:03 +0000 (17:34 +0000)]
Disable the omit-noop-join optimization when there are 64 or more terms in
the ORDER BY clause.
FossilOrigin-Name:
40de3939792e17df25598b3e60d1cebcecde2b00832acd55604f14b21398a9a7
dan [Sat, 8 Jun 2024 18:13:12 +0000 (18:13 +0000)]
Add extra tests for the changes on this branch.
FossilOrigin-Name:
a6365c778f2a6d6fa78e8520553373898f382ce73bf6496533e26291648ef5d1
dan [Fri, 7 Jun 2024 21:00:42 +0000 (21:00 +0000)]
Experimental optimization to rewrite a SELECT with an EXISTS(...) expression in the WHERE clause as a join.
FossilOrigin-Name:
972a33db0b0e924b78d5309d222d8ea298bd59c72da14ea2d14e8e2caaad1e0a
drh [Thu, 6 Jun 2024 23:56:36 +0000 (23:56 +0000)]
Allow the query planner access to the argument of LIMIT even if that
argument is a bound parameter.
FossilOrigin-Name:
c4a9dda2809c6e0e3d928e11e5553ead82cd9df551bcd35b11a7d869ef80ab8e
drh [Thu, 6 Jun 2024 23:22:32 +0000 (23:22 +0000)]
Omit bogus tests accidentally added by the privious commit.
FossilOrigin-Name:
e94dfe9928750dd98145d4d9920b298f7b0868703b487f86e0db77a41d53ccf9
drh [Thu, 6 Jun 2024 15:03:16 +0000 (15:03 +0000)]
Better optimize queries that use parameters in the LIMIT clause.
FossilOrigin-Name:
e58cb304d1e0ec6e30260a165aaccc2cf096ce6c999efb06683c4ef600ee12ef
stephan [Thu, 6 Jun 2024 12:22:19 +0000 (12:22 +0000)]
Re-enable [
dcc2bb2c562e97e090174 ], as [
296eeb26c816bc73 ] corrects the wasi-sdk build problem the former check-in triggered. Reported in [forum:
143e40d7f4e79c66 |forum post
143e40d7f4e79c66 ].
FossilOrigin-Name:
f66608bd356efe492d1003663c2e1ccd7cfbf2d40393d256f8720149904ad2d5
drh [Thu, 6 Jun 2024 01:21:57 +0000 (01:21 +0000)]
Adjust the parser so that the value of TK_ISNOT is similar to the value of
TK_IS. This helps the compiler generate faster switch() statements on the
Expr.op fields when there are cases for TK_ISNOT and other common operators.
FossilOrigin-Name:
34f05c3d89b2dd15e4b0d1ba292df7de3dfc54b505c0ba145cc3db52cf020845
drh [Thu, 6 Jun 2024 01:00:50 +0000 (01:00 +0000)]
Small performance optimization in the operatorMask routine of the WHERE
clause analysis logic.
FossilOrigin-Name:
9d69fc1c87ae673356869ecd89eb19734fd126702c0f9fe595336ecd7be89e08
drh [Thu, 6 Jun 2024 00:49:36 +0000 (00:49 +0000)]
Small performance optimization in the allowedOp() routine of the WHERE
clause analysis code.
FossilOrigin-Name:
4ba8be544711e07748e8dd3ca6b81f9897906061c0a1a1bb4fb3808dc27f734b
mistachkin [Wed, 5 Jun 2024 20:50:39 +0000 (20:50 +0000)]
Fix harmless compilation issues seen with MSVC.
FossilOrigin-Name:
816d4749384c7f398912c905a16c83b88f4c55632050b4c6117c61301d1a53e1
drh [Wed, 5 Jun 2024 20:41:36 +0000 (20:41 +0000)]
Small performance optimization in the codeEqualityTerm() routine of the
code generator.
FossilOrigin-Name:
8080c6eafd1280ea870a6ab1ba715ac5af67387e69771be6cbd46dda77c3eaa8
dan [Wed, 5 Jun 2024 14:47:54 +0000 (14:47 +0000)]
Fix an fts5 problem with secure-delete mode causing integrity-check to erroneously report a corrupt index.
FossilOrigin-Name:
80bef4d60ba9e3679ea66655ca36fcfaa888775a3d1598d50e9649ad84a95b63
dan [Wed, 5 Jun 2024 11:36:58 +0000 (11:36 +0000)]
Fix a very obscure issue where the name resolver could get confused if aliases like "sqlite_schema" or "sqlite_master" were used in a query involving the sqlite_temp_schema table.
FossilOrigin-Name:
a096eb7554952f8137c6e9330c328164719fb27e958787fbd503bcd1364e6ae4
mistachkin [Tue, 4 Jun 2024 19:21:16 +0000 (19:21 +0000)]
Fix harmless compiler warnings seen with MSVC.
FossilOrigin-Name:
93ac8573eead9b785a24715239e71cd3ef730bf16332cf3b5e264a6491374cac
dan [Tue, 4 Jun 2024 17:26:15 +0000 (17:26 +0000)]
Better handle WHERE terms that are common to two or more OR branches when planning virtual table queries.
FossilOrigin-Name:
1976c3f7e1fe77cf3367710e8ada230a3672ed374e316425164e42b2622526c7
dan [Tue, 4 Jun 2024 15:07:38 +0000 (15:07 +0000)]
Fix a couple of memory leaks in the shell tool code that could occur when processing errors.
FossilOrigin-Name:
e84f09d469ee76a5b5e44baf6a69b90c69d4160fa4c32de04a96f868643acd96
dan [Tue, 4 Jun 2024 14:32:31 +0000 (14:32 +0000)]
Allow shell command "testctrl pending_byte" to be used in unsafe-testing mode only.
FossilOrigin-Name:
afa45c4f5afc9248ca4a1e775404a460280bb9a58a92eae508ae00fb2f675dc6
drh [Mon, 3 Jun 2024 18:04:10 +0000 (18:04 +0000)]
Address a corner-case associated with the call-function-once optimization
of check-in [
663f5dd32d9db832 ] that was causing a (harmless) use of an
uninitialized bytecode register.
dbsqlfuzz
8a44f675401a8b1f68a43bf813c4f4f72ad8f0ea
FossilOrigin-Name:
b37ac2d020873b78efa164036db4056406a67330679f850775da520cd8027cb9
drh [Mon, 3 Jun 2024 12:36:43 +0000 (12:36 +0000)]
stephan [Mon, 3 Jun 2024 07:22:28 +0000 (07:22 +0000)]
Modify three #if checks in os_unix.c to improve handling of SQLITE_OMIT_WAL on WASI builds. Based on the discussion in/around [forum:
57e918431735128a |forum post
57e918431735128a ].
FossilOrigin-Name:
296eeb26c816bc734530cf446922f25be970b901c884df1a98083502f0d1e9f5
drh [Sun, 2 Jun 2024 10:52:35 +0000 (10:52 +0000)]
Be more aggressive about freeing memory associated with the
sqlite3_index_info.idxStr field.
FossilOrigin-Name:
85dcd0a8479a658203833cfd75f22813faa26d4793ebfbb8843035d683bee105
dan [Sat, 1 Jun 2024 17:56:58 +0000 (17:56 +0000)]
Have fts5.xBestIndex return SQLITE_CONSTRAINT, instead of a large cost, when no usable plan can be found.
FossilOrigin-Name:
7c470945372dc98610f7c9840ce8cab18c19b655352f0187e4f31040cea77363
dan [Fri, 31 May 2024 20:32:10 +0000 (20:32 +0000)]
Further tests for OR constraints on virtual tables.
FossilOrigin-Name:
ff4a30056f8dbcbd045afdbee485f6671c3580b95187144aa9a77c97dfda2647
dan [Fri, 31 May 2024 19:26:22 +0000 (19:26 +0000)]
Better handle WHERE terms that are common to two or more OR branches when planning virtual table queries.
FossilOrigin-Name:
4edd9b29f58621335b8a562280c991c34804bbba090f90c951261d043cff1965
drh [Fri, 31 May 2024 15:39:00 +0000 (15:39 +0000)]
Do not even try star-schema detection if the join has fewer than 5 tables,
since 5 is the minimum for a positive detection.
FossilOrigin-Name:
a07ec16bbc056fbc23a7bd58e5e32ef691c13e9babeb542918cf9a01cac40c20
drh [Fri, 31 May 2024 14:39:42 +0000 (14:39 +0000)]
Document the OP_Explain opcode. Add the WhereLoop.rRun value as P3 in
OP_Explain opcodes associated with WhereLoops, for testing purposes.
FossilOrigin-Name:
996c46e61d9a53a54018672dd407b8ba8c480dd6795393428f9d5fcb81b47ab5
stephan [Thu, 30 May 2024 21:54:16 +0000 (21:54 +0000)]
stephan [Thu, 30 May 2024 17:56:26 +0000 (17:56 +0000)]
Remove the unconditional SQLITE_OMIT_WAL when building in wasi-sdk mode, per [forum:
80003e91a7a6cb4d |requests in the forum].
FossilOrigin-Name:
dcc2bb2c562e97e090174d4d0970bfa1551e5eb4db022e6d232c4dd786818e45
drh [Thu, 30 May 2024 13:27:29 +0000 (13:27 +0000)]
Ensure that the second pass call to wherePathSolver() always reports a positive
value for the estimated number of output rows. This fixes a long-standing
(though exceedingly minor) problem that was only revealed by a new assert()
added yesterday. dbsqlfuzz
545d6debc2da496ab2b915e33ea34d9a35a935df
FossilOrigin-Name:
a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f
stephan [Thu, 30 May 2024 11:14:16 +0000 (11:14 +0000)]
Update shell.c to use the msteve fork of linenoise, per /chat discussion.
FossilOrigin-Name:
ee92fa8366b743266b17c692499087c0d11b9302d096c3dfb4e6356b467e939e
drh [Wed, 29 May 2024 15:16:17 +0000 (15:16 +0000)]
Remove an unused parameter from fts5ConfigParseSpecial(). Compiler-warning
fix only - no functional changes.
FossilOrigin-Name:
c08dd245f7706f2fd2269d700be480477619a722e27e6b439462ae543302c49f
drh [Wed, 29 May 2024 15:08:20 +0000 (15:08 +0000)]
Use a heuristic of artifically lowering the cost of fact tables in a
star-schema query in order to prevent plans where the fact tables are
in outer loops from being trimmed by the path limiter. This helps to
generate better (faster) query plans in those particular cases.
FossilOrigin-Name:
38db9b5c83dfb3021333365b2f6b11e3b54afd7033e9f4dadf0c0df1d4b082d8
drh [Wed, 29 May 2024 14:32:22 +0000 (14:32 +0000)]
Change an assert() (incorrectly) added by the previous check-in into a
testcase().
FossilOrigin-Name:
5e64b541d175c10a5df67ef3419ecd74fcb51392af5f5458973cea85ee6a3246
drh [Wed, 29 May 2024 14:04:52 +0000 (14:04 +0000)]
Small performance enhancement in wherePathSolver()
FossilOrigin-Name:
bdab69641df4704f7b080cf7841bbf39da9160222f7b664a79ed662b70ca7b0a
drh [Wed, 29 May 2024 13:29:39 +0000 (13:29 +0000)]
Improvements to comments and debugging output.
FossilOrigin-Name:
85164ee155e42809fe34e6c6b6fbe0a2baa9d616326a811173a0b0c8a885fcce
drh [Wed, 29 May 2024 10:40:53 +0000 (10:40 +0000)]
Remember the amount of the heuristic cost adjustment associated with
star schemas and compensate when computing whether or not to use Bloom
filters.
FossilOrigin-Name:
21daf2463ef70e6b5dc73ba5bf62b3d2fb504e9189f645ac74b513d3d8b979c2
drh [Wed, 29 May 2024 09:53:19 +0000 (09:53 +0000)]
larrybr [Wed, 29 May 2024 03:35:40 +0000 (03:35 +0000)]
[forum:/forumpost/
c9b8d923d5 |Fix sqldiff out-of-bounds char classification error mentioned in the forum.]
FossilOrigin-Name:
b31933d87301bd93763f0923e0ce06a183700875e6107c9f185faffbd99797d9
drh [Wed, 29 May 2024 00:38:12 +0000 (00:38 +0000)]
Use a heuristic in the query planner to help it better cope with large
star schema queries.
FossilOrigin-Name:
a98be0f548f277fab8f38a2dec6ddcbe7a7fff27856ba19e76ad8c5641894b7b
drh [Tue, 28 May 2024 19:08:18 +0000 (19:08 +0000)]
Fix a couple of assert() statements so that they cannot fire
when the SQLITE_TESTCTRL_INTERNAL_FUNCTIONS debugging capability
is activated. dbsqlfuzz
f5b347cf167a62fbe08062b2feee65cb9306e363 .
FossilOrigin-Name:
273504b74cb9c3cfa2497a1339e706a1f2d2c3ce81b23a16beb47da9292535e0
drh [Tue, 28 May 2024 18:53:36 +0000 (18:53 +0000)]
Tweaks to the query planner so that it is better able to deal with star
queries with many dimensions and bad indexes.
FossilOrigin-Name:
1e49081001f93b75ee499536f8a61a0f49225a1745117bb9267249c38c4bf803
drh [Tue, 28 May 2024 12:41:11 +0000 (12:41 +0000)]
Increase the number of parallel paths in the query solver from 12 to 20.
In the .wheretrace output, sort the parallel paths in order of increasing
cost.
FossilOrigin-Name:
8ba2c2f5cb31f7bcc426bec78457316ef11d0b5debf24e8da8c6fc2f95878b1e
drh [Tue, 28 May 2024 11:24:18 +0000 (11:24 +0000)]
dan [Tue, 28 May 2024 10:57:24 +0000 (10:57 +0000)]
Fix a problem with the error message reported by fts5 in some OOM cases.
FossilOrigin-Name:
c7aaa28f786567e29ebee3848283b5c740dd3b8144dc14372e56260ae1b76922
drh [Tue, 28 May 2024 00:16:52 +0000 (00:16 +0000)]
Improve the automatic-index decision such that no attempt is made to create
an automatic index on a column that is known to be non-selective because if
its use in other indexes that have been analyzed. See
[src:/tktview/
8ff324e120 |ticket
8ff324e120 ] and
[forum:/forumpost/
b21c2101a559be0a |forum post
b21c2101a559be0a ].
FossilOrigin-Name:
2a7603c327d11d5e6bc4d40c29151fea544d650f51200ff76efb921adb0c38df
drh [Tue, 28 May 2024 00:01:07 +0000 (00:01 +0000)]
Query planner tuning: Increase the maximum number of simultaneous solutions
to track int eh solver from 10 to 12.
FossilOrigin-Name:
fe2e1dadbacbe6392ceed44fd287a2ed82189cb8055f35631d37967d9a7a5d1d
drh [Mon, 27 May 2024 21:55:01 +0000 (21:55 +0000)]
Avoid creating an automatic index on a column that is known to be not very
selective.
FossilOrigin-Name:
70409763f70faa2a0f4f072fd318a687b109a0905cc57906ad7f80d2885fe6d9
drh [Mon, 27 May 2024 19:52:24 +0000 (19:52 +0000)]
The previous check-in was a little two aggressive about skipping the
initialization of entries in the CellArray.ixNx array. Fixed here.
FossilOrigin-Name:
1b6d1fbcdecf14bc79dc7b5df50e585d2fcc1484a9987b863c190e8f7ba2c39f
drh [Mon, 27 May 2024 18:15:08 +0000 (18:15 +0000)]
Fix typo in comment used to generate parts of the documentation.
[forum:/forumpost/
da5a2ca4db |Forum post
da5a2ca4db ].
FossilOrigin-Name:
428aadf0c71473ccb0681b2b7146281c62949ee99556873e49895d44eec7aee5
drh [Mon, 27 May 2024 15:13:49 +0000 (15:13 +0000)]
Very small performance increase and size reduction by removing unnecessary
ALWAYS() macros from the btree balance logic and replacing them with
special initialization of CellArray and some assert()s.
FossilOrigin-Name:
32b79041d9b6858e4ffade5841898619c7d25d20c4638bf85447a2ca9cc4a3d3
stephan [Mon, 27 May 2024 13:41:46 +0000 (13:41 +0000)]
drh [Mon, 27 May 2024 13:24:39 +0000 (13:24 +0000)]
For compatibility with PostgreSQL, when right-hand side of the ->> operator
is negative, it should index from the right side of the JSON array on the
left-hand side.
FossilOrigin-Name:
82365a45b96536c1146a384e5d3efce80a6ec469a54713c7f40bf15eb834b5fd
dan [Mon, 27 May 2024 11:35:05 +0000 (11:35 +0000)]
Fix a possible buffer overwrite in the ".import" command. [forum:/forumpost/
0c447f0548 |forum post
0c447f0548 ].
FossilOrigin-Name:
0fd958fa9b56a8ef254127e29800ca2a267590e86edf739bd339239b25a5da6e
drh [Mon, 27 May 2024 11:31:02 +0000 (11:31 +0000)]
Add new assert() statements to help out a static analyzer. Response to
[forum:/forumpost/
17fe8ac32e0de4f5 |forum post
17fe8ac32e0de4f5 ].
FossilOrigin-Name:
857f6d530949221d154b5120ecc2aa906418bec6f69d1c13197a432ba3cad8eb
drh [Sat, 25 May 2024 23:13:15 +0000 (23:13 +0000)]
drh [Fri, 24 May 2024 23:44:48 +0000 (23:44 +0000)]
Ensure that queries like "SELECT func(a) FROM tab GROUP BY 1" only call the
func() function once per row. Fix for the issue described in
[forum:/forumpost/
bf8f43aa522c2299 |forum thread
bf8f43aa522c2299 ].
FossilOrigin-Name:
663f5dd32d9db83249fcf85602a756464ece74e1899dc881ac9519d872638441
dan [Fri, 24 May 2024 21:38:37 +0000 (21:38 +0000)]
Fix another fts5 problem related to unknown tokenizer modules.
FossilOrigin-Name:
e78b7783040ef1ad34d4287af8a7a5998d360d50076e0de42a116d9a96fe74b4