drh
f9241a5fd0
Remove a NEVER() that was add yesterday. The fuzzer found a new test case
...
to make it happen.
FossilOrigin-Name: 83e6ac71073edfa0cd73788c30bdd5f09cb04c8a6a7d5123123dbcd354f430b8
2021-11-11 16:26:46 +00:00
drh
3ab4ffce1f
New assert() statements to help prove correct usage of VdbeCursor objects.
...
FossilOrigin-Name: 7cee62f77a9e7c3cf886f136e75a93c3bbbb88e48b66035883bea5503d9fc03c
2021-11-11 11:23:08 +00:00
drh
34e71830de
Load new test cases into test/fuzzdata8.db
...
FossilOrigin-Name: 8b53ffe99df6f5443bd22a9d95433819eb44c7e8f044c2f3e9d52661741d5612
2021-11-10 15:23:00 +00:00
drh
46c425b4dd
Make SQLITE_CORRUPT sticky: If a CORRUPT error is returned, all subsequent
...
write statements within the same transaction also fail early with
SQLITE_CORRUPT.
FossilOrigin-Name: 3feb0f1c3840904d28fc9a61262820e2b9b764addc1dd178aecc2cd0f952042c
2021-11-10 10:59:10 +00:00
drh
995d33ae02
Change test case error message text to match the current implementation.
...
FossilOrigin-Name: de10795a1cf70925088e9652998e813665b2e147ffa4a4edab18c7e2c66bf5ae
2021-11-09 13:31:42 +00:00
drh
4e86aa86ea
Fix lempar.c so that Lemon can compile with NDEBUG defined.
...
[forum:/forumpost/f331adca0b|Forum post f331adca0b]
FossilOrigin-Name: ba4fb51853fbcb8c142a350b4db0d59153f28ba0a63ad9a2d6fea7096d3dd544
2021-11-09 01:48:15 +00:00
drh
90cf38be63
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
2021-11-08 23:24:00 +00:00
dan
a32536b498
Fix the zeroblob() function and related APIs so that they work with SQLITE_OMIT_INCRBLOB builds.
...
FossilOrigin-Name: bc401a75dd9f3c29c5969ae36264e68ccefc0937e44e232ca1f6b550f7fd6e22
2021-11-08 19:35:26 +00:00
dan
1a39e45619
Fix an assert() in memdbTruncate() that could fail when processing a corrupt database.
...
FossilOrigin-Name: b1e2929860557cf88f98f0a4f2472e1a16be126bbb8050f0d728350f0cfe987a
2021-11-08 15:46:08 +00:00
drh
6d64b4a027
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
2021-11-07 23:33:01 +00:00
drh
7b108e4cfd
Add ALWAYS() to a branch made unreachable by the previous check-in.
...
FossilOrigin-Name: 0dc963f63aebc42960125f96865029f16b3f6867126aab350da12882505edb82
2021-11-06 20:25:29 +00:00
dan
35c7312ff0
Return an error if an attempt is made to drop an eponymous virtual table.
...
FossilOrigin-Name: 889dea52de874cd3bda9e811ef1e4ca53ab794ecabc65e9c780d9fb01eff3b2c
2021-11-06 18:22:50 +00:00
drh
62561b82f2
Avoid accessing the sqlite3_module.xShadowName field if (sqlite3_module.iVersion<3).
...
FossilOrigin-Name: a024764cef955099b498ea120d4127144880db6da411f074cf0fd1276989204e
2021-11-06 10:59:27 +00:00
drh
6821575ed8
Add the rbu_exclusive_checkpoint query parameter to RBU.
...
FossilOrigin-Name: c2d33ea9d81975b27fe157d698033e7c01569cc0aa6178b7f0c43afbfba4a9e2
2021-11-05 22:35:09 +00:00
drh
64d5b1ca27
New test cases for rbu_exclusive_checkpoint query parameter.
...
FossilOrigin-Name: 00285ff10c771066876896b28cd5185ec3792166b00702326954ef6678f19da8
2021-11-05 22:23:17 +00:00
drh
c18e022f15
Update an assert() statement to conform to the changes of the previous check-in.
...
FossilOrigin-Name: b5c668cac831425fd3e370142f9ea501bf2ca1c77c3eb0c5b8f0a574f7667b3c
2021-11-05 19:52:27 +00:00
drh
91acf7d353
Add the SQLITE_OPEN_EXRESCODE flag for sqlite3_open_v2().
...
FossilOrigin-Name: ff9373f42d8479be5cae6cc15dc7fe0cc125c6c0157f5375bf7e1e77c624655d
2021-11-05 19:36:26 +00:00
dan
1182e2ac7d
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
2021-11-05 19:04:01 +00:00
dan
695c87f67d
Update sqllimits1.test to account for recent changes to SQL function strftime().
...
FossilOrigin-Name: 7bba415f91884a20f665e982376c2c5e91a4431e218c8eefe275be3684f2e59a
2021-11-05 14:13:12 +00:00
drh
608af68ad3
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
2021-11-05 12:34:06 +00:00
drh
a1c4c3c187
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
2021-11-05 11:52:33 +00:00
dan
11e29677a2
Fix vacuum3.test so that it works with SQLITE_OMIT_ALTERTABLE builds.
...
FossilOrigin-Name: 07cca2fa891e9a60ea128a4b96ee407e9dd0f2b9e31fcffbfc2ac594a0e1ffe6
2021-11-05 11:26:00 +00:00
dan
06ee284182
Update a test case in sqllimits1.test to account for the updated implementation of SQL function strftime().
...
FossilOrigin-Name: f474ac370accc5c780e7cb3e11c35f2b6104df929d3394a27db00c6b995e71b3
2021-11-05 11:18:31 +00:00
dan
2841abedde
Fix a couple of problems with test scripts and SQLITE_OMIT_ALTERTABLE builds.
...
FossilOrigin-Name: 3ab5414d337536acad5675a3f1ca10e1ca925f0e7182def604b8b7a8fb53bf5a
2021-11-05 10:43:14 +00:00
dan
3555274419
Fix a crash that could occur in fts3 when processing a corrupt database.
...
FossilOrigin-Name: 2fad2a89527757b3956538a6bf91ebebe9c483f22f94e889e8b50c58f5100c5c
2021-11-04 18:04:55 +00:00
dan
de3fd373a1
Fix corruptN.test so that it works with SQLITE_DEFAULT_AUTOVACUUM=1 builds.
...
FossilOrigin-Name: f60e05bdbabe0449e5a12275b254ca9da39a2a5fdbff078ce28007a23044749e
2021-11-04 16:25:47 +00:00
dan
715e002d04
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
2021-11-04 16:15:46 +00:00
dan
a4adaa37fd
Have wapptest.tcl avoid attempting to build fuzztest for SQLITE_OMIT_VIRTUALTABLE configurations.
...
FossilOrigin-Name: 53ee208d4ee8db1499a63b6652a8c5269e8fe85a75376adffdb912094ac1a681
2021-11-04 16:03:24 +00:00
drh
a1d35da5f1
Fix typo in the sqlite3ext.h file.
...
[forum:/forumpost/63802db4ce|forum post 63802db4ce]
FossilOrigin-Name: d4a48ee0c28def416f75eb7840ba6462389e3f97e0dc02287bf1a726c8642f04
2021-11-04 15:17:42 +00:00
drh
a4a871c286
Show the preferred schema table names in the output of "PRAGMA table_list".
...
FossilOrigin-Name: 9147390d9885a37a62edc1058f313434627f1b59965c890877d2cb119e355c78
2021-11-04 14:04:20 +00:00
drh
06b7281c94
Change a branch made unreachable by the previous check-in into an assert().
...
FossilOrigin-Name: 685a987c9afd1c30629c36f1ffb5e349eb2e26182837523036b916c6f81632c4
2021-11-04 11:34:04 +00:00
drh
ddfec00de3
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
2021-11-04 00:51:53 +00:00
drh
0b97189c49
Remove two incorrect assert() statements added by a check-in from earlier
...
today.
FossilOrigin-Name: 3206edff947b9edb485466f05b2baadf725d798229630c7e83e88c0b9ae278ca
2021-11-03 16:35:23 +00:00
drh
ac894af85e
Improved the error message that results when a schema parse fails after
...
ALTER TABLE ADD COLUMN.
FossilOrigin-Name: b007a39dd3a46d13fe06f2a1eeb4e3fd4cad1a77892be6d175b31db1edd6f6a8
2021-11-03 15:59:17 +00:00
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
drh
dc88b40285
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
2021-10-21 19:48:14 +00:00
drh
8ef0b84c37
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
2021-10-21 17:01:10 +00:00
drh
8b554e2a1e
Fix an incorrect JSON assert() that was added 5 days ago by check-in [7b8ea2298927fd34].
...
FossilOrigin-Name: e162da3ab4c183b67872be004035c48fc8f20084bc5757aec27410ce23a36631
2021-10-20 20:22:37 +00:00
drh
b18a11ed37
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
2021-10-20 18:17:31 +00:00
drh
9fdd66e3c0
Enabled the testcase() macros under SQLITE_DEBUG.
...
FossilOrigin-Name: 0ae8dd132db8331ca9cc42ad511066924f9d3a1d158ecdb630cebc41b6bd2493
2021-10-20 17:58:33 +00:00
drh
dec8572d8a
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
2021-10-20 13:48:12 +00:00
drh
7132f4361b
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
2021-10-20 12:52:12 +00:00
dan
fb8e71c584
Fix a case in the fts3 offsets() function where a corrupt database record could lead to dereferencing an uninitialized pointer.
...
FossilOrigin-Name: 7b7d31a6153b1505288eb3e849d0d9ef9e88e961c7b2f918ef5582fd77990f6d
2021-10-20 11:40:34 +00:00
drh
60a2fc8244
Merge multi-module test logic improvements from trunk.
...
FossilOrigin-Name: e00a44ac10d68b7bdaff1d9c237b598696eddc2d7392574aee1a95d94b4f165a
2021-10-19 19:26:27 +00:00
drh
06ec7c662d
Improved cleanup in finish_test so that specifying multiple test modules
...
on the "./testfixture" command-line is more likely to work.
FossilOrigin-Name: 3658417bf300e004e5166ee69aa2d8c70697b87ea7456cb6337b0ad6d60257d5
2021-10-19 18:59:10 +00:00
dan
a24df58fe8
Fix permutations.test so that it can be called with a test file pattern that uses square brackets.
...
FossilOrigin-Name: 55b6241871a3b52d835ebdc52a1ce6c736861cf7a03331391c5d6ffd39720514
2021-10-19 18:53:30 +00:00
dan
37c906e63a
Update test scripts to unregister the test devsim VFS after it is used.
...
FossilOrigin-Name: bb0e18ae4a49c305dd8b26886a3a4f3c6dad380edca57af835da4ad470ca8eb6
2021-10-19 18:40:00 +00:00
drh
7bf3d01a83
Merge trunk enhancements into the autovacuum-pages-callback branch.
...
FossilOrigin-Name: c26c9e5040ef4c52f2a99597e3a7c3eabd52c905d874fc76ca10fd54b749fa97
2021-10-19 18:00:05 +00:00
drh
0fbc19eabd
Remove an incorrect assert() added 4 days ago by check-in [9e2f06b84f994277].
...
Replace it with a testcase() macro.
FossilOrigin-Name: 03dff7196bb00f8e32f574f65745ceafb33ee3fdd169263121342859c362eca5
2021-10-17 10:31:09 +00:00
drh
134f544ab2
Fix a harmless scan-build warning in FTS5.
...
FossilOrigin-Name: 0bf42bb5611dc3f672cb898b8be245fd25f7a3862c1e0734effd18d75e812f22
2021-10-16 19:50:03 +00:00
drh
da125367fc
Add NEVER() macros on branches that become unreachable due to the
...
previous check-in.
FossilOrigin-Name: 5fa272cc033216ed2d3b16078db58accf4d9a3d10e6dd64d362ef844b3e267b6
2021-10-16 18:53:36 +00:00
dan
1273d69c82
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
2021-10-16 17:09:36 +00:00
dan
f7ff755651
Fix an assert() in fts5 that could fail with a corrupt database.
...
FossilOrigin-Name: e99979855de937ed5ee0994b180054501400bf8776fb70acd31786d2ba1ad49a
2021-10-16 13:59:08 +00:00
drh
1bbfc6744c
Demostrate a prototype sqlite3_autovacuum_pages() interface.
...
FossilOrigin-Name: bb6f2b8b486c225043bc64e5f74ff6bbad6c5d1f337f0c81eeb6172b087bb943
2021-10-15 23:02:27 +00:00
drh
220f0d6f8e
Protect the WhereTerm.u union using nearby assert()s and/or branches.
...
FossilOrigin-Name: 8a56de5b9c6f4522000f8d991373490b67b9e9d97f03c1ca2cf32816d84789ef
2021-10-15 17:06:16 +00:00
drh
285f2ef4ad
Protect the JsonNode.u union using nearby assert()s and branches.
...
FossilOrigin-Name: 7b8ea2298927fd34f27b3345add3ce751ed728387fe3d9207b601ba6449d5af9
2021-10-15 16:15:04 +00:00
dan
33cf194218
Fix a signed integer overflow in fts5 leading to a segfault that could occur when processing corrupt records.
...
FossilOrigin-Name: 69a3ff0cc159cdf84a5367eaf708882ddeda4fa65c96a5b546ae4a0114f02cb7
2021-10-14 21:13:02 +00:00
drh
0475629d47
Protect access to the WhereLoop.u union using nearby assert()s and
...
branches.
FossilOrigin-Name: bdd840216cc4c5293c112f182a189f7562b3cc0f6270e3c4af5eb2e8bd61ccc9
2021-10-14 19:28:28 +00:00
drh
bc98f904e3
Update requirement marks. No changes to code.
...
FossilOrigin-Name: 3a6887a543ac348d1a0d4b7f54b13c9dae929c3fa3408c5a44420943ba8c116f
2021-10-14 17:30:32 +00:00
drh
8436f53ebe
New tests added to test/fuzzdata8.db.
...
FossilOrigin-Name: e944d71760e3ee3de5dd518a04dad54d66ae4d40dac172b64d16c508471e30a1
2021-10-13 20:29:05 +00:00
drh
a71490889e
Convert an assert() into a corruption detection branch in
...
sqlite3BtreePayload(). dbsqlfuzz 848171b5d58f6e4a62257466e0e7de16696d4f02.
FossilOrigin-Name: f038d7f90e04838479e44ded00f627ec5ad8e1bd477edea8e87e66dd37485f30
2021-10-13 20:11:30 +00:00
drh
c380f79112
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
2021-10-13 15:09:37 +00:00
drh
f6d07c83fc
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
2021-10-13 14:45:35 +00:00
drh
febf0352cd
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
2021-10-13 14:01:44 +00:00
drh
dbe349dfa5
The sqlite3_result_text() routine (and similar) should record OOM errors
...
in addition to SQLITE_TOOBIG errors.
dbsqlfuzz
FossilOrigin-Name: eca434362652fe2edd6090b29417b35bc88a170609810aa9d266f6fc27baeab8
2021-10-13 13:00:34 +00:00
drh
4fc80671f5
Fix the group_concat() inverse function implementation so that it correctly
...
handles BLOB inputs when database text encoding is UTF16.
FossilOrigin-Name: 38a1326b4bd11bbe2846990d099c28520d17ab4cace1af67248c2472f89df929
2021-10-12 22:55:04 +00:00
drh
ffa5b054dd
Fix an incorrect assert() in SQLITE_ENABLE_SORTER_REFERENCES logic - a new
...
assert() introduced 5 days ago by [87e2f5eb436fc448].
FossilOrigin-Name: 7cfc839e5f1f28514cba7d11b0c0eb56d5ea65caacb8893dcf9fcf2d409e2ba5
2021-10-12 18:05:55 +00:00
dan
dee0359ddb
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
2021-10-12 11:30:07 +00:00
mistachkin
04f1b691f2
Fix another harmless compiler warning for MSVC.
...
FossilOrigin-Name: b54c0db0fd686b85269cf4c301c9b483c5272269d0cd69a1c7141a91101192f0
2021-10-12 02:26:32 +00:00
mistachkin
77978a64f4
Fix harmless compiler warnings in the debug build for MSVC.
...
FossilOrigin-Name: 1ceb73f316ddc736aebd1e82ef3a0d9c173d025ac5b7fcfbde0a65a0eeb60a4b
2021-10-12 02:17:39 +00:00
drh
54e3f94eee
Fail a schema parse if a virtual table or view has a positive integer
...
rootpage.
FossilOrigin-Name: 02656760406add06303afc94eaf9f2be021cbdbc7ac1ca79b139a7d2de9c0dc5
2021-10-11 15:54:05 +00:00
drh
9966621da1
Use the IsOrdinaryTable() macro, not a test of tnum, to distinguish tables
...
from views and virtual tables.
FossilOrigin-Name: 6189b7809d774bf697d14e27a4bd961df5c318d261dce97db7801ce83f12c59a
2021-10-11 15:21:42 +00:00
drh
75231eae07
New test cases added to test/fuzzdata8.db
...
FossilOrigin-Name: 2e475fecadc6d9e9a0537435827f56a5c7345f69a9b713d7812da4c9a0f27a96
2021-10-11 09:48:59 +00:00
drh
cd789f9bd9
Fix an over-zealous assert().
...
FossilOrigin-Name: e2bb82a4095427eb810903180fa27fb85b52144bdcfe33388352638428d017f5
2021-10-11 09:39:42 +00:00
drh
0c1da68907
Detect any attempt to use an INDEXED BY clause on a CTE and report an
...
error.
FossilOrigin-Name: 35a9de2c97b9a386070e7827a0842bb1caf3af69ea0d6f67ce2a50be3426fb63
2021-10-09 16:00:56 +00:00
drh
b18b3df1da
Further to the previous check-in, remove the "harmless()" macro definition as
...
it is no longer used.
FossilOrigin-Name: b8c9a54664a87ac464b413390572c3feb912e1efc9c8a78c61f1b370e2165c05
2021-10-08 18:15:50 +00:00
drh
15b5411a67
Remove a "harmless()" macro that is no longer relevant.
...
FossilOrigin-Name: 87c357c60168fdc52c82382aa7288d66886f5fbe2ae6af68344dbcfdbca9069b
2021-10-08 18:12:37 +00:00
drh
635e6a92a0
Add support for "PRAGMA writable_schema=RESET".
...
FossilOrigin-Name: a51b305bd068f8d8e85b9fc38d61cdf5957f3a2ad2eb2e77015547910088e681
2021-10-08 16:39:33 +00:00
drh
635480ef47
Improved detection of database corruption.
...
FossilOrigin-Name: c7fae46c8a3bd78adc5a01340eff6c1efa75f9384dc7f42cb81717b029e7c56f
2021-10-08 16:15:17 +00:00
drh
074a131245
Minor improvements to comments in the data structure definitions. No
...
changes to code.
FossilOrigin-Name: e77ac4050cf6c24118ce2af4c075f60e3eeb2dafe6d222c848bc4e541eef7172
2021-10-08 10:25:06 +00:00
drh
dbfbb5a0c5
New assert() statements to protect the u1 and u2 unions of SrcList.
...
FossilOrigin-Name: 9b91fbcfcc14048f7d0755d47d9b7f9212fa2eaa6f3c04f417fa16c3a47943bf
2021-10-07 23:04:50 +00:00
drh
477572b9f1
Protect access to the Expr.y union using nearby assert()s and branches.
...
FossilOrigin-Name: 87e2f5eb436fc448427b0e24fb70f29688796b513b8c7b12f1a21540dae1e56d
2021-10-07 20:46:29 +00:00
dan
867bc4de2e
Break the tcl release tests into smaller units to better take advantage of multi-processor systems.
...
FossilOrigin-Name: 03cef1c30d96cd42682f57667bb3072c7643ef43fe05eda2d8b82c30789234af
2021-10-07 19:27:17 +00:00
drh
a4eeccdfdf
Protect all accesses to the Expr.x union using nearby assert()s and branches.
...
FossilOrigin-Name: 8eaa1d4a98b24adf245bbd2fe9212aa6a924a0f09c445906d7f87574f36a7423
2021-10-07 17:43:30 +00:00
drh
9d43db5b5c
Fix an incorrect assert() on PRAGMA table_xinfo added by the previous check-in.
...
FossilOrigin-Name: f85cb287c52baa729aeb223038e979a3b74a1eb3d97bf59c01f5417998204f84
2021-10-07 14:19:32 +00:00
drh
f975107437
Protect all accesses to the FuncDef.u and Expr.u unions using nearby
...
assert()s or branches.
FossilOrigin-Name: 9af863f065e0bef491c2ab7525194505f9516f4e6dfc789d2e3a9d2c2438533a
2021-10-07 13:40:29 +00:00
drh
78b2fa8610
Protect every access to the Table.u union using a nearby assert() or branch.
...
FossilOrigin-Name: 50e08338aed7ac0cee600098d2ecd4b3b7bfd31a597bb26773badf3d2e2582c8
2021-10-07 12:11:20 +00:00
drh
16a8f28e49
Fix a macro typo introduced by [5da112c02f9e8d0b] that prevented coverage
...
tests from working.
FossilOrigin-Name: 566e6974892ebd3d3de8d77b24655257a5efe14434c553e1a25fc680b201b336
2021-10-06 10:36:56 +00:00
drh
3768f175cc
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
2021-10-06 10:04:04 +00:00
drh
8746396385
Fix a harmless typo in a comment.
...
[forum:/forumpost/218c116fdf|forum post 218c116fdf].
FossilOrigin-Name: 8ca0c7d826622c9660ecbd9664eba2bac9bb1b850f96f35d6c959d0acde2309b
2021-10-05 22:51:26 +00:00
drh
13ca72d011
Fix harmless compiler warnings, mostly caused by prior efforts to get static
...
analyzers to run without warnings.
FossilOrigin-Name: cddd3b382a118bb16be3a602ae711fe2c2a7d1c673dd30dd3977b67ee555e666
2021-10-05 18:59:05 +00:00
drh
d7ace22d8c
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
2021-10-05 18:33:38 +00:00
drh
7a3b4451a1
Fixes for harmless static-analyzer warnings. This also makes the code easier
...
for humans to understand.
FossilOrigin-Name: 36177a62feeb4fa93ab6e3c6f4dbe1ddcf63bb02f93284abab979da0261b218e
2021-10-05 17:41:12 +00:00
drh
6a726fa175
Fix separate compilation of json1.c, which was apparently broken by
...
check-in [32f33f356931242b].
FossilOrigin-Name: 0c7ece6792d30bdb314e2a6e61d0c051c3619a2d749f8b1df7dc2b1f521388bf
2021-10-05 15:30:52 +00:00
drh
640574f61a
Small change to FTS5 to help static analyzers understand that it is not
...
dereferencing a NULL pointer.
FossilOrigin-Name: 0d853df1b19a0270b2cb0ebdf5df8067572f19ab9a82d047cb047f3f9e850348
2021-10-05 13:00:50 +00:00
drh
8a0c42765d
Ensure that geopoly does not invoke sqlite3_result_error_nomem() with a
...
NULL pointer.
FossilOrigin-Name: 2483310d15022b47109b44c86e100f5894be7a45a0568dfef6aea80e6c518654
2021-10-05 12:34:54 +00:00
drh
e1e1a43a0f
Simplifications to the preupdate_hook logic to make it easier to reason about,
...
and reduce static analyzer warnings.
FossilOrigin-Name: 91e3b98e06feaa5b70caf2266200d20d0ae4e432db147975c9f5959f93df7e7b
2021-10-05 11:11:43 +00:00
drh
7d4c94bc0f
Fix harmless static-analyzer warnings.
...
FossilOrigin-Name: 32f33f356931242b59c01b5df7e180941231e3d9c91577ad33aa4a01e9d59092
2021-10-04 22:34:38 +00:00
drh
d9403bc642
Merge static-analyzer warning fixes and the new SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS macro.
...
FossilOrigin-Name: 5da112c02f9e8d0bcbed8bcf6bab9c227607a802e85c8f70b1ca628d24960dee
2021-10-04 18:59:02 +00:00
drh
922c54206f
Some #defines somehow failed to get set correctly in the previous check-in.
...
Fixed here.
FossilOrigin-Name: 15bbdf9ac840a220f384411d3025ef22f949d310194b60bca8e6d6a759e6042e
2021-10-04 18:57:42 +00:00
drh
11a9ad5669
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
2021-10-04 18:21:14 +00:00
drh
1076130a5d
Fix harmless static analyzer warnings in auxiliary build tools, mkkeywordhash.c
...
and lemon.c. No changes to the SQLite core.
FossilOrigin-Name: f2f279b2cc1c8b3b162058c33956be4037cd519715ac0c4290f10c58d2528f0a
2021-10-04 16:14:51 +00:00
drh
c59ffa8c1e
Fix harmless static analyzer warnings.
...
FossilOrigin-Name: 1ebcde72e2046dffaa408d2a5a4a5bbf35fdf4b096e0e088dcffd9360effdaa7
2021-10-04 15:08:49 +00:00
drh
253888c13b
The pragma_table_list virtual table should have only one "schema" column.
...
FossilOrigin-Name: 886feffaad6baac37dfaab489c2aecc4abf51a3a5bce1e8a94be7cc1d2a3c30c
2021-10-04 13:30:22 +00:00
drh
aa6fe5bf10
Fix harmless static analyzer warnings.
...
FossilOrigin-Name: 6604a085964121113e7b7f57537a0ba64ba058d0eb12bf0a3aeb6d1b7a29d516
2021-10-04 13:18:44 +00:00
drh
36db90d3dd
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
2021-10-04 11:10:15 +00:00
larrybr
d797d6b626
In CLI, ensure correct line-accumulation state whenever line(s) are dumped or processed. And test this.
...
FossilOrigin-Name: be211a9c59234ef202e772fcaae18be43c44e1e00674f137cad2d903e00bfcab
2021-10-03 22:03:59 +00:00
drh
5bf4715e01
Add the sqlite3ResultStrAccum() internal interface to simplify the
...
the implementation of functions that return strings.
FossilOrigin-Name: e548e9299d3fd6ce5b647cf0dd93ff8e917a5eda43076c6a02389c52640e2e50
2021-10-03 00:12:43 +00:00
drh
ad1188b21c
Try to fix a harmless static-analyzer warning in sqlite3BtreeTransferRow().
...
FossilOrigin-Name: 5906a0152deded614d965e790a33c67832890828a4835451d65c06414ba71f8b
2021-10-02 18:22:24 +00:00
drh
952f35b24d
Fix a harmless static-analyzer warning in sqlite3ExprCode().
...
FossilOrigin-Name: 918c22e82ae6e366ddd094d337ed73fd23878c51745045519ed700113832545c
2021-10-02 17:46:24 +00:00
drh
9673cd0de7
Remove an unnecessary static buffer from sqlite3VdbeExpandSql().
...
FossilOrigin-Name: 953a33b7f739bb39f4a0efedcad2236c09fb798da4a519f8e1049aebe3bbf3ff
2021-10-02 17:34:28 +00:00
drh
cc9309c797
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
2021-10-02 17:12:58 +00:00
drh
76fc88fe0f
Fix harmless compiler warnings
...
FossilOrigin-Name: bdb9dc8a025b509960d08cdf0ff784dd075c156860548d7908de7d97e030701c
2021-10-02 16:39:16 +00:00
larrybr
810121623b
Fix CLI line processing. (back to start state after meta-command executes)
...
FossilOrigin-Name: 928c2a34986644d34bcb5e8a1b2720f31cf703383f4ce75381faefca6f356d04
2021-10-02 15:34:52 +00:00
drh
260ff08133
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
2021-10-01 22:48:52 +00:00
drh
e85e1da07b
Fix harmless compiler warnings.
...
FossilOrigin-Name: 94b59691ee50a4666b25e36d1529fc52f714bbe94c3e8ccb35bf0a4ea11050db
2021-10-01 21:01:07 +00:00
dan
37f3ac8faa
Change things so that SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTER_TABLE.
...
FossilOrigin-Name: 2f7c946c5f25a858167f5193ca06e53310394c8cff15426ab8a1327a1ec835fd
2021-10-01 20:39:50 +00:00
drh
82978ac20b
Fix a potential write outside of array bounds in the --hexdb decoder of the
...
CLI when given corrupt input.
FossilOrigin-Name: c7fdd775bb5efd22a486510a32a2f278c4d5cda95acd3085a0f0dfc2ef749d6f
2021-10-01 17:06:44 +00:00
dan
adfb203a7d
Fix a buffer overread in fts5 that could occur when processing an "ORDER BY rowid DESC" query against corrupt database records.
...
FossilOrigin-Name: fe098a93340b8dac15752f1be4f681e2a591f7ae1a94b177f400ccd7ef638480
2021-10-01 15:05:19 +00:00
drh
3dd01111e2
Remove unreachable branches in the fixed group_concat() code.
...
FossilOrigin-Name: 8bd721c29e7a28cd75885dd80235e4e37aa0847229f769f49e01127f794fa63a
2021-10-01 02:45:48 +00:00
drh
817424fe37
Merge updates from trunk
...
FossilOrigin-Name: 35351371c5e9602dec210ad0926ff8a1a269556ce1a166e81eb0543938e0c57e
2021-10-01 02:16:52 +00:00
drh
f06db3e892
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
2021-10-01 00:25:06 +00:00
dan
afaa660aef
Fix a problem with view handling in SQLITE_OMIT_VIRTUAL_TABLE builds.
...
FossilOrigin-Name: 6e791a24ce259ff6cc46a7c2188aea094a5021e154368f57019a0653c8a81217
2021-09-30 18:42:52 +00:00
dan
09e2626eaa
Fix rtreedoc.test so that it works with SQLITE_DEFAULT_AUTOVACUUM=1 builds.
...
FossilOrigin-Name: a300adc21151fb70ab8573477fd89a10300ee678f068fe123f22ada2f1f876d2
2021-09-30 17:39:21 +00:00
dan
91f621531d
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
2021-09-30 10:47:10 +00:00
drh
0019774e78
Add NEVER() macros on branches that are not reachable since [a0df216f7c3f8963].
...
FossilOrigin-Name: 5d771f3554f3c98872cd0c9f12f415e685f26fcb923e3fb7f1a7a760c7a53255
2021-09-29 20:17:19 +00:00
dan
0abb7ec36c
Fix a typo in altertab3.test.
...
FossilOrigin-Name: 18d38b13104a9c3367ec205bfa17fbdc3d792ba68a369b1c6f046096ef6cc581
2021-09-29 19:18:53 +00:00
dan
d091245d31
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
2021-09-29 19:15:25 +00:00
dan
ab632bc97e
Fix another problem with ALTER TABLE and vector UPDATE statements within triggers.
...
FossilOrigin-Name: a0df216f7c3f8963efba0b1ffee65d6a63309d846ffdcf2d2932cb4f1d4967b7
2021-09-29 18:33:26 +00:00
dan
eda0001d89
Add new test file rtreedoc3.test.
...
FossilOrigin-Name: 54604869861cc5866d5de87785599ca56f75067f8cb7fe22e32912b3a037e37b
2021-09-29 16:38:02 +00:00
larrybr
34896c6855
Sync w/trunk
...
FossilOrigin-Name: a4c18b2f0ce4a0f4d0c4f4c25dc69fbed4cb4876d2b69e3e5e0e756410892d74
2021-09-29 16:35:14 +00:00
dan
a92f9586e0
Add extra tests for the group_concat() fix on this branch.
...
FossilOrigin-Name: 3d148615f9d9c6a3d63d8eb015f3d70f453a66de49b28e665831254387c700b9
2021-09-29 14:14:16 +00:00
drh
a40f5af403
Improved testability of changes from check-in [255b0eeed113d83b].
...
FossilOrigin-Name: bbfd083c26086fb103fec88faa59a01e689e0b7fce38c09d8846bb472a0e6760
2021-09-29 14:01:44 +00:00
dan
415540ddaa
Fix an out-of-bounds read in fts5 that could occur when processing corrupt records.
...
FossilOrigin-Name: 9bbc01fb239b4aa752a56c584baa29655a3c845425d5c17d24a3939984d54fe2
2021-09-29 13:36:58 +00:00
larrybr
dde13e6f88
Get group_concat() to handle varying separator lengths when windowing
...
FossilOrigin-Name: 98e0f2bf67cdee1da1edadeb54ff8564728b3f28fc821e46e8de201247c3fc87
2021-09-29 00:32:13 +00:00
dan
a7f7c1c4af
Fix a potential ALTER TABLE problem with expressions like ( (<sub-select>) IN () ).
...
FossilOrigin-Name: df0d7e36dbf98ab5405d8366ce92fb85176d4388b47a57b0ca1aa1ba6ae5212e
2021-09-28 10:44:54 +00:00
dan
6bcaba70ac
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
2021-09-27 17:11:20 +00:00
dan
5a69d19eea
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
2021-09-27 15:44:03 +00:00
drh
76ec55fddb
Load recent dbsqlfuzz cases into test/fuzzdata8.db.
...
FossilOrigin-Name: 7a8fcf6d2c8e3c8f10ff515c8c00c761d15a28eef8e0e31e09e22feb06c9443b
2021-09-25 20:28:39 +00:00
dan
4b67c655af
Fix a memory leak in rtree triggered by corrupt database records. dbsqlfuzz 397ad036a9013d7318da30ef84947d2baaaa6d6c.
...
FossilOrigin-Name: 706322c2b5bb31e14c1120a94520b21fa623ff119e3890170e36b37d8bde721a
2021-09-25 20:19:16 +00:00
dan
c28cc32d81
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
2021-09-25 18:21:01 +00:00
drh
1580d50b76
Add const to parameters on various internal interfaces.
...
FossilOrigin-Name: 70c221c5cf7b4d9ed34f16d045f262f99d16aa3db84f80cf0b03ee82ba28d075
2021-09-25 17:07:57 +00:00
drh
84d90319e5
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
2021-09-24 19:57:32 +00:00
drh
b6dad520e5
Add lots of new "const" on internal function parameters. There is opportunity
...
for many more - this is a work in progress.
FossilOrigin-Name: a3c71a673ddd1c299bdae550fb955077b77088329a8ca2895dfb23538b524a8e
2021-09-24 16:14:47 +00:00
drh
ebd1ff62c5
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
2021-09-24 12:59:33 +00:00
drh
2a6a72a81c
Ensure that the db->init.azInit array is initialized at all times.
...
dbsqlfuzz 0ad6d441f9bf3dfc32626a9900bc1700495b16f9
FossilOrigin-Name: c7560c1329965ab57cd71393c044b110561b83641d08677bc51044df9e377882
2021-09-24 02:14:35 +00:00
drh
dd31c033c6
Fix harmless compiler warnings.
...
FossilOrigin-Name: d678ecca02698753d1b33e072566112e94ea36d0d3a8f4a24d2b09d131968d88
2021-09-22 14:43:35 +00:00
drh
68911c2a2a
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
2021-09-22 14:26:22 +00:00
drh
fd7abcd15b
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
2021-09-22 13:43:16 +00:00
drh
c2f61c18d1
Fix an incorrect assert() in rtree that was added recently
...
by [f7ad73c49507c943]. Change it to testcase().
FossilOrigin-Name: 3aa0bf3a098ee9a62c79f266f94e4d290056d0f3e91237944893d6bbb686861f
2021-09-22 13:07:10 +00:00
drh
6caccc1660
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
2021-09-22 10:57:30 +00:00
drh
6d9f034ba8
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
2021-09-22 10:28:50 +00:00
larrybr
b565bee66b
Fix .expert name collision bug reported at https://sqlite.org/forum/forumpost/05e6f32984561f57?t=h
...
FossilOrigin-Name: 4a3f98ad0dd2a8c0370042611a041bed2bd8d9ca82d6706e2db349eb97aaf1f0
2021-09-21 20:03:05 +00:00
larrybr
866c44704f
Speed and (slightly) simplify shell's input line early processing.
...
FossilOrigin-Name: a1c7f7f8e1b46440234be96e813e4c2c28150413dd95dcab5d13b9c80a202edf
2021-09-21 19:19:28 +00:00
drh
2e50f67073
Add the "PRAGMA table_list" command with its corresponding eponymous
...
table-valued function: "pragma_table_list".
FossilOrigin-Name: 2c0e7ae541e9ecb86aa58fa7e7057def8aac1b1af1af1aa80b8bf2d260f9a2f9
2021-09-21 17:26:23 +00:00
larrybr
b3e4423137
Accomplish fileio standalone for Win32 with less intervention.
...
FossilOrigin-Name: af5dcc9c2a3a45d10b985f6b7ea18d39c75502ed10fa6496aad787dbe8c8c3fb
2021-09-20 21:42:39 +00:00
larrybr
3d99743423
Allow fileio extension to be a stand-alone DLL for Win32
...
FossilOrigin-Name: d1cc3105b2baceb9f426fd6bc8d8317de3af09a0f02517715bd292c68e282fa1
2021-09-20 20:15:28 +00:00
larrybr
6b7e47fa58
Adjust shell tests for *Nix and Windows test platform anomaly
...
FossilOrigin-Name: 577544c5a2f193e00e5ca55b7feae96568198019573b9b0b37e2bf4300d6d524
2021-09-19 18:31:55 +00:00
larrybr
7e00984a47
Sync w/trunk, further streamline shell's resumable prescan.
...
FossilOrigin-Name: 9e00f9f7c03c192a3fb6b22851db0626515c59daac5ce6520229c42c838bf5b7
2021-09-18 21:35:22 +00:00
dan
5488e0827a
Further tests for legacy rtree geom callbacks.
...
FossilOrigin-Name: 99d6bb22e8735681443bfe67287aa15ce2c57d0d63e304abf8aa01fde50dd021
2021-09-18 16:15:54 +00:00
larrybr
d96bcc75e8
Shell's .read pipe now works for Windows too.
...
FossilOrigin-Name: 929bcc4098549692c573779d65c4c28027b0a2f48ebbf5b3f038deee24374b67
2021-09-17 21:12:47 +00:00
dan
01ed72f2c5
Add tests for legacy geometry callbacks to rtreedoc2.test.
...
FossilOrigin-Name: 6ad00e52eda5bc4cb8e6fffbd7538bcd4c6b22f84b837a746eba6bf8c91eb55a
2021-09-17 20:43:27 +00:00
drh
3780f9a4aa
Make the affinity() function available even if compiled without
...
SQLITE_DEBUG. Surround the implementation of all test-only SQL functions
with #ifndef SQLITE_UNTESTABLE.
FossilOrigin-Name: b7e00ef8059f6fb5658c6ad6f337cfdf065a5f1b1130452122282f3a69e98a93
2021-09-17 13:07:15 +00:00
drh
89b1715415
The dbsqlfuzz fuzzer found a refutation for a recent ALWAYS() macro.
...
FossilOrigin-Name: ebfc18aaa6506ccac80f297a1792e726972bb39c0b5c8706faadeb8df94a45e9
2021-09-16 22:23:36 +00:00
drh
8e4616c280
Minor changes to rtree.c so that we can get full branch coverage even when
...
it is compiled without geopoly.
FossilOrigin-Name: f05ae9b5864459493154037d2c902d203c4a43007b5d61bd4beb1eed56e06d13
2021-09-16 20:16:39 +00:00
dan
72fb42d570
Add tests to rtreedoc.test.
...
FossilOrigin-Name: b18c6ec46079520e0db8b42586ce9370a4038d0b4f719cfb98488037883e2537
2021-09-16 19:50:54 +00:00
drh
051c9ba1be
Add a single new ALWAYS() to rtree.c, with justification.
...
FossilOrigin-Name: 778e4499cdf2083d5431738099dedf0aade9271f661e09ca3278e0109bb1e720
2021-09-16 17:02:59 +00:00
drh
495f78d851
Add a tag comment in rtree.c. No changes to code.
...
FossilOrigin-Name: 213410fa9cceb4ce34bf590ba65648ebeb94cc8d0c29a8881222208097162a95
2021-09-16 16:41:59 +00:00
dan
bea28c73a3
Add a reference counter to a structure used internally by the Tcl interface so that it does not segfault if the database connection is closed from any of the various callback scripts that may be invoked.
...
FossilOrigin-Name: e54a33ce56432b23947583d34cf12fc64a55bbc49eb77c7f33cff5926df51070
2021-09-16 14:17:14 +00:00
drh
eb56e29053
Mark an unreachable branch in rtree.
...
FossilOrigin-Name: e6c4afd5b365b8dea8c0742352a09029da0f9715dd2407d4ccf53f1e0a4ce625
2021-09-16 14:07:09 +00:00
drh
86b262ecfa
Back out a couple of ALWAYS() macros from [4fab9089868bbb05]. Test case
...
added to TH3.
FossilOrigin-Name: d26963a530ccbe36a174823d2f0bd7e06c6fca4f38ecdd04cd700c4000cc3719
2021-09-16 13:52:28 +00:00
drh
e73e957c1e
For ALTER TABLE RENAME COLUMN, do not try to filter virtual tables out of
...
calls to sqlite_rename_column(). Let the function filter them itself.
The WHERE clause can mistakenly let virtual tables through if the
sqlite_schema table is corrupt. The sqlite_rename_column() function must
deal with them. We might as well let it deal with them always.
FossilOrigin-Name: 7c82b43b7cdb825f431d3a778f8b34e32666ccb3b067f1f2533d3b3dcca7bdc9
2021-09-16 13:20:29 +00:00
drh
11eb9c6a28
Under SQLITE_DEBUG with PRAGMA vdbe_trace=ON, show an output line if the
...
VDBE aborts for any reason.
FossilOrigin-Name: 7e3d6810039ca4563aa68dfa3671f570792a10f75c8eea68aa7dfd02d17702ca
2021-09-16 12:33:53 +00:00
drh
162f153579
Simplify the routine that attempts to estimate the size of an rtree index
...
by looking at the sqlite_stat1 entry for the %_rowid table.
FossilOrigin-Name: 06c329c17c2c2de8bc1ca7f3b0b929055675761a8be7a7e8b4a9fc5cca0d1679
2021-09-16 07:32:24 +00:00
drh
36784e0fb1
Mark various unreachable branches in rtree.c with ALWAYS() or NEVER().
...
FossilOrigin-Name: 4fab9089868bbb05a192da09bc201f0a84c5b9bef39dcb063afc1d7658299fdd
2021-09-16 05:39:07 +00:00
drh
c464ec6710
New ALWAYS() and assert() to mark unreachable branches in rtree.c.
...
FossilOrigin-Name: f7ad73c49507c9436adc7fe1b865f801eefcc7ea6b3ba35e83e63029beb03016
2021-09-16 05:24:40 +00:00
drh
5f9c7ba9d8
In rtree.c, remove an incorrect ALWAYS(). Add other ALWAYS() and NEVER().
...
FossilOrigin-Name: cbaac8878aac0623beb5af3bc79a5b1c0179213206fd658b8c4fcc3531889480
2021-09-15 19:53:22 +00:00
drh
750f2331c4
Add more ALWAYS() macros on unreachable branches in rtree.c
...
FossilOrigin-Name: fbba89dac9591c56da81bd0808910fbc64640f3ccfd95845ecab4d3aea46ca61
2021-09-15 19:13:24 +00:00
drh
8038cb99b0
Fix the xBestIndex method on rtree so that it correctly recognizes that
...
rowid=? works the same as id=?.
FossilOrigin-Name: c74c07cc86443057d34284ae31eb68470741592b0e61072fd5e120e82919169b
2021-09-15 16:20:15 +00:00
drh
04bd2c837b
Add ALWAYS() macros on some unreachable branches in rtree.
...
FossilOrigin-Name: 9123f680ae3100f4c781ac4f5b8afac49bb5d4231b5931ad112b1b615f22f613
2021-09-15 15:56:00 +00:00
dan
f02c324bc1
Further updates to rtreedoc.test.
...
FossilOrigin-Name: e66727837ddd5d1344c252323d52600b6138f5a2471f63d09b5a28ea2c22e595
2021-09-15 15:53:01 +00:00
larrybr
998e910346
Fix non-build for a test configuration
...
FossilOrigin-Name: c9a4ab059050a83d811149ff196ff16ea9e4c301627482800982b87cd30ddbbc
2021-09-15 14:48:02 +00:00
drh
83569e2e9e
Simplify some of the corrupt shadow-table detection logic in rtree.
...
FossilOrigin-Name: 0c4f37aa475bd4bd17c20c02ab2d9f63d0a6a08b0e2bbfa559f7b972ece6f4fc
2021-09-15 13:09:55 +00:00
larrybr
b01f1389f2
Squelch needless narrowing warning.
...
FossilOrigin-Name: 5540e6abc1a2a8540113ec9bfebe1fb78d6a044f45396dd1926b65ff17ff236b
2021-09-15 11:15:03 +00:00
dan
5f835b7847
Ensure rtreedoc.test is not run for builds without the rtree extension.
...
FossilOrigin-Name: 42dff223470e9c096b8486ef232ac41b70d0875d8ae07630bfaaea1515ffa8d0
2021-09-15 10:49:31 +00:00
dan
f159323c42
Add test cases to rtreedoc.test.
...
FossilOrigin-Name: afe0ec4d589d87a07c0daf3fc4de884b82a8bceed593ba4e44caa1cf033a6715
2021-09-14 20:07:58 +00:00
drh
c0bd26a23a
Update requirements marks to reflect recent documentation changes.
...
FossilOrigin-Name: 08cab8921e670a0d1758b505fe8c7455f6194cec69d1b7b77de91688be1028a6
2021-09-14 18:57:30 +00:00
dan
a2fef2f031
Add test cases to rtreedoc.test.
...
FossilOrigin-Name: b62de1269f17fcc944ff404a20c4f705ffe99c44d6c54f42c29e69753aac8092
2021-09-14 14:16:36 +00:00
dan
6962d78c4d
Minor updates to rtreedoc.test.
...
FossilOrigin-Name: b22c75e41ded29afd026b32b73b87f6427340a9ac1d46147db8edac20eb7beb5
2021-09-14 11:27:20 +00:00
larrybr
d000785d40
Shell to .read any named character source file/device (again.)
...
FossilOrigin-Name: c6fe4f8d639db25f0a339f4071f0ae34b90dcfec8dcc2c571f969e2614a38e05
2021-09-13 23:11:46 +00:00
dan
db45212a35
Add test cases to rtreedoc.test.
...
FossilOrigin-Name: 4ee99d315487a3aa09911191a74c6a12693784c5359243eb1396d8868566e80a
2021-09-13 18:32:02 +00:00
drh
82456a661d
Add assert() statements to refute
...
[forum:/forumpost/9f4e7f58fbb66ddd|forum post 9f4e7f58fbb66ddd].
FossilOrigin-Name: 83a83475c5064ea62016a03e9173ecd2a1fec7f6296f1ee99896fa0a38b4196a
2021-09-13 18:16:15 +00:00
dan
30918bfb0b
Add new test file rtreedoc.test.
...
FossilOrigin-Name: 8c4b1482eeb31856bce20eda1ce74959e19da11962f74d406a608747a92fe429
2021-09-13 16:36:20 +00:00
drh
57dd7e6ad8
Fix an incorrect comment and possible integer overflow in pager
...
resulting from check-in [23ca23894af352ea]. Problem reported by
[forum:/forumpost/e2ea1a3f61|forum post e2ea1a3f61]. Also change
the datatype of Pager.pageSize to i64 even though page size never
exceeds 65536, in order to help prevent future problems of this kind.
FossilOrigin-Name: f4a552ed9f4ab35520b634954c39748cc7bda535f426280b79da1b99f70599ac
2021-09-13 13:53:13 +00:00
larrybr
8d463ce135
CLI prescanner made to match SQLite's rules for delimited identifiers. Tests begun.
...
FossilOrigin-Name: 15b105c520968855ad960d8929f80af9e9bedc155237af9af1956f7b546947f2
2021-09-11 02:42:04 +00:00
larrybr
31aa366293
Make replace.tcl useful with TCL 8.4
...
FossilOrigin-Name: 2dd61dd97b0326b59b0bc3c83b4d4b9acf811c5acae4d1003e7525ba7a26daf5
2021-09-10 22:00:43 +00:00
larrybr
a96bbe9af6
Make CLI prescan handle goofy identifier delimiters too. Streamline code.
...
FossilOrigin-Name: 968aed690ba7240f8a256f5ba679cc971f432ff9af0ff99744824af79b952545
2021-09-10 19:45:22 +00:00
larrybr
3a9793e40f
Fix (luckily harmless) typo in memdb.c per https://sqlite.org/forum/forumpost/15af8872d5999df1
...
FossilOrigin-Name: d577030cdad165474b082afbe64782e2eb3290331b0e3045b1e85ee6fe011504
2021-09-10 18:35:59 +00:00
larrybr
ae509121d0
When showHeader set at CLI invocation, do not auto-set it later.
...
FossilOrigin-Name: 733b7d4f95a4e2f0df323974f323c40c2486b188d442e74306a4b580fd8a8bd8
2021-09-10 01:45:20 +00:00
drh
7f58117921
Back out changes [00286ca5d998d802] and [6844ede29e1dac93] (replacing the
...
associated branches with NEVER()) and add a single new test to
btreeOverwriteCell() that detects when an overflow pages is also mapped
into a b-tree page and raises and immediate SQLITE_CORRUPT error before
making any changes.
dbsqlfuzz 81791bd980fe6935ff2c7334ec8bef11c1c12b82 and others.
FossilOrigin-Name: 32210fa4ac4f06e1705ef808731c7be040a23f9a8630986440100c5d4e76dc07
2021-09-10 01:02:42 +00:00
larrybr
8bc4cbce6b
Speed-up CLI's processing for huge block comments, for any content
...
FossilOrigin-Name: c4568f9f458bad16bd4481f1f6f5e7b6f39f5ccf23f2b05890078577ce2ab9a2
2021-09-10 00:58:46 +00:00
drh
3acb3b7845
Remove a NEVER() in btree that is sometimes reachable.
...
dbsqlfuzz b9140023005430654c8fe544cf0a082ef8d561c1.
FossilOrigin-Name: 6844ede29e1dac93a392dfb1e7e676bb9d0a2e7bbec0a4a5804ffc2025a99b66
2021-09-09 19:19:02 +00:00
drh
4c5b7b922c
Avoid masking off an OOM fault in rtreecheck().
...
FossilOrigin-Name: 3ebfe7128a20b270de65ebf4620f62e34ea6cc46b472cc52aed96af504eb9637
2021-09-09 18:06:07 +00:00
drh
30ad4a6932
Improved database corruption detection in the editPage() subroutine
...
of the btree rebalancer.
dbsqlfuzz f035b1b5a100a5f0cffb95c958b6c67d7c5eaf1f.
FossilOrigin-Name: 00286ca5d998d80214d5e8d501a3b305f432cda1c0ef67ca530e1219565909b7
2021-09-09 14:03:55 +00:00
larrybr
31bffb44fa
Speedup CLI's gulping of many huge block SQL comments.
...
FossilOrigin-Name: 729620c5c0c642243be2fdda98f18d04efaf78ce365092e655cf60c9fee0874f
2021-09-08 21:49:03 +00:00
drh
94b70d8343
Fix PRAGMA integrity_check so that it does not try to enforce types on
...
ANY columns in a STRICT table.
FossilOrigin-Name: 57384fda8db43964871be5e48ae1c72c67533046b523f161d60a41fdc8e96b9e
2021-09-08 19:25:21 +00:00
larrybr
2c09a8ad6f
For sqldiff, sqlite_schema comparisons must use compound (synthesized) PK.
...
FossilOrigin-Name: 5bdd8466129b8e477c8349847f19f2a5adea3f650cca6dbafa3b835e5a538d09
2021-09-07 20:58:49 +00:00
drh
59bccb2637
New test cases added to fuzzdata8.db. No code changes.
...
FossilOrigin-Name: 51e5aadafe1a4ba6a0be7fc1732d1ec940cbc5e23723b76267c2abf887d713ac
2021-09-07 19:23:32 +00:00
larrybr
a933ec4c25
Make sqldiff able to compare sqlite_schema tables (for detailed schema differences.)
...
FossilOrigin-Name: 7ff92da9f183bc24a0d93996df771df7a712df1122ad897cb9143cde7d57ef7d
2021-09-07 19:04:42 +00:00
dan
eb84c6ef35
Fix a memory leak in fts5 that could occur when writing to an fts5 table that is being scanned by an fts5vocab cursor.
...
FossilOrigin-Name: 1183552de10b64a776874a23be8962c0693e5e0cd1a191ea8fa5d6a02b691e4a
2021-09-07 16:05:48 +00:00
drh
eb61630b40
Fix a potential NULL pointer deference in the LIKE optimization. The
...
problem was introduced by the addition of generated columns
in check-in [b855acf1831943b3] (SQLite version 3.31.0, 2020-01-22).
Reported by Wang Ke in
[forum/forumpost/699b44b3ee|forum post 699b44b3ee].
FossilOrigin-Name: b9417d400f4585004f434837022709f818044d5844fe208fe01595a6b226ef7d
2021-09-07 15:41:25 +00:00
dan
fb8ca7de0c
Fix a use-after-free error that could occur if an fts5 table is written while scanning it using an fts5vocab cursor.
...
FossilOrigin-Name: e751c2ec786b5c1a1c9640fdc3fde036879a2c32db2bd67fe7c72604780f67b8
2021-09-06 16:15:23 +00:00
drh
905b82d5f5
Fix an issue in the "shrink.test" test script reported by
...
[forum:/forumpost/90a74bd61861f58f|forum post 90a74bd618].
FossilOrigin-Name: 6c3734edb2ecabd85a715c853ef58da39381af26d3dd32e53c068b4fcf6fb98f
2021-09-06 15:59:32 +00:00
drh
e534c7b97f
Restore the use of system isnan() that was removed by
...
check-in [ea748edecb261f2b]. See
[forum:/forumpost/d7c530ac587f59e6|forum thread d7c530ac587f59e6].
FossilOrigin-Name: b3cfe23bec0b95ca673802526704200e2396df715fdded72aa71addd7f47e0e1
2021-09-06 11:44:19 +00:00
drh
e7e9539d99
Fix an assertion fault in pcache introduced by [4bc93658aa563f2f] and
...
detected by OSSFuzz. Test case in TH3.
FossilOrigin-Name: 2262a49467fa56c386080dac3e99a66e16c1700e138dba74db66e7b93ae76bf5
2021-09-03 18:11:12 +00:00
dan
748d8b9cdd
Have the planner ensure that if one scan uses a subset of the WHERE clause of another, that scan is estimated to cost less and return fewer rows.
...
FossilOrigin-Name: c7b34930e27597e7f634ad76be55fc436dcb84ea48d5b41b5d7f3596285dd672
2021-08-31 15:53:58 +00:00
dan
beed24d57e
Do not disable a rowid=? term used to drive an IPK index if it is a transitive constraint.
...
FossilOrigin-Name: 46e28cbcf6044b36aa4ddcda09adb49a46c6c6a8d41d558467ede3091304aa8c
2021-08-30 17:02:48 +00:00
drh
6d77a2948e
Patch lemon to fix "error" token handling, according ot
...
[forum:/forumpost/e680f42f53090061|forum post e680f42f53090061].
FossilOrigin-Name: 106b5e5355a3836a9756333e6dcbb13f0878a5352dab00973b8f0900879bd724
2021-08-27 11:26:37 +00:00
drh
b97e2ad10a
Add the --safe to the CLI. Also the --nonce option and the .nonce command.
...
FossilOrigin-Name: c76870cb1a8e2e1389ad864c51b9f596dff21df8bb58f438f0a2cacfa63b22a4
2021-08-26 18:31:39 +00:00
drh
5ced0a914e
Correctly preserve the collating sequence for a column when changing
...
its datatype. Fix for the problem reported by
[forum:/forumpost/e5c76b738e|forum post e5c76b738e]. Test cases
in TH3.
FossilOrigin-Name: c7f0813cabf9d8ab367bead5ba8cf20132b8bb9274d8e47b76ad66a10517dd2a
2021-08-24 17:07:44 +00:00
drh
0ccda5294f
Fix a typo in a comment. No changes to code.
...
FossilOrigin-Name: d953646a63bf96a8e6e57fefaa60ae1487e5e4eb776fb38cd9c4ce002e74d016
2021-08-23 15:56:01 +00:00
drh
b9fd0101bd
Back out the change that allows typeless columns in strict tables. Replace
...
that capability with an ANY type for strict tables that will accept any
datatype with BLOB affinity.
FossilOrigin-Name: d8fd1a2bfd51848ea612142d23475b268b3f5269e558f2e09713d1ac18b18274
2021-08-23 10:28:02 +00:00
drh
2a0eefd665
Allow typeless columns in STRICT tables that are able to accept any
...
data type.
FossilOrigin-Name: 1e2dcc2d4ee88c0aed40d1472b1c7d43fd43822891729ad6a2c55d5b912e7ad7
2021-08-21 20:54:19 +00:00
drh
ce68b6bfeb
Defer deleting subqueries in the compound-SELECT code generator until the
...
end of code generation, in order to avoid deleting expressions out from under
the aggregation function sanity checking assert()s that occur near the
end of SELECT code generation. This fixes the assertion fault described by
[forum:/forumpost/cfcb4b461d|forum post cfcb4b461d].
FossilOrigin-Name: 600f1991e5c0a5d89cd8776a157b6fd72c7489791085876925e8dd7ab146fe1f
2021-08-21 16:42:58 +00:00
drh
8eaf6c620e
Improvement to error handling in Lemon. No impact on SQLite.
...
[forum:/forumpost/2f468f43cbc48d7f|Forum post 2f468f43cbc48d7f]
FossilOrigin-Name: 18cc2f85744a18b6810d30baebe07a7a1bd332348e13b1a50d779edc616fb0c1
2021-08-20 19:51:22 +00:00
drh
9135c8206e
Support for STRICT tables. A table with the STRICT option only allows a few
...
core datatypes on columns and enforces those types rigidly. Also, PRIMARY KEY
columns must be NOT NULL.
FossilOrigin-Name: f9c1d3441b87ee296542faa724410d16a348143cba24fe74292eefc48e038a55
2021-08-20 15:44:48 +00:00
drh
faf9c77b4b
Improved error messages for the SQLITE_CONSTRAINT_DATATYPE error.
...
FossilOrigin-Name: 39abca01479c0f4f747b7b21fa05181896b00ed7559f0ab74aa575c23097ac21
2021-08-20 08:05:42 +00:00
drh
7b4b74acc7
Do not allow the xfer-optimization to move the content of an ordinary
...
table into a strict table.
FossilOrigin-Name: 1ed1b594d3c03ced68eb2b1285dfd8b9641cda20db1b1b7ae1afee217a3a9fe2
2021-08-20 01:12:39 +00:00
drh
71c770fbda
Improved comments. Fewer opcodes for integrity_check on strict tables.
...
FossilOrigin-Name: 4ee57fb588b41ab76649c605f57c7bcf5b7b638435af458d69f69a8ccbb121e8
2021-08-19 16:29:33 +00:00
drh
9e1209d111
Enhance PRAGMA integrity_check so that it verifies the datatype of
...
all columns in STRICT tables.
FossilOrigin-Name: 97c9248b3b81facce569bfa3fb405d44a1d1041e87132e8f649458c95620ccb2
2021-08-19 02:58:15 +00:00
drh
ab16578b72
STRICT tables require all fields of the PRIMARY KEY to be NOT NULL.
...
FossilOrigin-Name: 5efdf9acad9d54783f5134b7e9338f44336862d87dc324d315b8d55e44df1923
2021-08-19 00:24:43 +00:00
drh
3b7a0ccd5c
Merge the WITHOUT ROWID, NOT NULL ON CONFLICT bug fix into the strict-tables
...
branch.
FossilOrigin-Name: 7ee01ee47da247a80bcf16f88eb187b8c0928024536435ed20797a1a90495511
2021-08-18 23:00:43 +00:00
drh
fd46ec6476
Fix ON CONFLICT clause processing for NOT NULL constraints of PRIMARY KEY
...
columns on WITHOUT ROWID tables.
Ticket [f2be158c57aaa8c6]
FossilOrigin-Name: 13abba0941a724eb62455650976b03678e4455b6b3090c84a2ab2f4a7656b4d8
2021-08-18 22:26:51 +00:00
drh
72532f52bc
Trying to insert an incorrect datatype into a STRICT table raises an
...
SQLITE_CONSTRAINT_DATATYPE error. Seems to work, though lots more testing
is needed.
FossilOrigin-Name: a19305e5cfedf5c472200d6e05c1396443e348f052a40a0979f860f2ff06851d
2021-08-18 19:22:27 +00:00
drh
44183f83d0
What would it be like if you could add the keyword "STRICT" after a CREATE
...
TABLE statement to cause the table to (1) allow only a few well-defined
datatypes, (2) rigidly enforce those types, (3) require NOT NULL on PK
columns, (4) always enforce foreign key constraint, and so forth? This
branch seeks to explore that question.
FossilOrigin-Name: 78732b9f98936693ae29c85a692c35a84c7d065aec79903af34b08d18f10a5e6
2021-08-18 13:13:58 +00:00
drh
b70f2eabb4
Rename the Column.eType field to Column.eCType - with an extra "C".
...
FossilOrigin-Name: b9b0dcd5af072c22f2ce71cf9584b5b572fbcfbce6410a7d703b586adb8938ba
2021-08-18 12:05:22 +00:00
drh
d519bbdf5c
Fix an off-by-one error in the error-handling logic of the Lemon
...
parser-generator. This does not affect SQLite.
[forum:/forumpost/cff80737bf|Forum cff80737bf].
FossilOrigin-Name: 7cca80808cef192fe0479477056a028e230a164fd368e72100def065d424ca2c
2021-08-17 19:59:09 +00:00
dan
0546027cd7
By default, do not use memory mapping to access the temporary files used for external sorts. The old behaviour (to use memory mapping by default) may be restored by building with SQLITE_ENABLE_SORTER_MMAP defined.
...
FossilOrigin-Name: 306694dfb462f9d1f128461e7a8f15a0bb9b21fbc696caa1832f4b20749490d1
2021-08-12 14:22:30 +00:00
drh
a76b151dab
During DELETE, if an index entry is missing, do not raise the
...
SQLITE_CORRUPT_INDEX error (added by [f339f31f9e9a856b]) if in
"PRAGMA writable_schema=ON" mode.
FossilOrigin-Name: 19e56291a7344c7aa69e2845f11cb865ee10a6b89a00bbe74b3babbeebe0357b
2021-08-11 18:43:54 +00:00
drh
df67ec08ff
Do not apply the push-down optimization to CTE subqueries that will be
...
reused in other contexts in where the same optimization is unlikely to
be valid. Fix for the bug reported by
[forum:/forumpost/d496c3d29bc93736|forum post d496c3d29bc93736].
FossilOrigin-Name: a7ce29a6ef2e0362bbc9b23719d936dce07209b2651153c774682f599bbd888e
2021-08-11 13:48:56 +00:00
drh
834c688171
Improved comment on the OP_OpenDup used to get a new cursor for a
...
reused materialized CTE.
FossilOrigin-Name: b1926cc0ab2b81c7df30c4baa6014efcfddb9631f6e46a55c1cec0113ee1afdc
2021-08-11 13:19:13 +00:00
drh
f9d349a80d
Fix a compiler warning in pcache1. Reduce the maximum size of a pcache1
...
cache to 2147418112 pages.
FossilOrigin-Name: 4bc93658aa563f2fa84f7f85f7f9f336dc80425640140c0fc2aec4a3606fad48
2021-08-09 19:54:27 +00:00
mistachkin
bdf15bbd62
Further improvements to the eOpenState bit values.
...
FossilOrigin-Name: d44f74f14a387960ce105913526b572f4a3d1935351c6aab10cee85946488a9e
2021-08-09 18:13:38 +00:00
drh
8a72882425
Ensure that the pcache1 cache size does not get so big that it overflows
...
the integer that is keeping track of the cache size.
FossilOrigin-Name: bf9d70fc2fde06a3f132270a26d4abe321687169066aff26ad9e92757c7f9ee4
2021-08-09 18:07:06 +00:00
drh
9d16fb1c09
Fix harmless compiler warnings and improve the presentation for the new
...
--threadsafe option to the CLI.
FossilOrigin-Name: 7929dc2f6f304b077c174d41711b49a24120adeb0b29cb6acb4d6a40852d7e00
2021-08-09 17:45:00 +00:00
drh
af6d1afd24
Undocumented "--threadsafe N" option added to the CLI for testing purposes.
...
One of SQLITE_CONFIG_SINGLETHREAD, _MULTITHREAD, or _SERIALIZED is called
depending on the value of the N integer.
FossilOrigin-Name: 2d8f297c115f378854c1f2198e47ac5af5f222a5de8cc7575c42154094e71b53
2021-08-09 17:37:58 +00:00
drh
c806917441
Improved Hamming bit-distance between the SQLITE_STATE constants.
...
FossilOrigin-Name: 5100b0456bc91f11e4a0bcf0d426ae4d8328cd9341ee2f9c83d0fa9f73047a83
2021-08-09 17:36:22 +00:00
drh
687d74dfcc
Fix comments associated with sqlite3.eOpenState. No logic changes.
...
FossilOrigin-Name: fd8f498f5d5f7fcb78dd8f6f9323d20b9e2904b249ec735477a0f03cb47b8561
2021-08-09 13:06:59 +00:00
drh
5f9de6ecf4
Refactor sqlite3.magic into sqlite3.eOpenState.
...
FossilOrigin-Name: e5d6512aa1fa0016a679c6e0cb665a0c67ad16f1daa0c18a96b2ebae1beefd15
2021-08-07 23:16:52 +00:00
dan
b419452c7e
Fix an RBU problem with restarting an update after the *-oal file is already larger than 4GiB.
...
FossilOrigin-Name: 087b8b41c6ed76b55c11315e7e95679d67590be20ae21108b593d00bb7d1c57a
2021-08-06 20:17:39 +00:00
drh
d519c03669
Attempt to fix the showwal.c utility program so that it works on WAL files
...
larger than 4GiB.
FossilOrigin-Name: 5c0f9ea98a2b944857fe05d53a0143cb827b7d8215c37f33f1bce47ec1189952
2021-08-06 19:38:23 +00:00