dan [Thu, 26 Feb 2026 11:03:22 +0000 (11:03 +0000)]
Fix a problem where the wrong collation could be used as part of a row-value comparison between columns with different collation sequences. [forum:/forumpost/6ceca07fc3 | Forum post 6ceca07fc3].
drh [Wed, 25 Feb 2026 12:44:19 +0000 (12:44 +0000)]
Reinstant the work-around for [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96270|GCC compiler bug 96270]
which is apparently still an issue as of gcc 13.3.0 with -m32 on Mint Linux.
The test case in the bug report is fixed, but the vdbeMemRenderNum() routine
in SQLite still shows the problem.
drh [Tue, 24 Feb 2026 19:37:16 +0000 (19:37 +0000)]
Rename SQLITE_ENABLE_MULTITHREADED_CHECKS to SQLITE_THREAD_MISUSE_WARNINGS.
Run test cases with that option. Also add the
SQLITE_THREAD_MISUSE_ABORT option.
drh [Mon, 23 Feb 2026 12:19:05 +0000 (12:19 +0000)]
Change the SQLAR archive extraction algorithm in the CLI so that it
uses the newly enhanced realpath() SQL function to guard against
attacks that use symlinks to try to write files outside of the
destination directory.
[forum:/forumpost/641b09daa17d9086|Forum post 641b09daa17d9086].
drh [Mon, 23 Feb 2026 01:34:14 +0000 (01:34 +0000)]
When doing an SQLAR archive extraction in the CLI, postpone creating symlinks until after
all files and directories have been created. This prevents a hostile archive from
creating a symlink through which it can subsequently write content outside of the target
directory. [forum:forumpost/9e176adfef91c207|Forum post 9e176adfef91c207].
drh [Sat, 21 Feb 2026 20:03:47 +0000 (20:03 +0000)]
Improved rounding of double→text conversions for rounding digits
of 17. Add the new sqlite3_db_config(), SQLITE_DBCONFIG_FP_DIGITS,
to specify the number of significant digits to preserve on conversions.
drh [Sat, 21 Feb 2026 19:26:58 +0000 (19:26 +0000)]
New sqlite3_db_config(SQLITE_DBCONFIG_FP_DIGITS) that let's the application
specify the number of significant digits that double→text conversions
will attempt to preserve.
drh [Sat, 21 Feb 2026 10:57:02 +0000 (10:57 +0000)]
Increase the precision of double → text conversions that happen in
sqlite3_column_text(), or sqlite3_value_text(), or in the CAST() operator,
or similar, so that round-tripping the value back to double results in
exactly the same value.
drh [Fri, 20 Feb 2026 16:21:58 +0000 (16:21 +0000)]
In the decimal extension, an optional second argument to the
decimal() and decimal_exp() functions rounds the value to the
number of significant digits specified by that argument.
drh [Mon, 16 Feb 2026 16:56:59 +0000 (16:56 +0000)]
Refactor the sqlite3AtoF() routine so that it requires a zero-terminated
UTF-8 input. When the need arises to convert UTF16 or non-terminated
strings, wrapper functions are used. Together, this makes the code slightly
smaller and faster.
drh [Tue, 3 Feb 2026 17:21:59 +0000 (17:21 +0000)]
Improve the query planner by reducing the estimated number of output rows
for each stage of a join if there are LIKE, GLOB, REGEXP, or MATCH
constraints on the table where the pattern string is a constant. The
reduction in the output row estimate is proportional to the length of
the pattern string.
drh [Tue, 3 Feb 2026 14:00:28 +0000 (14:00 +0000)]
Refactor the implementation of this enhancement to keep all the code inside
the query planner, not leaking out into SQL function implementations.
Expand the enhancement to cover MATCH and REGEXP operators and overloads
of LIKE and GLOB.
drh [Sun, 1 Feb 2026 15:58:37 +0000 (15:58 +0000)]
Enhance the ".timer" command in the CLI to accept the "once" argument, and
so that it leaves its last real-time result in the $TIMER variable. Also
fix a harmless warning from an earlier check-in.
drh [Sun, 1 Feb 2026 00:37:04 +0000 (00:37 +0000)]
An experimental query-planner change that reduces the estimated number
of output rows for FROM clause terms that are restricted by a LIKE or
GLOB operator, based on the number of bytes in the pattern. The idea is
that longer patterns will match fewer records and hence should reduce the
estimated output count. The implementation is not workable as it stands
now. This is just a crazy idea, saved for future reference.
drh [Sat, 31 Jan 2026 02:17:55 +0000 (02:17 +0000)]
Fix a missed optimization opportunity due to a typo in check-in [898bfa1afd8260ea].
Reported by [forum:/forumpost/2026-01-31T00:49:53z|forum post 2026-01-31T00:49:53z].
drh [Fri, 30 Jan 2026 17:10:22 +0000 (17:10 +0000)]
Make CROSS JOIN a join reorder barrier again, as the SQLite documentation says it is. It
mistakenly stopped being a join barrier with check-in [c1ea064948ba08c4].
drh [Fri, 30 Jan 2026 13:11:20 +0000 (13:11 +0000)]
Change the new escape-character mechanism for CSV import so that there are
separate options for an escape character for quoted and unquoted fields of
the CSV.
stephan [Fri, 30 Jan 2026 06:37:34 +0000 (06:37 +0000)]
kvvfs fix for [https://github.com/sqlite/sqlite-wasm/issues/146|npm ticket #146]: use of a test-mode-only symbol in non-test runs leads to a null deref in xFileControl().
stephan [Wed, 28 Jan 2026 17:25:18 +0000 (17:25 +0000)]
Capture sqlite3_rsync's remote-end result code so the local side can exit with non-0 if, e.g., the remote sqlite3_rsync binary is found but fails to start. [forum:43eb1cd1c3979817|Confirmation received] that it resolves the motivating problem report.
drh [Tue, 27 Jan 2026 23:33:42 +0000 (23:33 +0000)]
Avoid unsigned integer overflow when evaluating an array index in a
JSON path expression.
[forum:/forumpost/2026-01-27T14:18:49z|Forum post 2026-01-27T14:18:49z].
drh [Tue, 27 Jan 2026 16:18:35 +0000 (16:18 +0000)]
The tmstmpvfs.c extension should not modify the content of pages going into
the WAL file, as that would corrupt the page checksum used for recovery.
Instead, only insert timestamp information as content is written into the
database file.
stephan [Tue, 27 Jan 2026 16:15:22 +0000 (16:15 +0000)]
Teach sqlite3_rsync to increment its error count when a child process fails, based on [forum:8fe404e547faa42e|forum post 8fe404e547faa42e]. This passes basic sanity tests but requires more testing and needs a review of the final 'else' block in the new code.
drh [Tue, 27 Jan 2026 14:59:08 +0000 (14:59 +0000)]
For CSV import in the CLI, when the table is created automatically
because it does not previously exist, make the column types "ANY"
instead of "TEXT" so that they will automatically adjust to different
datatypes in the input text.