drh [Wed, 25 Oct 2023 12:58:06 +0000 (12:58 +0000)]
Fix the amalgamation generator so that when it is reporting the Fossil
version number in the header comment of the amalgamation, it does not
elide the first hex digit of the version hash.
drh [Wed, 25 Oct 2023 10:37:11 +0000 (10:37 +0000)]
Enhance the new xIntegrity method of the sqlite3_module object with new
parameters that provide the name of the table being checked and
a flag to indicate a "quick_check". Based on feedback in
[forum:/forumpost/965c0d02ea|forum post 965c0d02ea].
dan [Tue, 24 Oct 2023 16:06:56 +0000 (16:06 +0000)]
Fix a problem with the fts5 highlight() and snippet() functions when used with tokenizers like "trigram" that output overlapping tokens. Forum post [forum:/forumpost/63735293ec|63735293ec].
dan [Tue, 24 Oct 2023 15:53:02 +0000 (15:53 +0000)]
Fix a problem with the fts5 highlight() and snippet() functions when used with tokenizers like "trigram" that output overlapping tokens. Forum post [forum:/forumpost/63735293ec|63735293ec].
dan [Mon, 23 Oct 2023 15:24:44 +0000 (15:24 +0000)]
Revert an earlier change that considered passing a NULL callback to sqlite3_preupdate_hook() to be a misuse. This is required to clear the preupdate hook altogether.
drh [Mon, 23 Oct 2023 02:01:14 +0000 (02:01 +0000)]
Fix the shell1.test test so to align with the new behavior imposed by
[bce807cd48763273] - that backslash escapes only work without quoted arguments
in dot-commands of the CLI.
drh [Sun, 22 Oct 2023 17:27:55 +0000 (17:27 +0000)]
Do not do backslash excape processing on any unquoted strings in dot-commands
in the CLI - on Windows or on posix-like systems either one. This brings the
processing into alignment with the documentation, allows backslash-delimited
filenames on Windows (as long as they are unquoted), and causes the CLI to work
the same with regard to backslash escapes on both Windows and posix.
drh [Sat, 21 Oct 2023 20:03:44 +0000 (20:03 +0000)]
Replace the patch at [5cb61c6788d7c017] with a better way to avoid failing
PRAGMA integrity_check if a module implementation is not loaded, as the use
of suppressErr can lead to problems.
drh [Sat, 21 Oct 2023 16:33:20 +0000 (16:33 +0000)]
Add the SQLITE_TESTCTRL_FK_NO_ACTION test control. Make it available in the
CLI. Fix a minor problems with SQLITE_CHANGESETAPPLY_FKNOACTION in sessions.
drh [Sat, 21 Oct 2023 16:25:44 +0000 (16:25 +0000)]
Extra comment on the implementation of SQLITE_TESTCTRL_FK_NO_ACTION,
warning about the need to reset the schema in order for the setting change
to take full effect.
drh [Sat, 21 Oct 2023 11:34:59 +0000 (11:34 +0000)]
Compress the content of the status line in testrunning.tcl so that all the
same status information appears but with less punctuation and with "zero"
values omitted, so that the status line will fit comfortably on an 80-column
terminal window.
drh [Sat, 21 Oct 2023 11:13:47 +0000 (11:13 +0000)]
Create the new string_agg(X,Y) aggregate function which is an alias for
the two-argument group_concat(X,Y) function, for compatibility with
SQL-Server and PostgreSQL.
drh [Fri, 20 Oct 2023 18:09:08 +0000 (18:09 +0000)]
Omit some redundant calls to strlen() used to find the size of
Expr.u.zToken in sqliteExprDup(). This inefficiency was seen while working
on the previous check-in, and I thought it best to fix it while it was
fresh in mind.
drh [Fri, 20 Oct 2023 17:15:15 +0000 (17:15 +0000)]
Improvements to the sqlite3ExprDup() logic for faster performance and better
run-time error detection. This check-in fixes the 5x oversize memory allocation
bug from [f371e4c0f8ea73ae] as well as all other known issues that result from
handing the ORDER BY clause of an aggregate function off of the pLeft pointer
of the Expr object.
dan [Fri, 20 Oct 2023 17:06:39 +0000 (17:06 +0000)]
Add the SQLITE_CHANGESETAPPLY_FKNOACTION flag to sqlite3session.h, for passing to sqlite3changeset_apply_v2() to cause all foreign key constraints to behave as if they were declared NO ACTION.
drh [Fri, 20 Oct 2023 15:47:30 +0000 (15:47 +0000)]
Simplifications and optimizations to the Expr object duplication logic.
The 5x multiplier crutch from [f371e4c0f8ea73ae] is still present. More
fixes are still needed.
drh [Fri, 20 Oct 2023 10:18:03 +0000 (10:18 +0000)]
Use sqlite3ParserAddCleanup() instead of calling sqlite3ExprListDelete()
directly when disposing of an unused ORDER BY in an aggregate function,
to avoid disrupting ALTER TABLE data structures.
drh [Thu, 19 Oct 2023 18:07:58 +0000 (18:07 +0000)]
Simplify the Expr compression logic slightly by adding the new EP_FullSize
property to expressions that are exceptions to the rule and should not be
compressed.
drh [Thu, 19 Oct 2023 12:12:49 +0000 (12:12 +0000)]
Fix the sqlite3ReferencesSrcList() routine so that it recognizes columns
in the ORDER BY clause of an aggregate. Fixes a problem with
[634286828dad873d] discoverd by dbsqlfuzz.
drh [Wed, 18 Oct 2023 13:18:52 +0000 (13:18 +0000)]
Enhance the parser so that it can accept an ORDER BY clause on a function
invocation. For this incremental check-in, the ORDER BY clause is currently
ignored.
drh [Tue, 17 Oct 2023 13:41:41 +0000 (13:41 +0000)]
Fix a JSON bug introduced by the optimization of [df099ad713011b67] and
first appearing in 3.43.0. The problem occurs when doing a JSON_EXTRACT()
on an array element that was added by JSON_SET() without first reparsing.
Reported by [forum:/forumpost/fc0e3f1e2a|forum post fc0e3f1e2a].
drh [Tue, 17 Oct 2023 11:57:36 +0000 (11:57 +0000)]
Enhance the documentation of sqlite3_deserialize() to make it clear that
the input database may not be in WAL mode.
[forum:/forumpost/a7e272cee9ac469f|Forum post a7e272cee9ac469f]
drh [Tue, 17 Oct 2023 10:47:42 +0000 (10:47 +0000)]
When an I/O or similar error occurs during a transaction with
journal_mode=MEMORY, attempt to rollback before closing the journal, as
all rollback information is forgotten when a memory rollback journal is
closed.
stephan [Mon, 16 Oct 2023 13:04:42 +0000 (13:04 +0000)]
JNI: initial draft (untested - requires more infrastructure first) of a UDF argument/result-handling interface which completely hides the C-style API from the client.
stephan [Mon, 16 Oct 2023 10:27:19 +0000 (10:27 +0000)]
JNI: move the C-style API parts into the capi subpackage and the higher-level wrapper into (tentatively) wrapper1, so that CApi.java can support multiple independent higher-level wrappers without name collisions, and CApi can be made public but have the option to be elided from wrapper-level javadocs for wrappers which do not wish to expose it.
stephan [Mon, 16 Oct 2023 08:10:11 +0000 (08:10 +0000)]
JNI: after calling a Java-side UDF, zero-out the pointer of the Java-side sqlite3_context and sqlite3_value array entries to avoid misbehavior if a client makes the mistake of holding a reference to one of those objects.