dan [Sat, 13 May 2023 19:13:40 +0000 (19:13 +0000)]
Add an "#ifndef SQLITE_HAVE_SQLITE3R" directive to shell.c.in, to avoid including the recovery code a second time if the shell is being compiled with sqlite3r.c.
drh [Fri, 12 May 2023 15:45:34 +0000 (15:45 +0000)]
Make the regexp extension more robust against OOM errors during compilation
of the recognizer engine.
[forum:/forumpost/f50aecd5e8|Forum post f50aecd5e8].
drh [Fri, 12 May 2023 10:52:12 +0000 (10:52 +0000)]
Ensure that all prepared statements are expired and forced to reprepare
whenever the database text encoding changes.
[forum:/forumpost/43cbfc4d23|Forum post 43cbfc4d23].
drh [Thu, 11 May 2023 21:15:55 +0000 (21:15 +0000)]
Add [/info/cec6a06508239c09e363?ln=5525-5531|restriction (5)] to the
omit-noop-join optimization. Fix for the issue reported by
[forum/forumpost/49f2c7f690|forum post 49f2c7f690].
drh [Wed, 10 May 2023 16:04:04 +0000 (16:04 +0000)]
Enhance the split-sqlite3c.tcl script so that it uses single-character
extensions on subordinate source files, even when the number of subordinates
exceeds 9. This is not yet needed, but might be soon.
drh [Wed, 10 May 2023 11:05:59 +0000 (11:05 +0000)]
Rename sqlite3IsTableConstraint() to sqlite3IsSingleTableConstraint() and
improve its header comment, in an attempt to make the code easier to reason
about. No functional changes - should generate identical machine code.
drh [Wed, 10 May 2023 00:33:21 +0000 (00:33 +0000)]
New restriction on the push-down optimization to prevent an ON or USING clause
on the left side of a RIGHT JOIN from being pushed down into a subquery that
is on the right side of that RIGHT JOIN.
[forum:/forumpost/a7d4be7fb6|Forum post a7d4be7fb6].
Also add comments to describe previously undocumented push-down optimization
restrictions.
drh [Mon, 8 May 2023 13:38:14 +0000 (13:38 +0000)]
In editPage(), if an attempt is made to edit an empty 64KB page, then take
the slow path through rebuildPage(), in order to maintain strict invariants
in the editPage() code.
[forum:/forumpost/0f37727c0d|Forum post 0f37727c0d].
drh [Mon, 8 May 2023 11:11:08 +0000 (11:11 +0000)]
Ensure that the label for a JSON object really is a string and not an array
or object that just happens to end with a string.
dbsqfuzz 32f62ed8676d0a153dbe756aeae3202d3670fe50.
drh [Sun, 7 May 2023 03:23:32 +0000 (03:23 +0000)]
It turns out that pagerExclusiveLock() can be called with the lock state
already set to RESERVED if the SQLITE_FCNTL_PERSIST_WAL setting is set and
a specific sequence of multiple journal mode changes occur.
Enhance pagerExclusiveLock() to deal with this.
[forum:/forumpost/8130545bc6|Forum post 8130545bc6]
drh [Fri, 5 May 2023 14:14:10 +0000 (14:14 +0000)]
Fix the pager2-3.1 test case so that it does not run if a required
dependence (shared-cache) is omitted from the build. Fix for
[forum:/forumpost/7a028538a7|forum post 7a028538a7].
dan [Fri, 5 May 2023 11:47:31 +0000 (11:47 +0000)]
Allow virtual tables to prepare writes to shadow tables in defensive mode from with xRelease() callbacks - even if the xRelease() is invoked from within sqlite3_finalize().
drh [Thu, 4 May 2023 11:29:15 +0000 (11:29 +0000)]
Fix a bug in cursor hints that can cause references to tables that have not
been opened. Cursor hints are intended for use by COMDB2 only and should not
appear in production builds, so this should not be a factor for the vast
majority of users.
drh [Wed, 3 May 2023 07:30:15 +0000 (07:30 +0000)]
In the zipfile extension, leave the catalog list in a consistent state when
the last entry is removed from the list.
[forum:/info/f03f1e4c5a5c9959|forum post f03f1e4c5a5c9959].
drh [Wed, 3 May 2023 06:48:08 +0000 (06:48 +0000)]
If the page size is wrong on the page1 content inside a WAL file, then
running VACUUM could trigger an assert(). This check-in changes that assert()
into a branch that returns SQLITE_CORRUPT.
[forum:/info/4ef9b37d74d2d2e8|Forum post 4ef9b37d74d2d2e8]
drh [Wed, 3 May 2023 05:00:10 +0000 (05:00 +0000)]
Do not overflow the Index.aSample[] array if the same index appears in
the sqlite_stat4 table under multiple names because it is a WITHOUT ROWID
primary key index. [forum:/info/537d8ab118df7edd|Forum post 537d8ab118df7edd]
stephan [Mon, 1 May 2023 19:28:07 +0000 (19:28 +0000)]
Remove xFileControl() handling from the OPFS VFS altogether, re-routing all syncing through xSync() instead. This eliminates superfluous syncing introduced in [a371374148a2], as discussed in [forum:647d2f811dbc2dfe|forum thread 647d2f811dbc2dfe].
stephan [Mon, 1 May 2023 15:15:11 +0000 (15:15 +0000)]
Implement full xSync() for the OPFS VFS. The previous implementation was not correct for journal files. Reported in [forum:647d2f811dbc2dfe|forum post 647d2f811dbc2dfe].
drh [Mon, 1 May 2023 11:24:35 +0000 (11:24 +0000)]
Do not apply the "AND false" optimization if either operand comes from the
ON clause of a join. Fix for the problem identified by
[forum:/forumpost/96cd4a7e9e|forum post 96cd4a7e9e].
All JSON to understand floating point literals "Inf" and "QNaN" and "SNaN" in
any case, without the SQLITE_EXTENDED_NAN_INF compile-time option. This
extension is always available.
Omit the json_valid() function. Change the name of json_error() to
json_error_position(). Use "NOT json_error_position(X)" as a substitute
for "json_valid5(X)".
Cure CLI generate_series() overflow bug (forum:754e2d4db2a5|noted by forum post #754e2d4db2a5) and bring behavior with negative step arguments closer to as-documented and eponymous function in PostgreSQL.
Add tests for generate_series(), and change an existing test that enforced varying rowid-to-value mapping with query ordering. (That no longer varies.)
Revise generate_series() extension (in CLI) to address overflow reported in [forum:754e2d4db2a5|forum post #754e2d4db2a5] and to make behavior better match the like-named PostgreSQL function.