]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
3 years agoApply the begin-concurrent-report patch to the wal2 branch. begin-concurrent-report-wal2
dan [Wed, 17 Nov 2021 14:21:38 +0000 (14:21 +0000)] 
Apply the begin-concurrent-report patch to the wal2 branch.

FossilOrigin-Name: 8eef87821357d1656d8f8dc08fd12ef0373f31fa1c5c11be7f4a95b173992a06

3 years agoMerge all recent trunk enhancements into the begin-concurrent-pnu-wal2 branch.
drh [Tue, 9 Nov 2021 15:18:21 +0000 (15:18 +0000)] 
Merge all recent trunk enhancements into the begin-concurrent-pnu-wal2 branch.

FossilOrigin-Name: 07bc13395de3e45fec2cd571f1c9d0776e198768a4a0dd00479347ca8058a003

3 years agoMerge the latest trunk enhancements into the wal2 branch.
drh [Tue, 9 Nov 2021 13:52:20 +0000 (13:52 +0000)] 
Merge the latest trunk enhancements into the wal2 branch.

FossilOrigin-Name: 0894f59569378c41207b6cef43dbff9a4873582709d954c809c18f42d918aa03

3 years agoChange test case error message text to match the current implementation.
drh [Tue, 9 Nov 2021 13:31:42 +0000 (13:31 +0000)] 
Change test case error message text to match the current implementation.

FossilOrigin-Name: de10795a1cf70925088e9652998e813665b2e147ffa4a4edab18c7e2c66bf5ae

3 years agoFix lempar.c so that Lemon can compile with NDEBUG defined.
drh [Tue, 9 Nov 2021 01:48:15 +0000 (01:48 +0000)] 
Fix lempar.c so that Lemon can compile with NDEBUG defined.
[forum:/forumpost/f331adca0b|Forum post f331adca0b]

FossilOrigin-Name: ba4fb51853fbcb8c142a350b4db0d59153f28ba0a63ad9a2d6fea7096d3dd544

3 years agoRefactor the code that figures out which SELECT in a cascade of nested queries
drh [Mon, 8 Nov 2021 23:24:00 +0000 (23:24 +0000)] 
Refactor the code that figures out which SELECT in a cascade of nested queries
a particular aggregate function belongs to.  This fixes the problem
reported by [forum:/forumpost/c7cc2aa3546e39c1|forum post c7cc2aa3546e39c1].
New test cases in dbsqlfuzz and th3.

FossilOrigin-Name: 74aec5dd1df95b5635f4da1f13753f113ea1d61de3dc3a1523ba51089c1900e4

3 years agoFix the zeroblob() function and related APIs so that they work with SQLITE_OMIT_INCRB...
dan [Mon, 8 Nov 2021 19:35:26 +0000 (19:35 +0000)] 
Fix the zeroblob() function and related APIs so that they work with SQLITE_OMIT_INCRBLOB builds.

FossilOrigin-Name: bc401a75dd9f3c29c5969ae36264e68ccefc0937e44e232ca1f6b550f7fd6e22

3 years agoFix an assert() in memdbTruncate() that could fail when processing a corrupt database.
dan [Mon, 8 Nov 2021 15:46:08 +0000 (15:46 +0000)] 
Fix an assert() in memdbTruncate() that could fail when processing a corrupt database.

FossilOrigin-Name: b1e2929860557cf88f98f0a4f2472e1a16be126bbb8050f0d728350f0cfe987a

3 years agoEnsure that the window function rewrite does not leave the parse tree
drh [Sun, 7 Nov 2021 23:33:01 +0000 (23:33 +0000)] 
Ensure that the window function rewrite does not leave the parse tree
in an invalid state that might cause problems downstream before the
error is recognized and unwinds the stack.  Also take steps such that
an invalid parse tree does not cause problems even if it goes
unrecognized.
[forum:/forumpost/398e9d5aa9|Forum post 398e9d5aa9].

FossilOrigin-Name: 0f9fc6b6073365d5159cd71e7fe08f8dadbc7b42abd324361e809502f4359155

3 years agoAdd ALWAYS() to a branch made unreachable by the previous check-in.
drh [Sat, 6 Nov 2021 20:25:29 +0000 (20:25 +0000)] 
Add ALWAYS() to a branch made unreachable by the previous check-in.

FossilOrigin-Name: 0dc963f63aebc42960125f96865029f16b3f6867126aab350da12882505edb82

3 years agoReturn an error if an attempt is made to drop an eponymous virtual table.
dan [Sat, 6 Nov 2021 18:22:50 +0000 (18:22 +0000)] 
Return an error if an attempt is made to drop an eponymous virtual table.

FossilOrigin-Name: 889dea52de874cd3bda9e811ef1e4ca53ab794ecabc65e9c780d9fb01eff3b2c

3 years agoMerge further changes from trunk into this branch.
dan [Sat, 6 Nov 2021 16:46:27 +0000 (16:46 +0000)] 
Merge further changes from trunk into this branch.

FossilOrigin-Name: 700876b79c47017cfbf42b8710ec0b50d7a987864db7599593817b962763bc71

3 years agoMerge change [6979efbf07d93e7a] from trunk to this branch.
dan [Sat, 6 Nov 2021 16:36:30 +0000 (16:36 +0000)] 
Merge change [6979efbf07d93e7a] from trunk to this branch.

FossilOrigin-Name: 2bb2448d6042b8c1597aab53b2c1c1aa0cdf9b36f15ef5c44730558f213297da

3 years agoMerge changes from trunk into this branch.
dan [Sat, 6 Nov 2021 16:10:10 +0000 (16:10 +0000)] 
Merge changes from trunk into this branch.

FossilOrigin-Name: 52667bce485354ee4fee87f19015845baef12adf2674127f8c6f1bac1ccf3b7d

3 years agoAvoid accessing the sqlite3_module.xShadowName field if (sqlite3_module.iVersion<3).
drh [Sat, 6 Nov 2021 10:59:27 +0000 (10:59 +0000)] 
Avoid accessing the sqlite3_module.xShadowName field if (sqlite3_module.iVersion<3).

FossilOrigin-Name: a024764cef955099b498ea120d4127144880db6da411f074cf0fd1276989204e

3 years agoAdd the rbu_exclusive_checkpoint query parameter to RBU.
drh [Fri, 5 Nov 2021 22:35:09 +0000 (22:35 +0000)] 
Add the rbu_exclusive_checkpoint query parameter to RBU.

FossilOrigin-Name: c2d33ea9d81975b27fe157d698033e7c01569cc0aa6178b7f0c43afbfba4a9e2

3 years agoNew test cases for rbu_exclusive_checkpoint query parameter. rbu_exclusive_checkpoint
drh [Fri, 5 Nov 2021 22:23:17 +0000 (22:23 +0000)] 
New test cases for rbu_exclusive_checkpoint query parameter.

FossilOrigin-Name: 00285ff10c771066876896b28cd5185ec3792166b00702326954ef6678f19da8

3 years agoUpdate an assert() statement to conform to the changes of the previous check-in.
drh [Fri, 5 Nov 2021 19:52:27 +0000 (19:52 +0000)] 
Update an assert() statement to conform to the changes of the previous check-in.

FossilOrigin-Name: b5c668cac831425fd3e370142f9ea501bf2ca1c77c3eb0c5b8f0a574f7667b3c

3 years agoAdd the SQLITE_OPEN_EXRESCODE flag for sqlite3_open_v2().
drh [Fri, 5 Nov 2021 19:36:26 +0000 (19:36 +0000)] 
Add the SQLITE_OPEN_EXRESCODE flag for sqlite3_open_v2().

FossilOrigin-Name: ff9373f42d8479be5cae6cc15dc7fe0cc125c6c0157f5375bf7e1e77c624655d

3 years agoIf the target database URI passed to sqlite3rbu_open() is contains the option "rbu_ex...
dan [Fri, 5 Nov 2021 19:04:01 +0000 (19:04 +0000)] 
If the target database URI passed to sqlite3rbu_open() is contains the option "rbu_exclusive_checkpoint=1", hold an exclusive lock for the duration of any incremental checkpoint operation.

FossilOrigin-Name: 7cb77296a22a87e7ed4c3544792f0204f704f01f384590c32c256bec4517c9bc

3 years agoUpdate sqllimits1.test to account for recent changes to SQL function strftime().
dan [Fri, 5 Nov 2021 14:13:12 +0000 (14:13 +0000)] 
Update sqllimits1.test to account for recent changes to SQL function strftime().

FossilOrigin-Name: 7bba415f91884a20f665e982376c2c5e91a4431e218c8eefe275be3684f2e59a

3 years agoUse the FTS_CORRUPT_VTAB macro rather than a direct call to
drh [Fri, 5 Nov 2021 12:34:06 +0000 (12:34 +0000)] 
Use the FTS_CORRUPT_VTAB macro rather than a direct call to
sqlite3Fts3Corrupt() in [2fad2a89527757b3] so that the build works
in all cases.

FossilOrigin-Name: 029c59cdf9e7dbb431f5d110bc69c3597458edc9b6b009b2e91422de705a19fa

3 years agoRemove an incorrect NEVER() reported at
drh [Fri, 5 Nov 2021 11:52:33 +0000 (11:52 +0000)] 
Remove an incorrect NEVER() reported at
[forum:/forumpost/5bbabfb7ce|forum post 5bbabfb7ce].  Also use this
opportunity to improve the isSimpleCount() function with better formatting,
an expanded header comment, and some extra assert() and textcase() macros.

FossilOrigin-Name: 2927185be81a5aa0dce70dd06040d05c2816a4d18b5094a6f709732cfd6968dc

3 years agoFix vacuum3.test so that it works with SQLITE_OMIT_ALTERTABLE builds.
dan [Fri, 5 Nov 2021 11:26:00 +0000 (11:26 +0000)] 
Fix vacuum3.test so that it works with SQLITE_OMIT_ALTERTABLE builds.

FossilOrigin-Name: 07cca2fa891e9a60ea128a4b96ee407e9dd0f2b9e31fcffbfc2ac594a0e1ffe6

3 years ago Update a test case in sqllimits1.test to account for the updated implementation...
dan [Fri, 5 Nov 2021 11:18:31 +0000 (11:18 +0000)] 
  Update a test case in sqllimits1.test to account for the updated implementation of SQL function strftime().

FossilOrigin-Name: f474ac370accc5c780e7cb3e11c35f2b6104df929d3394a27db00c6b995e71b3

3 years agoFix a couple of problems with test scripts and SQLITE_OMIT_ALTERTABLE builds.
dan [Fri, 5 Nov 2021 10:43:14 +0000 (10:43 +0000)] 
Fix a couple of problems with test scripts and SQLITE_OMIT_ALTERTABLE builds.

FossilOrigin-Name: 3ab5414d337536acad5675a3f1ca10e1ca925f0e7182def604b8b7a8fb53bf5a

3 years agoFix a crash that could occur in fts3 when processing a corrupt database.
dan [Thu, 4 Nov 2021 18:04:55 +0000 (18:04 +0000)] 
Fix a crash that could occur in fts3 when processing a corrupt database.

FossilOrigin-Name: 2fad2a89527757b3956538a6bf91ebebe9c483f22f94e889e8b50c58f5100c5c

3 years agoFix corruptN.test so that it works with SQLITE_DEFAULT_AUTOVACUUM=1 builds.
dan [Thu, 4 Nov 2021 16:25:47 +0000 (16:25 +0000)] 
Fix corruptN.test so that it works with SQLITE_DEFAULT_AUTOVACUUM=1 builds.

FossilOrigin-Name: f60e05bdbabe0449e5a12275b254ca9da39a2a5fdbff078ce28007a23044749e

3 years agoUpdate a test case in corruptN.test to account for the fact that if writable_schema...
dan [Thu, 4 Nov 2021 16:15:46 +0000 (16:15 +0000)] 
Update a test case in corruptN.test to account for the fact that if writable_schema=1 is set, no error is raised if a DELETE statement finds that an index entry is missing ([19e56291a7344c7a]).

FossilOrigin-Name: a90c5f0b5ba1ef0f41449cee10a65beb8b55b09fd1976e0e35814b1848979416

3 years agoHave wapptest.tcl avoid attempting to build fuzztest for SQLITE_OMIT_VIRTUALTABLE...
dan [Thu, 4 Nov 2021 16:03:24 +0000 (16:03 +0000)] 
Have wapptest.tcl avoid attempting to build fuzztest for SQLITE_OMIT_VIRTUALTABLE configurations.

FossilOrigin-Name: 53ee208d4ee8db1499a63b6652a8c5269e8fe85a75376adffdb912094ac1a681

3 years agoFix typo in the sqlite3ext.h file.
drh [Thu, 4 Nov 2021 15:17:42 +0000 (15:17 +0000)] 
Fix typo in the sqlite3ext.h file.
[forum:/forumpost/63802db4ce|forum post 63802db4ce]

FossilOrigin-Name: d4a48ee0c28def416f75eb7840ba6462389e3f97e0dc02287bf1a726c8642f04

3 years agoShow the preferred schema table names in the output of "PRAGMA table_list".
drh [Thu, 4 Nov 2021 14:04:20 +0000 (14:04 +0000)] 
Show the preferred schema table names in the output of "PRAGMA table_list".

FossilOrigin-Name: 9147390d9885a37a62edc1058f313434627f1b59965c890877d2cb119e355c78

3 years agoChange a branch made unreachable by the previous check-in into an assert().
drh [Thu, 4 Nov 2021 11:34:04 +0000 (11:34 +0000)] 
Change a branch made unreachable by the previous check-in into an assert().

FossilOrigin-Name: 685a987c9afd1c30629c36f1ffb5e349eb2e26182837523036b916c6f81632c4

3 years agoFirst the shadow table mechanism so that it works even if the shadow table
drh [Thu, 4 Nov 2021 00:51:53 +0000 (00:51 +0000)] 
First the shadow table mechanism so that it works even if the shadow table
comes before the virtual table in the sqlite_schema table, as can happen
after a VACUUM.

FossilOrigin-Name: 005a8642773556825fe4c5d0b2c12517d35289308a30df0151ef7f080acb0172

3 years agoRemove two incorrect assert() statements added by a check-in from earlier
drh [Wed, 3 Nov 2021 16:35:23 +0000 (16:35 +0000)] 
Remove two incorrect assert() statements added by a check-in from earlier
today.

FossilOrigin-Name: 3206edff947b9edb485466f05b2baadf725d798229630c7e83e88c0b9ae278ca

3 years agoImproved the error message that results when a schema parse fails after
drh [Wed, 3 Nov 2021 15:59:17 +0000 (15:59 +0000)] 
Improved the error message that results when a schema parse fails after
ALTER TABLE ADD COLUMN.

FossilOrigin-Name: b007a39dd3a46d13fe06f2a1eeb4e3fd4cad1a77892be6d175b31db1edd6f6a8

3 years agoFix INSERT into STRICT table with STATIC generated columns.
drh [Wed, 3 Nov 2021 14:02:48 +0000 (14:02 +0000)] 
Fix INSERT into STRICT table with STATIC generated columns.

FossilOrigin-Name: 24285d913678853213532d61aba077d576e3cd7629159e0a75dc3c16e54e2662

3 years agoAdd the --strict option to speedtest1.c
drh [Wed, 3 Nov 2021 12:50:28 +0000 (12:50 +0000)] 
Add the --strict option to speedtest1.c

FossilOrigin-Name: a247b5d88c12b1952b656e4f069c9229e0886ba16d7018ddf600e74592224792

3 years agoFix an issue in PRAGMA integrity_check associated reporting NULL values in
drh [Wed, 3 Nov 2021 11:43:09 +0000 (11:43 +0000)] 
Fix an issue in PRAGMA integrity_check associated reporting NULL values in
a NOT NULL column of type ANY in a STRICT table.

FossilOrigin-Name: 5dff1f66731ae35daf9633f8bb3ea942a7c29f4240e57bd2023ee7fc116e7c92

3 years agoCorrectly handle SeekScan on an IN operator of the middle term of an index
drh [Tue, 2 Nov 2021 22:24:19 +0000 (22:24 +0000)] 
Correctly handle SeekScan on an IN operator of the middle term of an index
when the right-most term is a range constraint.
Fix for ticket [5981a8c041a3c2f3].

FossilOrigin-Name: aa24660e76681d164b1948621d3dbd0f620c72c6bca636d35a9eed73ab7593fa

3 years agoProposed fix for a problem associated with OP_SeekScan that results in an seekscan-fix-20211102
drh [Tue, 2 Nov 2021 20:52:20 +0000 (20:52 +0000)] 
Proposed fix for a problem associated with OP_SeekScan that results in an
incorrect answer.  See ticket [5981a8c041a3c2f3].

FossilOrigin-Name: 266e9cbada531716c908c21d60a6038109722e3dd040237679ac0240fb5020ea

3 years agoEnsure that ALTER TABLE RENAME recognizes OOM errors while parsing
drh [Tue, 2 Nov 2021 17:55:01 +0000 (17:55 +0000)] 
Ensure that ALTER TABLE RENAME recognizes OOM errors while parsing
dependent triggers and handles them appropriately.
dbsqlfuzz 53e245eee15d3f19639d773048aa955c30708785.

FossilOrigin-Name: 1d9004cd015073853ce0ca811a68ea5411733eedee993b97a38a42ba139d7590

3 years agoFix a minor memory leak in the shell tool. Omit running fuzztest as part of the Devic...
dan [Tue, 2 Nov 2021 14:01:41 +0000 (14:01 +0000)] 
Fix a minor memory leak in the shell tool. Omit running fuzztest as part of the Device-One release test configuration, as it is now incompatible with SQLITE_OMIT_VIRTUALTABLE.

FossilOrigin-Name: 4d70f27b7b5681cfdf1c44ac654e565ccff089e74d3edf6660578e04e4b0c9b9

3 years agoAdd the --remove and --glob options to the .archive command in the CLI.
drh [Tue, 2 Nov 2021 11:24:37 +0000 (11:24 +0000)] 
Add the --remove and --glob options to the .archive command in the CLI.

FossilOrigin-Name: ea7b12cdf868fdfebc0a20bdcba97aea863284b563d478b0e4cb3d2a8612afee

3 years agoAdd #ifdef logic to os_unix.c so that it builds with SQLITE_OMIT_WAL defined.
dan [Tue, 2 Nov 2021 11:09:24 +0000 (11:09 +0000)] 
Add #ifdef logic to os_unix.c so that it builds with SQLITE_OMIT_WAL defined.

FossilOrigin-Name: 948c2cb2a2f44ba069cfbf5e9a57e56964f3a40db57459bb439bea9c3bd9f211

3 years agoFix a minor typo in a comment. archive_remove
drh [Tue, 2 Nov 2021 10:54:39 +0000 (10:54 +0000)] 
Fix a minor typo in a comment.

FossilOrigin-Name: 06a5bf4348d3125bb5407fe9b7d451800b113a91fd1a9dff7d840e2317a7284d

3 years agoAdd recent dbsqlfuzz cases to test/fuzzdata8.db.
drh [Tue, 2 Nov 2021 10:47:20 +0000 (10:47 +0000)] 
Add recent dbsqlfuzz cases to test/fuzzdata8.db.

FossilOrigin-Name: 8c3f2536d2853acef05c4e8c07f301abb0687402c56ded5ff8614e79fb049423

3 years agoFix a broken assert() in fts5 that could fail if the snippet() function were used...
dan [Tue, 2 Nov 2021 07:32:13 +0000 (07:32 +0000)] 
Fix a broken assert() in fts5 that could fail if the snippet() function were used with a query phrase containing 0 tokens on a detail=none or detail=col table.

FossilOrigin-Name: 0a5b94b99cf45df759a59cb5fc62da111ca33f8c2614769a81930d72b51f093a

3 years agoAdd globbing option to shell's .archive command.
larrybr [Tue, 2 Nov 2021 00:18:11 +0000 (00:18 +0000)] 
Add globbing option to shell's .archive command.

FossilOrigin-Name: 13fb74ac5e7578ab612af2ccc8147569d60dc35af84f496bcc5d648d223d6d6e

3 years agozap trailing whitespace
larrybr [Mon, 1 Nov 2021 22:33:20 +0000 (22:33 +0000)] 
zap trailing whitespace

FossilOrigin-Name: f2a908e9c86efb11bb179ce7121f0d510f952284891abfa69517b773fd88324c

3 years agoAdd a test for .ar -r and fix a use-of-uninitialized-variable bug
larrybr [Mon, 1 Nov 2021 22:30:24 +0000 (22:30 +0000)] 
Add a test for .ar -r and fix a use-of-uninitialized-variable bug

FossilOrigin-Name: 978d5ed4379b631a79cd46a75d9b5b403f3ec4ce7d9d52ed36a5678cdf04f7f2

3 years agoAdd --remove subcommand to shell's .archive command
larrybr [Mon, 1 Nov 2021 17:22:52 +0000 (17:22 +0000)] 
Add --remove subcommand to shell's .archive command

FossilOrigin-Name: 23525449b883ae6e1d62100bdbc9ff2ca788f67e8ae7d7e4b1a770413a70a7f0

3 years agoThe VVA() macro in json1.c must be active during SQLITE_COVERAGE_TEST because
drh [Mon, 1 Nov 2021 12:53:01 +0000 (12:53 +0000)] 
The VVA() macro in json1.c must be active during SQLITE_COVERAGE_TEST because
it affects the outcome of testcase() macros.

FossilOrigin-Name: 92c3d253797f9bde4670984d60bbd50b7b28540d2b5f503f318843580bab8765

3 years agoAdd the sqlite3_autovacuum_pages() interface.
drh [Sat, 30 Oct 2021 20:22:32 +0000 (20:22 +0000)] 
Add the sqlite3_autovacuum_pages() interface.

FossilOrigin-Name: ca2703c339f76101f25051a2ed380398b018782883bfee68b5f2d69a1de9091a

3 years agoFix an incorrect assert() statement in sqlite3GenerateConstraintChecks().
drh [Sat, 30 Oct 2021 18:17:59 +0000 (18:17 +0000)] 
Fix an incorrect assert() statement in sqlite3GenerateConstraintChecks().
dbsqlfuzz 4190cff310aeab359a55f354e560db95d3a6f47d

FossilOrigin-Name: 623c0d086bda135c49bfc238c31498facdcbe8ecc7659cc1af61594df0c6e899

3 years agoFix a memory leak in test code on this branch. autovacuum-pages-callback
dan [Sat, 30 Oct 2021 17:58:25 +0000 (17:58 +0000)] 
Fix a memory leak in test code on this branch.

FossilOrigin-Name: 60cd9da9258e0b701d4bb3f9c91c5d0a12e925b9b937df619b09f33a287b4a33

3 years agoMerge trunk changes into this branch.
dan [Sat, 30 Oct 2021 17:30:48 +0000 (17:30 +0000)] 
Merge trunk changes into this branch.

FossilOrigin-Name: 638c1b0c50229800067eb1ba29d829b4d6e008256c21a1f67b4ce4d19ea307b3

3 years agoReorder a test add earlier today to OP_Transaction for easier testing.
drh [Fri, 29 Oct 2021 16:19:03 +0000 (16:19 +0000)] 
Reorder a test add earlier today to OP_Transaction for easier testing.

FossilOrigin-Name: 8ba73b3cadb72ffcf176d19f9f946c1b90b224e5ab9a0e9eb9a83affa7476d23

3 years agoAllow "VACUUM INTO" to change the page_size of a database even if the
drh [Fri, 29 Oct 2021 13:10:02 +0000 (13:10 +0000)] 
Allow "VACUUM INTO" to change the page_size of a database even if the
original database is in WAL mode.  Enhancement suggested by
[forum:/forumpost/033f2c9d1f|forum post 033f2c9d1f].

FossilOrigin-Name: efc7e8c99a86e9d9eb81655ce96353847bd2cca64eb8f8d10e297f6f4d38e563

3 years agoAdd pragmas "multiplex_enabled", "multiplex_chunksize", and "multiplex_filecount...
drh [Fri, 29 Oct 2021 12:29:22 +0000 (12:29 +0000)] 
Add pragmas "multiplex_enabled", "multiplex_chunksize", and "multiplex_filecount" to the multiplexer implementation.

FossilOrigin-Name: 39c5e80dbf94ac3079b3e0c2c3e6608ac366e3f3de3cea4f4947addc3f52bc36

3 years agoFix the OP_Transaction opcode so that if an error other than SQLITE_SCHEMA
drh [Fri, 29 Oct 2021 09:59:06 +0000 (09:59 +0000)] 
Fix the OP_Transaction opcode so that if an error other than SQLITE_SCHEMA
occurs first, the original error is not overwritten by SQLITE_SCHEMA.
dbsqlfuzz 85bf7e262017c6c7bddb03ff6d8541511985d36c.

FossilOrigin-Name: 5374226df4a2c1b59258839532b67a399c447ac8ec1408fdf2dffb9c41e1349e

3 years agoFix .import -skip issue reported at https://sqlite.org/forum/forumpost/4c0816c24fc9d1...
larrybr [Thu, 28 Oct 2021 19:49:23 +0000 (19:49 +0000)] 
Fix .import -skip issue reported at https://sqlite.org/forum/forumpost/4c0816c24fc9d16f?t=h

FossilOrigin-Name: 3aadbe17edc1efc7fa6c9600de84e23242ba7866d2dcef2189afd7ba4c97979f

3 years agoMinor changes to make it easier for static analyzers to reason about the code.
drh [Thu, 28 Oct 2021 12:07:43 +0000 (12:07 +0000)] 
Minor changes to make it easier for static analyzers to reason about the code.

FossilOrigin-Name: ba4104aa02625b51113978c1bb540b75bd88cb1959c7e9bfb4113db4159df5d4

3 years agoEnsure that the WAL code correctly handles all possible outcomes from the
drh [Thu, 28 Oct 2021 00:09:31 +0000 (00:09 +0000)] 
Ensure that the WAL code correctly handles all possible outcomes from the
walIndexPage() routine.

FossilOrigin-Name: 6979efbf07d93e7afad508165df684dcc6fe33b91ca772397c8afa00d16d1a0d

3 years agoEnsure that all possible outcomes for walIndexPage() are accounted for by wal-tuneup
drh [Wed, 27 Oct 2021 23:55:30 +0000 (23:55 +0000)] 
Ensure that all possible outcomes for walIndexPage() are accounted for by
callers.

FossilOrigin-Name: 12715c6b234a04627ca27e94bfa8bd456998360a9f0117480e0038f4747818d6

3 years agoAvoid the 1-based indexing on the WalHashLoc.aPgno[] array. Make it 0-indexed
drh [Wed, 27 Oct 2021 20:23:59 +0000 (20:23 +0000)] 
Avoid the 1-based indexing on the WalHashLoc.aPgno[] array.  Make it 0-indexed
instead.

FossilOrigin-Name: 28f5f709b4b28ba7f6f56bdd4a9e8c04d0d2df90d13d6df1a589fa4a65163f4d

3 years agoImprove the comment on walIndexPage() to more accurately describe the
drh [Wed, 27 Oct 2021 19:57:59 +0000 (19:57 +0000)] 
Improve the comment on walIndexPage() to more accurately describe the
post-conditions.

FossilOrigin-Name: b619e936455f4001b543a9a58dea2ac9ebd598327d6be01130ca6e7e9764ffe6

3 years agoNew assert()s to help prove correctness in sqlite3VdbeMemExpandBlob().
drh [Wed, 27 Oct 2021 19:05:04 +0000 (19:05 +0000)] 
New assert()s to help prove correctness in sqlite3VdbeMemExpandBlob().

FossilOrigin-Name: 7238d58051bfdcea8f7a4aeab89145849d0659c987df9063aacafe97be6657fe

3 years agoFix the build for various the OMIT-everything compile-time option. No impact
drh [Wed, 27 Oct 2021 17:15:08 +0000 (17:15 +0000)] 
Fix the build for various the OMIT-everything compile-time option.  No impact
on regular builds.

FossilOrigin-Name: 947805719bc8629619af5358ad50a6365c01f8d9ceabfe8e4df947696d3819b3

3 years agoFix a harmless compiler warning in memdb.c.
drh [Wed, 27 Oct 2021 15:19:01 +0000 (15:19 +0000)] 
Fix a harmless compiler warning in memdb.c.

FossilOrigin-Name: 22fdc658a7cc6d2c50957f92c19de74c9ac7d7d3498731d73e035b99a82bc406

3 years agoFix a harmless compiler warning in fuzzcheck.
drh [Wed, 27 Oct 2021 15:16:30 +0000 (15:16 +0000)] 
Fix a harmless compiler warning in fuzzcheck.

FossilOrigin-Name: 1cfb7e8a095e1e24df5117aa7be97470d8ce91837ff83dabebac53fafee0b09c

3 years agoChange fuzzcheck so that it accepts binary dbsql files.
drh [Wed, 27 Oct 2021 13:16:33 +0000 (13:16 +0000)] 
Change fuzzcheck so that it accepts binary dbsql files.

FossilOrigin-Name: c87a2426b81f22bd21543aa2408625ae472d8fe6cbe6b04145937066e61123c9

3 years agoAdd the --script option to fuzzcheck.
drh [Wed, 27 Oct 2021 12:05:28 +0000 (12:05 +0000)] 
Add the --script option to fuzzcheck.

FossilOrigin-Name: 5a9676bd4945ca098652780515e94d04859e73588d9db5558ab42f8b068a9ddb

3 years agoEnhance fuzzcheck so that if an argument is an ordinary disk file (not
drh [Tue, 26 Oct 2021 22:36:41 +0000 (22:36 +0000)] 
Enhance fuzzcheck so that if an argument is an ordinary disk file (not
a database) it is read in and processed as a script.

FossilOrigin-Name: 978dc89df521f5855678128b3c0eb503c67c1b97ddb297076e5f2c03d6297605

3 years agoImproved CLI error messages.
drh [Tue, 26 Oct 2021 17:36:26 +0000 (17:36 +0000)] 
Improved CLI error messages.

FossilOrigin-Name: 8443a2724f463bd2e14ea3aa337e8987104f63365767ca2b0993f3f3196cff95

3 years agoAdd phase and error number to CLI error messages. detail_cli_errors
larrybr [Tue, 26 Oct 2021 16:57:09 +0000 (16:57 +0000)] 
Add phase and error number to CLI error messages.

FossilOrigin-Name: 7f87a298688c37bbad8fd2e1cf0e8fbcc36f0c211dcfa3685298525648dbe21b

3 years agoFix the busy_timeout restriction on fuzzcheck so that it can deal with
drh [Tue, 26 Oct 2021 09:53:51 +0000 (09:53 +0000)] 
Fix the busy_timeout restriction on fuzzcheck so that it can deal with
hexadecimal integer literals.

FossilOrigin-Name: 4b41535b096dec4b15a85e657102a72d4288728da6103f3fdcbe0e6f244c673a

3 years agoRemove a NEVER() in rebuildPage that is reachable, as is demonstrated by
drh [Mon, 25 Oct 2021 18:51:56 +0000 (18:51 +0000)] 
Remove a NEVER() in rebuildPage that is reachable, as is demonstrated by
dbsqlfuzz case beac09b2756b5d285aa68f9737fdb06c972f159a.

FossilOrigin-Name: ac3f617827e06800d26ef688c5f5480b9621676f141d2eac134f877e0c454149

3 years agoDo not allow large busy_timeout pragmas in fuzzcheck, as they accomplish
drh [Mon, 25 Oct 2021 12:54:23 +0000 (12:54 +0000)] 
Do not allow large busy_timeout pragmas in fuzzcheck, as they accomplish
nothing other than making the tests unnecessarily slow.

FossilOrigin-Name: fba441bf9f6ed729a66ccd4e42b5a8859bf3952d70a66bc9a2496ec49d90a60c

3 years agoImprove the authorizer filter for ATTACH on fuzzcheck.
drh [Sat, 23 Oct 2021 22:14:11 +0000 (22:14 +0000)] 
Improve the authorizer filter for ATTACH on fuzzcheck.

FossilOrigin-Name: 87d49e80878674470d280de79c8ade222dd006e65c90e79616c4f72c7c32dabb

3 years agoProvide an assert() to fire for applications that should never open or create
drh [Sat, 23 Oct 2021 22:11:18 +0000 (22:11 +0000)] 
Provide an assert() to fire for applications that should never open or create
a disk-based database file.

FossilOrigin-Name: 5218ac788ca35fdd7f98117758f0bef9d55fe7517098e7bf62fda3fed2af3d51

3 years agoThe pager now remembers when a VFS reports that a database file is
drh [Sat, 23 Oct 2021 20:32:27 +0000 (20:32 +0000)] 
The pager now remembers when a VFS reports that a database file is
SQLITE_OPEN_MEMORY and treats that database as an in-memory database.

FossilOrigin-Name: 967b65623807ff992869da0a7d9b0105701939c4658a7aee37a30fb267869c6d

3 years agoFix the memdb VFS so that it does not allow mmap if it is resizable, and so
drh [Sat, 23 Oct 2021 17:46:00 +0000 (17:46 +0000)] 
Fix the memdb VFS so that it does not allow mmap if it is resizable, and so
that it never opens a disk file for any reason.

FossilOrigin-Name: 5ee14715a561d7522e9c6fd35a2ad3e6de526450025a99d2a523c2b27151be4f

3 years agoUpdate fuzzcheck so that it allows ATTACH statements with memdb filenames.
drh [Sat, 23 Oct 2021 11:30:35 +0000 (11:30 +0000)] 
Update fuzzcheck so that it allows ATTACH statements with memdb filenames.

FossilOrigin-Name: 31671237e560b52dc27f707309269069a6bdcd017df9844908e77b57dc11f180

3 years agoFix harmless compiler warnings. Improve the independence of some TCL tests.
drh [Fri, 22 Oct 2021 11:17:29 +0000 (11:17 +0000)] 
Fix harmless compiler warnings.  Improve the independence of some TCL tests.

FossilOrigin-Name: 1a038242dc6c0cab97dd9375acfce62aa1c386debc36aaed388d366b87ddd931

3 years agoEnable FTS5 for fuzzcheck.
drh [Thu, 21 Oct 2021 20:08:00 +0000 (20:08 +0000)] 
Enable FTS5 for fuzzcheck.

FossilOrigin-Name: 559ba38b8a0f7795d781838ec78969874fd678f749b26cd49cf6112afc838732

3 years agoFix the previous check-in so that it works with virtual tables that add new
drh [Thu, 21 Oct 2021 19:48:14 +0000 (19:48 +0000)] 
Fix the previous check-in so that it works with virtual tables that add new
shadow tables the first time they are referenced.

FossilOrigin-Name: f73b499e539b9551a70deecec4fc10c3a4af3830324977861cd0558f9782a1d3

3 years agoFix the new "table_list" pragma so that it shows the correct number of
drh [Thu, 21 Oct 2021 17:01:10 +0000 (17:01 +0000)] 
Fix the new "table_list" pragma so that it shows the correct number of
columns for views and virtual tables even when the object has not been
previously used.

FossilOrigin-Name: fb0ed8c55f6362d2639687392a72cc3ed9dc318929e11893edd2a0f023929f7e

3 years agoMerge trunk enhancements into the begin-concurrent-pnu-wal2 branch.
drh [Thu, 21 Oct 2021 14:24:24 +0000 (14:24 +0000)] 
Merge trunk enhancements into the begin-concurrent-pnu-wal2 branch.

FossilOrigin-Name: 1958e6facaaca8e695ae3d7e79acdba0025d6221653397ea45f9b8daa56c8d9b

3 years agoMerge recent trunk enhancements into the wal2 branch.
drh [Thu, 21 Oct 2021 14:01:05 +0000 (14:01 +0000)] 
Merge recent trunk enhancements into the wal2 branch.

FossilOrigin-Name: 7e2bc836f6aedfd69588f5723f8797f11ee6437d3b63ffc43c88d40e3baadb1c

3 years agoFix an incorrect JSON assert() that was added 5 days ago by check-in [7b8ea2298927fd34].
drh [Wed, 20 Oct 2021 20:22:37 +0000 (20:22 +0000)] 
Fix an incorrect JSON assert() that was added 5 days ago by check-in [7b8ea2298927fd34].

FossilOrigin-Name: e162da3ab4c183b67872be004035c48fc8f20084bc5757aec27410ce23a36631

3 years agoFix the finish_test proc in tester.tcl so that it works for Windows test
drh [Wed, 20 Oct 2021 18:17:31 +0000 (18:17 +0000)] 
Fix the finish_test proc in tester.tcl so that it works for Windows test
builds.  Fix for problem introduced yesterday by check-in [3658417bf300e004].

FossilOrigin-Name: f52b84e69e5fcbe59ccc6163e7e78aa3822f2c354c88f8a76a2d1d4c90a99821

3 years agoEnabled the testcase() macros under SQLITE_DEBUG.
drh [Wed, 20 Oct 2021 17:58:33 +0000 (17:58 +0000)] 
Enabled the testcase() macros under SQLITE_DEBUG.

FossilOrigin-Name: 0ae8dd132db8331ca9cc42ad511066924f9d3a1d158ecdb630cebc41b6bd2493

3 years agoFix a problem with the CARRAY extension when the SQLITE_TRANSIENT destructor
drh [Wed, 20 Oct 2021 13:48:12 +0000 (13:48 +0000)] 
Fix a problem with the CARRAY extension when the SQLITE_TRANSIENT destructor
is used for non-text arrays.
[forum:/forumpost/48e525b266|Forum thread 48e525b266].

FossilOrigin-Name: cac910c15f409c5358843643b2f90252eb90328b9e5ff84cedbccb604d9891af

3 years agoEnsure that valid bytecode is generated for RETURNING clauses even if
drh [Wed, 20 Oct 2021 12:52:12 +0000 (12:52 +0000)] 
Ensure that valid bytecode is generated for RETURNING clauses even if
the schema is corrupt and PRAGMA writable_schema is set so that the
schema parse returns no errors.
dbsqlfuzz cb21825bdcd6fdb4b686ce4f6e2f45e781d2f220

FossilOrigin-Name: 699117156e0b5a7beda606de56bd511af322e3efa4eee6e60f0a8d60561def64

3 years agoFix a case in the fts3 offsets() function where a corrupt database record could lead...
dan [Wed, 20 Oct 2021 11:40:34 +0000 (11:40 +0000)] 
Fix a case in the fts3 offsets() function where a corrupt database record could lead to dereferencing an uninitialized pointer.

FossilOrigin-Name: 7b7d31a6153b1505288eb3e849d0d9ef9e88e961c7b2f918ef5582fd77990f6d

3 years agoMerge multi-module test logic improvements from trunk.
drh [Tue, 19 Oct 2021 19:26:27 +0000 (19:26 +0000)] 
Merge multi-module test logic improvements from trunk.

FossilOrigin-Name: e00a44ac10d68b7bdaff1d9c237b598696eddc2d7392574aee1a95d94b4f165a

3 years agoImproved cleanup in finish_test so that specifying multiple test modules
drh [Tue, 19 Oct 2021 18:59:10 +0000 (18:59 +0000)] 
Improved cleanup in finish_test so that specifying multiple test modules
on the "./testfixture" command-line is more likely to work.

FossilOrigin-Name: 3658417bf300e004e5166ee69aa2d8c70697b87ea7456cb6337b0ad6d60257d5

3 years agoFix permutations.test so that it can be called with a test file pattern that uses...
dan [Tue, 19 Oct 2021 18:53:30 +0000 (18:53 +0000)] 
Fix permutations.test so that it can be called with a test file pattern that uses square brackets.

FossilOrigin-Name: 55b6241871a3b52d835ebdc52a1ce6c736861cf7a03331391c5d6ffd39720514

3 years agoUpdate test scripts to unregister the test devsim VFS after it is used.
dan [Tue, 19 Oct 2021 18:40:00 +0000 (18:40 +0000)] 
Update test scripts to unregister the test devsim VFS after it is used.

FossilOrigin-Name: bb0e18ae4a49c305dd8b26886a3a4f3c6dad380edca57af835da4ad470ca8eb6