Commit Graph

2683 Commits

Author SHA1 Message Date
dan
9d41af23a4 Do not use HIDDEN columns for NATURAL joins. Fix for [7c0e06b16].
FossilOrigin-Name: ab09ef427181130be09a087b7e572ad4cfb6b3e1b459769ee5ebf046b3ead682
2019-12-30 14:32:27 +00:00
drh
8d7f44c03a Fix buffer underflows in the zipfile extension associated with zero-length
or NULL filename in the ZIP archive.  But report on the mailing list by
Yongheng and Rui.

FossilOrigin-Name: 465a15c5c2077011befa854a77f9d295bb751ef20b7d2937ac0ba47cc84587c9
2019-12-27 00:19:53 +00:00
dan
e752040c09 Fix an assert() in fts5 that could fail if an xSavepoint() call on another vtab fails.
FossilOrigin-Name: a5d7f5d24a239f729de0b8aa5becf5af35ba87160565ee0713c335b8d1bbf12d
2019-12-26 14:36:31 +00:00
dan
4fcce747e2 Fix a problem causing fts5 integrity-check failures if numeric values are inserted into a table within a utf-16 database. Fix for [752fdbf6].
FossilOrigin-Name: bae060f382e4386c0793db4aa280fe9cd4893307d17a1801a17218ae4dc031c2
2019-12-24 20:51:01 +00:00
drh
a194d3152c Make the zipfile() extension function more robust against zero-length filenames.
FossilOrigin-Name: b9c2005f0291d58d7f3bfd4a2286eb6563e9c9433519c3329035f325fc723445
2019-12-24 18:53:13 +00:00
dan
3fee9de239 Fix another case where malformed utf-8 was being mishandled in fts5. Fix for [df46a6f3].
FossilOrigin-Name: 1c0a05b09a97e6e2e9b11c31ed6ec7e6484686614b587ebfd0cfe27d973ba461
2019-12-24 16:20:05 +00:00
dan
84d17bdaa7 Fix an assert() added as part of commit [a11b393dc] that can fail if fts5 database records are corrupt.
FossilOrigin-Name: 4630c1ec013a4c2e54a34c9a64b2c803ac3912450de660497eb34ee21c91f426
2019-12-24 15:35:53 +00:00
dan
c26e78d275 Fix a spurious report of corruption that could be made by the fts5 integrity-check in SQLITE_DEBUG builds if the fts5 index contains malformed utf text.
FossilOrigin-Name: a11b393dc2c882cf0b3c47c3405bf43ca1d6459605bd39cccce4d32da653a72d
2019-12-24 14:27:03 +00:00
drh
d8f2d46cbc Fix the zipfile() function in the zipfile extension so that it is able to
deal with goofy filenames that contain embedded zeros.

FossilOrigin-Name: cc0fb00a128fd0773db5ff7891f7aa577a3671d570166d2cbb30df922344adcf
2019-12-23 21:04:33 +00:00
drh
5f0dfc00de Thoroughly reset the rtree cursor at the start of each VFilter operation,
including clearing its cache.  This prevents left over pages in the cache
which can cause problems on shutdown after a LEFT JOIN.
Ticket [5eadca17c4dde90c]

FossilOrigin-Name: 4c50afafce8416369f89477ba7fe7d9b047399a5ee5754c73d0e67bbea8d877c
2019-12-23 20:41:39 +00:00
drh
192cf36de6 Remove an extra deflateInit2() call accidently left in
check-in [f5ee30426e8876e7]

FossilOrigin-Name: 953e6aa6d9ca09e549c88bc728c322fabdcef581f3b4a7763d95488dddbbd6a5
2019-12-23 20:07:28 +00:00
dan
7a1d7c3968 Fix "PRAGMA data_version" so that it works the same way with locking_mode=PERSIST and journal_mode=PERSIST configured. Fix for 7a458c2a5f.
FossilOrigin-Name: 45748e2db028ffbda5d3e747493721a5a89af3fbc06823081a2f27f570e40e73
2019-12-22 14:29:55 +00:00
dan
e88af0179e Fix a spurious report of corruption from the fts3/4 integrity-check triggered by using the languageid option.
FossilOrigin-Name: 70815e273f511481c310dc33b3b49079901d891078fad49b663fbce06c77ecc2
2019-12-21 20:43:34 +00:00
dan
879f1a1ea6 Fix a bad interaction between RBU and [df51ae19].
FossilOrigin-Name: 0b9d8a1202c4220fd2ef299b6194533c1bf4018a0cd2d13da7e22c1a7de05ffa
2019-12-20 20:03:21 +00:00
dan
42ae633ab9 Fix two more cases in fts5 where sqlite3_value_bytes() was being called before sqlite3_value_text(). Fix for e431c355.
FossilOrigin-Name: a1ba9a37d7a68a6d31f8197c6350589ebe6a12f4e3c193a178dd7ead8bcd565a
2019-12-20 19:41:01 +00:00
drh
b2ab3dcff0 Fix harmless compiler warnings.
FossilOrigin-Name: 2bbd014c900e0d71fd30ec647739b82c5dc3aa237a0203f5a1db50593dae199e
2019-12-20 14:08:34 +00:00
dan
73b21382d4 Ensure fts5 consistently calls sqlite3_value_text() before sqlite3_value_bytes(). This matters when storing blobs in fts5 tables within utf-16 databases. Fix for [cf36cb4e02].
FossilOrigin-Name: c16305eba0eb14368f2631b9a82b7eb4483c93f3b31257ee7c33f9b00c344379
2019-12-20 13:24:11 +00:00
drh
6ad0e25fa4 Fix the regexp extension so that it correctly translates all over-length
3-byte UTF8 sequences into 0xfffd.

FossilOrigin-Name: 3d4c0bf8904135fa68c75801bfa738715cacc3b19dc8ad6ef550b11798d4b121
2019-12-19 21:11:48 +00:00
drh
54d501092d Fix the zipfile extension so that INSERT works even if the pathname of
the file being inserted is a NULL.  Bug discovered by the
Yongheng and Rui fuzzer.

FossilOrigin-Name: a80f84b511231204658304226de3e075a55afc2e3f39ac063716f7a57f585c06
2019-12-19 15:15:40 +00:00
dan
5be1b20aec Fix problems in fts3 with processing corrupt records and undefined integer overflows.
FossilOrigin-Name: 3b873029ef1903f76442445343af3786cd59ee66b0e5e0e6b76a0b6b1b5eb88a
2019-12-14 14:15:21 +00:00
dan
db5ed35609 Avoid a buffer overread in fts5 that could occur when parsing corrupt configuration records.
FossilOrigin-Name: 355afd77df21a2265871ca6d075f26b1fa121c7c2682cf512281944ff0c2186d
2019-12-10 03:40:11 +00:00
dan
c19e22f397 Fix possible null pointer dereferences in the fts5_expr() scalar function.
FossilOrigin-Name: c5d44143599f3fe98492b2b900fa3d77925c7be545096251055ceeab899a41f1
2019-12-09 02:20:37 +00:00
drh
c7a046e282 Ignore type affinity for auxiliary columns in RTREE as it is too error-prone
to try to parse out the type from other constraints.
Ticket [8bf76328ac940d52]

FossilOrigin-Name: 7fa664ea0ea1e0283a9af50c9ff8dd360ee6042f9e491a136f53d9bcbbc9c7ef
2019-12-07 12:13:54 +00:00
drh
5102cf8df5 Early detection and reporting of too few columns in an rtree CREATE VIRTUAL
TABLE statement.

FossilOrigin-Name: ef73107f475e40e6bdd8b722e96992070f81fd2b7a3cb718ec8f251c89ca3e81
2019-12-06 19:07:44 +00:00
drh
0a64ddbe76 In the rtree extension, actively suppress extra tokens on the column names,
and be pedantic about column affinities.  Ticket [367a86e28859f1ff]

FossilOrigin-Name: 97fb5a72f91a44d579466e67c33aa862384c4d1c95c2010cf4ae9dbd172bbcfb
2019-12-06 13:10:29 +00:00
drh
e5748a5502 Further enhancements to RTREE, following up to check-in [f898d04cf272ef01]
so that constraints are allowed to be compared to strings that look like
numbers.  Ticket [aa573a787b8f1fdf]

FossilOrigin-Name: 32772dfd50b602c049d8c30bc28cde60a18b7495a997d728081f689ff417c956
2019-12-06 01:38:24 +00:00
drh
b6c947251b Fix to the rowvalue logic that avoids disabling rowvalue inequality
contraints on a virtual table when the virtual table sets the omit flag.
The logic has been incorrect since row-values were added.  However, this
does not come up often as very few virtual tables implement inequality
constraints using the omit flag.  Ticket [f096d191b6641daa]

FossilOrigin-Name: b7810062ec2489e1c5ca6638dbeb0892e4ce376c5c1834a31d1a332ebab8a871
2019-12-05 21:46:23 +00:00
drh
cb224ab139 Make sure the rowid of an RTREE virtual table has integer affinity.
Ticket [9fe487ba3c064b4e]

FossilOrigin-Name: 7ae8c0d52f6aa7f27537216f85456ef49dade040366cfb250c789206ecd4dc5a
2019-12-05 14:42:26 +00:00
drh
348d7f64f2 Be strict about type enforcement on rowid look-ups in the RTREE extension.
Ticket [30e2c183b6b356e4]

FossilOrigin-Name: d43e0efb9642037dd751cfed13438e71cfceb50e14a0ec603880c6c3be2e93b1
2019-12-05 13:34:13 +00:00
drh
674a9b3425 Enhance the RTREE extension so that it give correct query results even if
the query uses non-numeric constraints.  Ticket [a55ab6d97d01ecbc]

FossilOrigin-Name: f898d04cf272ef0130dcae146cb86d8630b10a6f19aecfc2fa70e97e082bd51c
2019-12-05 00:44:47 +00:00
dan
8aa706e748 Fix a buffer overread that could occur in fts3 with corrupt %_stat records.
FossilOrigin-Name: e01fdbf9f700e1bd9dd5283c65547d10d26ce4f4506d3cfef9e1087aecdc2305
2019-12-04 03:46:50 +00:00
drh
d79967adbe Avoid a harmless zero offset of a null pointer in FTS3, so as to not provoke
unnecessary warnings from run-time checkers.

FossilOrigin-Name: 85d95abec4a596eb3ffd2ea19b4067dc1a6970264222ed5d69e75764ac21597c
2019-12-03 03:31:11 +00:00
drh
2bbcaee833 Fix various documentation typos suggested by Mark Benningfield.
No changes to code.

FossilOrigin-Name: 08f09dc4f986a27f4e4e69f8226dbfaf0cfe1269cefc2830bf0fbef7b9bbda48
2019-11-26 14:24:12 +00:00
drh
51690f26bc Fix to check-in [5d9a369301a65f32] so that it compiles without SQLITE_DEBUG.
FossilOrigin-Name: fefe2d046725254367f9f82a8c8cb137e8b75dbbf4bc48debf0649479ff2f0c2
2019-11-26 11:10:59 +00:00
dan
597f1eb195 Fix an assert() in fts3 that could fail due to corrupt database records.
FossilOrigin-Name: 5d9a369301a65f320a0696fcf1f062ca5976ef34350590c07aecf5335c66d872
2019-11-26 02:03:16 +00:00
drh
0f31327eee Enhance the path arguments in JSON functions to access "#-N" array indexes.
FossilOrigin-Name: ffeec62cb5223ae70bc1889df4c0b241f5d17b1a10156362ca59953028741480
2019-11-23 08:51:21 +00:00
dan
7e88d6364c Fix a memory leak in fts5 error handling code.
FossilOrigin-Name: de6637e15d95b7aee2caea8b8d5b9865f276cbbf152ecf0401c4c7bfdf6dee6f
2019-11-23 08:36:35 +00:00
drh
5281864f0c Extend the json-path mechanism with array indexes of the form "#" or "#-n" for
some positive number "n", to reference the end of an array.

FossilOrigin-Name: 35ed68a651f4cf8740597433b0f1c3b345841868022e0904e9f342840ba0e502
2019-11-22 17:37:56 +00:00
dan
6637332988 Prevent direct and indirect recursive content= options in fts3/4 and fts5.
FossilOrigin-Name: 2eb997327c2c369c10b7835be80112d77cb2a7cfa9fe4d564042984c21d94698
2019-11-21 14:20:59 +00:00
dan
70d1a1a3ed Further improve detection of corrupt records in fts3.
FossilOrigin-Name: a0f6d526baecd061a5e2bec5eb698fb5dfb10122ac79c853d7b3f4a48bc9f49b
2019-11-20 13:31:52 +00:00
drh
594b124f21 Changes to extensions and test logic so that the build works with gcc
and with -std=iso9899:1999

FossilOrigin-Name: 2575a68c3965e72f2ab211d933012442755afe6a9b7de9e9e50cdd2155fd1ec8
2019-11-20 12:07:40 +00:00
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
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
mistachkin
b88eaf1619 Add header guard to the expert extension.
FossilOrigin-Name: 7e3151855fd4370fb7d4fff20516c2c2d1980134620df924106e6989bc130583
2019-11-13 18:50:36 +00:00