drh
804725a6b9
Improvements to detection of corruption in the %_stat shadow table of FTS4.
...
FossilOrigin-Name: 6b67eba54e7b4887a8cdab7537b12a95e9f17bcdaa0b423af5ed5bd91f69f2c6
2019-11-18 14:04:21 +00:00
drh
13a8f203d9
Further improvements to shadow table corruption detection in FTS3.
...
FossilOrigin-Name: e35d8c76aae59f57cc5193f79b21b4298029bea78e1aab7af67432162ce63e00
2019-11-18 12:04:17 +00:00
drh
3e72bdb5fe
Detect and prevent infinite recursion in fts3SelectLeaf() due to a
...
malformed FTS3 btree.
FossilOrigin-Name: dfcf081d842629a0b177be7eb2eb8ce719324068991040a581e33ea1d5db3d27
2019-11-18 11:14:59 +00:00
drh
19d4175d65
Improved detection of corruption in the %_stat table of FTS4.
...
Chromium ticket 1025467.
FossilOrigin-Name: 10f8a3b718e0f47be528fba086c318e1dfe18ead383d01cfa24dedabad41e0a2
2019-11-18 10:37:57 +00:00
drh
ac801803a5
Fix an assert that can fail if the schema is corrupt.
...
FossilOrigin-Name: ed57c48e4bb337810521bda2da79614313e4835a317ca4eadb52bd67e4eadf98
2019-11-17 11:47:50 +00:00
drh
feb5dcf1a6
Better detection of corruption in the %_stat and %_docsize shadow tables
...
of FTS3.
FossilOrigin-Name: 1e449687881f4d388e54a0e51bcabba41ab10cf7e596ff65e31e88a23c70d497
2019-11-17 02:41:06 +00:00
drh
fd6bf04bba
Remove a reachable NEVER() in FTS3.
...
FossilOrigin-Name: 8bd75bf636f72f32d66c6c38e1918f27daf2f13290f00a001f41d50838bbda47
2019-11-17 00:08:24 +00:00
drh
c72f2fb7fe
More improvements to shadow table corruption detection in FTS3.
...
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
2019-11-16 23:47:40 +00:00
drh
94febb3a77
Improved detection of corrupt shadow tables in FTS3. Enable the debugging
...
special-inserts for FTS3 for both SQLITE_DEBUG and SQLITE_TEST.
FossilOrigin-Name: 04b2873be5aedeb1c4325cf36c4b5d180f929a641caf1e3829c03778adb29c8e
2019-11-16 21:40:49 +00:00
drh
3a5f9bc49c
More restrictions on changes to shadow tables when in defensive mode.
...
FossilOrigin-Name: bae76a5c40703871e5ce4cd23d6fae5a3836606f524a63b01ac828c7a602c5e9
2019-11-16 16:54:53 +00:00
drh
527cbd4a10
Do not allow CREATE TABLE or CREATE VIEW of an object with a name that looks
...
like a shadow table name.
FossilOrigin-Name: 6aef58b629d89955f85f65191ba2be67b2adfac4f0327fe9a7141cb2705dbc00
2019-11-16 14:15:19 +00:00
drh
070ae3beea
Break out the test for writable shadow tables into a separate subroutine.
...
FossilOrigin-Name: 8ad34d36a141fa8f5d9bd784dfeb892c983897a6dc6b867607cc668508acf944
2019-11-16 13:51:31 +00:00
drh
d0c51d1a04
Do not allow shadow tables to be dropped in defensive mode.
...
FossilOrigin-Name: 70390bbca49e706649ca5b7c031f0baf416fc38798c17e5f3b73746b3e66e3b5
2019-11-16 12:04:38 +00:00
drh
47bcc34271
Fix a potential NULL pointer dereference on a RENAME TABLE that references
...
a VIEW with a logic error in a window function in the ORDER BY clause.
FossilOrigin-Name: 0adb273f7e7671efb0e0a1619887e369500dfd2db7ef1b1e125c2414ea96e96f
2019-11-16 11:33:39 +00:00
drh
5710f1ad48
Modify three test cases so that they work even with unusual versions of the
...
library printf().
FossilOrigin-Name: 8f4a3750b7d272daf96831655ffee80d457875ee121fc4537008046b9a00d0e7
2019-11-15 21:16:34 +00:00
drh
8103a03607
Fix table-valued functions so that they will work as the right table
...
in a LEFT JOIN. Ticket [2ae0c599b735d59e]
FossilOrigin-Name: 2c35d3f67b67a53ead08b1c395e7ca8e5bf65f94a5a962a0562994a3c66c95d9
2019-11-15 00:52:13 +00:00
drh
195a843691
Add support for the sqlite3_hard_heap_limit64() interface and the
...
hard_heap_limit pragma.
FossilOrigin-Name: 6399c47ea89c5766274bd6abdc9b6a85fe5b7f6c1078972c2f58e624bae59b7c
2019-11-14 18:07:28 +00:00
drh
31999c5cac
Fix a bug in the hard_heap_limit pragma so that it returns the new value of
...
the hard_heap_limit, not the soft_heap_limit. Change SQLITE_MAX_MEMORY so
that it works by setting the default hard_heap_limit value.
FossilOrigin-Name: 33fd0c3abcad5555a150990a22d9c1bab99e79be01143fccb9fafc9b52cf92c8
2019-11-14 17:46:32 +00:00
drh
803f06bf62
Merge recent enhancements from trunk.
...
FossilOrigin-Name: b8a631fd30d0732505679230684b3362c965438197a2b11518f01a77599c9202
2019-11-14 15:21:15 +00:00
drh
39d1a2a100
Minor documentation enhancements. No changes to code.
...
FossilOrigin-Name: 6153f3aada0cc9c5e773753797892ee78b518b0d76568382f5fbc9ee960f814c
2019-11-14 15:10:48 +00:00
drh
01d1801cab
New test cases added to fuzzdata8.db.
...
FossilOrigin-Name: 5baffcda7d5a42a99fa905faa834f14b94b1e2a26b5221f15d8ae8f1f5e3236a
2019-11-14 13:57:15 +00:00
drh
ba01634cd3
Ensure that the same subquery does not go through the window-function rewrite
...
more than once, even when that subquery is part of a virtual table constraint
that lacks the omit flag.
FossilOrigin-Name: d0bc7db6b0a53edc04815622c46250d26f526f56e59f14875f4e18c75b49000d
2019-11-14 13:24:04 +00:00
mistachkin
b88eaf1619
Add header guard to the expert extension.
...
FossilOrigin-Name: 7e3151855fd4370fb7d4fff20516c2c2d1980134620df924106e6989bc130583
2019-11-13 18:50:36 +00:00
drh
dbf1c4ba8a
Fix the sqlite3TreeView() output to consistently use a colon and not a
...
comma after the table number in the AST dumps.
FossilOrigin-Name: fa2416f623d83fe93253137302a74fcd6cdd041da337a0756df344d7d09a19f5
2019-11-13 16:50:06 +00:00
drh
d2c40e9310
For for the previous check-in: Always enable the nUri variable, even
...
when debugging is turned off.
FossilOrigin-Name: f84a15394c369cbdb6fba87c603a609722cf1f499626c7f20699060273ab5081
2019-11-12 16:21:27 +00:00
drh
746461f1b8
Ensure that the main filename and the journal filenames in the pager
...
object are all correctly double-zero terminated.
FossilOrigin-Name: df51ae19c1aa4c26f2dcd427eddc1c9cc24b698e1ab0a948b198a57432e25e1e
2019-11-12 14:43:47 +00:00
drh
4c8056079f
Remove a harmless unused variable.
...
FossilOrigin-Name: 28091a48aa6994f8d7c142b5851bcd6b4e9a93a7bbef6c927a6182d24f3245b4
2019-11-12 03:45:23 +00:00
dan
a3b75e982a
Remove an asm() block from build tool mksourceid.c, as it causes build failures on some systems and performance is not important at build-time.
...
FossilOrigin-Name: 8e100e6c35c30e0d7e4014b9435f81f9f61ddab2386dfe9a4218d8190a6da3be
2019-11-11 15:13:11 +00:00
drh
48eb03bd0e
Proper surrogate pair decoding added to JSON functions. See the mailing list
...
bug report and [https://bugs.python.org/issue38749 ]. More test cases
needed here, but it seems to work so far.
FossilOrigin-Name: 51027f08c0478f1bf9d7545d9e268c772c0a5cd5dda4b03d78f16c7d94f2f50d
2019-11-10 11:09:06 +00:00
drh
9576802dba
Remove an incorrect ALWAYS() macro.
...
FossilOrigin-Name: f7a74f89dbd58b47bbcb58ea2af71fbe1eb5ec2dbe36d90685c39cb28ecf5250
2019-11-10 10:08:03 +00:00
drh
12bf712707
Change the COLFLAG_NOTAVAIL bitmask so that it fits in the single-byte
...
Walker.eCode field.
FossilOrigin-Name: 53847f5c28bdecfbc7b08685d4dcd0565526f6191491b4827c3c966a4b8d4a85
2019-11-09 15:31:34 +00:00
drh
675f73bcab
New dbsqlfuzz test cases added.
...
FossilOrigin-Name: 18c3a17dc8c07b12427e372ff86668d5bcb6b34d653c46c48561ed576acefa5b
2019-11-09 14:44:18 +00:00
drh
46a31cdf6b
Make sure the WITH stack in the Parse object is disabled following an error.
...
FossilOrigin-Name: de6e6d6846d6a41c4821454dfdc042096234df753be08c5567b79fe535d9b6ea
2019-11-09 14:38:58 +00:00
drh
ff1032e5c2
When a virtual table reports orderByConsumed, that tells us nothing about
...
whether or not the SQLITE_DISTINCTBY constraint is met.
Fix for ticket [7e59041f9c4e5102].
Test cases in TH3.
FossilOrigin-Name: b59f94e4da9b1653f2004b214407a50340dd476b27e6ec7e29e501a95db9c963
2019-11-08 20:13:44 +00:00
drh
1e7c00e695
Fix the xferCompatibleIndex() function so that it recognizes that a PRIMARY KEY
...
index for a WITHOUT ROWID table is different from a UNIQUE constraint index
on the primary key. Ticket [302027baf1374498]
FossilOrigin-Name: 34f64f11ca481996b1ff1686bdc5e278946635b6856cd1fe2355fce8e298e0f8
2019-11-07 14:51:24 +00:00
drh
4e8e533bf7
Restore generated column loop detection logic that was incorrectly removed
...
from the previous check-in [9e07b48934e9a972]. This fixes ticket
[299b50ba812d8e54]
FossilOrigin-Name: 104a2beb57037f9353ffa77096aae0eb64e4682e667f31623bfd3d064dd8d881
2019-11-07 02:32:54 +00:00
drh
dfa15270c4
Change the way generated columns are computed so that no column is computed
...
inside branch code that might not be taken. Ticket [4fc08501f4e56692]
FossilOrigin-Name: 9e07b48934e9a972dcf62e3538b3b21ffa044c553feba0441675ac0bbe13bcb2
2019-11-06 22:19:07 +00:00
mistachkin
bde3a4f680
Minor simplification to the changes from check-in [36c11ad51f].
...
FossilOrigin-Name: 7bc8205dd9c1657c736a9c6a1a90dd9dad442accfbb77d296eaae2c09ab46bd1
2019-11-06 19:25:45 +00:00
drh
4fb24c82cd
Fix the OP_DeferredSeek index-to-table column map in P4 so that it works
...
with generated columns. Ticket [ce22a07731530118]
FossilOrigin-Name: 36c11ad51fe9ab1bde0b98d0ea9b8588e07d168cd8027486749372894941ad93
2019-11-06 17:31:18 +00:00
drh
b1129c423f
Fix the handling of NOT NULL constraint violations for generated columns in
...
a REPLACE statement. Ticket [2399f5986134f79c]
FossilOrigin-Name: 77b1c90add514050fe62f22751362fecacd99f9775346cffc60e09c326e64e10
2019-11-06 14:49:43 +00:00
drh
06fc24555f
Changes an unreachable testcase() into an assert().
...
FossilOrigin-Name: 5710845b6314f924b490434b4446169f4bb50576aaa940472af68150db16e127
2019-11-04 12:49:15 +00:00
drh
6c68d7592f
Fix a false-postive in the sqlite3ExprImpliesNonNullRow() decision routine,
...
that resulted in an incorrect LEFT JOIN strength reduction when the
WHERE clause contained a row-value comparison.
Ticket [02aa2bd02f97d0f2]
FossilOrigin-Name: ea20068e6d97c9349ebcc7d0a01e99ebf08c6f44363f71a0218a1abea209adc5
2019-11-04 02:05:52 +00:00
drh
db535390db
The optimization of check-in [9b2879629c34fc0a] is incorrectly reasoned.
...
The WHERE clause of the partial index might not be true if the table of
the partial index is the right table of a left join. So disable the
optimization in that case. Ticket [623eff57e76d45f6]
FossilOrigin-Name: 3be19e1151af1850b65991edb82420f9412a7798dd756c86eaa9ffdde573263a
2019-11-03 00:07:41 +00:00
drh
0383661414
Fix a problem in VIEW creation that was introduced by the generated columns
...
feature.
FossilOrigin-Name: 9c795c4d2b042d2932774bd1274fa0167ca2dc9838e127e0cf31eb9273a32f2c
2019-11-02 17:59:10 +00:00
drh
089c4bc2e2
"STORED" is not actually a keyword. The parser looks for STORED as an
...
ordinary identifier.
FossilOrigin-Name: 167cd574d6a1d4fe2253f5bc5aaa7b031cbc82853e4d33b8d9b72eaf049003d4
2019-11-02 13:45:03 +00:00
drh
39b30a7d6b
In sqlite3GenerateIndexKey(), do not attempt to reuse column values from
...
the previous index if the current index is a partial index as the partial
index test may have corrupted those values. Ticket [a9efb42811fa41ee]
FossilOrigin-Name: 17e9f65814264de9c35bc5ba94e0a66fbbf1200c00d33ab9a19a0b6f92bc685a
2019-11-02 13:32:50 +00:00
drh
978256f3d8
Restore the on-line ".help" for the ".explain" command in the CLI.
...
FossilOrigin-Name: 28b8f1036d569bccce56b4e7042348024b5dd1ffa04850cbeddab1e35c49e5b7
2019-11-02 00:00:14 +00:00
drh
9c6a92982f
Fix a harmless compiler warning.
...
FossilOrigin-Name: f0ebea35d9d6b69a7bb4242fb79ff3db4267e429855fa6969f9f52ffee1c7a99
2019-11-01 18:52:09 +00:00
drh
bc4974c81b
The SET DEFAULT and SET NULL conflict resolution actions for foreign key
...
constraints should cause an error when they appear on a generated column.
FossilOrigin-Name: b47513d2b32b61ba42c1e9b59287d28f6fee231e6c65de2a3aa19effbbaf1e7f
2019-11-01 17:31:27 +00:00
drh
f2b9d7c605
Fix a potential use-after-free bug that follows an OOM error in code
...
added two days ago by check-in [84e02d773d60cffe]. Problem discovered
by OSSFuzz.
FossilOrigin-Name: 0a2eb949f8a759e5745d9468c8183d3c0b4b30e0fa2a14b3062620eb9e1d5c1d
2019-11-01 16:37:53 +00:00