stephan [Sun, 27 Nov 2022 00:57:56 +0000 (00:57 +0000)]
Document an OPFS API change in Chrome v108 which does not break our code but does change several formerly async methods to synchronous. No code changes.
stephan [Sat, 26 Nov 2022 15:24:58 +0000 (15:24 +0000)]
OPFS VFS: add the opfs-unlock-asap=1 URI flag which tells the VFS to release implicit locks ASAP instead of during VFS idle time. This improves concurrency notably in the test app but brings a significant performance penalty in speedtest1 (roughly 4x slowdown). This is not the final word in OPFS concurrency, but gets us a step further.
drh [Fri, 25 Nov 2022 17:05:55 +0000 (17:05 +0000)]
Relax restriction (8) on the push-down optimization so that it only applies
if one or more columns uses a collating sequence other than BINARY.
See [forum:/forumpost/3824ced748baa808|forum post 3824ced748baa808] and
check-in [346a3b12b861ce7b].
drh [Fri, 25 Nov 2022 16:32:59 +0000 (16:32 +0000)]
Fix #ifdefs so that restrictions (8) and (9) of the push-down optimization
are still enforced even if compiled with SQLITE_OMIT_WINDOWFUNC. This
fixes a bug introduced by check-in [346a3b12b861ce7b].
drh [Fri, 25 Nov 2022 16:10:48 +0000 (16:10 +0000)]
Immprove the query planner such that it is able to make use of indexed
expressions within an aggregate query with GROUP BY. This implements
enhancement request [99378177930f87bd].
drh [Fri, 25 Nov 2022 15:52:00 +0000 (15:52 +0000)]
Add restriction (9) to the push-down optimization: If the subquery is
a compound then all arms of the compound must have the same affinity.
dbsqlfuzz 3a548de406a50e896c1bf7142692d35d339d697f.
drh [Thu, 24 Nov 2022 19:02:40 +0000 (19:02 +0000)]
Take care not to try to add comments to a TK_AGG_COLUMN opcode that does
not have an associated Table object because it is a reference to an indexed
expression.
dan [Thu, 24 Nov 2022 15:32:00 +0000 (15:32 +0000)]
Update multiplex3.test to account for the fact that the multiplexor xDelete method may return an error even if it manages to delete the first chunk of a file.
stephan [Wed, 23 Nov 2022 19:03:22 +0000 (19:03 +0000)]
Add an experimental OPFS VFS-specific URI flag, opfs-unlock-asap, which tells the VFS to release implicit locks ASAP. This permits higher concurrency but hurts performance considerably. This may or may not be obsoleted by other concurrency-related experimentation.
drh [Wed, 23 Nov 2022 18:51:04 +0000 (18:51 +0000)]
Aggregates with GROUP BY now make use of expressions on indexes. This code
works and gets the correct answer for the test case in the ticket. Lots more
testing and documentation is needed, however.
stephan [Wed, 23 Nov 2022 16:39:07 +0000 (16:39 +0000)]
Initial infrastructure for adding a mode to the OPFS VFS which causes implicit locks to be released ASAP, which increases concurrency at the cost of performance.
dan [Wed, 23 Nov 2022 16:08:49 +0000 (16:08 +0000)]
Update Makefile.in to include new target "sqlite3r.c". For generating "sqlite3r.c" and "sqlite3r.h", versions of the amalgamation that include the recover extension. To build the shell tool against these files, add -DSQLITE_HAVE_SQLITE3R.
drh [Tue, 22 Nov 2022 19:49:16 +0000 (19:49 +0000)]
Rename the SELECTTRACE macro to TREETRACE, so that is corresponds to the new
CLI command. Renumber all of the bits in the bitmask used to enable
various kinds of tracing, and add a trace bitmap decoder in sqliteInt.h.
Changes to debugging logic only. No (intentional) changes to production code.
drh [Tue, 22 Nov 2022 15:43:16 +0000 (15:43 +0000)]
Since the memory registers used by the columns and functions of an
AggInfo object are sequential, it is not neecessary to remember each register
separately. We can simply remember the first one and do the math when
others are needed.
drh [Tue, 22 Nov 2022 13:33:58 +0000 (13:33 +0000)]
This is the first in what is anticipated to be a long sequence of incremental
changes aimed at improving aggregate query processing, and in particular
helping aggregate queries take better advantage of indexes on expression.
The end goal is to resolve ticket [99378177930f87bd], though it remains to
be seen whether or not I can get there with this approach.
drh [Mon, 21 Nov 2022 17:40:23 +0000 (17:40 +0000)]
Split out the debugging code that dumps an AggInfo object into a separate
subroutine called printAggInfo() so that it can be invoked interactively
during debugging. No changes to production code.
stephan [Mon, 21 Nov 2022 04:12:38 +0000 (04:12 +0000)]
Resolve missing SQLITE_LOCKED result code which triggered a new (since last checkin) exception in the OPFS VFS. Improve output of the OPFS contention tester app.
stephan [Mon, 21 Nov 2022 03:50:52 +0000 (03:50 +0000)]
Add test app for experimenting with multi-worker OPFS concurrency. Tweak OPFS VFS to significantly improve the otherwise "unfortunate" concurrency situation.
larrybr [Mon, 21 Nov 2022 00:11:09 +0000 (00:11 +0000)]
Fix a base64 decode bug. Provide for convenient inclusion of extension(s) built into the CLI, to simplify testing and for its own sake. Improve comments. Cure collision between base64.c and base85.c when both are in the same translation unit.
stephan [Sat, 19 Nov 2022 02:58:03 +0000 (02:58 +0000)]
Integrate a custom preprocessor to the JS build process to facilitate creation of both vanilla JS and ES6 Module builds from the same source files. There is still some build-level reworking pending to make an ESM build a first-class deliverable.
stephan [Fri, 18 Nov 2022 15:22:45 +0000 (15:22 +0000)]
shell.c.in: on non-Windows platforms, check for $XDG_CONFIG_HOME/sqlite3/sqliterc before ~/.sqliterc, per request in [forum:7a16582b1e403c81|forum post 7a16582b1e403c81].
drh [Thu, 17 Nov 2022 14:40:33 +0000 (14:40 +0000)]
Use the log10() and log2() functions from the standard C library to implement
the equivalent SQL functions, in the hope that this will prevent reported
precision problems.
See [forum:/forumpost/cfceb1230bdcfd84|forum post cfceb1230bdcfd84] and the
surrounding thread.
drh [Thu, 17 Nov 2022 13:58:25 +0000 (13:58 +0000)]
Split out the documentation for sqlite3_value_encoding() into its own
page and make it clear that this interface is intended for testing and
debugging only.
[forum:/forumpost/c9f445453da950ad|Forum thread c9f445453da950ad].
Comment changes only - no changes to code.
drh [Thu, 17 Nov 2022 01:24:06 +0000 (01:24 +0000)]
Raise an error if an attempt is made to compile the CLI with the
SQLITE_OMIT_COMPLETE option, since sqlite3_complete() really is necessary
for the CLI to operate sanely.
stephan [Wed, 16 Nov 2022 21:52:29 +0000 (21:52 +0000)]
Change a self.X JS reference to X to account for a symbol resolution discrepancy between vanilla JS and ES6 modules, as explained in [forum:801d8f77e5115141|forum post 801d8f77e5115141].
drh [Wed, 16 Nov 2022 19:53:39 +0000 (19:53 +0000)]
Avoid returning SQLITE_SCHEMA if the first query run on a connection
is "SELECT nosuchcolumn" or similar.
[forum:/forumpost/c1798f77ef|Forum post c1798f77ef]