]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
9 years agoMerge enhancements from trunk.
dan [Thu, 3 Sep 2015 18:57:52 +0000 (18:57 +0000)] 
Merge enhancements from trunk.

FossilOrigin-Name: 4b49fe996989fe42d2bb1c24e7193fef09c5fc50

9 years agoA simple optimization and size reduction in sqlite3PagerAcquire().
drh [Thu, 3 Sep 2015 18:20:10 +0000 (18:20 +0000)] 
A simple optimization and size reduction in sqlite3PagerAcquire().

FossilOrigin-Name: 618d8dd4ff44cce10cc4688a2134715ff66cc562

9 years agoAdd documentation for fts5 synonym support.
dan [Thu, 3 Sep 2015 18:05:09 +0000 (18:05 +0000)] 
Add documentation for fts5 synonym support.

FossilOrigin-Name: 58aa1f435959852df74f1bca8e0bdbc4f47c256a

9 years agoChange the Pager.hasBeenUsed flag into Pager.hasHeldSharedLock in order to
drh [Thu, 3 Sep 2015 17:54:32 +0000 (17:54 +0000)] 
Change the Pager.hasBeenUsed flag into Pager.hasHeldSharedLock in order to
take it off the critical path in sqlite3PagerAcquire().

FossilOrigin-Name: b79096be7cb02aae2f303db33a8bf19e69204374

9 years agoAdd tests to improve coverage of fts5_varint.c.
dan [Thu, 3 Sep 2015 15:37:26 +0000 (15:37 +0000)] 
Add tests to improve coverage of fts5_varint.c.

FossilOrigin-Name: 89f24f31a8f7d7cb0a66ee53523881f566dcb035

9 years agoRemove some more code from fts5_index.c by consolidating similar functions.
dan [Thu, 3 Sep 2015 14:22:27 +0000 (14:22 +0000)] 
Remove some more code from fts5_index.c by consolidating similar functions.

FossilOrigin-Name: 59ae30b97b40faa363c55aa2664dead9eaeeddc0

9 years agoAdd the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help
drh [Thu, 3 Sep 2015 13:46:12 +0000 (13:46 +0000)] 
Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help
with code generation, especially on PRAGMAs.  Rename sqlite3VdbeAddGoto()
to just sqlite3VdbeGoto().

FossilOrigin-Name: 847387ec8e6fef283899578fb232b2c23b00ee5b

9 years agoRemove dead code from fts5_index.c.
dan [Thu, 3 Sep 2015 11:17:52 +0000 (11:17 +0000)] 
Remove dead code from fts5_index.c.

FossilOrigin-Name: 8a0a9b01e74072ee52fe393311ad591208fbbf7c

9 years agoFix the fts5 integrity-check so that it works with columnsize=0 tables.
dan [Thu, 3 Sep 2015 11:00:50 +0000 (11:00 +0000)] 
Fix the fts5 integrity-check so that it works with columnsize=0 tables.

FossilOrigin-Name: 11b887b15eaee57ea2577c763e70494f1e251275

9 years agoFix a memory leak in fts5_expr.c.
dan [Thu, 3 Sep 2015 10:27:02 +0000 (10:27 +0000)] 
Fix a memory leak in fts5_expr.c.

FossilOrigin-Name: 399932a181437d84cd57234e76c4b65da1e4ac5f

9 years agoFactor out and simplify code in pragma.c for pragmas that return a single
drh [Thu, 3 Sep 2015 04:28:25 +0000 (04:28 +0000)] 
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

9 years agoFor PRAGMAs, factor out the code that sets the result set column names into
drh [Thu, 3 Sep 2015 03:29:51 +0000 (03:29 +0000)] 
For PRAGMAs, factor out the code that sets the result set column names into
a subroutine.

FossilOrigin-Name: 0ea6e5c9fc6b1dd1174c09097be5bf291da4e6c7

9 years agoOptimizations to the printf formatter.
drh [Wed, 2 Sep 2015 21:00:48 +0000 (21:00 +0000)] 
Optimizations to the printf formatter.

FossilOrigin-Name: a3b35ddeca8f459e81105ab6477f3c5afb9b96d5

9 years agoFurther tests to raise coverage of fts5 synonym code to 100%. Fix a dropped error...
dan [Wed, 2 Sep 2015 19:48:55 +0000 (19:48 +0000)] 
Further tests to raise coverage of fts5 synonym code to 100%. Fix a dropped error code in the same.

FossilOrigin-Name: bdedd838bb3028c586bcc9f643852ce1364adb49

9 years agoFix an issue with fts5 synonyms and NEAR(...) queries.
dan [Wed, 2 Sep 2015 18:56:01 +0000 (18:56 +0000)] 
Fix an issue with fts5 synonyms and NEAR(...) queries.

FossilOrigin-Name: f2e590700d8eb30da8ac3a92f6ca92a2bbe9c1fe

9 years agoAdd and use the sqlite3VdbeChangeOpcode() routine. Simplify the implementation
drh [Wed, 2 Sep 2015 18:40:33 +0000 (18:40 +0000)] 
Add and use the sqlite3VdbeChangeOpcode() routine.  Simplify the implementation
of the other sqlite3VdbeChange*() routines.

FossilOrigin-Name: 0a5b00e493efae58252f9fc7bde5a469645942d5

9 years agoAdd the sqlite3VdbeAddGoto(v,i) routine as a shorthand for
drh [Wed, 2 Sep 2015 18:19:00 +0000 (18:19 +0000)] 
Add the sqlite3VdbeAddGoto(v,i) routine as a shorthand for
sqlite3VdbeAddOp2(v,OP_Goto,0,i).

FossilOrigin-Name: be78f413df1b0d874b44a866ef6bf17543d7e8a2

9 years agoChange sqlite3_sql() so that it always returns the SQL text of the prepared
drh [Wed, 2 Sep 2015 17:55:12 +0000 (17:55 +0000)] 
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

9 years agoFix a problem with fts5 synonyms and phrase queries. Also fix an OOM handling bug...
dan [Wed, 2 Sep 2015 17:34:22 +0000 (17:34 +0000)] 
Fix a problem with fts5 synonyms and phrase queries. Also fix an OOM handling bug in fts5.

FossilOrigin-Name: a4c35fa2c94fe34b376670244fe72303c99868c1

9 years agoSmall simplification to the EXPLAIN QUERY PLAN logic.
drh [Wed, 2 Sep 2015 16:51:37 +0000 (16:51 +0000)] 
Small simplification to the EXPLAIN QUERY PLAN logic.

FossilOrigin-Name: d1592d201afea20cb2ca94fe2bf5ae031bd29ede

9 years agoUse sqlite3XPrintf() instead of sqlite3StrAccumAppend() in a few places
drh [Wed, 2 Sep 2015 15:37:50 +0000 (15:37 +0000)] 
Use sqlite3XPrintf() instead of sqlite3StrAccumAppend() in a few places
for better performance and a smaller footprint.

FossilOrigin-Name: 82355e41084387fa11b7b531e4d660dd3b4cd984

9 years agoThe sqlite3_memory_alarm() interface has been deprecated and undocumented
drh [Wed, 2 Sep 2015 14:56:56 +0000 (14:56 +0000)] 
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

9 years agoFix a problem handling OOM conditions within fts5 queries that feature synonyms.
dan [Wed, 2 Sep 2015 14:17:38 +0000 (14:17 +0000)] 
Fix a problem handling OOM conditions within fts5 queries that feature synonyms.

FossilOrigin-Name: 11fa980897c6c7be218bbd9c4cd8253272d2c300

9 years agoFix a problem with fts5 synonyms and the xQueryPhrase() auxiliary function API.
dan [Wed, 2 Sep 2015 08:22:41 +0000 (08:22 +0000)] 
Fix a problem with fts5 synonyms and the xQueryPhrase() auxiliary function API.

FossilOrigin-Name: cf3e45e76d23e10ee06296c3561a341591597a04

9 years agoVery minor optimizations in the unix VFS.
drh [Tue, 1 Sep 2015 23:51:53 +0000 (23:51 +0000)] 
Very minor optimizations in the unix VFS.

FossilOrigin-Name: 6db3ff45bc15ece29cb2c7a736e5c6d005dde200

9 years agoPerformance improvement in sqlite3VarintLen().
drh [Tue, 1 Sep 2015 22:29:07 +0000 (22:29 +0000)] 
Performance improvement in sqlite3VarintLen().

FossilOrigin-Name: adf9fefb00ae1dbb07a921c6796cb0a9505c6d19

9 years agoSmall size reduction and performance increase in sqlite3DbMallocSize().
drh [Tue, 1 Sep 2015 20:09:33 +0000 (20:09 +0000)] 
Small size reduction and performance increase in sqlite3DbMallocSize().

FossilOrigin-Name: 8a80967f849eed002a701235ed7fb406099d566e

9 years agoReduce the number of calls to sqlite3BeginBenignMalloc().
drh [Tue, 1 Sep 2015 19:51:37 +0000 (19:51 +0000)] 
Reduce the number of calls to sqlite3BeginBenignMalloc().

FossilOrigin-Name: 0bee6583665782fac5d9e82bdf19b6f07e7bd03f

9 years agoFix a problem that occurs when more than 4 synonyms for a term appear within a single...
dan [Tue, 1 Sep 2015 18:44:33 +0000 (18:44 +0000)] 
Fix a problem that occurs when more than 4 synonyms for a term appear within a single row.

FossilOrigin-Name: cd359550bdc2bf7be4c294b60130c9fc3f583902

9 years agoAdd tests for fts5 synonyms implemented by adding extra terms to queries. And fixes...
dan [Tue, 1 Sep 2015 18:08:36 +0000 (18:08 +0000)] 
Add tests for fts5 synonyms implemented by adding extra terms to queries. And fixes for the same.

FossilOrigin-Name: dbcb73802b88f76be17f09f3eb83ffac542de633

9 years agoBegin changes to allow synonym support by adding multiple terms to a query (an altern...
dan [Mon, 31 Aug 2015 20:06:06 +0000 (20:06 +0000)] 
Begin changes to allow synonym support by adding multiple terms to a query (an alternative to adding multiple terms to the FTS index).

FossilOrigin-Name: ad7feaed4cd6b1d6e6376bb82d1f5664ddd083f3

9 years agoEnhance the json_extract() function so that if given multiple PATH arguments
drh [Sat, 29 Aug 2015 19:41:45 +0000 (19:41 +0000)] 
Enhance the json_extract() function so that if given multiple PATH arguments
it will return a JSON array with all of the answers.  Also update comments
within the json1 extension to reflect stricter interpretation of JSON and PATH
arguments.

FossilOrigin-Name: 1da60c3dda4254620052a83c853c2d2b6dd5009f

9 years agoLink the json1 extension into the command-line shell by default.
drh [Sat, 29 Aug 2015 19:03:33 +0000 (19:03 +0000)] 
Link the json1 extension into the command-line shell by default.

FossilOrigin-Name: 2e8e239cec5a12ac81cf62c0fbe94fb5713c31b1

9 years agoAdd a test for an fts5 tokenizer that supports synonyms by adding multiple entries...
dan [Sat, 29 Aug 2015 18:46:12 +0000 (18:46 +0000)] 
Add a test for an fts5 tokenizer that supports synonyms by adding multiple entries to the fts index.

FossilOrigin-Name: 98d07d16cab92f1e7001afbe370df3ec6343fc1f

9 years agoNew test cases for the json1 extension.
drh [Sat, 29 Aug 2015 18:30:30 +0000 (18:30 +0000)] 
New test cases for the json1 extension.

FossilOrigin-Name: daff4832af963f98bcc1d2c2f84bd815d384f850

9 years agoFix the build with -DSQLITE_OMIT_VIRTUALTABLE.
drh [Sat, 29 Aug 2015 17:22:33 +0000 (17:22 +0000)] 
Fix the build with -DSQLITE_OMIT_VIRTUALTABLE.

FossilOrigin-Name: 752918def7231f7846b3e985c9953a1cc825ab6b

9 years agoDo not consider an empty string to be valid JSON. Add some additional
drh [Sat, 29 Aug 2015 16:02:37 +0000 (16:02 +0000)] 
Do not consider an empty string to be valid JSON.  Add some additional
JSON test cases.

FossilOrigin-Name: fd19ff029f128f478f69910352a6f8b84262ce1d

9 years agoAnother change to the fts5 tokenizer API.
dan [Sat, 29 Aug 2015 15:44:27 +0000 (15:44 +0000)] 
Another change to the fts5 tokenizer API.

FossilOrigin-Name: fc71868496f45f9c7a79ed2bf2d164a7c4718ce1

9 years agoChange the json1.c module so that it throws an error if any of the
drh [Sat, 29 Aug 2015 00:54:49 +0000 (00:54 +0000)] 
Change the json1.c module so that it throws an error if any of the
JSON selector paths are malformed.

FossilOrigin-Name: 3aa0855fd463076fc3277f1d9fe00d2f30e6b449

9 years agoBack out the json_check() routine. Instead, throw an error if the input to
drh [Fri, 28 Aug 2015 20:07:40 +0000 (20:07 +0000)] 
Back out the json_check() routine.  Instead, throw an error if the input to
a json function (other than json_valid()) is not valid JSON.

FossilOrigin-Name: dc9ce7b18cbe23d065317757234ef9fb8792da7a

9 years agoChange the fts5 tokenizer API to allow more than one token to occupy a single positio...
dan [Fri, 28 Aug 2015 19:56:47 +0000 (19:56 +0000)] 
Change the fts5 tokenizer API to allow more than one token to occupy a single position within a document.

FossilOrigin-Name: 90b85b42f2b2dd3e939b129b7df2b822a05e243d

9 years agoFix compiler warnings in rbu code.
dan [Fri, 28 Aug 2015 16:41:45 +0000 (16:41 +0000)] 
Fix compiler warnings in rbu code.

FossilOrigin-Name: 0fdc36fe35ae2fc8e9688fe6c53437f4d47502d9

9 years agoWhen searching the wal file for a frame, do not search that part that was already...
dan [Fri, 28 Aug 2015 16:18:45 +0000 (16:18 +0000)] 
When searching the wal file for a frame, do not search that part that was already checkpointed when the transaction was opened.

FossilOrigin-Name: a84cf4f5d326270a61faf4ff867260f2dd1e68a6

9 years agoMerge latest trunk into this branch. wal-read-change
dan [Fri, 28 Aug 2015 15:50:24 +0000 (15:50 +0000)] 
Merge latest trunk into this branch.

FossilOrigin-Name: ab93024da7bd577d8850b417aff8597a8b3807fc

9 years agoAdd the json_check() function, which returns its argument if the argument
drh [Fri, 28 Aug 2015 03:48:04 +0000 (03:48 +0000)] 
Add the json_check() function, which returns its argument if the argument
is well-formed JSON or which throws an error otherwise.

FossilOrigin-Name: 64abb65d4df11e5b3bcc4afc8e7c18e907c6080a

9 years agoEnhance the json_insert(), json_replace(), and json_set() functions with the
drh [Fri, 28 Aug 2015 03:33:50 +0000 (03:33 +0000)] 
Enhance the json_insert(), json_replace(), and json_set() functions with the
ability to add JSON instead of text if the argument is text and if the PATH
begins with '$$' instead of just '$'.

FossilOrigin-Name: 44f103d8862abc2d5613bac04dc2ea8e625b1f40

9 years agoFix the OR-optimization so that it always ignores subplans that do not
drh [Thu, 27 Aug 2015 23:18:55 +0000 (23:18 +0000)] 
Fix the OR-optimization so that it always ignores subplans that do not
use an index.

FossilOrigin-Name: 66f92a16866e5825363636b9cc4b8f9b29d9e84d

9 years agoReduce the size of the WhereScan object by 24 bytes while also clarifying its
drh [Wed, 26 Aug 2015 21:08:04 +0000 (21:08 +0000)] 
Reduce the size of the WhereScan object by 24 bytes while also clarifying its
operation.

FossilOrigin-Name: cbc3c9a8bf169ae0b21f26855038502c6cc25cfe

9 years agoEvaluate expressions only once when the same expression is used in both the
drh [Wed, 26 Aug 2015 14:01:41 +0000 (14:01 +0000)] 
Evaluate expressions only once when the same expression is used in both the
result set and in the ORDER BY clause.

FossilOrigin-Name: c2f3bbad778504681b39ab9399a1eb3c1a35ab3f

9 years agoRefactor With.a.zErr into With.a.zCteErr. No logic changes.
drh [Wed, 26 Aug 2015 11:40:11 +0000 (11:40 +0000)] 
Refactor With.a.zErr into With.a.zCteErr.  No logic changes.

FossilOrigin-Name: 58ba73630ecc4bc58b03a7962dd45b305ef605ef

9 years agoUpdate the TreeView output for compound SELECT statements so that all entries
drh [Wed, 26 Aug 2015 11:34:31 +0000 (11:34 +0000)] 
Update the TreeView output for compound SELECT statements so that all entries
are shown vertically aligned rather than each successive entry being indented.

FossilOrigin-Name: 65a8918776aa395009a690fa86bfc7d99eb973f9

9 years agoMove sqlite3IndexColumnAffinity() inside of SQLITE_ENABLE_STAT3_OR_STAT4.
drh [Tue, 25 Aug 2015 19:42:28 +0000 (19:42 +0000)] 
Move sqlite3IndexColumnAffinity() inside of SQLITE_ENABLE_STAT3_OR_STAT4.

FossilOrigin-Name: b3732a4e1b42a86675d89766cb8089914e2fab9a

9 years agoUse the sqlite3IndexColumnAffinity() routine to quickly and correctly find the
drh [Tue, 25 Aug 2015 19:20:04 +0000 (19:20 +0000)] 
Use the sqlite3IndexColumnAffinity() routine to quickly and correctly find the
affinity of an index column.

FossilOrigin-Name: 1ee089a72d789002a0a377347fc51e08ab32fb14

9 years agoFix a memory leak that might occur when compiling with SQLITE_OMIT_CHECK.
drh [Tue, 25 Aug 2015 00:34:54 +0000 (00:34 +0000)] 
Fix a memory leak that might occur when compiling with SQLITE_OMIT_CHECK.

FossilOrigin-Name: 8f1d9f1f308518522ebb1eaebb9b184b4ac30924

9 years agoRemove some redundant code: Call sqlite3ResolveExprListNames() rather than
drh [Mon, 24 Aug 2015 20:54:06 +0000 (20:54 +0000)] 
Remove some redundant code:  Call sqlite3ResolveExprListNames() rather than
calling sqlite3ResolveExprNames() in a loop - in two places.

FossilOrigin-Name: bdaf66465b6b1bdad10c08d9527b98e7000a41e4

9 years agoEnhances the parser so that it accepts arbitrary expressions for the arguments
drh [Mon, 24 Aug 2015 20:21:20 +0000 (20:21 +0000)] 
Enhances the parser so that it accepts arbitrary expressions for the arguments
of an index, though the code generator still rejects everything other than
simple column names.  The sqlite3RestrictColumnListSyntax() routine is removed
since that feature is now handled by the parser.

FossilOrigin-Name: bed42116addabcf3dfdc2e2d51ae183965704988

9 years agoEnhance the CREATE VIEW syntax so that the names of columns of the view can
drh [Mon, 24 Aug 2015 17:42:49 +0000 (17:42 +0000)] 
Enhance the CREATE VIEW syntax so that the names of columns of the view can
be specified after the view name.

FossilOrigin-Name: d794b34da6f9c77dfe17773b0b17b22de72cce7f

9 years agoEnhancements to the batch build tool for MSVC.
mistachkin [Mon, 24 Aug 2015 17:18:43 +0000 (17:18 +0000)] 
Enhancements to the batch build tool for MSVC.

FossilOrigin-Name: a1ae20cd97456a1126cfa1a9bedce0bac0940ad6

9 years agoDisallow the use of COLLATE clauses and the ASC and DESC keywords within
drh [Mon, 24 Aug 2015 15:39:42 +0000 (15:39 +0000)] 
Disallow the use of COLLATE clauses and the ASC and DESC keywords within
foreign key constraints and in the argument list to common table expressions.

FossilOrigin-Name: 83cbc4d8761498647794affffa961a4fca311be7

9 years agoImprovements to JSON string dequoting.
drh [Mon, 24 Aug 2015 12:42:41 +0000 (12:42 +0000)] 
Improvements to JSON string dequoting.

FossilOrigin-Name: 196d66d34d9783622e6f2f79eafea1488fc6f5cf

9 years agoFix corner-case problems in the type and atom columns of json_each() and
drh [Mon, 24 Aug 2015 02:32:04 +0000 (02:32 +0000)] 
Fix corner-case problems in the type and atom columns of json_each() and
json_tree().

FossilOrigin-Name: f0aba0e120074430cd7ad93291fcc97b8a25a054

9 years agoFix a comment typo on sqlite3ExprAlloc(). No code changes.
drh [Sun, 23 Aug 2015 20:48:29 +0000 (20:48 +0000)] 
Fix a comment typo on sqlite3ExprAlloc().  No code changes.

FossilOrigin-Name: 518d6220a12fb1289f699ef0821e6adfcd286ed0

9 years agoFix minor glitches in the json1.c extension, mostly having to do with OOM
drh [Sun, 23 Aug 2015 20:44:59 +0000 (20:44 +0000)] 
Fix minor glitches in the json1.c extension, mostly having to do with OOM
behavior.

FossilOrigin-Name: cc5204149c4053b9e529a72102d8df0925ad1ea1

9 years agoFixes to json_each() and json_tree(). Improved json_parse() debugging output.
drh [Sun, 23 Aug 2015 02:42:30 +0000 (02:42 +0000)] 
Fixes to json_each() and json_tree().  Improved json_parse() debugging output.

FossilOrigin-Name: fc1b24f316af07a64672f6edc14ebcff487dffbb

9 years agoAdd the json_valid() function to the json1.c extension. Fix various minor
drh [Sat, 22 Aug 2015 19:39:04 +0000 (19:39 +0000)] 
Add the json_valid() function to the json1.c extension.  Fix various minor
problems in the json1.c extension.

FossilOrigin-Name: 380a97345b446214843a63ccc017d49a52d884da

9 years agoFix a couple instances of OOM handling in the json extension.
drh [Sat, 22 Aug 2015 03:05:54 +0000 (03:05 +0000)] 
Fix a couple instances of OOM handling in the json extension.

FossilOrigin-Name: 213a6c5ccbcfe4495d45e3608e99a6398751aeed

9 years agoDo not apply the WHERE-clause pushdown optimization to terms that originate
drh [Sat, 22 Aug 2015 01:32:29 +0000 (01:32 +0000)] 
Do not apply the WHERE-clause pushdown optimization to terms that originate
in the ON or USING clause of a LEFT JOIN.  Fix for ticket
[6df18e949d3676290].

FossilOrigin-Name: 351bc22fa9b5a2e50da3583a882c5aa390bda19f

9 years agoAdd extension functions for processing JSON.
drh [Fri, 21 Aug 2015 20:43:32 +0000 (20:43 +0000)] 
Add extension functions for processing JSON.

FossilOrigin-Name: 178f9a352c6c9e15e809e1a47530c6592d18578d

9 years agoFixes for compiler warnings and errors in the makefiles. Rename the json
drh [Fri, 21 Aug 2015 20:37:12 +0000 (20:37 +0000)] 
Fixes for compiler warnings and errors in the makefiles.  Rename the
one test script to json101.test.

FossilOrigin-Name: 9ff6ccde5f26f18073587c320290570854ffc833

9 years agoChange the name of the json loadable extension to "json1.c", in anticipation
drh [Fri, 21 Aug 2015 20:12:43 +0000 (20:12 +0000)] 
Change the name of the json loadable extension to "json1.c", in anticipation
of having future major changes to the interface.

FossilOrigin-Name: d0d4bec9e3d8829a2d488f2742f1650214fa716a

9 years agoAdd the fullkey column to both json_each() and json_tree().
drh [Fri, 21 Aug 2015 20:02:48 +0000 (20:02 +0000)] 
Add the fullkey column to both json_each() and json_tree().

FossilOrigin-Name: 15dd99431e9ddd0fbdbb8dcc921687b0c6d26a29

9 years agoMerge header file fixes from trunk.
drh [Fri, 21 Aug 2015 19:56:45 +0000 (19:56 +0000)] 
Merge header file fixes from trunk.

FossilOrigin-Name: 7c2713e98ffb5f0d96eb7de9514eab43f0712011

9 years agoAdd a missing #define for sqlite3_vsnprintf to sqlite3ext.h.
drh [Fri, 21 Aug 2015 19:53:06 +0000 (19:53 +0000)] 
Add a missing #define for sqlite3_vsnprintf to sqlite3ext.h.

FossilOrigin-Name: da3c9df09c46564353218d0163e378b880a3ce62

9 years agoReserve the SQLITE_IOERR_VNODE error code name.
drh [Fri, 21 Aug 2015 17:39:35 +0000 (17:39 +0000)] 
Reserve the SQLITE_IOERR_VNODE error code name.

FossilOrigin-Name: 53b593fcae178f2e08f758ae6fd100869f771bfd

9 years agoAdd the json_tree() virtual table.
drh [Fri, 21 Aug 2015 17:33:11 +0000 (17:33 +0000)] 
Add the json_tree() virtual table.

FossilOrigin-Name: 08c36e45f0d3a7b89caf823652d7543b76ac802a

9 years agoMerge in trunk fixes for table-valued functions.
drh [Fri, 21 Aug 2015 17:16:22 +0000 (17:16 +0000)] 
Merge in trunk fixes for table-valued functions.

FossilOrigin-Name: 67375f32d931351964d75d20671c4a6d8a294d7d

9 years agoFix a corner-case bug in table-valued functions. Update the generate_series()
drh [Fri, 21 Aug 2015 17:14:48 +0000 (17:14 +0000)] 
Fix a corner-case bug in table-valued functions.  Update the generate_series()
virtual table to increase the performance estimate penalty for being
underspecified.

FossilOrigin-Name: 552bc9cb88bbe54b4cf5fdf66d1217e7a2047110

9 years agoFix typo in comment. No changes to code.
drh [Fri, 21 Aug 2015 12:37:49 +0000 (12:37 +0000)] 
Fix typo in comment.  No changes to code.

FossilOrigin-Name: 7b8d17dd840f64dac9a018a4547a97de799e94ab

9 years agoMerge the latest changes from trunk, including the table-valued function
drh [Thu, 20 Aug 2015 23:39:38 +0000 (23:39 +0000)] 
Merge the latest changes from trunk, including the table-valued function
implementation.

FossilOrigin-Name: 10c444322f05ea8b83247f96a140bf3dbc4e9448

9 years agoCompiler-warning fixes in the sqldiff.exe utility.
drh [Thu, 20 Aug 2015 23:33:09 +0000 (23:33 +0000)] 
Compiler-warning fixes in the sqldiff.exe utility.

FossilOrigin-Name: 64d13339d44d1b7ec6768a33421f2138cb7872d8

9 years agoFix a couple C99-isms that cause compile errors on MSVC.
drh [Thu, 20 Aug 2015 23:28:18 +0000 (23:28 +0000)] 
Fix a couple C99-isms that cause compile errors on MSVC.

FossilOrigin-Name: bc577fe6cbbe5385d81d6fa0f3c34bb1c833f0d6

9 years agoFix corner-case memory management issues in table-valued functions. Change
drh [Thu, 20 Aug 2015 23:21:34 +0000 (23:21 +0000)] 
Fix corner-case memory management issues in table-valued functions.  Change
virtual table handling so that if xDestroy is missing the table is
eponymous only even if xCreate is present.

FossilOrigin-Name: 774e6a14b124bbae4da0e188b62aee9ffb8c3745

9 years agoSkip calling the virtual table xDestroy method when it is null.
mistachkin [Thu, 20 Aug 2015 21:14:31 +0000 (21:14 +0000)] 
Skip calling the virtual table xDestroy method when it is null.

FossilOrigin-Name: b73ad305a6b7cb84fe0a1efb334b8e4592e21c40

9 years agoFix compiler warnings in the sqldiff tool seen with MSVC.
mistachkin [Thu, 20 Aug 2015 21:09:32 +0000 (21:09 +0000)] 
Fix compiler warnings in the sqldiff tool seen with MSVC.

FossilOrigin-Name: 072279d458fbb74a812a9ee723041d6b7c662a88

9 years agoFix stray variable declaration for C89.
mistachkin [Thu, 20 Aug 2015 20:21:06 +0000 (20:21 +0000)] 
Fix stray variable declaration for C89.

FossilOrigin-Name: 17eb7f18cb76170e109977a94b259b763cd86c47

9 years agoCorrectly handle empty function argument lists on table-valued functions.
drh [Thu, 20 Aug 2015 20:13:37 +0000 (20:13 +0000)] 
Correctly handle empty function argument lists on table-valued functions.

FossilOrigin-Name: a7acc7878b8bb8e27a0da67b2dbb7bd51df4859b

9 years agoAdd support for table-valued functions in the FROM clause implemented as
drh [Thu, 20 Aug 2015 19:55:58 +0000 (19:55 +0000)] 
Add support for table-valued functions in the FROM clause implemented as
virtual tables.

FossilOrigin-Name: 9b718b06b156163ae34115b6c5f6d163a7ee7cc3

9 years agoPrevent the series.c extension from loading on older versions of SQLite that table-valued-functions
drh [Thu, 20 Aug 2015 18:28:46 +0000 (18:28 +0000)] 
Prevent the series.c extension from loading on older versions of SQLite that
do not support xCreate==NULL.

FossilOrigin-Name: 3efc79427ef4686142d074cfe5b2f0a33af19b2e

9 years agoMake SQLITE_BUSY_SNAPSHOT and SQLITE_BUSY_RECOVERY retryable, just as a plain
drh [Thu, 20 Aug 2015 17:18:32 +0000 (17:18 +0000)] 
Make SQLITE_BUSY_SNAPSHOT and SQLITE_BUSY_RECOVERY retryable, just as a plain
SQLITE_BUSY is.

FossilOrigin-Name: fd13dd950d99fd1996860f7a5f220fdc89180194

9 years agoFix a typo in series.c.
dan [Thu, 20 Aug 2015 16:16:37 +0000 (16:16 +0000)] 
Fix a typo in series.c.

FossilOrigin-Name: 23db7f50f14801c2cf56c006d7c7f593908b7158

9 years agoFix the path lookup for objects so that it can handle quoted identifier
drh [Wed, 19 Aug 2015 23:02:49 +0000 (23:02 +0000)] 
Fix the path lookup for objects so that it can handle quoted identifier
names and non-alphanumerics in the identifier.

FossilOrigin-Name: 87f5873004f69396baa7c67937342b4e32f79bda

9 years agoAdd the json_each(JSON,PATH) table-valued-function.
drh [Wed, 19 Aug 2015 22:47:17 +0000 (22:47 +0000)] 
Add the json_each(JSON,PATH) table-valued-function.

FossilOrigin-Name: 3335ac17bbcb09dc915173d69bf42048f84ad563

9 years agoMerge the table-valued-function rowid fix.
drh [Wed, 19 Aug 2015 19:26:13 +0000 (19:26 +0000)] 
Merge the table-valued-function rowid fix.

FossilOrigin-Name: a06a6392bd48baa8b9bac2624869c0cc7da7e779

9 years agoFix eponymous virtual tables so that they do not automatically make the first
drh [Wed, 19 Aug 2015 19:01:28 +0000 (19:01 +0000)] 
Fix eponymous virtual tables so that they do not automatically make the first
column the rowid.  Enhance the generate_series virtual table to support rowid.

FossilOrigin-Name: a325a08599759471047e234ef9cfcc3cb110aafd

9 years agoMerge support for table-valued functions.
drh [Wed, 19 Aug 2015 18:31:11 +0000 (18:31 +0000)] 
Merge support for table-valued functions.

FossilOrigin-Name: 96a5d44d9fcb7b159c04630ad2d956fe27df5a43

9 years agoImproved comments on the generate_series virtual table. Test cases for
drh [Wed, 19 Aug 2015 18:19:49 +0000 (18:19 +0000)] 
Improved comments on the generate_series virtual table.  Test cases for
ORDER BY rowid DESC with generate_series.

FossilOrigin-Name: fef44c37f31ca9fd7891cecdbe95cc46a987067b

9 years agoA list of arguments following a table name translates into equality
drh [Wed, 19 Aug 2015 17:11:37 +0000 (17:11 +0000)] 
A list of arguments following a table name translates into equality
constraints against hidden columns in that table.

FossilOrigin-Name: 40e12cfe4c29475417ba89fb637b4c763cf74016

9 years agoMinor refactor of the SrcList object so that it is able to hold the argument
drh [Wed, 19 Aug 2015 15:20:00 +0000 (15:20 +0000)] 
Minor refactor of the SrcList object so that it is able to hold the argument
list to a table-valued-function in the FROM clause.

FossilOrigin-Name: b919376147597c4b73421abe5788f893baf1560b

9 years agoVirtual table modules with a null xCreate method act as eponymous-only modules -
drh [Wed, 19 Aug 2015 13:54:20 +0000 (13:54 +0000)] 
Virtual table modules with a null xCreate method act as eponymous-only modules -
they cannot be used in a CREATE VIRTUAL TABLE statement.  Add the series.c
extension that implements a postgres-like generate_series virtual table to
demonstrate this capability.

FossilOrigin-Name: c58426dbd5ea8b8440ebcc1214f79fa63d658216

9 years agoMerge changes from trunk.
drh [Wed, 19 Aug 2015 12:52:51 +0000 (12:52 +0000)] 
Merge changes from trunk.

FossilOrigin-Name: dddd792dedf0c73ebe74b4ff8d303e6216c16b6a