Commit Graph

14556 Commits

Author SHA1 Message Date
drh 0b19c96935 Fix a potential NULL pointer deref in the testing logic of pcache1.
NB: The -DSQLITE_TEST compile-time option is needed to hit the problem.

FossilOrigin-Name: f5580f08538636ffb1367e717a33756288ccddde
2015-09-10 19:22:25 +00:00
dan 33c47f565c Modify the fts5 leaf page format to permit faster seek operations. This is a file-format change. Any existing databases can be upgraded by running the fts5 'rebuild' command.
FossilOrigin-Name: 0c0c4ae971e54efc526eed7bd071c90dfadb95ff
2015-09-10 17:23:37 +00:00
drh 383de6918c Create separate "path" and "root" columns in the json_each() and json_tree()
virtual tables.  "Root" is the 2nd parameter and is fixed.  
"Path" varies as json_tree() walks the hierarchy.

FossilOrigin-Name: 127cce3eb96b819005832997e0a082df9fb96f0b
2015-09-10 17:20:57 +00:00
dan 204debf3a3 Increment the fts5 version value to indicate that the on-disk format has changed.
FossilOrigin-Name: 99de5e3613d557728dd196353516bc7cf64a0e6c
2015-09-10 16:39:38 +00:00
dan 56c8634853 Fix a segfault in fts5 that could occur if the database contents were corrupt.
FossilOrigin-Name: 4931e37da4d2c26d7afc5432f7f0d534b51a85fa
2015-09-10 16:19:01 +00:00
dan 40d45f8960 Merge latest changes from trunk. Including fts5_expr.c fixes.
FossilOrigin-Name: 716e7e747714d6af502f6a87ca8d789bb7ce162a
2015-09-10 15:52:42 +00:00
dan b97efa0ba3 Update description of on-disk format in fts5_index.c.
FossilOrigin-Name: 85aac7b8b6731e2f6880b80cfd62d431ea059799
2015-09-10 15:49:16 +00:00
drh 0c2750889e Make the sqlite3ext.h header file responsive to -DSQLITE_OMIT_LOAD_EXTENSION.
FossilOrigin-Name: 47a46a9fa4a96cdb96a20b6aec802661b1ee4598
2015-09-10 15:24:27 +00:00
drh e6f5278c9a Disable tests for json_each() and json_tree() on builds where
virtual tables are not supported

FossilOrigin-Name: bb8ee3b140a0a8b7c89f5debf22369f204ceef0b
2015-09-10 15:22:35 +00:00
drh b1031f05e0 Fix the --help option on test/releasetest.tcl. Also fix the final error
count so that it includes a count of subtest crashes.

FossilOrigin-Name: 9ecf684dfe0cd7e3b058d208aca7eb600bf1d21b
2015-09-10 15:20:49 +00:00
dan e712acb641 Revert an accidentally committed makefile change.
FossilOrigin-Name: 402704b13f1f246c0224f90862bed93a825575f1
2015-09-10 10:40:00 +00:00
dan f679d97d18 Fix an fts5 problem that could occur if a term and the first associated rowid are on different leaf pages.
FossilOrigin-Name: ffe2796ac9244c62325fce4960f26c653321623c
2015-09-10 10:01:30 +00:00
dan a5aa8e1db2 Change the array of 16-bit offsets at the end of each page to an array of varints.
FossilOrigin-Name: fab245bea4f283714c17bca22428d5eb4db5935a
2015-09-10 05:40:17 +00:00
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
dan f06bd2c132 Fix a bug in preprocessor macros within fts5_main.c.
FossilOrigin-Name: 0eb2b9521fad6fa36e6fa374c2bc1f70b5180f7c
2015-09-09 08:15: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
dan fe8e2eba0a Remove the 0x00 terminators from the end of doclists stored on disk.
FossilOrigin-Name: 00d990061dec3661b0376bd167082942d5563bfe
2015-09-08 19:55:26 +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
dan 60f8139a96 Use macros to make the code in fts5_index.c easier to read.
FossilOrigin-Name: 67ff5ae81357eb7fa28049bb724a22cb6f52e076
2015-09-07 08:14:30 +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
dan e386a1ba25 Experiment with a different fts5 leaf page format that allows faster seeks.
FossilOrigin-Name: a1f4c3b543eed84e808f6b901a38179786fffe16
2015-09-05 19:52:08 +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