Commit Graph

14630 Commits

Author SHA1 Message Date
drh fea870be38 Remove some redundant code: Call sqlite3ResolveExprListNames() rather than
calling sqlite3ResolveExprNames() in a loop - in two places.

FossilOrigin-Name: bdaf66465b6b1bdad10c08d9527b98e7000a41e4
2015-08-24 20:54:06 +00:00
drh 108aa00a87 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
2015-08-24 20:21:20 +00:00
drh 8981b904b5 Enhance the CREATE VIEW syntax so that the names of columns of the view can
be specified after the view name.

FossilOrigin-Name: d794b34da6f9c77dfe17773b0b17b22de72cce7f
2015-08-24 17:42:49 +00:00
mistachkin a09767b230 Enhancements to the batch build tool for MSVC.
FossilOrigin-Name: a1ae20cd97456a1126cfa1a9bedce0bac0940ad6
2015-08-24 17:18:43 +00:00
drh bc622bc045 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
2015-08-24 15:39:42 +00:00
drh 80d874083b Improvements to JSON string dequoting.
FossilOrigin-Name: 196d66d34d9783622e6f2f79eafea1488fc6f5cf
2015-08-24 12:42:41 +00:00
drh 442a7c6015 Fix corner-case problems in the type and atom columns of json_each() and
json_tree().

FossilOrigin-Name: f0aba0e120074430cd7ad93291fcc97b8a25a054
2015-08-24 02:32:04 +00:00
drh e792b5b420 Fix a comment typo on sqlite3ExprAlloc(). No code changes.
FossilOrigin-Name: 518d6220a12fb1289f699ef0821e6adfcd286ed0
2015-08-23 20:48:29 +00:00
drh c3722b2103 Fix minor glitches in the json1.c extension, mostly having to do with OOM
behavior.

FossilOrigin-Name: cc5204149c4053b9e529a72102d8df0925ad1ea1
2015-08-23 20:44:59 +00:00
drh 8784eca17f Fixes to json_each() and json_tree(). Improved json_parse() debugging output.
FossilOrigin-Name: fc1b24f316af07a64672f6edc14ebcff487dffbb
2015-08-23 02:42:30 +00:00
drh bc8f092ca1 Add the json_valid() function to the json1.c extension. Fix various minor
problems in the json1.c extension.

FossilOrigin-Name: 380a97345b446214843a63ccc017d49a52d884da
2015-08-22 19:39:04 +00:00
drh be9474ee05 Fix a couple instances of OOM handling in the json extension.
FossilOrigin-Name: 213a6c5ccbcfe4495d45e3608e99a6398751aeed
2015-08-22 03:05:54 +00:00
drh 38978dd4ed 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
2015-08-22 01:32:29 +00:00
drh 1fa97b3ec8 Add extension functions for processing JSON.
FossilOrigin-Name: 178f9a352c6c9e15e809e1a47530c6592d18578d
2015-08-21 20:43:32 +00:00
drh 6fd5c1e0e8 Fixes for compiler warnings and errors in the makefiles. Rename the
one test script to json101.test.

FossilOrigin-Name: 9ff6ccde5f26f18073587c320290570854ffc833
2015-08-21 20:37:12 +00:00
drh f28ed795db Change the name of the json loadable extension to "json1.c", in anticipation
of having future major changes to the interface.

FossilOrigin-Name: d0d4bec9e3d8829a2d488f2742f1650214fa716a
2015-08-21 20:12:43 +00:00
drh 4af352d47e Add the fullkey column to both json_each() and json_tree().
FossilOrigin-Name: 15dd99431e9ddd0fbdbb8dcc921687b0c6d26a29
2015-08-21 20:02:48 +00:00
drh b1b124d482 Merge header file fixes from trunk.
FossilOrigin-Name: 7c2713e98ffb5f0d96eb7de9514eab43f0712011
2015-08-21 19:56:45 +00:00
drh cfe05d882f Add a missing #define for sqlite3_vsnprintf to sqlite3ext.h.
FossilOrigin-Name: da3c9df09c46564353218d0163e378b880a3ce62
2015-08-21 19:53:06 +00:00
drh 180872fef9 Reserve the SQLITE_IOERR_VNODE error code name.
FossilOrigin-Name: 53b593fcae178f2e08f758ae6fd100869f771bfd
2015-08-21 17:39:35 +00:00
drh 505ad2ca41 Add the json_tree() virtual table.
FossilOrigin-Name: 08c36e45f0d3a7b89caf823652d7543b76ac802a
2015-08-21 17:33:11 +00:00
drh a7781dc0bb Merge in trunk fixes for table-valued functions.
FossilOrigin-Name: 67375f32d931351964d75d20671c4a6d8a294d7d
2015-08-21 17:16:22 +00:00
drh 1f2fc28134 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
2015-08-21 17:14:48 +00:00
drh 0dfbe064de Fix typo in comment. No changes to code.
FossilOrigin-Name: 7b8d17dd840f64dac9a018a4547a97de799e94ab
2015-08-21 12:37:49 +00:00
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
dan d50bd6b0aa Update RBU to avoid repreparing a statement immediately after it is prepared.
FossilOrigin-Name: 1d75a41bb2f7fcd32f9f08768517b814e452e456
2015-08-08 15:13:08 +00:00
drh cf599b6ade Enhance the query planner so that it is able to use partial indexes that use
AND-connected terms in the WHERE clause.

FossilOrigin-Name: 065765902d2774d7432b9c00ea2efed26e0aaa5e
2015-08-07 20:57:00 +00:00
dan 5a790285a0 Add a specially formatted comment to shell.c to make it easier for scripts to edit. No code changes.
FossilOrigin-Name: 6d47b35ad10e85f27d1c446586e8c798cce4911d
2015-08-07 20:06:14 +00:00
drh 3acc85f0ed increase the version number to 3.8.12
FossilOrigin-Name: e596a6b63f3a18c26352b1b3e67bb282fdec8055
2015-08-06 12:54:13 +00:00
mistachkin 7e968a7d0a Fix harmless compiler warnings in FTS5 code.
FossilOrigin-Name: 0ddb2532b2daaaf1b0109ac360822f84cb999b7f
2015-08-06 03:19:14 +00:00
mistachkin c38e00f61e Fix duplicate test numbering in the FTS5 matchinfo tests.
FossilOrigin-Name: 483ebe8989ed7dbe197fe84e3eef6e76fa828e14
2015-08-06 03:09:49 +00:00
dan 50b5491771 Add tests for the matchinfo-like test function. Fix problems found in test and fts5 code by doing so.
FossilOrigin-Name: 9e3aafe44a0813aa2a0c6172fdba1440b8a973ec
2015-08-05 19:35:59 +00:00
dan b20a42e316 Update the spellfix virtual table extension so that an explicit "top = ?" constraint works even if there is also a "distance < ?" or "distance <= ?" constraint.
FossilOrigin-Name: 0888838371608558f31d5bcb5fed1c8861aa52c1
2015-08-05 15:29:32 +00:00
dan dca929040a Fix some problems in test code detected by cppcheck.
FossilOrigin-Name: c9ff4ca4a0b44bbb8d6676144ddf77b04426e619
2015-08-05 08:01:46 +00:00
dan f9419d17ff Remove all references to "docid" within fts5 source code and comments. Replace with "rowid".
FossilOrigin-Name: dffd358f6cbf575d3b1045b1ce53429d15bade2a
2015-08-05 07:43:46 +00:00
dan d3789c0028 Add new test file fts5_test_mi.c, containing an implementation of a function similar to FTS4 matchinfo() for FTS5.
FossilOrigin-Name: 4f9520a9dc9c667b7fda5b0822de2bf48184ac99
2015-08-04 20:29:00 +00:00
drh dc6ef98742 Improve the usage comment on sqlite3_analyzer: show the available switches.
FossilOrigin-Name: 783f78e39795b2c491c342558ef59f1fc32c2858
2015-08-04 19:06:50 +00:00
dan 30c16ade95 Update the [showdb] program so that the database file is read directly (bypassing the SQLite VFS) only if the --raw option is specified. Otherwise, it is read using the default VFS. Also, the URI syntax may be used on the command line to specify the name of the database file to examine, so an alternative VFS may be requested using a URI parameter.
FossilOrigin-Name: e3c6d4b6e738c7ea015c0c809a5f7d1a94dda945
2015-08-04 15:29:43 +00:00
dan 8fb1bd2bc4 Update the [showdb] program so that the database file is read directly (bypassing the SQLite VFS) only if the --raw option is specified. Otherwise, it is read using the default VFS. An alternative VFS may be specified by specifying the database file to open using the URI syntax.
FossilOrigin-Name: 9699e9bd9a0e813d04c9d37422920670697c46ed
2015-08-04 15:23:49 +00:00
drh 8fb6c4389d In the sqlite3_analyzer.exe utility, show the depth of each btree and report
the average fanout of indexes and WITHOUT ROWID tables.

FossilOrigin-Name: cd997770013e923ac3fa34b1546b97681923c8b1
2015-08-04 14:18:10 +00:00
dan 871f6e34f6 Add the "--uri" option to utility program "showdb". This option causes showdb to use sqlite with the SQLITE_OPEN_URI option to open the database file, instead of opening it directly using the OS open() function.
FossilOrigin-Name: 90e34d5119f720496e86a3a6de7771ea87b7dcbb
2015-08-03 17:03:31 +00:00
drh fa4620b6f5 Allow a VIEW to reference undefined tables and functions when initially
created.  The error report is deferred until the VIEW is used.  This allows
views to be created before subviews and tables that the view references.

FossilOrigin-Name: 70b57dafb3216feb21091883196831fa1252e7bf
2015-08-03 13:44:45 +00:00
dan 0734b5a057 Add extra tests for RBU and FTS3/4.
FossilOrigin-Name: 3419044967258e3ed65f71528e06952ee102dcc7
2015-08-01 18:18:21 +00:00
dan a9ca8afef5 Add support for "fossil deltas" to RBU and "sqldiff --rbu".
FossilOrigin-Name: e26ef165fe2f7524684af0d269d38475ea8b9489
2015-07-31 19:52:03 +00:00
drh 8ff2587b66 Fix the sqlite3_stmt_busy() interface so that it always returns FALSE after
the statement has returned SQLITE_DONE, even for ROLLBACK statements.
Clarify the documentation.

FossilOrigin-Name: 047d3475e93d08cf172ad02404a690d5b0c1b833
2015-07-31 18:59:56 +00:00
dan 90c3179bb4 Remove a duplicate "typedef struct Fts5Global Fts5Global;" from fts5_main.c (duplicate is in fts5Int.h).
FossilOrigin-Name: 54a771fe2c2b3c1cc2914a527a825934fe114c49
2015-07-31 17:48:07 +00:00
mistachkin 809edfcc01 When building the VSIX package for UAP, omit the AppLocal suffix for the MSVC runtime library because it is no longer needed.
FossilOrigin-Name: fee7ad73c10e9353c3ac298d254ab77ad85a210d
2015-07-31 15:14:14 +00:00
dan dd688e7970 Fix a problem causing [sqldiff --rbu] to fail on tables for which all columns are part of the PRIMARY KEY.
FossilOrigin-Name: 93449e7046d60cad020ca439ded82e759c2e3cd9
2015-07-31 15:13:29 +00:00
dan 79e2347fdf Fix a bug in the fts5 porter tokenizer preventing it from passing xCreate() arguments through to its parent tokenizer.
FossilOrigin-Name: c3c672af97edf2ae5d793f6fa47364370aa4f4ec
2015-07-31 14:43:02 +00:00
dan 994618521c Add the --rbu switch to the "sqldiff" utility.
FossilOrigin-Name: 098bea26da4533d9ad97a85687cca56fb0d764a4
2015-07-30 20:26:16 +00:00
dan c1e8ae679a Allow RBU tables to be named "data[0-9]*_<target>" instead of strictly "data_<target>". Also update RBU so that it always processes data tables in order sorted by name.
FossilOrigin-Name: 287aa30601506f168d355c35176a3383474444ca
2015-07-30 11:38:19 +00:00
dan dbac3ece0f Return an error message (instead of segfaulting) if test function fts5_expr() is invoked with no arguments.
FossilOrigin-Name: 8e818b8985c0196cd9671a6491796faaeebeb16e
2015-07-30 11:26:10 +00:00
mistachkin e61d31fa00 Support building VSIX packages for UAP using Visual Studio 2015 and the Windows 10 SDK.
FossilOrigin-Name: 96559adbf18bbbf25ff4e1579ee3ff2afef4c4d7
2015-07-29 22:38:45 +00:00
mistachkin afb4004ccc Update Windows 10 SDK version for RTM.
FossilOrigin-Name: 80ab338cc6fe920ad7edbb86672ff3d704152f52
2015-07-29 22:37:06 +00:00
mistachkin 60e0807801 Add SQLITE_DISABLE_INTRINSIC define to disable use of intrinsic functions (e.g. for certain older compilers and/or platforms).
FossilOrigin-Name: f0075d735a76ce326619b6ba7f0d556e492f1c41
2015-07-29 21:47:39 +00:00
drh 36c25f7686 Fix the releasetest.tcl script so that it ignore cast overflow errors that
recent versions of clang generate but which are unavoidable given the test
input.

FossilOrigin-Name: a0020c57859fd452a2b5c943f9c5cf5ec6f997e3
2015-07-29 20:24:39 +00:00
drh 6a8d08bc55 Version 3.8.11.1
FossilOrigin-Name: cf538e2783e468bbc25e7cb2a9ee64d3e0e80b2f
2015-07-29 20:00:57 +00:00
drh 3bc3709e7b Restore an undocumented side-effect of PRAGMA cache_size: it forces the
database schema to be parsed.  Also increase the version number to 3.8.11.1.

FossilOrigin-Name: e4628de3ce2b556fb46f0eb6eaac4809d17738f0
2015-07-29 15:22:49 +00:00
dan 0f43df31b5 Update comments in fts5.h describing the xColumnCount() API function.
FossilOrigin-Name: a623eb55d1583bcfe360a8dabd29f2a583c61e64
2015-07-29 14:58:47 +00:00
drh cc3c382826 Increase the version number to 3.8.11.1
FossilOrigin-Name: 326d746dee3589a4e2ee06f3285285856e734b87
2015-07-29 14:46:46 +00:00
drh 8ea60e35c2 The "PRAGMA cache_size" reads the database schema, as it has down in all prior
versions of SQLite.  This side-effect of cache_size is undocumented, but 
apparently it does get used and its absence from 3.8.11 was causing problems.

FossilOrigin-Name: 4489722a6b560355ef13f091e5c9dcf0b00072f0
2015-07-29 14:10:43 +00:00
mistachkin 9b714140d1 Update batch build tool library paths for MSVC 2015.
FossilOrigin-Name: d431d4e11a6006473ac223e58806ac26050934d5
2015-07-28 19:35:26 +00:00
drh 41b9ca2519 Fix the xfer optimization for WITHOUT ROWID tables so that it correctly
updates the change count returned by sqlite3_changes().

FossilOrigin-Name: eff43715d1a3a9ce3fe5da194dbb76ec0c06e13c
2015-07-28 18:53:37 +00:00
drh 33a3c75999 Clarification to the documentation for sqlite3_result_zeroblob64(). No
changes to code.

FossilOrigin-Name: c98175e900cdda0c81fb559fed4cc5f27c34e368
2015-07-27 19:57:13 +00:00
drh 3b8d5ac7fe Version 3.8.11
FossilOrigin-Name: b8e92227a469de677a66da62e4361f099c0b79d0
2015-07-27 13:49:41 +00:00
dan 291d090947 Merge the fts5-btree-index branch with this one. FTS5 changes only.
FossilOrigin-Name: 9f1dcdc3e1644c21762dacf619fac70afe6318c5
2015-07-27 12:19:11 +00:00
dan c3b4132f53 Bump the "version" field in the fts5 config table.
FossilOrigin-Name: 92c9178933ef95e92c343c0a741a76bbdf071966
2015-07-27 11:49:01 +00:00
dan 8d90087146 Minor tweak to the SQL schema used by fts5.
FossilOrigin-Name: 427bf09ba41158041d774aac2b5ffbd062c6eabe
2015-07-27 11:43:36 +00:00
dan d0dc8cb5a3 Remove a potentially undefined behaviour involving signed integers and bitshift operations from fts5_hash.c.
FossilOrigin-Name: ad6286ab1f40e4716456a67b719f9cd733f988eb
2015-07-27 11:01:19 +00:00
dan 44198f30b5 Merge latest trunk changes with this branch.
FossilOrigin-Name: 5ec933c257884019484db7f533ce920012e47a1c
2015-07-27 10:46:48 +00:00
dan 5a51c272ea Remove a duplicated "if" condition from fts3.c.
FossilOrigin-Name: ee348b12754abda1fe13231c1868faca9d78481c
2015-07-25 19:26:52 +00:00
dan d1f9ffeb5f Fix the rowallock.test script so that it works with builds that do not support mmap mode.
FossilOrigin-Name: 7efed5786bb6a7a452f5aece9d6c6a09e6930939
2015-07-25 14:26:17 +00:00
drh 06b5a224c0 Fix the wal3.test module so that it works with the memsubsys1 permutation.
FossilOrigin-Name: af85b01d93d3043f2e1a38d289ca00a5ef24520c
2015-07-25 14:12:26 +00:00
dan 8adbb17cb5 Fix a test script problem in memsubsys2.test.
FossilOrigin-Name: 70885729b7488474e7294212f9b334382675b112
2015-07-25 12:03:57 +00:00
drh 7416f2edd9 Disable the page cache bulk allocation for the shrink.test and wal.test
modules.

FossilOrigin-Name: 3418f1f165a0746cdf130e6a19fa0e1eb56df1d4
2015-07-25 03:10:12 +00:00
drh c6edb3acf9 Fix the zeroblob.test script so that it works even on builds where the
SQLITE_MAX_LENGTH has been raised to 2147483645.

FossilOrigin-Name: db129149812cb4eadb4cd79ad293d14962d2638d
2015-07-24 23:28:05 +00:00
mistachkin 24fa5435ee Enable the RBU extension to compile cleanly on Windows using MSVC.
FossilOrigin-Name: cca79fdc3dff65907c2a59369057265b4512058f
2015-07-24 21:19:25 +00:00
mistachkin 9895f73526 For Windows CE, a different header is required for the byteswap intrinsics.
FossilOrigin-Name: 2d572b8cdc67679cc95e69677a87e7b4a82f6c2d
2015-07-24 20:43:18 +00:00
dan 08406bf064 Fix warnings in fts5 code.
FossilOrigin-Name: bd4f156d07d0db1f063d42891965920fc2229352
2015-07-24 20:34:40 +00:00
drh e045d483f8 Fix the pragma2.test module so that it works with
SQLITE_ENABLE_MEMORY_MANAGEMENT.

FossilOrigin-Name: de281a4fac0de3700e754c17976a8497587ca797
2015-07-24 19:56:44 +00:00
dan 5555741bdc Allow the RBU module to read data from appropriately named SQL views created within the RBU database.
FossilOrigin-Name: 45c6a760ca63d19a7ccc352c7e35d8391025b515
2015-07-24 18:58:59 +00:00
dan d716c39c76 Fix a test script bug introduced by [562687d9].
FossilOrigin-Name: a343745d99cf4bccb2f5582735cc2f88b03e847d
2015-07-24 18:22:29 +00:00
dan 80c0302228 Add the sqlite3_bind_zeroblob64() API.
FossilOrigin-Name: 1997ee548b2e569a39e73319b661c1a78dfe5dae
2015-07-24 17:36:34 +00:00
drh a523e31a87 New makefile target "fastfuzztest" runs the same tests as "fuzztest" but
with a 100M memory size limit.  This more than doubles the speed.  The
original unlimited "fuzztest" is still run on a "fulltest".

FossilOrigin-Name: cfeb1b1c294c58222549d06819e9df2e300388fd
2015-07-24 17:26:13 +00:00
drh 6bacdc21ae Fix compiler warnings. Get the new sqlite3_result_zeroblob64() working
on loadable extensions.

FossilOrigin-Name: f8991e6f726485301c80d2dbb05e7d5c0d283b5d
2015-07-24 17:14:03 +00:00
dan a4d5ae8fa2 Add the sqlite3_result_zeroblob64() API. Use it in the SQL zeroblob() function.
FossilOrigin-Name: c6445b9fb4d7d1a8479436d7d183bad754a01615
2015-07-24 16:24:37 +00:00
drh 53e66c3cda More robust handling of zeroblob() with oversized arguments. Fix fuzzcheck
so that it can be run with limited heap memory.

FossilOrigin-Name: 4e3e516a42059c97f42a7eb59bdf5cded0ff843a
2015-07-24 15:49:23 +00:00
dan 03bc525a51 Modify a few test scripts to avoid leaving the sqlite3Config structure in a non-default state.
FossilOrigin-Name: 562687d9f56bf4bb0f5f07f97cbbb7649c81faf8
2015-07-24 14:17:17 +00:00
mistachkin f6972c3764 Update RBU description comment in the header file. No changes to code.
FossilOrigin-Name: 119883a21bdcab66c15d1e80f3da20addda328ad
2015-07-24 00:02:15 +00:00
drh cfb8f8d6a9 Change the name of the OTA extension to RBU: Resumable Bulk Update.
FossilOrigin-Name: 017c5019e1ce042025d4f327e50ec50af49f9fa4
2015-07-23 20:44:49 +00:00
drh 7877d9afca When SQLITE_OMIT_LOOKASIDE is set, do not allocate any lookaside memory since
it will never be used.

FossilOrigin-Name: 0ffd499f2374f2b191080b9952acfed56daf3335
2015-07-23 17:16:27 +00:00
drh d3e3f0b46e The sqlite3ExprCodeGetColumn() is not guaranteed to put the result in the
register requested.   Fix the skip-scan code generator for WITHOUT ROWID
tables so that it always checks the register and copies the result if it
lands in the wrong register.  Fix for ticket [8fd39115d8f46ece70e7d4b3].

FossilOrigin-Name: 793e206f9032d9205bdb3f447b136bed9a25fa22
2015-07-23 16:39:33 +00:00
mistachkin 6b67a8ae03 Fix harmless compiler warning in MSVC 2015.
FossilOrigin-Name: 01c8b9ccfa0f336dfead7c004de3de571753f707
2015-07-21 19:22:35 +00:00
mistachkin 9edb5ceb1f Cleanup the 'config.h' file in the appropriate distclean targets.
FossilOrigin-Name: e0a9978077a1b4e5988681438e4efff93920e574
2015-07-19 19:53:23 +00:00
drh 63abdc59dd More adjustments to the malloc5.test module so that it works correctly with
the new pcache1 bulk allocation.

FossilOrigin-Name: 2a7b3a440f74019f154496b2f95aa852a46e04fc
2015-07-17 12:42:53 +00:00
drh f6bff3f5d6 Avoid a harmless compiler warning.
FossilOrigin-Name: 2288842b8f191ff05a157db7f77af867bfa83c4f
2015-07-17 01:16:10 +00:00
dan 3baaacae03 Merge trunk changes, including fixes for compiler warnings in fts5 code, with this branch.
FossilOrigin-Name: 7190d79ba452ceb1af77ce1375278b097816a8be
2015-07-16 20:24:42 +00:00
dan 8694d6049f Fix compiler warnings in fts5 code.
FossilOrigin-Name: e9bf275cd969eca6fb41384d3637528d6a19f819
2015-07-16 20:17:57 +00:00
drh 939d4bcd77 Fix harmless compiler warnings.
FossilOrigin-Name: 9a592cf91c74b369bacf6a0e69d45f3e73dfdbce
2015-07-16 18:37:53 +00:00
drh 957026ac78 Defer the bulk pcache1 memory allocation until the first page allocation
request.  Limit the size of the pcache1 bulk allocation to the cache_size
setting.  Deallocate the bulk allocation on a sqlite3_db_release_memory()
request, if the bulk allocation is completely unused.

FossilOrigin-Name: b79a4affe44bd0c8e155cae19f3f62c715684cd6
2015-07-16 18:18:19 +00:00
mistachkin 89b31d73a6 Fix compilation issues with SQLITE_OMIT_COMPOUND_SELECT defined.
FossilOrigin-Name: 9c39d4644530ccc532f4ff26464106c6da43269a
2015-07-16 17:29:27 +00:00
drh 3e9dd938dd Enable memory-mapped I/O on FreeBSD and DragonFly.
FossilOrigin-Name: 2cdd647951ff5dca53576bb8be6dd6310a557571
2015-07-15 23:15:59 +00:00
mistachkin 3a2a686409 Make the debugging line numbers in the amalgamation more accurate.
FossilOrigin-Name: 3b34e95ca85a6dd7d0766e43035a6cec4bc724a1
2015-07-15 21:00:33 +00:00
dan e3229c19cb Use a WITHOUT ROWID table to index fts5 btree leaves. This is faster to query and only slightly larger than storing btree nodes within an intkey table.
FossilOrigin-Name: 862418e3506d4b7cca9c44d58c2eb9dc915d75c9
2015-07-15 19:46:02 +00:00
drh f4fa0b8073 Fix some harmless compiler warnings.
FossilOrigin-Name: 110cd84f5e842c4dcd9b9398cea211e25f36b3aa
2015-07-15 18:35:54 +00:00
drh 618ee61e04 Attempt to fix harmless warnings generated by GCC and Clang runtime analyzers.
FossilOrigin-Name: b522c95ddcd7046dca756f4d1a1e90c34dbcab64
2015-07-15 18:04:48 +00:00
drh 3cf9c12008 Fix the fuzz3.test script so that it works with the new bulk pagecache
allocation feature.

FossilOrigin-Name: 829a2dbaf17413743b58ce0533d556031a14195a
2015-07-15 13:56:34 +00:00
drh a8dbd52abb Amplify the comment on renderLogMsg() that explains the problems associated
with calling sqlite3_log() from deep within the memory allocator.

FossilOrigin-Name: a73d7128fbca8dde5e90bd46ee915e39ae07dd1f
2015-07-14 22:43:37 +00:00
mistachkin bc50bb7f53 Further refine FTS5 cleanup in Makefiles.
FossilOrigin-Name: b53a95063cf6b8ee8cad77e9fff4c50a356c43bb
2015-07-14 21:56:53 +00:00
mistachkin 65a88fcb42 Skip trying to include 'intrin.h' when compiling for WinCE with MSVC.
FossilOrigin-Name: 6db90ca2b4ac806b42532072ebe6b2a4a7b9713d
2015-07-14 21:56:17 +00:00
mistachkin 532f179cab Fix some harmless compiler warnings.
FossilOrigin-Name: 3de030c904d125ccf41fa1929646b8a002b5341b
2015-07-14 17:18:05 +00:00
drh 201e0c68f7 Always invoke the profile callback even if the statement does not run to
completion.

FossilOrigin-Name: 202479aa0a62067343e724487960b8a039e2e978
2015-07-14 14:48:50 +00:00
mistachkin ebad80e373 Refine cleaning of FTS5 files by Makefile targets.
FossilOrigin-Name: e548d77b3c91cdf11c78d1a688fd768e209bdbf5
2015-07-14 00:36:34 +00:00
drh fcd4325398 Fix the origination date on the loadfts.c utility program.
FossilOrigin-Name: 5c76c062c0cbf7c95897c5de4868172292023303
2015-07-13 23:55:08 +00:00
drh 3547c5184c Fix the header comment on the loadfts.c utility program.
FossilOrigin-Name: 955ad4ae1978eeee1be9014fe2760c8519ad6206
2015-07-13 18:01:14 +00:00
dan 3eb9024d68 Fix inconsistencies in formatting of fts5 docs.
FossilOrigin-Name: 5fb4c77163be8d5ff1e2934dda3cc2ad0a6267e8
2015-07-10 17:55:42 +00:00
dan d2454f47e7 Improve the performance of docid merges in fts5.
FossilOrigin-Name: b2de77a01cc5edcea2f98f7916e64cb33e6bd414
2015-07-09 20:46:35 +00:00
dan 3dbd2397f4 Reduce the number of calls to malloc() made by fts5.
FossilOrigin-Name: 898618ccf61d3ad166d9fc742e132d518338b5c3
2015-07-09 19:02:19 +00:00
dan a90579db99 Fix two problems that could cause fts3 auxiliary functions to occasionally misbehave if used with match expressions that contain both OR and NEAR.
FossilOrigin-Name: 372c1db2475f367d54270d5801aff0503745bff4
2015-07-08 17:59:08 +00:00
drh 104a25a034 Enhance the pcache1 page cache so that it tries to allocate a block of
SQLITE_DEFAULT_PCACHE_INITSZ pages from malloc() on startup, and uses those
preallocated pages when possible rather than going to malloc() for each
individual page.  About a 5% performance increase for some workloads.

FossilOrigin-Name: 5348ffc3fda5168c1e9e14aa88b0c6aedbda7c94
2015-07-08 16:22:42 +00:00
drh 7b341e6f99 Comment fix. No changes to code.
FossilOrigin-Name: c1e2ed0ef4d3436d19d3203c5fb553caac53659e
2015-07-08 14:13:44 +00:00
drh 52d9f40b7d Do not do the bulk pcache1 allocations if SQLITE_CONFIG_PAGECACHE specifies
a global page cache buffer.

FossilOrigin-Name: 75d98dae676996a05e97b09b19e34463e8f30d51
2015-07-08 13:40:50 +00:00
drh 4698136594 Early detection of file corruption in a debugging routine, before the invalid
data can cause problems.

FossilOrigin-Name: b27a47fef995f0ab2516e6ca779711cab1f50fb9
2015-07-08 12:25:38 +00:00
drh e56d43010d Avoid left-shifting bits into the sign of a signed integer, as such behavior
is technically undefined.

FossilOrigin-Name: 9417b4021b779876dcb3b9be636f01f4055eb54e
2015-07-08 01:22:52 +00:00
drh 4297c7c4be Add a compile-time constant for configuring the default pagecache setup.
FossilOrigin-Name: ad5fdfbac85682f0f0dee62e1086f40026a58be2
2015-07-07 21:14:42 +00:00
dan bcf2163771 Merge the Fts5MultiSegIter and Fts5IndexIter objects.
FossilOrigin-Name: 6ace73541ae48aeb19e0c2d9f6772d032d0a7eae
2015-07-07 19:35:11 +00:00
dan 01233d3e54 Add a test case to verify that "PRAGMA data_version" works as expected when an OTA client writes to the database.
FossilOrigin-Name: 6441f2dc9e7f53de64bc15b1d766c885b2635112
2015-07-07 19:07:30 +00:00
drh fd5ae9649c No need to test sqlite3GlobalConfig.bCoreMutex when SQLITE_THREADSAFE==0.
FossilOrigin-Name: 26db0fee06947d75621237a641b9652b312b3b37
2015-07-07 15:14:16 +00:00
drh c54357cc2a Simplify the page recycling condition in pcache1. Fix test cases to work
with the latest changes.

FossilOrigin-Name: 5b60df5503f61922326b3e10e94aa197b17afe4b
2015-07-07 14:06:18 +00:00
dan b2fe306a2e Further optimizations for fts5 b-tree seeks.
FossilOrigin-Name: f37899686c032145f431f81c1072738536c61c7e
2015-07-07 08:29:32 +00:00
drh db7ae89d5b A unified cache is now only used for SQLITE_ENABLE_MEMORY_MANAGEMENT, or if
SQLITE_CONFIG_PAGECACHE defines a shared start-time page cache buffer and the
application is single-threaded.

FossilOrigin-Name: d5ff1d69054d51a55eff6e1979971822db7f8f30
2015-07-06 20:57:22 +00:00
dan 656773b675 Speed up seek operations on fts5 b-tree structures.
FossilOrigin-Name: 7b7da1eb435d321fc4283f6aa2161fa1e16f2cf3
2015-07-06 20:27:19 +00:00
drh ee70a84ea7 Enhance separate pcache1 to allocate a block of pages from heap on startup,
if possible, for a 5.2% performance improvement.

FossilOrigin-Name: aa7341c8736732a0a59f6688cc34e78be02a7bfc
2015-07-06 18:54:52 +00:00
drh b63ce02f57 Do not allow recursive CTEs that use aggregate queries in the recursive part.
FossilOrigin-Name: 6d2999afbc25b9c238e4028f637c10eaaf0ec75e
2015-07-05 22:15:10 +00:00
dan 30ae503167 Optimize seek operations on fts5 b-trees.
FossilOrigin-Name: 8cf02090ce53ec150492d77d9e5e5f27665bd34f
2015-07-04 18:44:07 +00:00
drh 01c5c00c12 Preserve the number of requested PAGECACHE pages even if the memory pointer
or size is zero.  Enhance the pcache1.c header comment to explain the memory
layout of a page cache line.

FossilOrigin-Name: dacb2a615ce1c0573baf4518000454038745cf2a
2015-07-04 18:15:04 +00:00
dan 70c8885417 Fix a problem in the fts5 integrity-check.
FossilOrigin-Name: 4e473559c9bdcf4d0b823e995a3642cd50ebd337
2015-07-04 15:35:02 +00:00
drh 72e191ed71 Do not preserve the btreeInitPage() results in PRAGMA integrity_check if
there were cell sizing errors because PRAGMA cell_size_check was turned off
during the btreeInitPage() call.

FossilOrigin-Name: 743bf1f184be316971f2e9c651bcf573bde8654a
2015-07-04 11:14:20 +00:00
mistachkin 68b134c73a Sync up Makefile clean targets for FTS5.
FossilOrigin-Name: 43ead44ef6416d69602e123c3be7a258772837f1
2015-07-04 00:04:37 +00:00
mistachkin 74db356726 Correction to check-in [1025873fdf], tighten up the number of static test mutexes.
FossilOrigin-Name: 4e515897af97cb3a4158bcc34318992e8dcee77a
2015-07-03 23:29:55 +00:00
mistachkin 82194aa6e2 Update clean target in MSVC makefile.
FossilOrigin-Name: e6c03e72010e919dbac2055b6c3f3b13b1663b15
2015-07-03 23:12:33 +00:00
mistachkin 28ae577a3d Enhance mutex testing to include APP and VFS static mutexes.
FossilOrigin-Name: 1025873fdfd9e7e53094c48af1a79c60ae50ae97
2015-07-03 23:11:36 +00:00
mistachkin 93de653844 Add static mutexes for use by the built-in / third-party VFSs and use the built-in VFS mutex where appropriate.
FossilOrigin-Name: b202e2a1d73d104d795d2252b1c6f61d65bfb295
2015-07-03 21:38:09 +00:00
dan 28a10c3c1f Rework the Fts5MultiSegIter structure a bit to make it more efficient.
FossilOrigin-Name: 0778825d0ec9315c70659fae8d0640b209049dd8
2015-07-03 20:47:18 +00:00
dan 00a1351e55 Speed up eof checks on fts5 cursors.
FossilOrigin-Name: 3df4af5d8c28863783b0bc867abfbe31cc96f1b9
2015-07-03 19:13:56 +00:00
mistachkin f156c9b684 Enable use of the __builtin_bswap32() only with GCC 4.3 and higher.
FossilOrigin-Name: 030f60a7ba171650ce8c0ac32dc166eab80aca32
2015-07-03 17:54:49 +00:00
dan ec7c1de354 Avoid freeing the array of instance matches each time the fts5 xNext() method is called.
FossilOrigin-Name: b9b0c1e50d77f5d6e02f43fbb100c722cb692cc5
2015-07-03 17:14:18 +00:00
drh 2e43e96107 New command-line options for speedtest1: --multithread, --nomemstat,
--serialized, and --singlethread

FossilOrigin-Name: 2b7567229e3ba7e22271bb909ba977b3de19cca5
2015-07-03 14:34:25 +00:00
dan a153bbc4c2 Copy fts5.h into the build directory as part of building fts5.c. Also remove code to edit fts5parse.c from various Makefiles and add it to mkfts5c.tcl.
FossilOrigin-Name: 4d8f03dc7b6529cf8d46fc0fcc82112c0394dc13
2015-07-02 20:12:34 +00:00
drh d2dc87f6d5 When doing coverage analysis of a btree page for pragma integrity_check,
make the first entry (that covers the header, cell index, and gap) implied,
for a performance boost and size reduction.

FossilOrigin-Name: e53d497c2d2fbc5014b39f5624b52ce207800698
2015-07-02 19:47:08 +00:00
dan 6544b8643f Minor change to mkfts5c.tcl so that fts5.c can be used according to the instructions in loadext.html.
FossilOrigin-Name: edbcccd349090efff3f975e27451608136a429fc
2015-07-02 18:52:16 +00:00
dan 3abdc44e7b Add fts5_source_id() SQL function, similar to sqlite_source_id().
FossilOrigin-Name: ec2573487cb86664f7f056168a764c28ca8236fc
2015-07-02 18:16:02 +00:00
mistachkin c29cbb0bec Fix harmless compiler warnings and one macro VVA_ONLY macro usage issue.
FossilOrigin-Name: bcc8a75509aafda61feb6dcc074668c79611a662
2015-07-02 16:52:01 +00:00
mistachkin ae6ca8e0ed Simplify FTS5 handling in the MSVC makefile.
FossilOrigin-Name: f022e04343fc166a71b315d5aabbc5cc075a4767
2015-07-02 16:50:43 +00:00
drh 1910def351 Fix a (harmless) shadowed local variable definition in the integrity_check
logic.

FossilOrigin-Name: 3a26a919fd5550e5a0053a48cb93a27bb95cc916
2015-07-02 16:29:56 +00:00
drh cbc6b71f39 Smaller and faster PRAGMA integrity_check that also does a better job of
detecting errors.  Some output text describing discovered file corruption
has changed for clarity.

FossilOrigin-Name: 251a7590ff4f65f59a1c871892533e4e2c544515
2015-07-02 16:17:30 +00:00
dan 3f09beda45 Remove "#ifdef SQLITE_ENABLE_FTS5" from individual fts5 source files. Add a single "#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5)" to fts5.c.
FossilOrigin-Name: 7819002ed85497bbd0f9cf4d39df641573324436
2015-07-02 15:52:21 +00:00
drh 0d847186e9 Add the --shrink-memory option to the speedtest1 test program.
FossilOrigin-Name: c9ddbd88998d9523e72ad910ea67eb55024b3a88
2015-07-02 01:38:39 +00:00
drh 14681b739b Avoid create a stack from in sqlite3BackupUpdate() in the common case where
the first argument is NULL.

FossilOrigin-Name: 2a897b9e94acaf1fd91e9f8e94fa52e01694f011
2015-07-01 19:59:36 +00:00
drh e05b3f8f0b Simplification of PRAGMA integrity_check logic. Make sure that the depth
of the right-most subtree is correct.  Size reduction and performance increase,
with no change in output.

FossilOrigin-Name: 550705fcb64e7ad637686e47cabe2621d65851bf
2015-07-01 17:53:49 +00:00
drh 94a3115daa Fix some harmless compiler warnings.
FossilOrigin-Name: 307195c8709d7fd2a642baa8011eb0c88cfdc0ac
2015-07-01 04:08:40 +00:00
drh 88266dc17a Change integrity_check to analyze the cells of a page in reverse order, as
this will tend to insert the cells into the analysis heap in increasing order
by address, which is the most efficient way to load a min-heap.

FossilOrigin-Name: 59ad912c4c1f858e04d27b1b8f25581a5f6e5daf
2015-07-01 01:31:14 +00:00
mistachkin 647ca46fc5 Make use of the _byteswap_ushort() and _byteswap_ulong() compiler intrinsics for MSVC, when available.
FossilOrigin-Name: fe144dd73f7097a17c24c7812c2a1cc40466e6da
2015-06-30 17:28:40 +00:00
drh da6d3e2117 Make use of built-in bswap32() and bswap16() functions in GCC/Clang for a
significant performance improvement there.

FossilOrigin-Name: 8bfcda3d10aec864d71d12a1248c37e4db6f8899
2015-06-30 15:10:29 +00:00
drh ad265296ff Only use <nowiki>__builtin_bswap16()</nowiki> with GCC 4.8 and later.
FossilOrigin-Name: ce8177e3e64d2ac4cd5d9e7757cdd5fcecd7d0ea
2015-06-30 14:01:20 +00:00
drh 329428e208 Remove the use of htonl() in the previous check-in due to linkage issues.
Add the get2byteAligned() macro and use it for access to the cell offsets
on btree pages for about a 1% performance gain.

FossilOrigin-Name: 79ff36b7170c9e7e7a9935c8b9d1665867771087
2015-06-30 13:28:18 +00:00
drh 5372e4d4f9 Make use of htonl() and <nowiki>__builtin_bswap32()</nowiki> for faster
implementations of sqlite3Get4byte() and sqlite3Put4byte().

FossilOrigin-Name: bc27ebd7f73e9fc8e00da6ec82632e439fcce812
2015-06-30 12:47:09 +00:00
drh 3169906d06 Change an unreachable branch into an assert() in sqlite3PagerAcquire()
and optimize sqlite3PcacheOpenSavepoint() by factoring out rarely used code
into a subroutine.

FossilOrigin-Name: b406b20ecdf0bff63c5c222fab11cb9acee86765
2015-06-30 11:07:32 +00:00
drh d8c0ba3b02 Optimization to the sqlite3PcacheFetch() logic.
FossilOrigin-Name: d9a0481ce0fd9824b1566f182d68ec46ef091b1b
2015-06-30 03:57:59 +00:00
drh 50642b1deb Put all variable declarations for sqlite3PagerWrite()
at the beginning of the block.  Syntax only - no logic changes.

FossilOrigin-Name: a0fa6b3ba59716e53b8c035b497602050ed0ccb8
2015-06-30 03:34:13 +00:00
drh 1116bf1359 Implement sqlite3Strlen30() using strlen() from the C library.
FossilOrigin-Name: 8001aa52bd12f900092387fe3571463e89efd977
2015-06-30 03:18:33 +00:00
drh 597d2b6412 Change sqlite3ApiExit() so that its first argument is never NULL.
FossilOrigin-Name: 791b706ec6c3e80885666e48e01524f0e9a7557e
2015-06-30 03:13:47 +00:00
drh 27fb746cde Put BtCursor objects on a singly-linked list instead of a doubly-linked list.
Add the BTCF_Multiple flag.  Only invoke saveAllCursors() when using a cursor
that has BTCF_Multiple set.

FossilOrigin-Name: 429ccef2b36fc46e92914eb54afd5f800b1a40ff
2015-06-30 02:47:36 +00:00
drh 98ef0f6c48 Convert several 5-year-old and older NEVER() macros into assert().
FossilOrigin-Name: ed54c14ea8a72d69d69e0c0d7f6936f54efc04c2
2015-06-30 01:25:52 +00:00
drh 207c817365 From sqlite3BtreeInsert(), bypass the btreeMoveto() routine for table inserts
and go directly to sqlite3BtreeMovetoUnpacked().

FossilOrigin-Name: 53fe685d56368af78238c8981cc41704929f7660
2015-06-29 23:01:32 +00:00
drh b34755308c Add a bypass path in sqlite3PagerWrite() for pages with the PGHDR_WRITEABLE
bit set, for about a 1% performance increase.

FossilOrigin-Name: ba425a6abb9886e6af87b5f6205202db450beba8
2015-06-29 20:53:18 +00:00
drh 60e32edba5 Combine subjRequiresPage() and subjournalPage() into a single
subjournalPageIfRequired() routine.

FossilOrigin-Name: 3b65eb56c422855ca47f709247205f0c77d98a5c
2015-06-29 19:08:18 +00:00
drh 1aacbdb374 Add the PGHDR_WRITEABLE bit for PgHdr.flags which is used to
distinguish between pages that are on the dirty list and pages that are
safe to modify.

FossilOrigin-Name: 7c4ef7b7c8744af19075bb96d1e0b63e35978ed1
2015-06-29 18:29:10 +00:00
drh e399ac2e1e Fix over-length source code lines in pager.c.
FossilOrigin-Name: 14de3d39267a4005a0fa900bab4adc4c104e4084
2015-06-29 18:14:02 +00:00
dan ef648698c8 Fix minor problems in the ota demo application.
FossilOrigin-Name: 6aaaec6e63cdf713b0d67e24a892088ff251c82a
2015-06-29 15:41:50 +00:00
drh 82ef8775c7 Simplifications and performance improvement in pager_write().
FossilOrigin-Name: ab7aeeead395a05b91a921ef9ebe9252fffad667
2015-06-29 14:11:50 +00:00
drh c78ae916b9 Add the new PGHDR_CLEAN bit to PgHdr.flags in pcache.c. This bit is always
the opposite of PGHDR_DIRTY.  Use the extra bit to avoid a comparison
for a small performance boost.

FossilOrigin-Name: 8619fc346d9a5a66a3c4566b4cc032b6b6bf73fd
2015-06-29 04:21:15 +00:00
drh 234a93fc9c Very small size reduction and performance increase in sqlite3BitvecTest().
FossilOrigin-Name: 9b3a7281bd45994edf813a687e4b7a0761697929
2015-06-29 03:28:43 +00:00
drh 325d087aa7 Move an assert() and testcase() into their correct position within
getAndInitPage().

FossilOrigin-Name: 18115164e12509ec21f34598089a7f1310048819
2015-06-29 00:52:33 +00:00
drh 95c91e145a Use tail recursion in pcache1Unpin() to get a small size reduction and
speed improvement.

FossilOrigin-Name: fde70472aebc09b34a517131f676e6847d02b747
2015-06-29 00:21:00 +00:00
drh b84c14d07c Comment typo fix and minor cleanup in the pager. No logic changes.
FossilOrigin-Name: 94ef17012855b7be725594c34bcea75f34c40190
2015-06-28 17:33:11 +00:00
drh c5ef7151b0 Avoid unnecessary calls to sqlite3VdbeSerialTypeLen() for integer
serial types, for a small size reduction and a speed increase.

FossilOrigin-Name: 9cd30d33b1d02dc8c55c1d74bdbcefab63ebf2a7
2015-06-28 02:58:51 +00:00
drh c75d886b05 Make greater use of BtCursor.curIntKey.
FossilOrigin-Name: 63998471d023dd846d5583ac856e2acc47ad41ea
2015-06-27 23:55:20 +00:00
drh 408efc0664 Add the BtCursor.curIntKey field and use it for a small size reduction and
performance boost.

FossilOrigin-Name: 4a17df139ac41e29c9a2e58afbd1238a5e94bd36
2015-06-27 22:49:10 +00:00
drh 15a0021b3e Enhancements to the previous check-in to make it a little smaller and faster.
FossilOrigin-Name: 291d9e0c328a7bd0f255b0b7e819ca2c909701a3
2015-06-27 20:55:00 +00:00
drh 28f58dd60e Performance improvements in moveToChild() by shifting some work over
to getAndInitPage().  Net improvement is about 800K cycles at cost of 30 bytes.

FossilOrigin-Name: 1956a4ce8eca650d98a7f68fd2d82eb8a3d6069f
2015-06-27 19:45:03 +00:00
drh 375beb0ec0 Manually inline the call from getAndInitPage() to btreeGetPage() for a
savings of 2.5 million cycles at a cost of less than 100 bytes.

FossilOrigin-Name: 7f65b96b4017413bd19624570efe8fb2b0f7b991
2015-06-27 15:51:06 +00:00
drh bbf0f867d2 Add releasePageNotNull() as an alternative to releasePage() when the argument
is guaranteed to be non-NULL, and use it for a small performance gain.

FossilOrigin-Name: 9383a688701ac2c366a308efc287c9c0f8977d4e
2015-06-27 14:59:26 +00:00
drh f44890a7c4 Add the Mempage.aDataOfst field and use it in sqlite3BtreeMovetoUnpacked()
for about a 2 million cycle gain.

FossilOrigin-Name: bee94dc3510745ba2efa044e8f3299793cfc7e34
2015-06-27 03:58:15 +00:00
mistachkin 95ae9587f1 Treat compilation of FTS5 for the loadable extension specially with MSVC.
FossilOrigin-Name: 7c610276bb41dbc80fe169d35fe9a3a3f6525635
2015-06-26 20:45:43 +00:00
dan ef4f75637c Merge fts5 branch into trunk.
FossilOrigin-Name: d27d9965b5404cd32be1113215fd9feeb5b66acc
2015-06-26 20:25:59 +00:00
dan 55296c5470 Merge latest trunk with this branch.
FossilOrigin-Name: 8671b9e137275d247e67e3d7d5d9c4cb1f380ff7
2015-06-26 20:14:23 +00:00
dan 018a93d216 Remove unnecessary lines from fts3.h and main.mk.
FossilOrigin-Name: c1b268ced38259706674ed2fcbf842d3fbd9fb8c
2015-06-26 20:13:56 +00:00
dan 6394d99a0e Fix a segfault that could follow an OOM error in fts5.
FossilOrigin-Name: 713239b8cf2900e8f7d97646c7f350248b4e804f
2015-06-26 20:08:25 +00:00
drh abb78fbd88 Small size reduction and performance increase on the OP_IdxInsert opcode.
FossilOrigin-Name: b6bedc2e9c2f87709673799db9401b95fdb386b0
2015-06-26 19:43:55 +00:00
dan ca0a30cd05 Merge latest trunk changes with this branch.
FossilOrigin-Name: 2a1af0f29e4c387721ec1fb3a2b55e8605b8401d
2015-06-26 19:33:04 +00:00