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.
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.
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.
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]
drh [Mon, 14 Nov 2022 18:57:21 +0000 (18:57 +0000)]
Change the fake_big_file test command so that it fails for files larger than
2MB on Windows, as we have observed that Window10 will sometimes bluescreen
when operating on very large sparse files.
drh [Sat, 12 Nov 2022 17:17:01 +0000 (17:17 +0000)]
Disable the ability to change the schema_version cookie when
SQLITE_DBCONFIG_DEFENSIVE mode is enabled. This is a security
enhancement inspired by the question in
[forum:/forumpost/2b9cc3dae1f1e5f6|forum post 2b9cc3dae1f1e5f6].
dan [Thu, 10 Nov 2022 19:19:52 +0000 (19:19 +0000)]
Avoid returning SQLITE_SCHEMA if the first query run on a connection is "SELECT nosuchcolumn" or similar. Forum post <https://sqlite.org/forum/forumpost/c1798f77ef>.
stephan [Thu, 10 Nov 2022 13:22:35 +0000 (13:22 +0000)]
Automatically relinquish implicitly-acquired OPFS file locks during VFS idle time in an attempt to help alleviate cross-tab locking contention like that described in [forum:58a377083cd24a|forum post 58a377083cd24a].
stephan [Thu, 10 Nov 2022 11:35:10 +0000 (11:35 +0000)]
OPFS: if an op which needs a lock is called when no lock has been obtained, automatically lock it at the start of the op and unlock it at the end of that op. This is an attempt to alleviate the cross-tab contention described in [forum post 58a377083cd24a|forum:58a377083cd24a] but it increases speedtest1 run time by approximately 4x. Perhaps auto-lock can be combined with the older idle-time-based auto-unlock to unlock such locks (but not those from xLock()) to improve this?
drh [Wed, 9 Nov 2022 10:17:25 +0000 (10:17 +0000)]
Increase the precision of the nData parameter to the dbdataValue() routine
inside the sqlite_dbdata virtual table, to avoid the possibility of integer
overflow.
dan [Tue, 8 Nov 2022 20:04:05 +0000 (20:04 +0000)]
Fix a problem with URI formatting in calls to sqlite3rbu_vacuum(zDb, NULL) causing problems on win32. First reported here <https://sqlite.org/forum/forumpost/a7ae915a9d>.
drh [Mon, 7 Nov 2022 18:36:02 +0000 (18:36 +0000)]
Improve the ability of mkshellc.tcl to remove redundant typedefs from the
generated shell.c code. This is needed to get shell.c to build on older
C compilers.
stephan [Mon, 7 Nov 2022 13:06:20 +0000 (13:06 +0000)]
Add sqlite3.wasm.alloc.impl() as a "public back door" into the low-level non-throwing allocator. Correct sqlite3.WasmAllocError constructor to behave like its usages expect it to and add tests for that.
drh [Mon, 7 Nov 2022 11:19:28 +0000 (11:19 +0000)]
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.