dan
4c7bdd1597
Fix a buffer overwrite triggered by a prefix query on a corrupt fts5 table.
...
FossilOrigin-Name: 1d8172a94bce2d067027685e5aa1dc8f5d5d55b5da0832ad2836f6939de68c8f
2019-01-23 12:19:22 +00:00
dan
ccfa550922
Fix a buffer overrun that could occur in fts5 if a prefix query is made on a corrupt database.
...
FossilOrigin-Name: 1abc4415648e69362061e9f9a4f2c1d419ba33801999b377650d8b9a4d2d3a7c
2019-01-22 21:17:40 +00:00
dan
8e4fe01dda
Do not run shmlock.test as part of the journaltest permutation.
...
FossilOrigin-Name: 5b7d0c784e6467154d9549af0163d788b69d5e5a6478a735834cdea945e7dbb7
2019-01-22 20:18:29 +00:00
drh
c5ea2d474d
Use _strdup() instead of strdup() on Windows builds of the CLI, to avoid
...
a compiler warning reported on the mailing list.
FossilOrigin-Name: a7126a4f4fb4e3e25be95d673323f835252bb2b427469616046a90b2acf64071
2019-01-22 16:44:59 +00:00
drh
f186f0b058
Fix the SQLITE_DESERIALIZE_READONLY feature so that it does not cause
...
an assertion fault in the pager.
FossilOrigin-Name: b9eccef7825c61980678599358b62bc394283124653061ce163ead0c653f481d
2019-01-22 16:43:47 +00:00
drh
178edcd774
Update dbfuzz2 to set a maximum database size of 100MiB by default, but
...
with the new --max-db-size N option to change that limit.
FossilOrigin-Name: 21d6bb78ef2979d011b917d2d6519d7cd0009fcad83ed23ab2e9a5e02d8e51ab
2019-01-22 16:11:31 +00:00
drh
6ca644818b
Enhancements to deserialize: (1) Add the SQLITE_FCNTL_SIZE_LIMIT file control
...
to set a maximum size for an in-memory database, defaulting to
SQLITE_MEMDB_DEFAULT_MAXSIZE or 1GiB. (2) Honor the SQLITE_DESERIALIZE_READONLY
flag. (3) Enhance the TCL interface to support -maxsize N and -readonly BOOLEAN.
(4) Add the --maxsize option to the ".open" command and on the command-line for
the CLI.
FossilOrigin-Name: 30f08d58882819a69e353bcc1b6b349664bbfbe00aa1c115ba44a9fd899fcc5b
2019-01-22 16:06:20 +00:00
drh
247c1b4a0b
Make sure cursors are opened on all indexes for an UPDATE OR REPLACE
...
regardless of whether or not the indexes are partial or contain columns
that might need to be updated.
FossilOrigin-Name: e148cdad35520e6684cfeba23b003f60b55f83a6bf621aff16be8aa5612cdcee
2019-01-22 13:45:48 +00:00
dan
2c7a73eaea
Fix another segfault caused by a corrupt fts3 database.
...
FossilOrigin-Name: ba3b8412726548a0716c1a2d67260c3b7e31956474f4cd4ce607cf2cebc667dd
2019-01-22 12:21:28 +00:00
drh
9b13365bba
Ensure that a key comparison does not read a collating sequence past the
...
end of the KeyInfo, even if the key field of an index is corrupted by having
a string in the last column instead of the ROWID.
FossilOrigin-Name: 058a8006dceda78a894ea9446f057aa60b6d38e96506d4d91bda0ee2f9314ba3
2019-01-22 02:34:35 +00:00
drh
87c3ad4537
Enhance the btree search routine so that it does early detection of
...
impossibly large keys and thereby avoids a large malloc() call.
FossilOrigin-Name: 3ecaaee69f49e43d38047b7d53b82689eba7f7d33541fcac3c32b6dc8a568458
2019-01-21 23:18:22 +00:00
dan
129371553c
Avoid deferencing a freed pointer following an OOM or SQLITE_CORRUPT error in
...
the fts3 xDestroy method.
FossilOrigin-Name: 505ed9a47825240979338a24044559613fbbd2a7850bdff70c7164da054ec63d
2019-01-21 17:57:31 +00:00
dan
ac30553f76
Remove a faulty assert() from fts3.
...
FossilOrigin-Name: 6c33a303ebbb0f5193ead535280ba63118e14fb4f9977ce80dc716a0b082ec99
2019-01-21 16:12:20 +00:00
drh
e6c628e98c
Make sure the extra bytes allocated for the saved cursor position by
...
check-in [160b1e31c0f27257] are initialized to zero.
FossilOrigin-Name: 2737564929e86ead84a3ff6512369268198d38b46e3e02866f8ce34babc76cb9
2019-01-21 16:01:17 +00:00
drh
50b910a8b5
Add the --memtrace option to the CLI.
...
FossilOrigin-Name: a1e12fa2a8eb5648a96cc2d8d39899d6f87c5e2269cec7de486964c8b915e724
2019-01-21 14:55:03 +00:00
drh
7c04c69204
Minor fix the fallocate.test module change from [7cd56cad5efead5]
...
FossilOrigin-Name: 94fb7a47003c3c1a52e833e98d27399cfec5382afde2b3990e8223c8bff7cfa0
2019-01-21 14:49:14 +00:00
drh
5976552a72
Add the --max-data and --max-as options to dbfuzz2. Also cause dbfuzz2 to
...
show its maximum RSS size upon exit in standalone mode with the -v option.
FossilOrigin-Name: 7ce93e824a954d1e0cf8d7343e59a2660175f42bd4dac02aed8ad77644e7eb2f
2019-01-21 13:47:55 +00:00
drh
8ed07d1274
Add the --max-stack option to dbfuzz2.
...
FossilOrigin-Name: c11ae4fed89484f0a0061002861b5d599bbda8e40a1f0c33fdbe8cb072134d5c
2019-01-20 00:03:59 +00:00
dan
27a037354c
Avoid a division-by-zero error in fts5 caused by a corrupt database.
...
FossilOrigin-Name: 928e622178bd004be52b2271ac554176aebe9d6e115ecac4e7072eccbb4262b5
2019-01-19 15:55:27 +00:00
dan
b8852ae083
Remove a broken assert() triggered by a "PRAGMA max_page_count = N"
...
invocation, where N is larger than the number of pages in the database image,
but smaller than the number of pages in the database file.
FossilOrigin-Name: 7cd56cad5efead5097e9918c87313bb46e583fe62bae0df1be60e10117e2c3cb
2019-01-19 15:27:09 +00:00
dan
93b6c1666d
Fix a problem with using ALTER TABLE to rename a table or column when the
...
database schema contains a trigger or view that itself contains an expression
"<column> AND 0".
FossilOrigin-Name: 908ff7fffa302255a74e2334ca3a1779ed43acb0268fce5a83a56fd16794dc88
2019-01-19 14:07:37 +00:00
dan
225b05795f
Fix a memory leak introduced by [55c5d72a].
...
FossilOrigin-Name: fbd681dce2905d8b8ad7948ba684b0b62d6c04be0f7a2992ee7d6836a99010de
2019-01-18 21:17:08 +00:00
dan
6e0a75a2b8
Fix a crash in the fts5vocab module caused by including a "term < NULL" term
...
in a WHERE clause.
FossilOrigin-Name: 9e717c4377c0116a5d36815fbc30f8b8803f14770d30be361feb27cc5b5b537b
2019-01-18 21:12:32 +00:00
dan
a86b20820d
Fix an infinite loop caused by a corrupt database in fts3. Also an undefined
...
left-shift in fts5.
FossilOrigin-Name: 55c5d72af9510e2f27c33544d804a58d4282b0efb384ead38484129ce91b574f
2019-01-18 21:03:15 +00:00
dan
4c1c79035f
Avoid passing a NULL pointer to memcpy in fts5, even if the database is corrupt.
...
FossilOrigin-Name: acccc9808f52009b2c7794770c8b7efe2ce861fa184d32e287e7114c74e2b522
2019-01-18 20:15:02 +00:00
drh
d00ad9a656
Typecasts added to the GeoPoly extension to avoid harmless UBSAN warnings.
...
FossilOrigin-Name: a1f6a093ac4a2de8c5b02c30fe57e09770460fd5bdddfe9c7a9a24fb83a6b491
2019-01-18 19:33:56 +00:00
dan
451297752c
Fix problems causing undefined left-shift operations in the fts3 snippet()
...
function.
FossilOrigin-Name: b90dbaed3092236e97f9796fa63989a3648060e16189e1267c430f4a7e799fac
2019-01-18 19:26:48 +00:00
drh
ed968fa4cb
Avoid integer overflow when computing the array of a bounding box with
...
the rtree_i32 virtual table.
FossilOrigin-Name: b352f1590d20a574b0681e011ececcf4f41fa5b157503d330e03939404aca0e9
2019-01-18 18:52:17 +00:00
drh
e3b89d2c5f
Handle oversize floating point values carefully when converting to integers
...
for the '%' binary operator.
FossilOrigin-Name: 048add13fc10e69ae504a49c4663612381d928b2cf1f9cdab4ff34bd40f601a3
2019-01-18 17:53:50 +00:00
dan
0e14e98706
Fix a fairly obscure problem allowing an "ALTER TABLE RENAME col TO ..." statement to modify the schema in such a way as to break a reference within a trigger program.
...
FossilOrigin-Name: 64bec9e6214c6932fab5a3fb8c569ae14cd2d603bd0f8b26104815c3bb9d396a
2019-01-18 16:06:18 +00:00
drh
3cb79202f8
Use the full 64-bit integer value in the argument to randomblob().
...
FossilOrigin-Name: 05df5f7aeaf2132810452e8871132d1e66650a841991cb2a9ce32f2d03e20bf4
2019-01-18 14:53:15 +00:00
drh
21908b2166
Disable the xfer-optimization if the two tables have the same root page
...
due to schema corruption.
FossilOrigin-Name: f31b3bd2a6a8aa35a6454f37f3a4b4595e2ad74256cd180439019ab4c6c2059e
2019-01-17 20:19:35 +00:00
dan
934d4f7bac
Fix another corruption related crash in fts5.
...
FossilOrigin-Name: 4538d9afe4e6360e20c7b474e77314e5ad293453e1edbe356bf6ea84c05857ee
2019-01-17 20:06:56 +00:00
drh
aa0f2d0efa
Add the SQLITE_ENABLE_EARLY_CURSOR_CLOSE compile-time option which causes
...
read cursors to be closed after their usefulness ends during a two-pass
UPDATE.
FossilOrigin-Name: 7def6c8edd85f19ee09038e01541f75b1f71ca39b9fb782b8f0fcac89207c353
2019-01-17 19:33:16 +00:00
dan
f66da6ce8e
Fix a buffer overwrite that could occur when running an fts5 prefix query
...
against a corrupt database.
FossilOrigin-Name: 3910b5639d5c96d1840d4feeea64d3a55073531b7365a4e75d9cda6f119f3cfc
2019-01-17 19:11:10 +00:00
dan
25fb50674f
Fix problems with joining two or more fts5_vocab tables that access the same
...
underlying fts5 table.
FossilOrigin-Name: 49956395e14b61f6bf839e59ae7dd95eb32ebf32f3d16388844de6621b9c2d98
2019-01-17 17:39:15 +00:00
drh
29c992cb04
Revamp the SrcList allocator routines to be methods of Parse instead of
...
being methods of the "sqlite3" object, so that they can leave better error
messages when the SrcList object grows too large.
FossilOrigin-Name: df08d472b090b212fb77ce2aae0e1ffe79ae5db4b1accf55e6fdb18e8b0a7098
2019-01-17 15:40:41 +00:00
drh
0ad7aa8182
Limit the size of SrcList objects to 200 entries (compile-time configurable
...
using -DSQLITE_MAX_SRCLIST=n). The maximum number of tables in a join has
always been 64, so this is not a real constraint on capability. Limiting the
size of a SrcList prevents DOS attacks (discovered by OSSFuzz) using crazy
nexted CTE joins.
FossilOrigin-Name: 7cac614d5df55eb092b863163483b6782b942b21bd15fd787576fef5619fa849
2019-01-17 14:34:46 +00:00
drh
04fcef00ee
Fix a corner-case for the logic that cause an insert of a NULL into an
...
INTEGER PRIMARY KEY column to be converted into a valid integer key,
when the NULL results from a CASE expression that lacks an ELSE clause.
FossilOrigin-Name: 9a425051e7ba59e797636f5cf32b5f6efafdb21c8d5300e099b8008b829c1439
2019-01-17 04:40:04 +00:00
drh
30fdb45da0
Ensure that the variable-length integer decoder in FTS3 never tries to
...
left-shift a negative number.
FossilOrigin-Name: 10ffc1fe006a1766ff2f1ffc6129786afb86b6b1f8d3a17334e8ecb838d37b9c
2019-01-17 03:43:38 +00:00
drh
f20bbc5f69
Fix a failure in sqlite3ExprCompare()
...
FossilOrigin-Name: 835e2cc55feea2f2426c99816c27f9c35d2fd4cdd9bf1c7f46f889ecfd222778
2019-01-17 01:06:00 +00:00
dan
8b20e4a3eb
Fix a problem with fix [b4b57413].
...
FossilOrigin-Name: ca7b7aaed010ec67bec5355a9ac1d7f229d6d5f2ba2d796b76f5e908b1267688
2019-01-16 20:48:13 +00:00
dan
e011ee2830
Fix a problem in the fts3 matchinfo() function with corrupt database handling.
...
FossilOrigin-Name: 24ed5fb6aea30b098d2faf3cf9d638933e518657217e903239ffaa1e25d34f66
2019-01-16 19:44:09 +00:00
drh
375afb8bda
Fix a problem in the code generator for sorting results with SRT_EphemTab
...
and a LIMIT clause.
FossilOrigin-Name: 49fcde2f1f981ac0c75728bed3444e7c1d3167311db282d3375c96ce090b2210
2019-01-16 19:26:31 +00:00
dan
5e970a8f40
Fix a problem with renaming a column that is used as part of an ORDER BY on a
...
compound SELECT within a database view or trigger.
FossilOrigin-Name: b4b5741366578b25ec6e4c415ab8239215e53b1c900be613575f40a826cfccc9
2019-01-16 14:58:37 +00:00
dan
fb8ac325d7
Avoid a dangling pointer comparison when renaming a table that has a trigger
...
that itself contains a window function with an (illegal) column reference in a
FOLLOWING expression.
FossilOrigin-Name: d45bee36f2c1091a2d32c16ca8921bf4e7c9e40c46d0a36fbcb179ecfafcfbf0
2019-01-16 12:05:22 +00:00
dan
4ccb41fc99
Fix a memory leak that could occur in fts3 when handling a corrupt database.
...
FossilOrigin-Name: 65cebb06a0afcbcb4157c3d518a62ed188b1e90d9e9b69d88fece484bcb6e380
2019-01-16 11:38:06 +00:00
dan
dfb5c963a0
Fix a problem with ALTER TABLE and vector assignments in UPDATE statements
...
within triggers.
FossilOrigin-Name: cc6cd7531fee39b4c2a9f522f1089c1d79254a9e25acae59468322031f94c25a
2019-01-15 20:51:35 +00:00
dan
1a39d2bb5c
Handle SQL NULL values without crashing in the fts5 snippet() and highlight()
...
functions.
FossilOrigin-Name: a5e9cc794f17566160c4b2b5791601a744a21ace987b19ff8a5816fd78dce56a
2019-01-15 18:14:27 +00:00
dan
a783931794
Fix a buffer overread in fts3 caused by a corrupt record.
...
FossilOrigin-Name: e54efd60c20bbfc5d70ddb9e1dd6ffb68cbbcfa57b4f07cb104767ef08c1a559
2019-01-15 16:14:31 +00:00