drh [Fri, 6 May 2022 01:02:05 +0000 (01:02 +0000)]
Prevent an infinite loop on SQLITE_ERROR_RETRY when trying to modify a
corrupt schema while PRAGMA writeable_schema=ON is active.
dbsqlfuzz ded83609f475cc989c7339d45efb5151c1495501
drh [Tue, 3 May 2022 14:25:52 +0000 (14:25 +0000)]
Fix the Bloom filter pull-down optimization so that it jumps to the correct
place if it encounters a NULL key. Fix for the bug described by
[forum:/forumpost/2482b32700384a0f|forum thread 2482b32700384a0f].
Preserve the COLLATE operator on an index on an expression when resolving
the use of that expression into a reference to the index. See
[forum:/info/7efabf4b03328e57|forum thread 7efabf4b03328e57] for details.
Modify utility function sqlite3SetString() so that it may be used safely on Parse.zErrMsg. Fuzzer test case "crash-1604e5d76c92574e21e437049dab9b672e06b767.txt".
drh [Fri, 25 Mar 2022 01:31:18 +0000 (01:31 +0000)]
Fix the Bloom-filter optimization so that it does not use IS NULL or
IS NOT NULL constraints from the WHERE clause when operating on a LEFT JOIN.
[forum:/forumpost/031e262a89b6a9d2|Forum thread 031e262a89b6a9d2].
drh [Mon, 21 Mar 2022 18:23:24 +0000 (18:23 +0000)]
Strengthen the defenses against corrupt databases in the
sqlite3BtreeInsert() function of the btree module.
[forum:/forumpost/c7ec29905f|Forum post c7ec29905f].
drh [Mon, 21 Mar 2022 13:55:56 +0000 (13:55 +0000)]
Fix the assert() that attempts to verify that the table-reference to
index-reference translator finds all required translations.
[forum:/forumpost/929168fdd6|Forum post 929168fdd6].
drh [Thu, 17 Mar 2022 11:37:02 +0000 (11:37 +0000)]
Another fix for a corner-case in sqlite_offset() - this one having to
do with computed virtual columns in a WITHOUT ROWID table. Also an
assertion fault problem with sqlite_offset().
drh [Thu, 10 Mar 2022 16:28:13 +0000 (16:28 +0000)]
Prevent a NULL-pointer dereference when trying to parse a illegal
schema entry that contains a window function while doing a RENAME COLUMN.
[forum:/forumpost/ec2a2e0deb|Forum post ec2a2e0deb].
drh [Tue, 8 Mar 2022 16:12:53 +0000 (16:12 +0000)]
Fix a potentially uninitialized local variable in the ".import"
command of the CLI - introduced by [741651fd4b1b776b]. This same change
is part of the nearby [/info/5e30c6ea707f9d38|"Fix compiler warnings"]
check-in.
drh [Mon, 7 Mar 2022 16:40:44 +0000 (16:40 +0000)]
Do not allocate new Trigger objects in the parser following a syntax error,
to avoid violating invariants associated with Expr nodes. See
[forum:/forumpost/2024e94071ef1531|forum thread 2024e94071ef1531] for more
information.
drh [Mon, 7 Mar 2022 14:59:45 +0000 (14:59 +0000)]
Fix the code generated for vector IN operator constraints on virtual tables
so that they work even if the "omit" field in the sqlite3_index_info object
is off. This has apparently never worked correctly before. Presumably, nobody
has ever before written a virtual table that can use vector IN operator
constraints and that relies on bytecode to double-check the constraints.
Test cases in TH3. Problem discovered by
dbsqlfuzz cab8e26194a40147627094f3c6849c0a7b1e0310.
drh [Sat, 5 Mar 2022 20:20:45 +0000 (20:20 +0000)]
Fix the 'localtime' modifier in date/time functions so that it preserves
fractional seconds.
[forum:/forumpost/2ffbaa2c3fd7fb82|Forum post 2ffbaa2c3fd7fb82].
drh [Tue, 22 Feb 2022 15:47:55 +0000 (15:47 +0000)]
Fix an undersized memory allocation in the test harness for RTREE. This
error was in test logic only, not in the SQLite library itself.
[forum:/forumpost/35470a0a72a005e1|forum post 35470a0a72a005e1]
drh [Thu, 17 Feb 2022 17:24:39 +0000 (17:24 +0000)]
Enhance the documentation on sqlite3_stmt_readonly() to explain that
EXPLAIN and EXPLAIN QUERY PLAN do not affect the return value. Add test
cases to verify this. Add new test cases and requirements marks for
complete requirements test coverage on this interface.
drh [Tue, 15 Feb 2022 13:23:09 +0000 (13:23 +0000)]
Improved rendering of floating point numbers without a fractional part in
".dump" output from the CLI.
[forum:/forumpost/550d877659f37cb2|Forum post 550d877659f37cb2].
drh [Mon, 14 Feb 2022 18:18:56 +0000 (18:18 +0000)]
Minor correction to the early corruption detection added by
[a6fda39e81d0da98|check-in a6fda39e81d0da98] so that it works even if
the page being cleared in page 1 of the database.
drh [Fri, 11 Feb 2022 17:33:02 +0000 (17:33 +0000)]
Fix an assert() in the pager by adding "|| CORRUPT_DB", in as much as the
assert() is not necessarily true if the database size in the header is
wrong. dbsqlfuzz f2f996065b90988aa9b0ae425b66dbb296546a08.
drh [Fri, 11 Feb 2022 12:06:37 +0000 (12:06 +0000)]
Fix the bind2.test test script so that it works even if
SQLITE_ENABLE_PREUPDATE_HOOK is not defined.
Fix for test-case breakage from check-in [c006515ae6faff65].
drh [Thu, 10 Feb 2022 21:26:53 +0000 (21:26 +0000)]
Enhance SQLITE_TESTCTRL_LOCALTIME_FAULT so that is able to install an
alternative localtime() interface so that the localtime logic an be better
tested.
drh [Wed, 9 Feb 2022 18:47:09 +0000 (18:47 +0000)]
When process first moves a database into WAL mode and then tries to run
sqlite3_wal_checkpoint() without first performing a transaction, first
try to run a synthesized transaction to get the Pager caught up before
attemptingn the checkpoint.
[forum:/forumpost/fd0f19d229156939|forum post fd0f19d229156939].
dan [Wed, 9 Feb 2022 18:42:15 +0000 (18:42 +0000)]
Fix a problem with using sqlite3_bind_value() with sqlite3_value objects obtained from sqlite3_preupdate_new() when an integer value is written to a column with real affinity.