stephan [Thu, 25 May 2023 16:49:06 +0000 (16:49 +0000)]
Add ability for the JS Worker1.exec() API to report the number of changes made to the caller, per request in [forum:d0b19483642e20dd | forum post d0b19483642e20dd].
drh [Tue, 23 May 2023 15:16:20 +0000 (15:16 +0000)]
When converting an aggregate expression to AGG_COLUMN, be sure to remove
the EP_Unlikely flag if it is present.
[forum:/info/fbfe330a2009d036|Forum post fbfe330a2009d036].
drh [Mon, 22 May 2023 16:35:21 +0000 (16:35 +0000)]
When a floating-point RTREE is presented with large integer constraints -
integers that are too big to be represented exactly by a float - then take
extra steps to ensure that all possibly relevant entries in the RTREE are
returned, even in boundary cases. Fix for the problem identified by
[forum:/forumpost/da70ee0d0d|forum post da70ee0d0d].
stephan [Fri, 19 May 2023 18:23:53 +0000 (18:23 +0000)]
Extend detection of the INSERT...RETURNING locking case to the DB.selectValue(s)/selectArray/selectObject() family of functions. Add tests for INSERT/UPDATE...RETURNING with those functions.
stephan [Fri, 19 May 2023 17:50:16 +0000 (17:50 +0000)]
oo1.Stmt.finalize() no longer throws, but instead returns the same as the C API. oo1.DB.exec() now triggers the INSERT...RETURNING locking failure as an exception via reset() instead of finalize(). Some code-adjacent internal API renaming for clarity's sake.
stephan [Fri, 19 May 2023 15:54:41 +0000 (15:54 +0000)]
sqlite3.oo1.Stmt.finalize() now throws if sqlite3_finalize() returns non-zero. This is intended to address the INSERT RETURNING case covered in [forum:36f7a2e7494897df|forum post 36f7a2e7494897df].
drh [Fri, 19 May 2023 11:48:05 +0000 (11:48 +0000)]
Change the RTREE engine so that equality comparisons of floating point
values are duplicated in the byte-code so that the comparisons are done
using 64-bit floats and consistent results are always obtained.
[forum:/forumpost/da61c4a1b5b4af19|Forum post da61c4a1b5b4af19].
dan [Wed, 17 May 2023 11:31:51 +0000 (11:31 +0000)]
Avoid an assert() failure that could occur in SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds when a WITH clause attached to an UPDATE or DELETE statement created a CTE of the same name as the table being modified.
drh [Mon, 15 May 2023 02:06:35 +0000 (02:06 +0000)]
As evidenced by [forum:/forumpost/f3f546025a|forum post f3f546025a], the
new RIGHT JOIN related restriction on the push-down optimization implemented
by [da3fba18742b6e0b] also needs to apply to the automatic index
(a.k.a. hash-join) optimization and to the Bloom filter optimization.
Computation of the restriction is now
moved into the sqlite3ExprIsSingleTableConstraint() routine.
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]