drh [Tue, 19 Jan 2021 20:09:44 +0000 (20:09 +0000)]
Fix a problem handling sub-queries with both a correlated WHERE clause and a "HAVING 0" clause where the parent query is itself an aggregate.
The problem was apparently introduced by check-in [6e6b3729e0549de0]
dan [Mon, 30 Nov 2020 18:52:08 +0000 (18:52 +0000)]
Update the tea/win/makefile.vc file that ships as part of the autoconf package to use "sqlite3" instead of "tclsqlite3" for the installed dll filename.
dan [Mon, 30 Nov 2020 18:43:40 +0000 (18:43 +0000)]
Update the tea/win/makefile.vc file that ships as part of the autoconf package to use "sqlite3" instead of "tclsqlite3" for the installed dll filename.
drh [Mon, 30 Nov 2020 14:20:17 +0000 (14:20 +0000)]
Do not reuse the obsolete SQLITE_TESTCTRL_PRNG_RESET value for
SQLITE_TESTCTRL_SEEK_COUNT. Give SEEK_COUNT its own unique value.
This avoids incompatibility with legacy test code.
drh [Wed, 25 Nov 2020 13:59:47 +0000 (13:59 +0000)]
Change the -init option to the command-line shell to honor the -bail option.
Also change it to report an error if the filename mentioned cannot be
opened.
dan [Tue, 24 Nov 2020 16:44:09 +0000 (16:44 +0000)]
Ensure that super-journal and other journal filenames passed by SQLite to an sqlite3_vfs.xOpen() implementation may be safely passed to sqlite3_uri_parameter() and similar functions.
drh [Tue, 24 Nov 2020 13:14:15 +0000 (13:14 +0000)]
Remove the VERSION_NUMBER macro from configure.ac as it has been unused
since 2009 check-in [7f4810747b086498]. See also
[forum:/forumpost/bb2c634fcd|forum post bb2c634fcd].
drh [Wed, 18 Nov 2020 23:44:41 +0000 (23:44 +0000)]
If a read() or pread() indicates that the database file is unreadable due to
filesystem damage, then it returns SQLITE_IOERR_CORRUPTFS which is then
converted into SQLITE_CORRUPT before being returned to the application.
drh [Wed, 18 Nov 2020 12:48:48 +0000 (12:48 +0000)]
On unix, for certain error codes of read()/pread() return
SQLITE_IOERR_CORRUPTFS instead of SQLITE_IOERR_READ. And then convert this
error into SQLITE_CORRUPT prior to returning back to the application.
drh [Tue, 17 Nov 2020 14:41:37 +0000 (14:41 +0000)]
Add a single-argument form to the CARRAY table-valued function, with
content bound using the sqlite3_carray_bind() interface that is included
with the extension.
drh [Sat, 14 Nov 2020 20:03:34 +0000 (20:03 +0000)]
Modify UPDATE so that two-pass updates on a rowid table use an ephemeral
table to store rowids rather than a RowSet. This uses less memory, though
it is slower.
drh [Thu, 5 Nov 2020 19:13:44 +0000 (19:13 +0000)]
Suppress errors associated with TEMP triggers that reference objects in
non-TEMP databases. This is a continuation of the fix for ticket #3810
shown in check-in [ba1afc040171810d]
from [/timeline?c=trunk:200908061743|2009-08-06], based on a bug report in
[forum:/forumpost/157dc791df|forum post 157dc791df]
drh [Mon, 26 Oct 2020 18:14:12 +0000 (18:14 +0000)]
Always create a statement journal when using the OP_ParseSchema opcode,
as you never know when it might fail. See the discussion on
[forum:/forumpost/daa2c728cc|forum post daa2c728cc].
drh [Thu, 22 Oct 2020 18:50:30 +0000 (18:50 +0000)]
Minor tweaks to query planning weights so that when STAT4 is enabled
and functioning, a full table scan is more likely to be selected if
that seems like the fastest solution. Only do this when STAT4 info
is available because an error has a large potential downside.
drh [Thu, 22 Oct 2020 15:47:48 +0000 (15:47 +0000)]
Sometimes it makes sense to do a full table scan rather than try to use
an index when most of the rows will be selected. This branch is trying to
tune the query planner to make that happen more often.
drh [Tue, 20 Oct 2020 14:40:53 +0000 (14:40 +0000)]
Fix the sqlite3_hard_heap_limit() so that it works with sqlite3_realloc64()
in addition to sqlite3_malloc64(). Improvements to OOM processing and
debugging aids in the fuzzcheck utility.
drh [Mon, 19 Oct 2020 01:23:48 +0000 (01:23 +0000)]
Allow multiple recursive terms in the compound SELECT of a recursive CTE.
This facilitates writing a query to find find the connected components of
an undirected graph.
drh [Thu, 15 Oct 2020 17:59:38 +0000 (17:59 +0000)]
Minor fixes to the cksumvfs documentation in the header comment of the source
file. Enhance speedtest1.c so that it can more easily do performance
comparisons of cksumvfs.
drh [Thu, 15 Oct 2020 14:37:27 +0000 (14:37 +0000)]
The windows VFS accepts query parameter "exclusive=true" to cause it to
take a mandatory file lock, preventing other applications from even
reading the file.
drh [Wed, 14 Oct 2020 15:46:29 +0000 (15:46 +0000)]
Enhanced documentation for sqlite3_vtab_nochange() to make it clear that
it is an optimization and that virtual table implementations should be
prepared for it to always return false.
drh [Mon, 12 Oct 2020 13:24:00 +0000 (13:24 +0000)]
Fix BEGIN IMMEDIATE and BEGIN EXCLUSIVE so that they work even if one or
more of the database files in the connection are read-only. Test cases
for this are in TH3.
dan [Mon, 5 Oct 2020 16:41:56 +0000 (16:41 +0000)]
Allow fts5 trigram tables created with detail=column or detail=none to optimize LIKE and GLOB queries. Allow case-insensitive tables to optimize GLOB as well as LIKE.
drh [Fri, 2 Oct 2020 11:55:07 +0000 (11:55 +0000)]
For the OP_SeekScan optimization, the OP_IdxGT does not necessarily come
right after the OP_SeekGE. So use the P2 operand of OP_SeekScan to point
to the first instruction after OP_IdxGT. Problem found by dbsqlfuzz.
drh [Fri, 2 Oct 2020 02:02:18 +0000 (02:02 +0000)]
Disable the OP_SeekScan opcode of the in-scan-vs-index optimization when
in PRAGMA reverse_unordered_selects mode, as the OP_SeekScan only works
with forwards scans. Thanks to OSSFuzz for pointing out the problem to
us.