dan
1d4b16405b
Fix a problem causing the sqlite_master entry corresponding to a virtual table
...
to be removed by a DROP TABLE even if the call to the vtabs xDestroy() method
failed.
FossilOrigin-Name: 0140f6dbfbea93eadcd7f727d84064a0c0d1f0806dbe3e5ef1017da603157e3b
2018-12-28 17:45:08 +00:00
dan
eefc72d12f
Avoid an undefined left-shift operation in fts5 caused by malformed utf-8
...
text.
FossilOrigin-Name: c3a3a11194586bef80a9d7ca54caae8af30d4e7b464b8bb3d257ba2d2ec4791f
2018-12-28 14:33:55 +00:00
dan
666636b6de
Fix a buffer overwrite in fts5 triggered by a corrupt database.
...
FossilOrigin-Name: a385298df264dbfa6765f63ad8708f74bc8e8a1404239c1049890b39a1bda888
2018-12-28 13:57:30 +00:00
dan
b163b57212
Fix problems in fts5 found by ASAN.
...
FossilOrigin-Name: c564bf870106faef297594a51995619c80311d06bd5f8a0c7644f666f22ba576
2018-12-28 07:37:22 +00:00
dan
593c716781
Fix another problem with corrupt database handling in fts5.
...
FossilOrigin-Name: fb0d7fba07865ff557bfcdacfda7b625d099ac8b4dcbe0c08cd2d4b84a068bb9
2018-12-27 20:12:02 +00:00
drh
aa243aa7cd
Modify the btree02.test module so that it does not depend on whether TCL
...
interprets a value as a string or as an integer.
FossilOrigin-Name: d9e4f9574659c6285deba3dca68eca9989e615971cea3a901ffcda12fb4ee36f
2018-12-27 16:55:01 +00:00
dan
e80834f6ff
Fix another problem in fts5 caused by a corrupt schema record.
...
FossilOrigin-Name: ff45f9dd69fe1e1c7875e5bb73ac3dde2a31746475d3765cda9233f8e06e26ca
2018-12-27 15:36:16 +00:00
drh
57e141bc28
Fix the filename normalization in the dbtotxt utility program.
...
FossilOrigin-Name: 29a00a05dd40ff59be340969e1aca4fee41e092f2faa1cea85a3448265a83c2c
2018-12-27 13:52:45 +00:00
dan
cd80dc3667
Fix a null-pointer dereference that could occur in fts5 with a corrupt
...
database.
FossilOrigin-Name: b0a49d5e6df116bb5eacb60a0bb0f482760aec38bd417d4250d9e57d43bdbb13
2018-12-27 07:46:37 +00:00
drh
bdefaf08ee
Fix a problem in which nested CTEs with the same table name trick the
...
code generator into thinking they are the same CTE, which then tries to
use the manifest them both into the same transient table.
FossilOrigin-Name: 202dd033019dd27428e3cc5f6e164c95b37efe39e2753515112b201ddefca67b
2018-12-27 02:16:01 +00:00
drh
7eb2c9176a
In the treeview debugging output,
...
provide additional details for the Table object
associated with each FROM clause term.
FossilOrigin-Name: 11d4682d2eec133ccca99ca9cf2620cd249b4afe55918f3ebf93b454431f9c55
2018-12-27 00:30:42 +00:00
dan
f6febee0e2
Update the coverage-wal permutation to cover branches enabled by
...
SQLITE_ENABLE_SNAPSHOT.
FossilOrigin-Name: 6821c61f1d71be2be7f867e59fd94582a1eaf45a4d1fb88be995807a77cc22ea
2018-12-26 18:34:56 +00:00
dan
89dec01e48
Add a few more test cases to walvfs.test.
...
FossilOrigin-Name: 14a64df36efe0dc36795311d58385f9c65dc465b214059e07c2ee6b95ea99c87
2018-12-26 17:49:57 +00:00
dan
0f55a571fc
Avoid an "unitialized value read" problem in fts5 that can occur with a
...
corrupt database.
FossilOrigin-Name: 6cae81cd1ffb0180e0260d5ba921502c7dee2f54637bff3558a4d1cb5dfd3f32
2018-12-26 16:57:47 +00:00
dan
c2909bf8ac
Fix a problem with handling corrupt databases in the fts5 integrity-check
...
function.
FossilOrigin-Name: 9bad745d373f4686a2726c3f77a2ccad60e7181645d7ed483a2e43075a4ef30c
2018-12-26 16:04:54 +00:00
dan
d8f3b4c320
Fix a problem with corrupt fts3 database detection introduced by [95a9a39f].
...
FossilOrigin-Name: c80bb15b44e9b6a3c0c5a49d5e93e66376c3520ecefc1db7425c8a7e09d3eade
2018-12-26 14:15:09 +00:00
drh
8625221444
Fix a problem with the CSV extension when it uses the "header" option on
...
a real file.
FossilOrigin-Name: 7acaed08f946633fca3ab8434dd6349ea6f1bac4fd9ec21f476db013ee06de30
2018-12-26 12:50:47 +00:00
drh
e4c26c41b4
Fix a typo in a comment that is used to generate session documentation.
...
FossilOrigin-Name: a1f50d57ce76f6c08a0ddbdd3c3fe2732d0e57dda14cb9aa3da00a14ceb4bc44
2018-12-25 11:17:50 +00:00
drh
47df8a2c40
Increase the number of parameters to sqlite3WhereCodeOneLoopStart() to
...
encourage the compiler to inline that routine within sqlite3WhereBegin().
This gives a performance improvement.
FossilOrigin-Name: 3c2ad0e915e835b1cb2962879beff50b2745d0cefe1cfc89ef90b7879c139ce6
2018-12-25 00:15:37 +00:00
drh
bd462bcc10
Improvements to EXPLAIN QUERY PLAN formatting. The MULTI-INDEX OR now shows
...
a separate "INDEX" subtree for each index. SCALAR SUBQUERY entries provide
a subquery number that is related back to the .selecttrace output.
FossilOrigin-Name: 7153552bac51295c56a1c42ca79d57195851e232509f9e9610375692f48c7e86
2018-12-24 20:21:06 +00:00
dan
92107a38dc
Add a few more test cases to walfault2.test and walvfs.test.
...
FossilOrigin-Name: 3873941c4fb9aa2d0de1129722c5fcdf2be1ea261677d4841ed99f896c778459
2018-12-24 20:00:27 +00:00
dan
1ab76166e3
Change another fts5 assert() that may fail with a corrupt database to an
...
assert_nc().
FossilOrigin-Name: d9653380c455b4bf6c371540d677cbde6d17664c58662b5cc9a12929f46192dd
2018-12-24 19:59:37 +00:00
dan
76e4990b25
Add test cases to test file walvfs.test.
...
FossilOrigin-Name: d697f6f3ca47350dad30feb529914fc5254fa662ece783408eea963d912918c1
2018-12-24 18:51:13 +00:00
drh
c310c53e01
Always include OP_Explain opcodes in the bytecode when SQLITE_DEBUG is enabled.
...
FossilOrigin-Name: d8c1235c02b745138ac2b12e8bbb00dda4cac321176be92a2fa9547be029b3d0
2018-12-24 18:10:39 +00:00
dan
94e95ea46e
Copy some extra test infrastructure from the mutexfree-shmlock branch to trunk.
...
FossilOrigin-Name: 883337ffdb434b6856ceaada121c0be67e2fdec7b447675f45e85568ef28d7d9
2018-12-24 15:22:47 +00:00
drh
a599e150ca
Restore a line of code that was previously commented out for debugging.
...
FossilOrigin-Name: e53781f5bdf5c7b7d91ffe76565ea2fe5d1b3a9b162b3a88a7017bbe785d4c72
2018-12-24 14:30:11 +00:00
dan
29e9af8848
Change the way a comparison used to detect corrupt databases in fts3 is done
...
to avoid potential pointer overflow in 32-bit builds.
FossilOrigin-Name: 95a9a39ff784b960b62dd6298e722a620ba3f9c8b76839a49bbef35d7bc84a8e
2018-12-24 13:34:36 +00:00
drh
5198ff5767
Do not generate subroutines for non-static SELECT and EXISTS expressions.
...
Fix up some test cases to account for the minor changes in EXPLAIN QUERY PLAN
output.
FossilOrigin-Name: 06de44ec9e173992ca9afb89dd2b4e40d2a7e35512c7959603cdceb606f5dfbd
2018-12-24 12:09:47 +00:00
drh
efb699fc7c
Prevent the use of subroutines to implement the RHS of IN operators within
...
CHECK constraints.
FossilOrigin-Name: 6b24d3fb94e787d25e49501714780dfb0c0c99077102056aa68445f4808cdd57
2018-12-24 11:55:44 +00:00
drh
2c04131ca7
Experimental code that tries to put the computation of subqueries inside a
...
subroutine, and reuse that subroutine if the same subquery is evaluated more
than once. Current code does not work for CHECK constraints.
FossilOrigin-Name: 6c44838adbe5dc482bc010e91a6dd7a0f777c989f443dd600740d2c783208e0d
2018-12-24 02:34:49 +00:00
drh
85bcdce270
Split the code generation for the RHS of IN operators and for SELECT and
...
EXISTS expressions into two separate subroutines, because there is now little
commonality between those to functions. This is intended to help make the
code easier to read and maintain.
FossilOrigin-Name: 2b6494b1509f0d0189f98aa34c990eee99c775ff57826e79b2c5b0a12b4c97ad
2018-12-23 21:27:29 +00:00
dan
8d69a58119
Improve the coverage of wal.c provided by the "coverage-wal" test permutation.
...
FossilOrigin-Name: 6231485114eb07b258cd0e6e163ca05f7e9cf5664e071808fcb1329b33e4c4f5
2018-12-22 20:32:28 +00:00
dan
6a509d56bc
Catch another case of a corrupted structure record in fts5.
...
FossilOrigin-Name: fb17fea4b9779fbd3adb6ff9500da83a6ca4fa7cba379aa70074e4328814a7f2
2018-12-22 19:54:17 +00:00
dan
862faf28bb
Change a faulty assert() in fts5 that could fail on a corrupt db to an if() statement.
...
FossilOrigin-Name: 1daaba9fb46706af8ed0669a661c304df999a69cf639d29d93208f422c515d8c
2018-12-22 19:09:46 +00:00
drh
11d07ed643
Fix one more instance of excess whitespace in test result strings.
...
FossilOrigin-Name: c064964deb0b7220ba784f07ca9c603680f3c8bb936d56ab4eca1962beac1359
2018-12-22 16:14:45 +00:00
drh
3a07548b0d
Remove unnecessary whitespace from testcase result strings.
...
FossilOrigin-Name: ad70f03ceda74163903d247a975666b35fae722a27c48dd3efd31c1164b5627e
2018-12-22 15:46:23 +00:00
dan
b63d6070ee
Fix an assert() in fts5 that could fail with a corrupt database.
...
FossilOrigin-Name: 83935b950619855fb3bf05486091804ac2a61fb993c6ec826c89f943264fabc3
2018-12-22 15:21:31 +00:00
dan
634ac14488
Fix a "jump or move depends on uninitialized value" valgrind error that could
...
occur in fts5 when dealing with a corrupt database.
FossilOrigin-Name: 3518c09b944c92974939b1de244401afd34de5d9aa75050e5ad55581a94e1e71
2018-12-22 13:34:52 +00:00
dan
fb11bf8c91
Avoid a left-shift of a negative value (undefined behaviour) when dealing with a corrupt database in
...
fts3.
FossilOrigin-Name: b851d12474035328df8354c7da8d81bc78833c8c704153f9f573c19b47a8487e
2018-12-22 09:39:06 +00:00
dan
583521fbb0
Fix cut-and-paste error in test file fts4umlaut.test.
...
FossilOrigin-Name: cad5da1bf5f65ad87d97b72e9a84081fde455ba4085e79943fdf6c0144b1ef83
2018-12-22 07:16:42 +00:00
drh
9bfb079409
Do not all REPLACE to sneak a NULL value into a NOT NULL column. Detect that
...
situation and ABORT instead. Fix for ticket [e6f1f2e34dceeb1ed61531c7e98].
FossilOrigin-Name: db8d1d12f5c1673404b2afb5426d5ea3afe3b69d01f8f2bc47ffdf70684fdf24
2018-12-22 01:13:25 +00:00
drh
a42325e731
The OP_Eq and OP_Ne operators have a special P5 value SQLITE_NOTNULL that
...
asserts that the values are not null. Except that is not always true for
a corrupt database. Adjust the assert() and add a testcase() to make this
point clear.
FossilOrigin-Name: a3fdb2c78d23b94d68dc08126b22d03152ac6068496a42402cdfb336cd4a7e33
2018-12-22 00:34:30 +00:00
drh
a86c8ce940
Update the dbtotxt utility program so that it does not output characters that
...
are special to TCL, thus making the output of dbtotxt easier to insert into
test scripts.
FossilOrigin-Name: 48438bb35b48955a1df83ef90f0ef6c9cfed0b16d2e938f36d74ad9d53b4b5b4
2018-12-21 22:11:37 +00:00
drh
cde4bf8ba7
Improved detection of shadow table corruption in RTREE.
...
FossilOrigin-Name: b39bf4356e6bcf1d8442721d6cbbfe06caba01325104fb469da8fe69e1f623a2
2018-12-21 22:08:59 +00:00
dan
6ba81ef1bf
Add new sqlite3_prepare_v3() flag SQLITE_PREPARE_NO_VTAB, for
...
preparing statements that are not allowed to use any virtual tables.
Use this to prevent circular references in triggers on virtual table
shadow tables from causing resource leaks.
FossilOrigin-Name: da587d18575ac06a6b65fec1d106f0cc65bc10f493ca6c6b99117a2162d15a52
2018-12-21 20:18:06 +00:00
dan
deb201b866
Use SQLITE_PREPARE_NO_VTAB in rtree as well.
...
FossilOrigin-Name: 82a2ae7132964eab0dfad9a8314a399ffd3b72366b35e1767df6452125dd1d80
2018-12-21 19:55:20 +00:00
dan
38e3853240
Add tests for the use of SQLITE_PREPARE_NO_VTAB in fts5.
...
FossilOrigin-Name: 1999612010e310fc2430d1f00076f69fade0c66d202771dbb0f3d5597ac0a03c
2018-12-21 19:30:18 +00:00
dan
1ea0443c2d
Add new sqlite3_prepare_v3() flag SQLITE_PREPARE_NO_VTAB, for preparing
...
statements that are not allowed to use any virtual tables. Use this to prevent
circular references in triggers on virtual table shadow tables from causing
resource leaks.
FossilOrigin-Name: 25666e3d03950caf753295cdb55df162e07dbcf6840b05875c6e0b127c469ecb
2018-12-21 19:29:11 +00:00
drh
afdc9e23fc
In FTS3, avoid calling memcpy() with a NULL source pointer, even if the
...
transfer amount is zero bytes.
FossilOrigin-Name: 1abb83d29a06308c96bea379311b390240347c5f81824749348d18ad75840c96
2018-12-21 18:51:27 +00:00
drh
8bcc686614
The fts4umlaut.test module requires FTS5, so do not try to run it without that
...
module.
FossilOrigin-Name: dee3ae900129d39d69aff3ec6187376be100803ee6170bbf39529f37b4253260
2018-12-21 18:50:43 +00:00