Commit Graph

23382 Commits

Author SHA1 Message Date
drh
926aac51ba Fix INSERT into STRICT table with STATIC generated columns.
FossilOrigin-Name: 24285d913678853213532d61aba077d576e3cd7629159e0a75dc3c16e54e2662
2021-11-03 14:02:48 +00:00
drh
80b957b753 Add the --strict option to speedtest1.c
FossilOrigin-Name: a247b5d88c12b1952b656e4f069c9229e0886ba16d7018ddf600e74592224792
2021-11-03 12:50:28 +00:00
drh
5c9290423d 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
2021-11-03 11:43:09 +00:00
drh
5f29c602aa 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
2021-11-02 22:24:19 +00:00
drh
5d742e39d9 Proposed fix for a problem associated with OP_SeekScan that results in an
incorrect answer.  See ticket [5981a8c041a3c2f3].

FossilOrigin-Name: 266e9cbada531716c908c21d60a6038109722e3dd040237679ac0240fb5020ea
2021-11-02 20:52:20 +00:00
drh
61a8ad7cf9 Ensure that ALTER TABLE RENAME recognizes OOM errors while parsing
dependent triggers and handles them appropriately.
dbsqlfuzz 53e245eee15d3f19639d773048aa955c30708785.

FossilOrigin-Name: 1d9004cd015073853ce0ca811a68ea5411733eedee993b97a38a42ba139d7590
2021-11-02 17:55:01 +00:00
dan
07ed9c1100 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
2021-11-02 14:01:41 +00:00
drh
3d0107dda3 Add the --remove and --glob options to the .archive command in the CLI.
FossilOrigin-Name: ea7b12cdf868fdfebc0a20bdcba97aea863284b563d478b0e4cb3d2a8612afee
2021-11-02 11:24:37 +00:00
dan
a12a40c3f0 Add #ifdef logic to os_unix.c so that it builds with SQLITE_OMIT_WAL defined.
FossilOrigin-Name: 948c2cb2a2f44ba069cfbf5e9a57e56964f3a40db57459bb439bea9c3bd9f211
2021-11-02 11:09:24 +00:00
drh
0c0fb9cf80 Fix a minor typo in a comment.
FossilOrigin-Name: 06a5bf4348d3125bb5407fe9b7d451800b113a91fd1a9dff7d840e2317a7284d
2021-11-02 10:54:39 +00:00
drh
1cd6042f90 Add recent dbsqlfuzz cases to test/fuzzdata8.db.
FossilOrigin-Name: 8c3f2536d2853acef05c4e8c07f301abb0687402c56ded5ff8614e79fb049423
2021-11-02 10:47:20 +00:00
dan
76c3ae6848 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
2021-11-02 07:32:13 +00:00
larrybr
8f09f4b264 Add globbing option to shell's .archive command.
FossilOrigin-Name: 13fb74ac5e7578ab612af2ccc8147569d60dc35af84f496bcc5d648d223d6d6e
2021-11-02 00:18:11 +00:00
larrybr
719506f9af zap trailing whitespace
FossilOrigin-Name: f2a908e9c86efb11bb179ce7121f0d510f952284891abfa69517b773fd88324c
2021-11-01 22:33:20 +00:00
larrybr
7774fc010a Add a test for .ar -r and fix a use-of-uninitialized-variable bug
FossilOrigin-Name: 978d5ed4379b631a79cd46a75d9b5b403f3ec4ce7d9d52ed36a5678cdf04f7f2
2021-11-01 22:30:24 +00:00
larrybr
47061b9d57 Add --remove subcommand to shell's .archive command
FossilOrigin-Name: 23525449b883ae6e1d62100bdbc9ff2ca788f67e8ae7d7e4b1a770413a70a7f0
2021-11-01 17:22:52 +00:00
drh
16fc5e67a0 The VVA() macro in json1.c must be active during SQLITE_COVERAGE_TEST because
it affects the outcome of testcase() macros.

FossilOrigin-Name: 92c3d253797f9bde4670984d60bbd50b7b28540d2b5f503f318843580bab8765
2021-11-01 12:53:01 +00:00
drh
d4cc4d02cb Add the sqlite3_autovacuum_pages() interface.
FossilOrigin-Name: ca2703c339f76101f25051a2ed380398b018782883bfee68b5f2d69a1de9091a
2021-10-30 20:22:32 +00:00
drh
362c181913 Fix an incorrect assert() statement in sqlite3GenerateConstraintChecks().
dbsqlfuzz 4190cff310aeab359a55f354e560db95d3a6f47d

FossilOrigin-Name: 623c0d086bda135c49bfc238c31498facdcbe8ecc7659cc1af61594df0c6e899
2021-10-30 18:17:59 +00:00
dan
21b1c6ddac Fix a memory leak in test code on this branch.
FossilOrigin-Name: 60cd9da9258e0b701d4bb3f9c91c5d0a12e925b9b937df619b09f33a287b4a33
2021-10-30 17:58:25 +00:00
dan
e7c23433fb Merge trunk changes into this branch.
FossilOrigin-Name: 638c1b0c50229800067eb1ba29d829b4d6e008256c21a1f67b4ce4d19ea307b3
2021-10-30 17:30:48 +00:00
drh
e4e1af5efb Reorder a test add earlier today to OP_Transaction for easier testing.
FossilOrigin-Name: 8ba73b3cadb72ffcf176d19f9f946c1b90b224e5ab9a0e9eb9a83affa7476d23
2021-10-29 16:19:03 +00:00
drh
cfb5249622 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
2021-10-29 13:10:02 +00:00
drh
37bbcb48a9 Add pragmas "multiplex_enabled", "multiplex_chunksize", and "multiplex_filecount" to the multiplexer implementation.
FossilOrigin-Name: 39c5e80dbf94ac3079b3e0c2c3e6608ac366e3f3de3cea4f4947addc3f52bc36
2021-10-29 12:29:22 +00:00
drh
8cb63f5a5e 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
2021-10-29 09:59:06 +00:00
larrybr
6ac9a5cf5a Fix .import -skip issue reported at https://sqlite.org/forum/forumpost/4c0816c24fc9d16f?t=h
FossilOrigin-Name: 3aadbe17edc1efc7fa6c9600de84e23242ba7866d2dcef2189afd7ba4c97979f
2021-10-28 19:49:23 +00:00
drh
33d28ab4cf Minor changes to make it easier for static analyzers to reason about the code.
FossilOrigin-Name: ba4104aa02625b51113978c1bb540b75bd88cb1959c7e9bfb4113db4159df5d4
2021-10-28 12:07:43 +00:00
drh
e8837211bc Ensure that the WAL code correctly handles all possible outcomes from the
walIndexPage() routine.

FossilOrigin-Name: 6979efbf07d93e7afad508165df684dcc6fe33b91ca772397c8afa00d16d1a0d
2021-10-28 00:09:31 +00:00
drh
eaad533e54 Ensure that all possible outcomes for walIndexPage() are accounted for by
callers.

FossilOrigin-Name: 12715c6b234a04627ca27e94bfa8bd456998360a9f0117480e0038f4747818d6
2021-10-27 23:55:30 +00:00
drh
71c3ea7523 Avoid the 1-based indexing on the WalHashLoc.aPgno[] array. Make it 0-indexed
instead.

FossilOrigin-Name: 28f5f709b4b28ba7f6f56bdd4a9e8c04d0d2df90d13d6df1a589fa4a65163f4d
2021-10-27 20:23:59 +00:00
drh
5f25627a1c Improve the comment on walIndexPage() to more accurately describe the
post-conditions.

FossilOrigin-Name: b619e936455f4001b543a9a58dea2ac9ebd598327d6be01130ca6e7e9764ffe6
2021-10-27 19:57:59 +00:00
drh
9b2adcc3d1 New assert()s to help prove correctness in sqlite3VdbeMemExpandBlob().
FossilOrigin-Name: 7238d58051bfdcea8f7a4aeab89145849d0659c987df9063aacafe97be6657fe
2021-10-27 19:05:04 +00:00
drh
f76d287742 Fix the build for various the OMIT-everything compile-time option. No impact
on regular builds.

FossilOrigin-Name: 947805719bc8629619af5358ad50a6365c01f8d9ceabfe8e4df947696d3819b3
2021-10-27 17:15:08 +00:00
drh
90385ddcf1 Fix a harmless compiler warning in memdb.c.
FossilOrigin-Name: 22fdc658a7cc6d2c50957f92c19de74c9ac7d7d3498731d73e035b99a82bc406
2021-10-27 15:19:01 +00:00
drh
be2d6fdd71 Fix a harmless compiler warning in fuzzcheck.
FossilOrigin-Name: 1cfb7e8a095e1e24df5117aa7be97470d8ce91837ff83dabebac53fafee0b09c
2021-10-27 15:16:30 +00:00
drh
662bebb6bd Change fuzzcheck so that it accepts binary dbsql files.
FossilOrigin-Name: c87a2426b81f22bd21543aa2408625ae472d8fe6cbe6b04145937066e61123c9
2021-10-27 13:16:33 +00:00
drh
075201e50f Add the --script option to fuzzcheck.
FossilOrigin-Name: 5a9676bd4945ca098652780515e94d04859e73588d9db5558ab42f8b068a9ddb
2021-10-27 12:05:28 +00:00
drh
48b4bf269c 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
2021-10-26 22:36:41 +00:00
drh
9ce554baf7 Improved CLI error messages.
FossilOrigin-Name: 8443a2724f463bd2e14ea3aa337e8987104f63365767ca2b0993f3f3196cff95
2021-10-26 17:36:26 +00:00
larrybr
f9a49b0cad Add phase and error number to CLI error messages.
FossilOrigin-Name: 7f87a298688c37bbad8fd2e1cf0e8fbcc36f0c211dcfa3685298525648dbe21b
2021-10-26 16:57:09 +00:00
drh
629c2eaf46 Fix the busy_timeout restriction on fuzzcheck so that it can deal with
hexadecimal integer literals.

FossilOrigin-Name: 4b41535b096dec4b15a85e657102a72d4288728da6103f3fdcbe0e6f244c673a
2021-10-26 09:53:51 +00:00
drh
9b35c679a9 Remove a NEVER() in rebuildPage that is reachable, as is demonstrated by
dbsqlfuzz case beac09b2756b5d285aa68f9737fdb06c972f159a.

FossilOrigin-Name: ac3f617827e06800d26ef688c5f5480b9621676f141d2eac134f877e0c454149
2021-10-25 18:51:56 +00:00
drh
63e8f03c78 Do not allow large busy_timeout pragmas in fuzzcheck, as they accomplish
nothing other than making the tests unnecessarily slow.

FossilOrigin-Name: fba441bf9f6ed729a66ccd4e42b5a8859bf3952d70a66bc9a2496ec49d90a60c
2021-10-25 12:54:23 +00:00
drh
c8f7211d8f Improve the authorizer filter for ATTACH on fuzzcheck.
FossilOrigin-Name: 87d49e80878674470d280de79c8ade222dd006e65c90e79616c4f72c7c32dabb
2021-10-23 22:14:11 +00:00
drh
f81b40a52d Provide an assert() to fire for applications that should never open or create
a disk-based database file.

FossilOrigin-Name: 5218ac788ca35fdd7f98117758f0bef9d55fe7517098e7bf62fda3fed2af3d51
2021-10-23 22:11:18 +00:00
drh
021e228ec0 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
2021-10-23 20:32:27 +00:00
drh
88944e6f10 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
2021-10-23 17:46:00 +00:00
drh
be53656171 Update fuzzcheck so that it allows ATTACH statements with memdb filenames.
FossilOrigin-Name: 31671237e560b52dc27f707309269069a6bdcd017df9844908e77b57dc11f180
2021-10-23 11:30:35 +00:00
drh
dcf10a1a4b Fix harmless compiler warnings. Improve the independence of some TCL tests.
FossilOrigin-Name: 1a038242dc6c0cab97dd9375acfce62aa1c386debc36aaed388d366b87ddd931
2021-10-22 11:17:29 +00:00
drh
95888784ef Enable FTS5 for fuzzcheck.
FossilOrigin-Name: 559ba38b8a0f7795d781838ec78969874fd678f749b26cd49cf6112afc838732
2021-10-21 20:08:00 +00:00