]>
git.ipfire.org Git - thirdparty/sqlite.git/log
dan [Sat, 16 Oct 2021 17:09:36 +0000 (17:09 +0000)]
Have the btree layer detect when a "DELETE FROM tbl" statement is clearing a database page that is still in use (due to database corruption) and report SQLITE_CORRUPT.
FossilOrigin-Name:
a6fda39e81d0da98dd6b60b32e6df786f0089c1f4ac7f3a2936afd118bd04353
dan [Sat, 16 Oct 2021 13:59:08 +0000 (13:59 +0000)]
Fix an assert() in fts5 that could fail with a corrupt database.
FossilOrigin-Name:
e99979855de937ed5ee0994b180054501400bf8776fb70acd31786d2ba1ad49a
drh [Fri, 15 Oct 2021 17:06:16 +0000 (17:06 +0000)]
Protect the WhereTerm.u union using nearby assert()s and/or branches.
FossilOrigin-Name:
8a56de5b9c6f4522000f8d991373490b67b9e9d97f03c1ca2cf32816d84789ef
drh [Fri, 15 Oct 2021 16:15:04 +0000 (16:15 +0000)]
Protect the JsonNode.u union using nearby assert()s and branches.
FossilOrigin-Name:
7b8ea2298927fd34f27b3345add3ce751ed728387fe3d9207b601ba6449d5af9
dan [Thu, 14 Oct 2021 21:13:02 +0000 (21:13 +0000)]
Fix a signed integer overflow in fts5 leading to a segfault that could occur when processing corrupt records.
FossilOrigin-Name:
69a3ff0cc159cdf84a5367eaf708882ddeda4fa65c96a5b546ae4a0114f02cb7
drh [Thu, 14 Oct 2021 19:28:28 +0000 (19:28 +0000)]
Protect access to the WhereLoop.u union using nearby assert()s and
branches.
FossilOrigin-Name:
bdd840216cc4c5293c112f182a189f7562b3cc0f6270e3c4af5eb2e8bd61ccc9
drh [Thu, 14 Oct 2021 17:30:32 +0000 (17:30 +0000)]
Update requirement marks. No changes to code.
FossilOrigin-Name:
3a6887a543ac348d1a0d4b7f54b13c9dae929c3fa3408c5a44420943ba8c116f
drh [Wed, 13 Oct 2021 20:29:05 +0000 (20:29 +0000)]
drh [Wed, 13 Oct 2021 20:11:30 +0000 (20:11 +0000)]
Convert an assert() into a corruption detection branch in
sqlite3BtreePayload(). dbsqlfuzz
848171b5d58f6e4a62257466e0e7de16696d4f02 .
FossilOrigin-Name:
f038d7f90e04838479e44ded00f627ec5ad8e1bd477edea8e87e66dd37485f30
drh [Wed, 13 Oct 2021 15:09:37 +0000 (15:09 +0000)]
Attempt to clarify the sqlite3_open_v2() documentation so that people do not
come away with the idea that SQLITE_OPEN_EXCLUSIVE is an allowed bit value
for the 3rd argument bitmask.
FossilOrigin-Name:
1310a126deae6974277d281ff78a7c34bd21829dd822a9fd8d6bda23cfba3f15
drh [Wed, 13 Oct 2021 14:45:35 +0000 (14:45 +0000)]
Back out the SQLITE_OPEN_EXCLUSIVE changes because it does not work on
Windows and it does not work always on unix.
FossilOrigin-Name:
d008ad793dfb11c287f366377cbc561acedef6c9d08b1557f463484eda41a84e
drh [Wed, 13 Oct 2021 14:01:44 +0000 (14:01 +0000)]
Remove a NEVER() macro in ALTER TABLE due to an
obscure case of a nested CTE inside an UPDATE within a
trigger. dbsqlfuzz
e89174cbfad2d904f06b5e24df0a22510b6a1c1e
FossilOrigin-Name:
9e2f06b84f9942772c30bed2ac71b3296c9adf9661dbf8916d56996253ee8d28
drh [Wed, 13 Oct 2021 13:00:34 +0000 (13:00 +0000)]
The sqlite3_result_text() routine (and similar) should record OOM errors
in addition to SQLITE_TOOBIG errors.
dbsqlfuzz
FossilOrigin-Name:
eca434362652fe2edd6090b29417b35bc88a170609810aa9d266f6fc27baeab8
drh [Tue, 12 Oct 2021 22:55:04 +0000 (22:55 +0000)]
Fix the group_concat() inverse function implementation so that it correctly
handles BLOB inputs when database text encoding is UTF16.
FossilOrigin-Name:
38a1326b4bd11bbe2846990d099c28520d17ab4cace1af67248c2472f89df929
drh [Tue, 12 Oct 2021 18:05:55 +0000 (18:05 +0000)]
Fix an incorrect assert() in SQLITE_ENABLE_SORTER_REFERENCES logic - a new
assert() introduced 5 days ago by [
87e2f5eb436fc448 ].
FossilOrigin-Name:
7cfc839e5f1f28514cba7d11b0c0eb56d5ea65caacb8893dcf9fcf2d409e2ba5
dan [Tue, 12 Oct 2021 11:30:07 +0000 (11:30 +0000)]
Fix a use-after-free in fts3 that could follow an optimize() in the middle of a SELECT statement when the hash table is non-empty.
FossilOrigin-Name:
8124b2ceb71447157283b16f9a7fa6e250003b9ddf1c1b45f91db64aed79b5da
mistachkin [Tue, 12 Oct 2021 02:26:32 +0000 (02:26 +0000)]
Fix another harmless compiler warning for MSVC.
FossilOrigin-Name:
b54c0db0fd686b85269cf4c301c9b483c5272269d0cd69a1c7141a91101192f0
mistachkin [Tue, 12 Oct 2021 02:17:39 +0000 (02:17 +0000)]
Fix harmless compiler warnings in the debug build for MSVC.
FossilOrigin-Name:
1ceb73f316ddc736aebd1e82ef3a0d9c173d025ac5b7fcfbde0a65a0eeb60a4b
drh [Mon, 11 Oct 2021 15:54:05 +0000 (15:54 +0000)]
Fail a schema parse if a virtual table or view has a positive integer
rootpage.
FossilOrigin-Name:
02656760406add06303afc94eaf9f2be021cbdbc7ac1ca79b139a7d2de9c0dc5
drh [Mon, 11 Oct 2021 15:21:42 +0000 (15:21 +0000)]
Use the IsOrdinaryTable() macro, not a test of tnum, to distinguish tables
from views and virtual tables.
FossilOrigin-Name:
6189b7809d774bf697d14e27a4bd961df5c318d261dce97db7801ce83f12c59a
drh [Mon, 11 Oct 2021 09:48:59 +0000 (09:48 +0000)]
drh [Mon, 11 Oct 2021 09:39:42 +0000 (09:39 +0000)]
drh [Sat, 9 Oct 2021 16:00:56 +0000 (16:00 +0000)]
Detect any attempt to use an INDEXED BY clause on a CTE and report an
error.
FossilOrigin-Name:
35a9de2c97b9a386070e7827a0842bb1caf3af69ea0d6f67ce2a50be3426fb63
drh [Fri, 8 Oct 2021 18:15:50 +0000 (18:15 +0000)]
Further to the previous check-in, remove the "harmless()" macro definition as
it is no longer used.
FossilOrigin-Name:
b8c9a54664a87ac464b413390572c3feb912e1efc9c8a78c61f1b370e2165c05
drh [Fri, 8 Oct 2021 18:12:37 +0000 (18:12 +0000)]
Remove a "harmless()" macro that is no longer relevant.
FossilOrigin-Name:
87c357c60168fdc52c82382aa7288d66886f5fbe2ae6af68344dbcfdbca9069b
drh [Fri, 8 Oct 2021 16:39:33 +0000 (16:39 +0000)]
Add support for "PRAGMA writable_schema=RESET".
FossilOrigin-Name:
a51b305bd068f8d8e85b9fc38d61cdf5957f3a2ad2eb2e77015547910088e681
drh [Fri, 8 Oct 2021 16:15:17 +0000 (16:15 +0000)]
drh [Fri, 8 Oct 2021 10:25:06 +0000 (10:25 +0000)]
Minor improvements to comments in the data structure definitions. No
changes to code.
FossilOrigin-Name:
e77ac4050cf6c24118ce2af4c075f60e3eeb2dafe6d222c848bc4e541eef7172
drh [Thu, 7 Oct 2021 23:04:50 +0000 (23:04 +0000)]
New assert() statements to protect the u1 and u2 unions of SrcList.
FossilOrigin-Name:
9b91fbcfcc14048f7d0755d47d9b7f9212fa2eaa6f3c04f417fa16c3a47943bf
drh [Thu, 7 Oct 2021 20:46:29 +0000 (20:46 +0000)]
Protect access to the Expr.y union using nearby assert()s and branches.
FossilOrigin-Name:
87e2f5eb436fc448427b0e24fb70f29688796b513b8c7b12f1a21540dae1e56d
dan [Thu, 7 Oct 2021 19:27:17 +0000 (19:27 +0000)]
Break the tcl release tests into smaller units to better take advantage of multi-processor systems.
FossilOrigin-Name:
03cef1c30d96cd42682f57667bb3072c7643ef43fe05eda2d8b82c30789234af
drh [Thu, 7 Oct 2021 17:43:30 +0000 (17:43 +0000)]
Protect all accesses to the Expr.x union using nearby assert()s and branches.
FossilOrigin-Name:
8eaa1d4a98b24adf245bbd2fe9212aa6a924a0f09c445906d7f87574f36a7423
drh [Thu, 7 Oct 2021 14:19:32 +0000 (14:19 +0000)]
Fix an incorrect assert() on PRAGMA table_xinfo added by the previous check-in.
FossilOrigin-Name:
f85cb287c52baa729aeb223038e979a3b74a1eb3d97bf59c01f5417998204f84
drh [Thu, 7 Oct 2021 13:40:29 +0000 (13:40 +0000)]
Protect all accesses to the FuncDef.u and Expr.u unions using nearby
assert()s or branches.
FossilOrigin-Name:
9af863f065e0bef491c2ab7525194505f9516f4e6dfc789d2e3a9d2c2438533a
drh [Thu, 7 Oct 2021 12:11:20 +0000 (12:11 +0000)]
Protect every access to the Table.u union using a nearby assert() or branch.
FossilOrigin-Name:
50e08338aed7ac0cee600098d2ecd4b3b7bfd31a597bb26773badf3d2e2582c8
drh [Wed, 6 Oct 2021 10:36:56 +0000 (10:36 +0000)]
Fix a macro typo introduced by [
5da112c02f9e8d0b ] that prevented coverage
tests from working.
FossilOrigin-Name:
566e6974892ebd3d3de8d77b24655257a5efe14434c553e1a25fc680b201b336
drh [Wed, 6 Oct 2021 10:04:04 +0000 (10:04 +0000)]
Once corner case for the fix at [
8b24c177061c3836 ] was not quite right.
Caught overnight by both OSSFuzz and dbsqlfuzz and repaired here.
FossilOrigin-Name:
79e90a8225b90593e384eab49a8d1d3c93a3deaf2739dcc30f6c88852df80d04
drh [Tue, 5 Oct 2021 22:51:26 +0000 (22:51 +0000)]
Fix a harmless typo in a comment.
[forum:/forumpost/
218c116fdf |forum post
218c116fdf ].
FossilOrigin-Name:
8ca0c7d826622c9660ecbd9664eba2bac9bb1b850f96f35d6c959d0acde2309b
drh [Tue, 5 Oct 2021 18:59:05 +0000 (18:59 +0000)]
Fix harmless compiler warnings, mostly caused by prior efforts to get static
analyzers to run without warnings.
FossilOrigin-Name:
cddd3b382a118bb16be3a602ae711fe2c2a7d1c673dd30dd3977b67ee555e666
drh [Tue, 5 Oct 2021 18:33:38 +0000 (18:33 +0000)]
Fix more harmless static-analyzer warnings. As of this check-in, no warnings
are generated by scan-build for clang-6 or clang-10.
FossilOrigin-Name:
a7835bead85b1b18a8affd9835240b0baf9c7af887196bbdcc3f5d58055042fc
drh [Tue, 5 Oct 2021 17:41:12 +0000 (17:41 +0000)]
Fixes for harmless static-analyzer warnings. This also makes the code easier
for humans to understand.
FossilOrigin-Name:
36177a62feeb4fa93ab6e3c6f4dbe1ddcf63bb02f93284abab979da0261b218e
drh [Tue, 5 Oct 2021 15:30:52 +0000 (15:30 +0000)]
Fix separate compilation of json1.c, which was apparently broken by
check-in [
32f33f356931242b ].
FossilOrigin-Name:
0c7ece6792d30bdb314e2a6e61d0c051c3619a2d749f8b1df7dc2b1f521388bf
drh [Tue, 5 Oct 2021 13:00:50 +0000 (13:00 +0000)]
Small change to FTS5 to help static analyzers understand that it is not
dereferencing a NULL pointer.
FossilOrigin-Name:
0d853df1b19a0270b2cb0ebdf5df8067572f19ab9a82d047cb047f3f9e850348
drh [Tue, 5 Oct 2021 12:34:54 +0000 (12:34 +0000)]
Ensure that geopoly does not invoke sqlite3_result_error_nomem() with a
NULL pointer.
FossilOrigin-Name:
2483310d15022b47109b44c86e100f5894be7a45a0568dfef6aea80e6c518654
drh [Tue, 5 Oct 2021 11:11:43 +0000 (11:11 +0000)]
Simplifications to the preupdate_hook logic to make it easier to reason about,
and reduce static analyzer warnings.
FossilOrigin-Name:
91e3b98e06feaa5b70caf2266200d20d0ae4e432db147975c9f5959f93df7e7b
drh [Mon, 4 Oct 2021 22:34:38 +0000 (22:34 +0000)]
drh [Mon, 4 Oct 2021 18:59:02 +0000 (18:59 +0000)]
Merge static-analyzer warning fixes and the new SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS macro.
FossilOrigin-Name:
5da112c02f9e8d0bcbed8bcf6bab9c227607a802e85c8f70b1ca628d24960dee
drh [Mon, 4 Oct 2021 18:57:42 +0000 (18:57 +0000)]
Some #defines somehow failed to get set correctly in the previous check-in.
Fixed here.
FossilOrigin-Name:
15bbdf9ac840a220f384411d3025ef22f949d310194b60bca8e6d6a759e6042e
drh [Mon, 4 Oct 2021 18:21:14 +0000 (18:21 +0000)]
Fix harmless static analyzer warnings in sessions, rtree, fts3 and fts5.
Add the -DSQLITE_OMIT_AUXILIARY_SAFETY_CHECKS compile-time option to cause
ALWAYS() and NEVER() macros to be omitted from the build.
FossilOrigin-Name:
1c67f957fc77e37ce8f0d447c41ca975e8e79a35d332739c24a633649b5b0387
drh [Mon, 4 Oct 2021 16:14:51 +0000 (16:14 +0000)]
Fix harmless static analyzer warnings in auxiliary build tools, mkkeywordhash.c
and lemon.c. No changes to the SQLite core.
FossilOrigin-Name:
f2f279b2cc1c8b3b162058c33956be4037cd519715ac0c4290f10c58d2528f0a
drh [Mon, 4 Oct 2021 15:08:49 +0000 (15:08 +0000)]
drh [Mon, 4 Oct 2021 13:30:22 +0000 (13:30 +0000)]
The pragma_table_list virtual table should have only one "schema" column.
FossilOrigin-Name:
886feffaad6baac37dfaab489c2aecc4abf51a3a5bce1e8a94be7cc1d2a3c30c
drh [Mon, 4 Oct 2021 13:18:44 +0000 (13:18 +0000)]
drh [Mon, 4 Oct 2021 11:10:15 +0000 (11:10 +0000)]
Fix query plans created by whereShortCut() so that they always check
transitive constraints that drive an index. The is analogous to the
[
f1f9b5de3c59489b ] check-in, just for whereShortCut() rather than the
full query planner. Fix for the issue described by
[forum:/forumpost/
a65cacbf5e1c41ba |forum post
a65cacbf5e1c41ba ].
FossilOrigin-Name:
8b24c177061c38361588f419eda9b7943b72a0c6b2855b6f39272451b8a1b813
larrybr [Sun, 3 Oct 2021 22:03:59 +0000 (22:03 +0000)]
In CLI, ensure correct line-accumulation state whenever line(s) are dumped or processed. And test this.
FossilOrigin-Name:
be211a9c59234ef202e772fcaae18be43c44e1e00674f137cad2d903e00bfcab
drh [Sun, 3 Oct 2021 00:12:43 +0000 (00:12 +0000)]
Add the sqlite3ResultStrAccum() internal interface to simplify the
the implementation of functions that return strings.
FossilOrigin-Name:
e548e9299d3fd6ce5b647cf0dd93ff8e917a5eda43076c6a02389c52640e2e50
drh [Sat, 2 Oct 2021 18:22:24 +0000 (18:22 +0000)]
Try to fix a harmless static-analyzer warning in sqlite3BtreeTransferRow().
FossilOrigin-Name:
5906a0152deded614d965e790a33c67832890828a4835451d65c06414ba71f8b
drh [Sat, 2 Oct 2021 17:46:24 +0000 (17:46 +0000)]
Fix a harmless static-analyzer warning in sqlite3ExprCode().
FossilOrigin-Name:
918c22e82ae6e366ddd094d337ed73fd23878c51745045519ed700113832545c
drh [Sat, 2 Oct 2021 17:34:28 +0000 (17:34 +0000)]
Remove an unnecessary static buffer from sqlite3VdbeExpandSql().
FossilOrigin-Name:
953a33b7f739bb39f4a0efedcad2236c09fb798da4a519f8e1049aebe3bbf3ff
drh [Sat, 2 Oct 2021 17:12:58 +0000 (17:12 +0000)]
Make the sqlite3_filename_xxxx() interfaces robust against NULL pointer
arguments, even though the documentation says the behavior is undefined
in that case.
FossilOrigin-Name:
dd64c60bab4e2b44419db6882dfcc80b73d733ebe3bea64a7588c33fbc428234
drh [Sat, 2 Oct 2021 16:39:16 +0000 (16:39 +0000)]
larrybr [Sat, 2 Oct 2021 15:34:52 +0000 (15:34 +0000)]
Fix CLI line processing. (back to start state after meta-command executes)
FossilOrigin-Name:
928c2a34986644d34bcb5e8a1b2720f31cf703383f4ce75381faefca6f356d04
drh [Fri, 1 Oct 2021 22:48:52 +0000 (22:48 +0000)]
Fix a problem with group_concat() when it is used as a window function with
a sliding window, as described by
[forum:/forumpost/
f3eb24a6c0 |forum thread
f3eb24a6c0 ].
FossilOrigin-Name:
f47f7f78227830c065d9ce715b8456eab81a38d680f76bf4ff08f298d84f9c7a
drh [Fri, 1 Oct 2021 21:01:07 +0000 (21:01 +0000)]
dan [Fri, 1 Oct 2021 20:39:50 +0000 (20:39 +0000)]
Change things so that SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTER_TABLE.
FossilOrigin-Name:
2f7c946c5f25a858167f5193ca06e53310394c8cff15426ab8a1327a1ec835fd
drh [Fri, 1 Oct 2021 17:06:44 +0000 (17:06 +0000)]
Fix a potential write outside of array bounds in the --hexdb decoder of the
CLI when given corrupt input.
FossilOrigin-Name:
c7fdd775bb5efd22a486510a32a2f278c4d5cda95acd3085a0f0dfc2ef749d6f
dan [Fri, 1 Oct 2021 15:05:19 +0000 (15:05 +0000)]
Fix a buffer overread in fts5 that could occur when processing an "ORDER BY rowid DESC" query against corrupt database records.
FossilOrigin-Name:
fe098a93340b8dac15752f1be4f681e2a591f7ae1a94b177f400ccd7ef638480
drh [Fri, 1 Oct 2021 02:45:48 +0000 (02:45 +0000)]
Remove unreachable branches in the fixed group_concat() code.
FossilOrigin-Name:
8bd721c29e7a28cd75885dd80235e4e37aa0847229f769f49e01127f794fa63a
drh [Fri, 1 Oct 2021 02:16:52 +0000 (02:16 +0000)]
drh [Fri, 1 Oct 2021 00:25:06 +0000 (00:25 +0000)]
Fixes to the version of "varsep" group_concat so that (1) it builds under
separate compilation and (2) omits tabs in source code and (3) runs faster
than trunk. This variant of the group_concat_varsep branch might be preferred
over the tip because it preserves (undocumented) legacy behavior about the
position of separators relative to terms.
FossilOrigin-Name:
04399cf9645e04b171090ff8a3c27752929c10d2cd8778e26f8f3337aa902ab6
dan [Thu, 30 Sep 2021 18:42:52 +0000 (18:42 +0000)]
Fix a problem with view handling in SQLITE_OMIT_VIRTUAL_TABLE builds.
FossilOrigin-Name:
6e791a24ce259ff6cc46a7c2188aea094a5021e154368f57019a0653c8a81217
dan [Thu, 30 Sep 2021 17:39:21 +0000 (17:39 +0000)]
Fix rtreedoc.test so that it works with SQLITE_DEFAULT_AUTOVACUUM=1 builds.
FossilOrigin-Name:
a300adc21151fb70ab8573477fd89a10300ee678f068fe123f22ada2f1f876d2
dan [Thu, 30 Sep 2021 10:47:10 +0000 (10:47 +0000)]
Update a test case in rtreedoc.test to account for the fact that release builds generate fewer VM instructions than debug builds.
FossilOrigin-Name:
7d16b302826fec3606dbc6e20df0d2182f6946a2ed4076d2412d1df30c552ecb
drh [Wed, 29 Sep 2021 20:17:19 +0000 (20:17 +0000)]
Add NEVER() macros on branches that are not reachable since [
a0df216f7c3f8963 ].
FossilOrigin-Name:
5d771f3554f3c98872cd0c9f12f415e685f26fcb923e3fb7f1a7a760c7a53255
dan [Wed, 29 Sep 2021 19:18:53 +0000 (19:18 +0000)]
dan [Wed, 29 Sep 2021 19:15:25 +0000 (19:15 +0000)]
Have the dbstat module arrange things internally so that there are 256 addressable bytes following each page buffer. This way, small buffer overreads caused by corrupt database pages do not lead to undefined behaviour.
FossilOrigin-Name:
c4c705abc60624bf9ba4c1c05286b902b965f7ba9fd776c4ef8bc1fb78a4ccde
dan [Wed, 29 Sep 2021 18:33:26 +0000 (18:33 +0000)]
Fix another problem with ALTER TABLE and vector UPDATE statements within triggers.
FossilOrigin-Name:
a0df216f7c3f8963efba0b1ffee65d6a63309d846ffdcf2d2932cb4f1d4967b7
dan [Wed, 29 Sep 2021 16:38:02 +0000 (16:38 +0000)]
larrybr [Wed, 29 Sep 2021 16:35:14 +0000 (16:35 +0000)]
dan [Wed, 29 Sep 2021 14:14:16 +0000 (14:14 +0000)]
Add extra tests for the group_concat() fix on this branch.
FossilOrigin-Name:
3d148615f9d9c6a3d63d8eb015f3d70f453a66de49b28e665831254387c700b9
drh [Wed, 29 Sep 2021 14:01:44 +0000 (14:01 +0000)]
dan [Wed, 29 Sep 2021 13:36:58 +0000 (13:36 +0000)]
Fix an out-of-bounds read in fts5 that could occur when processing corrupt records.
FossilOrigin-Name:
9bbc01fb239b4aa752a56c584baa29655a3c845425d5c17d24a3939984d54fe2
larrybr [Wed, 29 Sep 2021 00:32:13 +0000 (00:32 +0000)]
Get group_concat() to handle varying separator lengths when windowing
FossilOrigin-Name:
98e0f2bf67cdee1da1edadeb54ff8564728b3f28fc821e46e8de201247c3fc87
dan [Tue, 28 Sep 2021 10:44:54 +0000 (10:44 +0000)]
Fix a potential ALTER TABLE problem with expressions like ( (<sub-select>) IN () ).
FossilOrigin-Name:
df0d7e36dbf98ab5405d8366ce92fb85176d4388b47a57b0ca1aa1ba6ae5212e
dan [Mon, 27 Sep 2021 17:11:20 +0000 (17:11 +0000)]
Have the dbstat virtual table take a copy of each page buffer that it traverses instead of just a reference to the page-cache object. This avoids problems if an error causes transaction rollback while a dbstat cursor is open. dbsqlfuzz crash-
417224040fee04f0f0e62b70265c518893b08769 .
FossilOrigin-Name:
6ab25f8bd52d6412a9600143de364f6d8ad8e2c835315fafca6f54d5f38a49dc
dan [Mon, 27 Sep 2021 15:44:03 +0000 (15:44 +0000)]
Fix a problem in ALTER TABLE causing table or column references in sub-selects ton the RHS of a vector SET clause in an UPDATE within a trigger (i.e. "SET (a,b) = ( (SELECT...), <expr> )").
FossilOrigin-Name:
255b0eeed113d83b474efc5bc8fc790a270bc43ee598df4b2c378e1ad2d729b7
drh [Sat, 25 Sep 2021 20:28:39 +0000 (20:28 +0000)]
Load recent dbsqlfuzz cases into test/fuzzdata8.db.
FossilOrigin-Name:
7a8fcf6d2c8e3c8f10ff515c8c00c761d15a28eef8e0e31e09e22feb06c9443b
dan [Sat, 25 Sep 2021 20:19:16 +0000 (20:19 +0000)]
dan [Sat, 25 Sep 2021 18:21:01 +0000 (18:21 +0000)]
Fix a bad interaction between the pager cache and the dbstat module that could lead to a malfunction following an OOM. dbsqlfuzz
9ed3e4e3816219d3509d711636c38542bf3f40b1 .
FossilOrigin-Name:
e03554a6a8c33d820922edccf605a2ce92055315bf22e464207ea8c0d81e3dd6
drh [Sat, 25 Sep 2021 17:07:57 +0000 (17:07 +0000)]
Add const to parameters on various internal interfaces.
FossilOrigin-Name:
70c221c5cf7b4d9ed34f16d045f262f99d16aa3db84f80cf0b03ee82ba28d075
drh [Fri, 24 Sep 2021 19:57:32 +0000 (19:57 +0000)]
Dbsqlfuzz (
a097eaad43c3c845b236126df92fb49b25449b0c ) found a way to reach the
assert() that was added to sqlite3_declare_vtab() by [
eb94f4a8174436b1 ].
This check-in fixes the problem.
FossilOrigin-Name:
857d26a68cf439e9cba4f8a3b326c69366fc486a876b76835538709ee39b8713
drh [Fri, 24 Sep 2021 16:14:47 +0000 (16:14 +0000)]
Add lots of new "const" on internal function parameters. There is opportunity
for many more - this is a work in progress.
FossilOrigin-Name:
a3c71a673ddd1c299bdae550fb955077b77088329a8ca2895dfb23538b524a8e
drh [Fri, 24 Sep 2021 12:59:33 +0000 (12:59 +0000)]
Ensure that sqlite_stat1 and sqlite_stat4 are ordinary tables (not views or
virtual tables) before trying to load them
(dbsqlfuzz
bc02a0cde82dee801a8d6f653d2831680f87dca1 ). This prevents
sqlite3_declare_vtab() from running with db->init.busy turned on. Even so,
enhance sqlite3_declare_vtab() to be able to deal with db->init.busy being on,
in case there are undiscovered paths to that state.
Each of these two changes are independently sufficient to prevent the problem
fixed by the previous check-in [
c7560c1329965ab5 ] but there
is no harm in keeping that third layer of protection in place.
FossilOrigin-Name:
eb94f4a8174436b1f0deed0a43618a20018387bb815be658314ca6b454c446fb
drh [Fri, 24 Sep 2021 02:14:35 +0000 (02:14 +0000)]
drh [Wed, 22 Sep 2021 14:43:35 +0000 (14:43 +0000)]
drh [Wed, 22 Sep 2021 14:26:22 +0000 (14:26 +0000)]
For shell.c.in, define CHAR_BITS to 8 on platforms that do not have that
value set by default. This fixes the build on older machines.
FossilOrigin-Name:
96610cc8251ad4ff8d7f0536f20f4572a996bfa8d24bec8a7925a333e507da1e
drh [Wed, 22 Sep 2021 13:43:16 +0000 (13:43 +0000)]
Fix harmless compiler warnings in shell.c.in, and a compiler warning in
sqlite3expert.c which is a real error, though also harmless.
FossilOrigin-Name:
56da0e9c0321d1fd3c360722cd6284296f9ba459f6b37ab35c81ecabd18f12e3
drh [Wed, 22 Sep 2021 13:07:10 +0000 (13:07 +0000)]
Fix an incorrect assert() in rtree that was added recently
by [
f7ad73c49507c943 ]. Change it to testcase().
FossilOrigin-Name:
3aa0bf3a098ee9a62c79f266f94e4d290056d0f3e91237944893d6bbb686861f
drh [Wed, 22 Sep 2021 10:57:30 +0000 (10:57 +0000)]
Enhance the TCL-based test harness so that it is possible to list multiple
test modules on the "testfixture" command-line and have them all run.
For example: "<tt>./testfixture test/shell*.test</tt>"
FossilOrigin-Name:
45caf9b85fc75abe80e3d2704fc634e4b103647c912c3fbffb1847d8cb581b62
drh [Wed, 22 Sep 2021 10:28:50 +0000 (10:28 +0000)]
Use sqlite3_snprintf() for the ".changes" output formatting in the shell
because it now uses %lld, and some older C compilers do not understand that
construct.
FossilOrigin-Name:
53dadf80672a4fe05341fe40873b6cfa73f6bc1e07cc41fcf10fe290c9156363