Commit Graph

14539 Commits

Author SHA1 Message Date
drh
0e8729dbe4 Attempt to declare sqlite3MemoryBarrier() correctly for all possible
build configurations.

FossilOrigin-Name: da8a288f8ef4be34281519b4b4db9b857b9d168b
2015-09-10 04:17:06 +00:00
drh
852944eb9b Fix the json_tree() scan for the case when a path is supplied. Add new
json1 test cases.

FossilOrigin-Name: 6adc7de76acee6cfb5ff761739e7a8de7b5bf4b2
2015-09-10 03:29:11 +00:00
drh
5fb72e5f3e No-op the sqlite3_memory_alarm() interface in a different way, that does
not break legacy memory behavior.  This is a re-do of
check-in [5d3f5df4da9f40d5].

FossilOrigin-Name: 8250e2a487ee12c9a2dea5603ab60aed51e5dc7b
2015-09-10 01:22:09 +00:00
mistachkin
f5eac36a64 Fix harmless compiler warning in FTS5.
FossilOrigin-Name: 86146a731d75eb25279c0e072c0bdda593de905d
2015-09-09 23:54:46 +00:00
dan
5c472d0860 Fix an assert() enabled by SQLITE_ENABLE_EXPENSIVE_ASSERT in wal.c.
FossilOrigin-Name: 8d2ed150a7a15626965cf994ef48c3ab61eca6ec
2015-09-09 19:44:33 +00:00
drh
8820250e8d Fix a possible NULL pointer deref when using SQLITE_ENABLE_MEMORY_MANAGEMENT.
FossilOrigin-Name: 89bfdbfe943adce8e02c84ede014fcfed504c5d3
2015-09-09 19:27:10 +00:00
mistachkin
3f62cb5aad Fix harmless compiler warning.
FossilOrigin-Name: 280fd3a482978b4a488a8b425721e451c2a30745
2015-09-09 17:23:48 +00:00
mistachkin
4b03efb695 Fix harmless compiler warnings in FTS5.
FossilOrigin-Name: 2cdb18778f20baa902e54f218ba26d2bacf0801e
2015-09-09 17:17:22 +00:00
drh
3c03afd3f5 When running a CREATE TABLE AS, make the initial temporary sqlite_master entry
for the new table a real record rather than a NULL, in case the query after 
the AS actually tries to read the sqlite_master table.
Fix for ticket [acd12990885d9276].

FossilOrigin-Name: 4a18d8bd4cc66eb08c6198cdf6e14f1bce0ec05a
2015-09-09 13:28:06 +00:00
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