Commit Graph

14530 Commits

Author SHA1 Message Date
drh 0c6dfaa34a Remove an unused local variable from Lemon.
FossilOrigin-Name: fe9ffe5eed7d376f3f08c78c1ce5514c886f3479
2015-09-08 21:16:46 +00:00
drh a46a4a63de Enhance the DBSTAT virtual table with a new hidden table "schema" that if
set will cause the table to report on the specified schema rather than on
"main".  Also:  Fix a faulty assert in sqlite3_context_db_handle().

FossilOrigin-Name: 6beb512c7a3c3649b56f0df1ca77855535a87ba7
2015-09-08 21:12:53 +00:00
drh b4d472f609 Eponymous virtual tables exist in the "main" schema only. Enforce this rule.
FossilOrigin-Name: 06f90bb274c4bb0c30585024c8d365d43c4162f2
2015-09-08 20:26:09 +00:00
drh 310a8d6668 Fix the help message that sqlite3_analyzer.exe generates for invalid
arguments.

FossilOrigin-Name: 33a14e7be1004abca7a30f675459138d7f8d72b1
2015-09-08 17:31:30 +00:00
drh 337cd0def4 Minor tweaks to Lemon.
FossilOrigin-Name: 986677224a8da5e79fbbd90673f1b595da89c5d6
2015-09-07 23:40:42 +00:00
drh 3921d8be5d Enhance the Lemon parser generator to add SHIFTREDUCE states that reduce the
sizes of some of the parser tables.

FossilOrigin-Name: 99b992fa840707711d99f8d05b62412f7008cd93
2015-09-07 20:11:30 +00:00
drh ae2a4084a2 Fix an unreachable branch in the new parse automaton.
FossilOrigin-Name: e9d604b4306a86faae315ac3cba59bf07d1b665c
2015-09-07 20:02:39 +00:00
drh a248a722cf Change the parser engine so that it (once again) waits for a lookahead token
before reducing, even in a SHIFTREDUCE action.

FossilOrigin-Name: 2c17a1358353a0845b039283be79353f033e2491
2015-09-07 19:52:55 +00:00
drh 3bd48ab213 For the Lemon-generated parser, add a new action type SHIFTREDUCE and use it
to further compress the parser tables and improve parser performance.

FossilOrigin-Name: 531c3974b3d586c1989cde905b2fb4681239a570
2015-09-07 18:23:37 +00:00
drh 7e698e9d71 In the "parse.out" output file from Lemon, show addition the complete text
of rules on reduce actions.

FossilOrigin-Name: b6ffb7e471e51ff69668154ad2c8790e466c9d37
2015-09-07 14:22:24 +00:00
drh c75e0166f0 Improved "Parser Statistics" output (the -s option) for the Lemon parser
generator.

FossilOrigin-Name: 809503e4efcdb498d176e8c0794a5ba0882adef2
2015-09-07 02:23:02 +00:00
drh 2d64034bc2 Improved memory barrier that should work with MinGW on older versions of
Windows.

FossilOrigin-Name: 47dc24bd1e8f76eb17ba53a883b8984b3e1b2934
2015-09-06 10:31:37 +00:00
drh 6081c1dbdf Add a memory barrier to the mutex initialization logic, try to work around
an issue reported by WebKit.

FossilOrigin-Name: 11a9a786ec06403addb47f5c6fb142b382fae522
2015-09-06 02:51:04 +00:00
drh 0b8d255c37 Omit all use of Expr nodes for TK_AS, as those nodes no longer served a useful
purpose and in fact interferred with the query planner.

FossilOrigin-Name: 7ab0b258eabfcfb7f1b0bd1b12e166d2f267823d
2015-09-05 22:36:07 +00:00
drh 28b9e0fc05 Fix an unreachable conditional in the WHERE clause analysis logic.
FossilOrigin-Name: 24924a58197e558a9e8800cc5c91dc8fb32f3557
2015-09-05 19:21:00 +00:00
drh e3a7307e2d Get STAT4 range scan estimates work again when the bounds are determined
by date/time functions.

FossilOrigin-Name: d2761357a0496ec1e590c7c9e397c5b5c904f91a
2015-09-05 19:07:08 +00:00
drh 2547336dad Fix over-length source code lines in Lemon.
FossilOrigin-Name: 1efece95ff8777b89558be59277732ba2a68d5ab
2015-09-04 18:03:45 +00:00
drh 13bf8c498f Add support for CREATE INDEX statements that use deterministic expressions
rather than only column names.

FossilOrigin-Name: 2131a5ca53f0e9b0b98a9dd9a20e495d54d146a7
2015-09-04 17:32:19 +00:00
drh aac39e1ded Merge trunk enhancements, and espeically the fix for allowing strings
as column identifers in CREATE INDEX statements.

FossilOrigin-Name: 5ff855293865c244ac632c630e8e7e8d7c05a5f6
2015-09-04 13:02:21 +00:00
drh edb04ed946 Continue to support the (broken) legacy syntax of allowing strings for
column names in CREATE INDEX statements and in UNIQUE and PRIMARY KEY
constraints.

FossilOrigin-Name: 3d3df79bfaf9dbc7aa711c08a19d2f6dbe744b32
2015-09-04 12:54:01 +00:00
dan 4dfe98a8c4 Enhance showfts5.tcl so that it can optionally display the number of terms in each segment.
FossilOrigin-Name: d648ddd93de039820f5abe064c7bc1318cd9d6b1
2015-09-04 11:13:00 +00:00
dan 477fc0e621 Modify the fts5 custom tokenizer interface to permit synonym support. The fts5_api.iVersion value is now set to 2. Existing fts5 custom tokenizers (if there are such things) will need to be updated to use the new api version.
FossilOrigin-Name: 0b7e4ab8abde3ae32459233df115c433dd58d2c1
2015-09-04 10:31:51 +00:00
dan 31c171c154 Merge latest trunk changes.
FossilOrigin-Name: 443a5eb8e17fd4f0b83ecc5bba74848e2c8a968c
2015-09-04 10:24:05 +00:00
drh 92af02c939 Simplification of the LRU list handling in pcache1.
FossilOrigin-Name: 05a3a2cd140587265b5427d23c93c5be1f39e199
2015-09-04 04:31:56 +00:00
drh 95a0b37156 Change the pcache module to keep track of the total number of references to
all pages rather than the number of pages references, for a performance
improvement and size reduction.

FossilOrigin-Name: f00a9e1e998c4bd249a45444dc2d71a7e4903b8b
2015-09-03 20:43:55 +00:00
dan f8efe64649 Rearrange code in fts5_expr.c so that synonym support does not slow down the common case.
FossilOrigin-Name: 801882817f1d895aef1426f9a7196bd140b807c3
2015-09-03 19:48:02 +00:00
dan cce413202a Merge enhancements from trunk.
FossilOrigin-Name: 4b49fe996989fe42d2bb1c24e7193fef09c5fc50
2015-09-03 18:57:52 +00:00
drh 98c5f8795a A simple optimization and size reduction in sqlite3PagerAcquire().
FossilOrigin-Name: 618d8dd4ff44cce10cc4688a2134715ff66cc562
2015-09-03 18:20:10 +00:00
dan ea8b93ee20 Add documentation for fts5 synonym support.
FossilOrigin-Name: 58aa1f435959852df74f1bca8e0bdbc4f47c256a
2015-09-03 18:05:09 +00:00
drh c98a4cc8b6 Change the Pager.hasBeenUsed flag into Pager.hasHeldSharedLock in order to
take it off the critical path in sqlite3PagerAcquire().

FossilOrigin-Name: b79096be7cb02aae2f303db33a8bf19e69204374
2015-09-03 17:54:32 +00:00
dan ea623630e2 Add tests to improve coverage of fts5_varint.c.
FossilOrigin-Name: 89f24f31a8f7d7cb0a66ee53523881f566dcb035
2015-09-03 15:37:26 +00:00
dan e1c28d7229 Remove some more code from fts5_index.c by consolidating similar functions.
FossilOrigin-Name: 59ae30b97b40faa363c55aa2664dead9eaeeddc0
2015-09-03 14:22:27 +00:00
drh 34de0c8c5e Merge enhancements from trunk.
FossilOrigin-Name: 1ab10cbf27245961b40eda1ce70f35646f0a9966
2015-09-03 14:18:12 +00:00
drh 076e85f59c Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help
with code generation, especially on PRAGMAs.  Rename sqlite3VdbeAddGoto()
to just sqlite3VdbeGoto().

FossilOrigin-Name: 847387ec8e6fef283899578fb232b2c23b00ee5b
2015-09-03 13:46:12 +00:00
dan 5d144875bc Remove dead code from fts5_index.c.
FossilOrigin-Name: 8a0a9b01e74072ee52fe393311ad591208fbbf7c
2015-09-03 11:17:52 +00:00
dan 9a9e3531f7 Fix the fts5 integrity-check so that it works with columnsize=0 tables.
FossilOrigin-Name: 11b887b15eaee57ea2577c763e70494f1e251275
2015-09-03 11:00:50 +00:00
dan 2a6ecb3141 Fix a memory leak in fts5_expr.c.
FossilOrigin-Name: 399932a181437d84cd57234e76c4b65da1e4ac5f
2015-09-03 10:27:02 +00:00
drh 7cc023c7fa Factor out and simplify code in pragma.c for pragmas that return a single
row with a single column that is an integer or text value.

FossilOrigin-Name: d7f4bdf594e93c848f46901637861c8eed4c34df
2015-09-03 04:28:25 +00:00
drh b460e52a83 For PRAGMAs, factor out the code that sets the result set column names into
a subroutine.

FossilOrigin-Name: 0ea6e5c9fc6b1dd1174c09097be5bf291da4e6c7
2015-09-03 03:29:51 +00:00
drh 2a8f671244 Optimizations to the printf formatter.
FossilOrigin-Name: a3b35ddeca8f459e81105ab6477f3c5afb9b96d5
2015-09-02 21:00:48 +00:00
dan 9c671b741c Further tests to raise coverage of fts5 synonym code to 100%. Fix a dropped error code in the same.
FossilOrigin-Name: bdedd838bb3028c586bcc9f643852ce1364adb49
2015-09-02 19:48:55 +00:00
dan 50ea76e748 Fix an issue with fts5 synonyms and NEAR(...) queries.
FossilOrigin-Name: f2e590700d8eb30da8ac3a92f6ca92a2bbe9c1fe
2015-09-02 18:56:01 +00:00
drh 0ff287fb01 Add and use the sqlite3VdbeChangeOpcode() routine. Simplify the implementation
of the other sqlite3VdbeChange*() routines.

FossilOrigin-Name: 0a5b00e493efae58252f9fc7bde5a469645942d5
2015-09-02 18:40:33 +00:00
drh 2991ba050b Add the sqlite3VdbeAddGoto(v,i) routine as a shorthand for
sqlite3VdbeAddOp2(v,OP_Goto,0,i).

FossilOrigin-Name: be78f413df1b0d874b44a866ef6bf17543d7e8a2
2015-09-02 18:19:00 +00:00
drh ef41dfe5b1 Change sqlite3_sql() so that it always returns the SQL text of the prepared
statement, if the text is available, even if the the prepared statement was
generated using sqlite3_prepare() instead of sqlite3_prepare_v2().  Also
include some minor comment fixes and code simplifications.

FossilOrigin-Name: 2f5472cfda6c72e75b9cf7b7481612465c1a5e6a
2015-09-02 17:55:12 +00:00
dan bea34fc53a Fix a problem with fts5 synonyms and phrase queries. Also fix an OOM handling bug in fts5.
FossilOrigin-Name: a4c35fa2c94fe34b376670244fe72303c99868c1
2015-09-02 17:34:22 +00:00
drh 2ed0d809a6 Small simplification to the EXPLAIN QUERY PLAN logic.
FossilOrigin-Name: d1592d201afea20cb2ca94fe2bf5ae031bd29ede
2015-09-02 16:51:37 +00:00
drh d37bea5bdc Use sqlite3XPrintf() instead of sqlite3StrAccumAppend() in a few places
for better performance and a smaller footprint.

FossilOrigin-Name: 82355e41084387fa11b7b531e4d660dd3b4cd984
2015-09-02 15:37:50 +00:00
drh 4ef299a32c The sqlite3_memory_alarm() interface has been deprecated and undocumented
for almost 8 years (since version 3.5.3).  Change it into a no-op.

FossilOrigin-Name: 5d3f5df4da9f40d5897b5c23b2ea9333fc18ac2c
2015-09-02 14:56:56 +00:00
dan 583611df65 Fix a problem handling OOM conditions within fts5 queries that feature synonyms.
FossilOrigin-Name: 11fa980897c6c7be218bbd9c4cd8253272d2c300
2015-09-02 14:17:38 +00:00