Commit Graph

14456 Commits

Author SHA1 Message Date
drh
6842952429 Merge the latest changes from trunk, including the table-valued function
implementation.

FossilOrigin-Name: 10c444322f05ea8b83247f96a140bf3dbc4e9448
2015-08-20 23:39:38 +00:00
drh
0fee5969c8 Compiler-warning fixes in the sqldiff.exe utility.
FossilOrigin-Name: 64d13339d44d1b7ec6768a33421f2138cb7872d8
2015-08-20 23:33:09 +00:00
drh
c743579e59 Fix a couple C99-isms that cause compile errors on MSVC.
FossilOrigin-Name: bc577fe6cbbe5385d81d6fa0f3c34bb1c833f0d6
2015-08-20 23:28:18 +00:00
drh
d8b1bfc6bf 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
2015-08-20 23:21:34 +00:00
mistachkin
197d59ffc4 Skip calling the virtual table xDestroy method when it is null.
FossilOrigin-Name: b73ad305a6b7cb84fe0a1efb334b8e4592e21c40
2015-08-20 21:14:31 +00:00
mistachkin
1abbe28884 Fix compiler warnings in the sqldiff tool seen with MSVC.
FossilOrigin-Name: 072279d458fbb74a812a9ee723041d6b7c662a88
2015-08-20 21:09:32 +00:00
mistachkin
bc63ec1d62 Fix stray variable declaration for C89.
FossilOrigin-Name: 17eb7f18cb76170e109977a94b259b763cd86c47
2015-08-20 20:21:06 +00:00
drh
d10dbad5e1 Correctly handle empty function argument lists on table-valued functions.
FossilOrigin-Name: a7acc7878b8bb8e27a0da67b2dbb7bd51df4859b
2015-08-20 20:13:37 +00:00
drh
7fcdd06949 Add support for table-valued functions in the FROM clause implemented as
virtual tables.

FossilOrigin-Name: 9b718b06b156163ae34115b6c5f6d163a7ee7cc3
2015-08-20 19:55:58 +00:00
drh
b81fba1930 Prevent the series.c extension from loading on older versions of SQLite that
do not support xCreate==NULL.

FossilOrigin-Name: 3efc79427ef4686142d074cfe5b2f0a33af19b2e
2015-08-20 18:28:46 +00:00
drh
cbd8db35f5 Make SQLITE_BUSY_SNAPSHOT and SQLITE_BUSY_RECOVERY retryable, just as a plain
SQLITE_BUSY is.

FossilOrigin-Name: fd13dd950d99fd1996860f7a5f220fdc89180194
2015-08-20 17:18:32 +00:00
dan
01dced109f Fix a typo in series.c.
FossilOrigin-Name: 23db7f50f14801c2cf56c006d7c7f593908b7158
2015-08-20 16:16:37 +00:00
drh
6b43cc8531 Fix the path lookup for objects so that it can handle quoted identifier
names and non-alphanumerics in the identifier.

FossilOrigin-Name: 87f5873004f69396baa7c67937342b4e32f79bda
2015-08-19 23:02:49 +00:00
drh
cb6c6c6f45 Add the json_each(JSON,PATH) table-valued-function.
FossilOrigin-Name: 3335ac17bbcb09dc915173d69bf42048f84ad563
2015-08-19 22:47:17 +00:00
drh
222cd5bee2 Merge the table-valued-function rowid fix.
FossilOrigin-Name: a06a6392bd48baa8b9bac2624869c0cc7da7e779
2015-08-19 19:26:13 +00:00
drh
509c3fc004 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
2015-08-19 19:01:28 +00:00
drh
03726aaf7f Merge support for table-valued functions.
FossilOrigin-Name: 96a5d44d9fcb7b159c04630ad2d956fe27df5a43
2015-08-19 18:31:11 +00:00
drh
bc550df32f Improved comments on the generate_series virtual table. Test cases for
ORDER BY rowid DESC with generate_series.

FossilOrigin-Name: fef44c37f31ca9fd7891cecdbe95cc46a987067b
2015-08-19 18:19:49 +00:00
drh
01d230ce05 A list of arguments following a table name translates into equality
constraints against hidden columns in that table.

FossilOrigin-Name: 40e12cfe4c29475417ba89fb637b4c763cf74016
2015-08-19 17:11:37 +00:00
drh
8a48b9c0b1 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
2015-08-19 15:20:00 +00:00
drh
398f872d1f 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
2015-08-19 13:54:20 +00:00
drh
b89c92a615 Merge changes from trunk.
FossilOrigin-Name: dddd792dedf0c73ebe74b4ff8d303e6216c16b6a
2015-08-19 12:52:51 +00:00
drh
0e07f6ae40 Simplification to error handling in addModuleArgument() in the virtual table
processing.

FossilOrigin-Name: c573b0a1aa3ba509234f07520fa94d008bcbb330
2015-08-19 12:45:57 +00:00
dan
5ef2b281aa When updating a zipvfs database with RBU, set journal_mode=off to prevent the upper-level pager from creating a large temporary file.
FossilOrigin-Name: dec14a3980dcf6c61b0b9ac4ba82fa963ac346d4
2015-08-19 08:34:34 +00:00
drh
51be3873c0 Initial implementation of eponymous virtual table instances.
FossilOrigin-Name: c1f43a7799a9298abea01b2f8531fc7cdadc4594
2015-08-19 02:32:25 +00:00
dan
c1e63be360 Add test file spellfix2.test, which should have been checked in some time ago.
FossilOrigin-Name: 8599402092537ab3df8926eb900661c12d738d4c
2015-08-18 19:09:28 +00:00
mistachkin
0cbb513a67 Fix harmless compiler warning in FTS5.
FossilOrigin-Name: 02448a9fccd4532daa667e4ba6ff1dbb7f68008a
2015-08-18 16:32:45 +00:00
drh
0042a9785c Comment clarification. No changes to code.
FossilOrigin-Name: 71a966952cf8f1d699cf8362ea3f6204c6e16384
2015-08-18 12:59:58 +00:00
drh
52216adf7e Initial implementation of json_set() and json_insert().
FossilOrigin-Name: 4aa49656d98e2894f2faa8963f79462ee6165d40
2015-08-18 02:28:03 +00:00
drh
d096059fca Initial implementation of json_replace().
FossilOrigin-Name: 3c4bee65d93efc7f03f0f11817a068b02068d37c
2015-08-17 21:22:32 +00:00
drh
301eeccaa7 Add an initial implementation for json_remove().
FossilOrigin-Name: 2a8267209dbda36a37c1b5f65000b2f763c62341
2015-08-17 20:14:19 +00:00
drh
987eb1fa9b Initial implementation for json_array_length(), json_extract(), and
json_type().

FossilOrigin-Name: 39983204515837e7bd574cf47918e493acc03d1f
2015-08-17 15:17:37 +00:00
drh
5634cc05e4 Abandon the JSONB format for now. (We may return to it in the future.) Add
a function to render a JSON parse.

FossilOrigin-Name: 9703c0aa18ae43375af876474b818e504e1c10a5
2015-08-17 11:28:03 +00:00
drh
b2cd10eaa9 Fix off-by-one error when parsing primitive JSON types "true", "false", and
"null".

FossilOrigin-Name: 42c15c1e36b5077646fef99028cf12e587a45023
2015-08-15 21:29:14 +00:00
drh
e9c37f32e5 Add a prototype JSON parser.
FossilOrigin-Name: 789ba487000aa73621a41d115ad5de455ea8ea31
2015-08-15 21:25:36 +00:00
drh
d5a74c8e19 Minor fix to the display of oversized KeyInfo structures in the P4 operand
of Open opcodes in EXPLAIN output.

FossilOrigin-Name: f65a9b4ab2c6f0b7028e16e2a0f83fd6d58ae1cd
2015-08-15 16:32:50 +00:00
drh
e31dc59b4c Duplicate the output of releasetest.tcl into releasetest-out.txt
FossilOrigin-Name: 5e06a9c186f4b7478c73155613de219d702e0241
2015-08-14 12:53:37 +00:00
dan
b8c7cfb834 When searching the wal file for a frame, do not search that part that was already checkpointed when the snapshot being read was at the head of the wal file.
FossilOrigin-Name: 90760e72327eb0593cbfa6d7058b554198cd8044
2015-08-13 20:23:46 +00:00
dan
82d7aea6d4 Add the sqlite3rbu_savestate() function to the rbu extension. To force rbu to save its state to disk without closing the sqlite3rbu* handle.
FossilOrigin-Name: 851a875ad6b81f90960caf4d03b116afc911858d
2015-08-13 18:26:09 +00:00
drh
bd0621b360 Experimental code (untested) for a JSONB datatype.
FossilOrigin-Name: e3596ac7b1dd5bde3f9cae5781a6806d8d9f7166
2015-08-13 13:54:59 +00:00
dan
4510faa6df Avoid invoking system call unlink() directly from RBU code. Use the xDelete method of the default VFS instead.
FossilOrigin-Name: ee966af8ff79189f8b90f3557dea21059517dfe2
2015-08-13 11:46:21 +00:00
dan
6df003c7a5 Avoid reading frames that have already been checkpointed from the wal file.
FossilOrigin-Name: 5669ac4a40429abc3f44540fc9d2f3b79b404bdf
2015-08-12 19:42:08 +00:00
drh
2032d60793 Add the json_object() function.
FossilOrigin-Name: 414a95f3b79359f167858b2325fd2be223569c66
2015-08-12 17:23:34 +00:00
drh
5fa5c10784 Begin adding an extension that provides JSON SQL functions.
FossilOrigin-Name: dde8afdd8dba1d92560326dca7c1cdfedbe5e070
2015-08-12 16:49:40 +00:00
dan
7899fa78c1 Minor optimization for fts5 API xInst().
FossilOrigin-Name: efb7c9c5d0015c8c966f8d6742c05cda82fc146a
2015-08-12 15:36:58 +00:00
dan
7918dc835b Add the xPhraseFirst() and xPhraseNext() fts5 APIs, for faster iteration through a single phrases position list. Also optimize xInst() and xInstCount() a bit.
FossilOrigin-Name: f7682435278419829a46bb4cc9b5625d46549e22
2015-08-12 12:11:28 +00:00
dan
f053ceb9c1 Merge fixes from the fts5NoWarn branch.
FossilOrigin-Name: 61cb2fc6c12810863c965c74e90bc502e20cf810
2015-08-11 14:25:34 +00:00
drh
aa2cdca33e Fix compiler warnings and remove unreachable code.
FossilOrigin-Name: fd5608fb20831f1f1946c8941445b7acc463a143
2015-08-08 23:30:56 +00:00
drh
834f99711c Fix an assert() that was in the wrong spot.
FossilOrigin-Name: 962b6cd6bbc1ef82ae98cb2ddf41e7a1116e70f5
2015-08-08 23:23:33 +00:00
drh
027616d4ce Fix compiler warnings and remove unreachable code.
FossilOrigin-Name: be190fe7826d157fc5acd84210095725b059e4f6
2015-08-08 22:47:47 +00:00