Commit Graph

14678 Commits

Author SHA1 Message Date
dan
23fda8242c Further tweaks to main.mk so that fts5 builds as part of testfixture.
FossilOrigin-Name: 97e11b79a52fb1c57f0afd2dbd6ee66cf00a922d
2015-10-08 21:00:46 +00:00
dan
56eac26897 Fix further fts5 compilation issues.
FossilOrigin-Name: 0d7f301fb03c8546a5dbce5d061a1d74e3c86bcf
2015-10-08 20:40:18 +00:00
dan
351ccb3825 Fix two more warnings in fts5 code.
FossilOrigin-Name: 5343e601fb6f0f24f4e4d5d442f7b5b074734143
2015-10-08 20:28:33 +00:00
dan
056d7acf25 Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror.
FossilOrigin-Name: e9e76e12812b9b42b1142246b71cea98e26903aa
2015-10-08 20:11:42 +00:00
drh
50065656f7 First attempt to add json1 and fts5 to the amalgamation. This check-in does
not compile.

FossilOrigin-Name: d820a1bd1b8dd702d1b3a099af393530cc5a5d51
2015-10-08 19:29:18 +00:00
drh
d7fd6aa4ba Remove two unused lines of code - discovered by scan-build.
FossilOrigin-Name: 77b707b77496a08703fe9405e8e4521a4e5b419e
2015-10-08 02:44:42 +00:00
dan
98e713bb8d Further optimizations for fts5 prefix queries without a prefix index.
FossilOrigin-Name: 83dc1ff7fa010715ca7f406a572f4ee444a967d7
2015-10-07 19:06:21 +00:00
mistachkin
08114efde4 Fix harmless compiler warning in FTS5.
FossilOrigin-Name: 13adcd038fc20dd1b6f344f79b449b4034f8f8f2
2015-10-07 17:06:17 +00:00
dan
22c7cca21f Allow the subsitute character (codepoint 26 - 0x1A) to appear in fts5 barewords.
FossilOrigin-Name: baec1b96cb64a6a6317143a8df841e502afe3914
2015-10-07 17:01:22 +00:00
drh
1dcc97cd3a Adjustments to spellfix2.test so that it works reliably on mac.
FossilOrigin-Name: d591e860d3d7c61637b4b07989bf176cb337db2c
2015-10-07 16:14:18 +00:00
dan
d46cc33131 Add tests for fts5 phrase queries with column filters.
FossilOrigin-Name: f20f9f813f00cefcd427e506a09b0b973c782e3f
2015-10-07 13:24:27 +00:00
dan
92099b0753 Add further tests for fts5 prefix queries.
FossilOrigin-Name: accdc98b1291f07b802fd23f3ebc7dbc02ba09d3
2015-10-07 09:02:50 +00:00
mistachkin
6418ffab82 Fix a typo in the previous check-in.
FossilOrigin-Name: 80027709c3ba2a8c9bda4d37779f65104be1045c
2015-10-07 04:20:34 +00:00
mistachkin
6bd7456edd When running tests on Tcl 8.6 under Windows, skip tests 'uri-1.12.*' due to a change in Tcl behavior related to NTFS ADS (alternate data streams).
FossilOrigin-Name: 8a0a2aa5a6df3d7b5995457b57f051e39d6cf9e9
2015-10-07 03:07:41 +00:00
drh
ee38148785 Remove three obsolete and unused files from tool/
FossilOrigin-Name: 0abd65294e6e8db68e7ce6724f02f17ba1cb3422
2015-10-07 00:35:18 +00:00
mistachkin
91a3ecb0ad Fix typo in comments. No changes to code.
FossilOrigin-Name: a05f903c64edeba8a9748aad68f5981943e68b3c
2015-10-06 21:49:55 +00:00
drh
8b0cf38a12 Simplifications to the VDBE bytecode that handles LIMIT and OFFSET.
FossilOrigin-Name: 041df7c2f14b95868a08090354ebb3308050790e
2015-10-06 21:07:06 +00:00
dan
a2507137f3 Optimizations for fts5 expressions that filter on column. More still to come.
FossilOrigin-Name: bf1607ac155018573ca40fb58aca62c5fea7e60b
2015-10-06 20:53:26 +00:00
drh
9f1ef45f6a Fix the LIMIT and OFFSET handling for UNION ALL queries that contain a
subquery with ORDER BY on the right-hand side.  Fix for ticket
[b65cb2c8d91f668584].

FossilOrigin-Name: 4b631364354068af95a01630469cb6fbfe8b52fd
2015-10-06 17:27:18 +00:00
mistachkin
8d9837acd5 Adjustments to sqlite3MemoryBarrier() when compiling with MSVC and/or WinCE.
FossilOrigin-Name: 3168326ebfa1c961d8fc6435453b02be23d910cc
2015-10-06 01:44:53 +00:00
dan
6f832d3dff Improve performance of prefix queries without a prefix index on fts5 tables.
FossilOrigin-Name: f2f0184e9e1c9f121ee2ac864cd28c8cd8efecb5
2015-10-05 19:41:16 +00:00
dan
f24bebe37a Update fts3 so that expressions to the left and right of a NOT operator are balanced. This prevents relatively small expressions (a dozen terms or so) that are children of NOT operators from triggering the "expression tree is too large" error.
FossilOrigin-Name: d6b66cd7b89fbd964f798d160a34caac0ba7347a
2015-10-05 15:39:45 +00:00
dan
2c1023df09 Add fts5txt2db.tcl, a tool for creating sample fts4/5 databases from text files.
FossilOrigin-Name: 44f1ce30d1e446c9ee5f8bd8a62119e00356aa0e
2015-10-05 11:57:09 +00:00
dan
a0f197b842 Update fts5 to support the table function syntax. "... FROM fts5_tbl WHERE fts5_tbl MATCH ?1 AND rank MATCH ?1" can now be written "FROM fts5_tbl(?1, ?2)".
FossilOrigin-Name: 41d17d9e24303aed6d549ea23c62b93bf2f71691
2015-10-03 15:38:57 +00:00
dan
06f8c635ef Add tests for the rtree module to verify that attempts to insert non-integer primary key values or non-numeric dimensions into an rtree table are handled correctly.
FossilOrigin-Name: f653fce90846b700441e8fa5f1930c1ec5e38e31
2015-10-03 12:23:18 +00:00
dan
bca189d5d8 Update fts5 to avoid using a statement journal for UPDATE and DELETE operations that affect at most a single row.
FossilOrigin-Name: 5c83b9db46d61cfa76a1abed50467e2f02db0eb0
2015-10-02 20:04:30 +00:00
dan
5171e911f2 Fix an fts3 bug causing NEAR queries on uncommitted data to malfunction.
FossilOrigin-Name: 6f90839e91024e2006042f5eb7f21ca5b47a9b4a
2015-10-01 18:31:29 +00:00
drh
105865acf9 Add a corrupt database to test/fuzzdata3.db to validate the previous
check-in.

FossilOrigin-Name: e796c0efb6cf17444b53af75046daf7d8fa82f78
2015-09-30 14:30:19 +00:00
drh
9b5351d439 Fix an assert() in btree.c that is only true for non-corrupt databases.
FossilOrigin-Name: 29f7227ff127202c53fe7c3b6558b3c101b0a7bc
2015-09-30 14:19:08 +00:00
dan
e755e10a78 Clear the BTCF_ValidNKey flag when putting a cursor into REQUIRESEEK state. Fix for [1b266395].
FossilOrigin-Name: a6d5e4e8693bea3739c35fe9769ac9abfb9ed056
2015-09-30 12:59:12 +00:00
dan
d95bb39c52 Improve error handling in shell command ".tables".
FossilOrigin-Name: 31a91ee7d32af8580a170903eb857ed9222fdb0a
2015-09-30 11:19:05 +00:00
drh
4b92f98ccc Use symbolic names XN_ROWID and XN_EXPR in place of the (-1) and (-2)
magic numbers in Index.aiColumn[].  Add asserts to help verify that
Index.aiColumn[] is always used correctly.  Fix one place in FK processing
where Index.aiColumn[] was not being used correctly.

FossilOrigin-Name: 7d272aa62cd4cbbf4b5d04e3b918de27671e8301
2015-09-29 17:20:14 +00:00
dan
e60856980a Add the sqlite3_index_info.idxFlags field, allowing xBestIndex() implementations to specify to SQLite that a strategy may visit at most one row. Add support for this to fts3/4. Omit the statement journal from virtual table UPDATE and DELETE operations that are guaranteed not to affect more than one row.
FossilOrigin-Name: a1d08fd3d0419da8c22355d48c6d83eed6fd7e07
2015-09-29 16:47:53 +00:00
dan
65c4f591be Ensure that the xSavepoint() virtual table method is correctly invoked if there are already open savepoints (or statement transactions) the first time a virtual table is written within a transaction.
FossilOrigin-Name: 77948b5eceab92a77c39d0864ac15ad453a76fd7
2015-09-29 16:41:23 +00:00
drh
e2b7d7a0a1 Remove dead code, replacing with assert() statements that make sure the
code really was dead.

FossilOrigin-Name: 0e317dda5dfd35b742afd70dacb5bfb39aa3fc4a
2015-09-29 15:50:04 +00:00
drh
c149f18f4d Create the sqlite3IsToplevel(Parse*) interface to check to see if a top-level
VDBE is being coded (versus a trigger) and use that interface.

FossilOrigin-Name: 59662cd2b65255a30e1a420331c07c51b644621a
2015-09-29 13:25:15 +00:00
drh
94f26a1e22 Fix compiler warnings.
FossilOrigin-Name: d1a0783854d2e9272320d9ddfa58362532f58d1a
2015-09-29 12:32:56 +00:00
dan
4ad0971919 Fix an off-by-one error in test function fts5_decode().
FossilOrigin-Name: 3a9f076250d9559d8ea94ba44095ba3ddbc5542d
2015-09-29 12:19:51 +00:00
dan
91742c45a9 Merge latest trunk change into this branch.
FossilOrigin-Name: b519c0d67a8fc39d65c17eccc9300a6187bd5661
2015-09-29 11:59:25 +00:00
dan
b3deb4ea64 Change the name of the new sqlite3_index_info.flags field to "idxFlags". Add documentation for the same to sqlite.h.in.
FossilOrigin-Name: f61203bc0fb0b62e12d6270e8d9063e445a5a252
2015-09-29 11:57:20 +00:00
dan
354474ad6d Add tests for fts3 and onepass update/delete operations. Also fix a problem with onepass updates that do not affect any rows.
FossilOrigin-Name: 820c804468abff692742952de670c5d906a50956
2015-09-29 10:11:26 +00:00
dan
0f40037eee Also allow UPDATE on virtual tables to use the onepass strategy.
FossilOrigin-Name: 1aa27d706db9b2e21737ce4b94b47ecd12c2570f
2015-09-28 20:03:49 +00:00
drh
a722821eb5 Extra information provided by .wheretrace on input flags to the query planner
and on the result of sqlite3WhereOkOnePass().

FossilOrigin-Name: c5566bb39c8d9b58f77380b81a873429575c7d5c
2015-09-28 17:05:22 +00:00
dan
d943b27596 Update fts3 to use the onepass strategy for delete operations.
FossilOrigin-Name: fffab4f70f85eeb2acbb89534064a6e397c39384
2015-09-28 15:23:29 +00:00
dan
076e0f9674 Changes to allow DELETE operations on virtual tables to use the onepass strategy under some circumstances.
FossilOrigin-Name: e73f919fae1833c6ffb36eddbc76d9a8d9324214
2015-09-28 15:20:58 +00:00
drh
3169713be0 Add test cases to the ONEPASS optimization corruption problem fixed by the
previous check-in.

FossilOrigin-Name: 5c14d447055bb337428eb1fe0a2934abee381829
2015-09-28 15:08:28 +00:00
drh
63c85a7a66 Fix a database corruption bug caused by the ONEPASS optimization added
in check-in [8b93cc5937000535].  Bug detected (prior to release) by
[https://www.sqlite.org/sqllogictest|sqllogictest].  Test cases to follow.

FossilOrigin-Name: 9d057f52217e7ef9c3f3eb84117abe3365503f44
2015-09-28 14:40:20 +00:00
drh
2f20e13b83 Enable adding JSON1 by appending the json1.c source file to the amalgamation
and compiling with -DSQLITE_ENABLE_JSON1

FossilOrigin-Name: 33404b2029120d4aabe1e25d484871810777e934
2015-09-26 17:44:59 +00:00
drh
32498f1321 Fix a memory leak that can occur following a syntax error in CREATE VIEW.
FossilOrigin-Name: f4704035a6134f702c00110358e36f1579e2ea78
2015-09-26 11:15:44 +00:00
drh
c4cdb29a0e Fix the title of the documentation on sqlite3_value_subtype(). This is a
comment change only.

FossilOrigin-Name: b79023542458f7e839469c5e313694f1e4cf223a
2015-09-26 03:31:47 +00:00