Commit Graph

995 Commits

Author SHA1 Message Date
dan
e3e031ce85 Add ota tests to increase code coverage. Fix some minor issues in error handling within the ota code.
FossilOrigin-Name: 2b10c5d2b8b8b535d3dec0c68a777db16268e1e5
2015-02-18 20:16:15 +00:00
dan
d092df51de Fix a problem with OTA updates in the presence of database readers.
FossilOrigin-Name: 144bb29ffcbfe96dc10c0224113e73a80e89314b
2015-02-18 17:40:05 +00:00
dan
eadc772beb Improve test coverage of ota code a bit.
FossilOrigin-Name: a438fa6c9ad2fb1d78ac747172d07455d6381387
2015-02-17 20:49:42 +00:00
dan
f5fe23909d Add extra tests and fixes for ota.
FossilOrigin-Name: e0b7151962fedbcac975f2216fd6b33b995a8945
2015-02-16 21:13:19 +00:00
dan
5902352fca Add further tests and fixes for ota.
FossilOrigin-Name: 62dc1fffc38cb157c15105098749b6dd0198eb84
2015-02-16 11:48:34 +00:00
dan
c76c64f931 Move tcl test code from sqlite3ota.c to new file ext/ota/test_ota.c.
FossilOrigin-Name: f20779a6e890ba73bfaa904cefcf3a029b01fed4
2015-02-16 06:27:37 +00:00
dan
52800df9fc Change the way the "incremental checkpoint" function of OTA works in order to reduce the effect on the SQLite core code.
FossilOrigin-Name: b64a11a754dc56f3406d3b703531ebe9e4af4908
2015-02-14 18:58:22 +00:00
dan
01325e86e6 Merge the ota-update-no-pager_ota_mode branch into this one.
FossilOrigin-Name: 71887cd9b38def398d48eaf0ec34eeac3c7c5177
2015-02-11 17:05:17 +00:00
dan
a3cf4f7ccb Merge latest trunk changes with this branch.
FossilOrigin-Name: 0b63e8dcbaec5043e353734e684c2a46552a3409
2015-02-11 16:54:48 +00:00
dan
2e24971f2a Ensure that an error is reported if an attempt is made to update a wal mode database via ota.
FossilOrigin-Name: 6fc5d4d26a603b3906f02ceea0f507780d0c35eb
2015-02-11 16:25:27 +00:00
dan
cd73244144 Further tweaks to work with zipvfs.
FossilOrigin-Name: 0f152416be792457c52417aeb531ac860d12a5bd
2015-02-10 20:00:38 +00:00
dan
07427d0350 Add documentation and test cases for sqlite3ota_create_vfs(). Also code to detect errors in zipvfs/ota setup.
FossilOrigin-Name: e729668168f00325459bc2e9b515aa95e57f2754
2015-02-10 17:08:17 +00:00
dan
faa8c4fdcb Add the sqlite3ota_create_vfs() and sqlite3ota_destroy_vfs() functions.
FossilOrigin-Name: 96443ecb6909141aa621a16e628455857d036482
2015-02-09 20:07:35 +00:00
dan
de1f6a270b Add comments to explain the role of the ota vfs.
FossilOrigin-Name: 7bb633639d1e41067903a49653f09a823054e213
2015-02-07 20:20:32 +00:00
dan
dd0ad3785b Remove "PRAGMA pager_ota_mode".
FossilOrigin-Name: 8ac58e46782bd6b81c06fdf1cb5b316b8a4e1ddf
2015-02-07 19:17:36 +00:00
drh
2f8109cef1 Revise the way that the index structure for a WITHOUT ROWID table is
discovered.

FossilOrigin-Name: 7f10a0eaf1fedfa020cbd7019ec9342ffdc3b9b0
2015-02-06 00:31:45 +00:00
dan
8800b53bc5 Change a comment in sqlite3ota.h to make it clear that it is not possible to insert a NULL value into an INTEGER PRIMARY KEY column using ota.
FossilOrigin-Name: a5e86bea4ad51bbb988a2a2215961706894f4a02
2015-02-05 17:46:19 +00:00
dan
a8ccf3ed74 Prevent ota updates from violating NOT NULL constraints. Add a comment to the "limitations" section of sqlite3ota.h saying that CHECK constraints are not enforced.
FossilOrigin-Name: 74e073dd604142212f3d3e1931065d124daabd80
2015-02-05 17:36:30 +00:00
drh
d4ef7c50bb Figure out the primary-key type of a table using queries of sqlite_master
and the table_info and index_list pragmas, obviating the need for
SQLITE_TESTCTRL_TBLTYPE.

FossilOrigin-Name: 50ecdfc443b51e3569c6add2fba5132f959c61cb
2015-02-05 01:49:31 +00:00
dan
06c9722564 Fix the error messages returned by ota if an update violates a unique constraint.
FossilOrigin-Name: c4845a3b591723ff60b7b1da198f44908c12bdfc
2015-02-04 19:20:42 +00:00
dan
738a3b2fcb Avoid a linear scan of the entire table when ota updates or deletes a row from a table with an external primary key index.
FossilOrigin-Name: 1db198ccca1e5c5a922cefe3daeff8d2e5d3a7f7
2015-02-04 16:32:47 +00:00
dan
1e35850229 Fix a memory leak that could follow an OOM error in ota.
FossilOrigin-Name: 0d5415f26427d0af89663c5a3e944e488143b648
2015-02-04 11:08:47 +00:00
dan
e2863b6074 Fix some problems surrounding WITHOUT ROWID tables with DESC primary key indexes
.

FossilOrigin-Name: a21fefb79a161e6bb057ae4f6ba554f659706ac1
2015-02-03 18:43:42 +00:00
dan
75fda9b395 Remove "PRAGMA ota_mode".
FossilOrigin-Name: 1c111447a07687c30ed4ad5a6c27a169c85b7ea6
2015-02-03 15:56:08 +00:00
dan
57fec54b53 Fix some problems with building fts5 and fts3 together using the amalgamation.
FossilOrigin-Name: fb10bbb9f9c4481e6043d323a3018a4ec68eb0ff
2015-02-02 11:32:20 +00:00
dan
32348f7bd2 Merge latest trunk changes with this branch.
FossilOrigin-Name: 76212f2c9a3c3ff0e238d6dad776938c6af674e6
2015-02-02 09:40:36 +00:00
dan
3b660d7da3 Have ota use imposter tables to write to indexes instead of the sqlite3_index_writer() interface. The error handling in this version is broken in a few small ways.
FossilOrigin-Name: cdaeab467f6aa3217be161377a9b78a4eec37093
2015-01-31 20:42:04 +00:00
dan
5082140311 Minor optimizations to fts5 writes.
FossilOrigin-Name: 1fffe51fa92f1784365140d5b163ab6c690981ae
2015-01-31 15:23:44 +00:00
drh
3102aa01fd Merge all recent trunk changes, and especially the SQLITE_TESTCTRL_INITMODE
enhancement.

FossilOrigin-Name: 36436dde74ce2536a9a430b4458216499ad113bf
2015-01-30 16:36:17 +00:00
dan
719b0f66e5 Fix some problems with transactions that both read and write an fts5 table.
FossilOrigin-Name: 0e225b15357765f132c3364b222f9931a608a5b2
2015-01-29 20:59:34 +00:00
dan
88392bf3ce Optimize range constraints on the rowid column of fts3/4 tables even if there is no MATCH clause in the query.
FossilOrigin-Name: 85dc12625d300fe48f3c096f54ebcb8b6ef4e30a
2015-01-29 11:52:22 +00:00
drh
120b3a4f61 Merge in all changes from trunk.
FossilOrigin-Name: 17c69be80542c5f84e21d60df3edc49422b087d9
2015-01-28 12:00:40 +00:00
mistachkin
e4a0d79b8a Fix harmless compiler warnings.
FossilOrigin-Name: e7d2ec048c88237c124fbe598f8f7e950d43d90f
2015-01-27 21:24:33 +00:00
dan
900f1922ac Fix a problem with fts5 doclist-indexes that occured if the first rowid of the first non-term page of a doclist is zero.
FossilOrigin-Name: f704bc059e06b01f1d68fa7dad89e33eace6c389
2015-01-27 20:41:00 +00:00
dan
6f0138e89e Fix a bug in the fts3 snippet() function causing it to omit leading separator characters from snippets that begin with the first token in a column.
FossilOrigin-Name: adc9283dd9bc3a6463f8c4fe23dd58a3712c349d
2015-01-27 19:01:26 +00:00
dan
18f6ff9eb7 Improve the performance of fts3/4 queries that use the OR operator and at least one auxiliary fts function.
FossilOrigin-Name: 245e8730451fbdc1c729beff7295c452df604009
2015-01-27 18:43:02 +00:00
dan
8ac3025419 Have fts5 store rowids in ascending order. Query speed is virtually the same regardless of rowid order, and ascending order makes some insert optimizations easier.
FossilOrigin-Name: 5206ca6005bfa9dfc7346d4b89430c9748d32c10
2015-01-24 19:57:03 +00:00
dan
641cb4360a Fix compression of keys stored on internal segment b-tree nodes by fts5.
FossilOrigin-Name: 51444f67c0cc58a3023eb1cd78e7cf889da6c80f
2015-01-23 17:43:21 +00:00
dan
626d9e3062 Remove some redundant code from fts5.
FossilOrigin-Name: 939b7a5de25e064bdf08e03864c35ab718da6f6f
2015-01-23 06:50:33 +00:00
dan
0b520cc5f9 Add further tests and fixes for fts5.
FossilOrigin-Name: 5b295897153e9b26cd0d2e7ea112a4d461d0a665
2015-01-22 19:13:08 +00:00
dan
4c2871bead Further tests and fixes for fts5.
FossilOrigin-Name: c020a291ed293a66d21c5885e50a7fee04aa6366
2015-01-21 20:30:14 +00:00
dan
dd8a501019 Fix an fts5 issue with loading doclist-indexes for a term that is the last thing on its leaf page.
FossilOrigin-Name: e0d614425f7f5ffe266fdc03642931b1ec19ad25
2015-01-21 18:23:25 +00:00
dan
b461380333 Add further tests for fts5 backend.
FossilOrigin-Name: 09dabb3b9e140eec6cfda83bcb86b6b9f5cf54b6
2015-01-21 16:10:59 +00:00
dan
997d798d92 Merge latest trunk changes with this branch.
FossilOrigin-Name: b3348b1e07e168b156636a29fc8c6d6afb3129c2
2015-01-21 06:36:07 +00:00
dan
fd0b436e10 Add extra fault injection tests to fts5.
FossilOrigin-Name: f45a0dc0a8911c8aac5a1028ac4f543a709656e7
2015-01-20 20:34:17 +00:00
dan
aa4d380a42 Handle the case where a tokenizer determines that there are zero tokens in an fts5 query term.
FossilOrigin-Name: 75f3d17f864072dfa2caee182b86cc4b9972d691
2015-01-19 11:15:36 +00:00
drh
65545b5993 Eliminate all use of sprintf(), strcpy() and strcat() from test logic because
OpenBSD hates those functions.

FossilOrigin-Name: 10321910990195878c0af1e94b34ae0cdc0cb31b
2015-01-19 00:35:53 +00:00
dan
d8736bc3b8 Ensure an up to date copy of the fts5 configuration has been loaded into memory before attempting to modify the same configuration.
FossilOrigin-Name: f30afd209aa4ce42766b1493750c4f5b5f1e9502
2015-01-17 20:01:52 +00:00
dan
2656167f6e Improve the performance of the fts5 porter tokenizer implementation.
FossilOrigin-Name: 96ea600440de05ee663e71c3f0d0de2c64108bf9
2015-01-17 17:48:10 +00:00
drh
068a251d99 Simplify some code in rtree, to avoid confusing the optimizer in GCC on
some macs:
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00).
Prior to these changes, compiling with -O3 would cause incorrect code to
be generated.  The change to the nodeGetCell() routine is key.  The other
changes are merely cosmetic details discovered while bug hunting.

FossilOrigin-Name: 882181ff9dd75f32db266db6e476671021fc567b
2015-01-13 21:26:17 +00:00
dan
851ca6e715 Fix prefix indexes so that they work in characters, not bytes.
FossilOrigin-Name: af8d43a4a08528bbae25ee38fe25de8a86f8a21c
2015-01-13 17:25:08 +00:00
mistachkin
7bb22ac7ff Silence some harmless uninitialized local variable warnings.
FossilOrigin-Name: 44375a34e59d1b0f0d765a99dcc7e6f30a4be7f7
2015-01-12 19:59:12 +00:00
mistachkin
7bb6e8e169 Get things compiling cleanly with MSVC and W4.
FossilOrigin-Name: c8725fa5fa361959b0f0a3fb36f204905d6f0ae9
2015-01-12 18:52:41 +00:00
mistachkin
1a51ce78ba Fix some harmless compiler warnings.
FossilOrigin-Name: 2b8eecbfe7935d3d9826fbcd473dd3a49138ad11
2015-01-12 18:38:02 +00:00
dan
73f7d6ed75 Optimize the unicode61 tokenizer so that it handles ascii text faster. Make it the default tokenizer. Change the name of the simple tokenizer to "ascii".
FossilOrigin-Name: f22dbccad9499624880ddd48df1b07fb42b1ad66
2015-01-12 17:58:04 +00:00
dan
27277c4e3c Fix some documentation issues in fts5.
FossilOrigin-Name: 512e1bdb4093b59d1494dfc63391476eadd52aea
2015-01-10 20:34:27 +00:00
dan
d6b1c880d2 Add the fts5 'optimize' command.
FossilOrigin-Name: e749be563d8e738af113bd301770e2f22763ab77
2015-01-07 19:33:11 +00:00
dan
96a32bb51c Add the 'rebuild' and 'delete-all' commands.
FossilOrigin-Name: 0cb2fed525778d96237b5b0943047665e1f636d1
2015-01-07 17:11:11 +00:00
dan
aacf3d1a3b Remove the iPos parameter from the tokenizer callback. Fix the "tokenchars" and "separators" options on the simple tokenizer.
FossilOrigin-Name: 65f0262fb82dbfd9f80233ac7c3108e2f2716c0a
2015-01-06 19:08:26 +00:00
dan
2a28e507f7 Further fixes and test cases related to external content tables.
FossilOrigin-Name: ce6a899baff7265a60c880098a9a57ea352b5415
2015-01-06 14:38:34 +00:00
dan
ded4f41d1a Tests and fixes for fts5 external content tables.
FossilOrigin-Name: 047aaf830d1e72f0fdad3832a0b617e769d66468
2015-01-05 20:41:39 +00:00
dan
0fbc269fef Add support for external content tables to fts5.
FossilOrigin-Name: 17ef5b59f789e9fa35c4f053246d819987fd06f8
2015-01-03 20:44:58 +00:00
dan
ade921c3ad Allow the rank column to be remapped on a per-query basis by including a term similar to "rank match 'bm25(10,2)'" in a where clause.
FossilOrigin-Name: 1cd15a1759004d5d321056905dbb6acff20dc7d9
2015-01-02 14:55:22 +00:00
drh
4081d5da3b Add logic to releasetest.tcl that detects -fsanitize=undefined errors.
Fix a few false-positivies that come up when running the sanitize=undefined
test.

FossilOrigin-Name: 2835e79a0afec6e4d449ac9340afec068c2d4c11
2015-01-01 23:02:01 +00:00
dan
37db72f1f7 Merge latest trunk changes with this branch.
FossilOrigin-Name: 4b3651677e7132c4c45605bc1f216fc08ef31198
2015-01-01 18:03:49 +00:00
drh
f0a88279bd Fix a harmless compiler warning in rtree.
FossilOrigin-Name: 30891c6b8ebe9dfc939f9695bb45a159fbaaf262
2015-01-01 16:47:43 +00:00
dan
6024772ba2 Add a version of the unicode61 tokenizer to fts5.
FossilOrigin-Name: d09f7800cf14f73ea86d037107ef80295b2c173a
2015-01-01 16:46:10 +00:00
dan
e716aca24b Move all fts5 test files to new directory "ext/fts5/test".
FossilOrigin-Name: 7f148edb30103c5f4fee20cd08e38537f9615bf2
2014-12-29 15:59:36 +00:00
dan
5fa3acabf4 Fixes to built-in tokenizers.
FossilOrigin-Name: b33fe0dd89f3180c209fa1f9e75d0a7acab12b8e
2014-12-29 11:24:46 +00:00
dan
2a615fa627 Fix the fts5 bm25() function so that it matches the documentation.
FossilOrigin-Name: 1ac7a8d0af9a71ddf6a1421033dcb9fa67c6120c
2014-12-23 19:18:34 +00:00
dan
005e10e39a Fixes and simplifications for the snippet() and highlight() functions.
FossilOrigin-Name: ca5d44042aa7461dcc8b700b0763df4df9d4a891
2014-12-22 21:01:52 +00:00
dan
1616d55153 Remove the fts5_test() aux function. Test aux functions using the tcl interface instead.
FossilOrigin-Name: 67e3ffd950c5347d219a06b33ad51949cffa7d90
2014-12-19 20:53:51 +00:00
dan
2ae0f4c931 Fix a problem with prefix queries and the AND operator.
FossilOrigin-Name: 38b3c65e3ee95eb7afadb76e0110570fbbc41e1b
2014-12-18 20:01:15 +00:00
dan
e4bec37900 Fix various problems in fts5 revealed by fault-injection tests.
FossilOrigin-Name: e358c3de5c916f2c851ab9324ceaae4e4e7a0fbd
2014-12-18 18:25:48 +00:00
dan
0a99e9fb01 Update this branch with latest trunk changes.
FossilOrigin-Name: 69a312ad3fe5b39bc394b9ce958cb63d734518c7
2014-12-08 07:50:31 +00:00
dan
fdf3a8970d Update comments in sqlite3ota.h to remove the "must have PRIMARY KEY" restriction.
FossilOrigin-Name: 088a41eb8c18886a260cf53fa0cca3bd1958dc05
2014-12-08 07:28:26 +00:00
dan
61826cdb6c Extra tests for the ota_rowid column.
FossilOrigin-Name: 46069393b3141ab198f0fcc4f6c05229f06bf1e8
2014-12-08 07:22:34 +00:00
dan
7ca1d07aff Allow the ota extension to write to tables with no PRIMARY KEY declaration.
FossilOrigin-Name: ba59a7e2ba97244492cbca9247456df0f3f19248
2014-12-06 19:30:41 +00:00
drh
2c3abeb8c3 Fix compiler warnings.
FossilOrigin-Name: e9955c0e14d13ba1411f013acb4979958dae2516
2014-12-05 00:32:09 +00:00
drh
063970a15f Fix comment typos reported on the mailing list. No changes to code.
FossilOrigin-Name: 93a71c9f058b58d11187293a1e8d5324d0911880
2014-12-04 14:01:39 +00:00
dan
845d0ab323 Begin testing fts5 OOM and IO error handling.
FossilOrigin-Name: 2037dba62fdd995ad15b642abe499a790f5ffe5c
2014-12-03 17:27:35 +00:00
dan
615a9ae5db Add a configuration option to remap the "rank" column to an auxiliary fts5 function.
FossilOrigin-Name: b5f5971283b9b2f60c16f9675099855af95012cd
2014-12-02 20:18:11 +00:00
dan
89a89560d6 Add code to parse a rank() function specification. And a tcl interface to add auxiliary functions to fts5.
FossilOrigin-Name: 9c1697a2aa1f601e6eb11704abe63a73c8105447
2014-12-01 20:05:00 +00:00
dan
ca7fad3d2c Add a cookie mechanism to ensure that the %_config table is re-read as required.
FossilOrigin-Name: bb4a37b53de60da9ec8b9317eec14afa99690828
2014-11-28 20:01:13 +00:00
dan
cb11e73fc2 Add a %_config table to fts5.
FossilOrigin-Name: 83491c56661ca78f96020ba68184bb3fb19e674f
2014-11-27 20:03:45 +00:00
dan
ca3d648f9c Update ota so that the hidden columns of virtual tables may be written.
FossilOrigin-Name: ccee999649d0fa1d48e53847542f4cbe05e3d694
2014-11-27 18:09:46 +00:00
dan
cb62aae034 Add the auxiliary highlight() function to fts5.
FossilOrigin-Name: 059092379f981eb919b500ce447006f9e645fc5a
2014-11-24 16:24:33 +00:00
dan
7bf9ec1c26 Add SQLITE_ENABLE_OTA pre-processor directives so that this branch may be compiled with or without OTA.
FossilOrigin-Name: 600cefdd4d29c1de4d107fa7ddeb76a18edce4f5
2014-11-22 09:09:50 +00:00
dan
841ed2b0f2 Merge latest trunk changes with this branch.
FossilOrigin-Name: 7ef44c5b5bd30bcc4ef59ed172b9ce9ac6a843f6
2014-11-21 14:37:24 +00:00
dan
54f0dec3e6 Changes to comments in sqlite3ota.h.
FossilOrigin-Name: 14139542b68fbf01632a1b149cd6fca4bb01efa6
2014-11-21 11:22:11 +00:00
dan
ca5ceb4229 Add support for updating virtual tables via ota.
FossilOrigin-Name: 4dfcfe543945aa60a7ac397a3bdb0ac9e20ef7b6
2014-11-21 10:46:23 +00:00
dan
f8bd49ee22 Add the "ota_delta()" feature for delta-compressed updates.
FossilOrigin-Name: c64dcd1788f5cc7db197a0ec4ab0981f34a72c6b
2014-11-20 19:19:02 +00:00
dan
268c0f8844 Update the ota extension so that it can be used to update tables with external PRIMARY KEY indexes.
FossilOrigin-Name: 55066a1171cbd3077f5e6c8ceb2745e810d9476e
2014-11-20 17:37:08 +00:00
dan
54ef517012 Updates to support zipvfs in pass-through mode.
FossilOrigin-Name: 556c3de53ad33d11d33ec794345c2100aa76f3e1
2014-11-20 15:11:12 +00:00
dan
8a1e107811 Add tests for WITHOUT ROWID tables with composite primary keys.
FossilOrigin-Name: 712d413d29950b19d4afb18cfcf9d3afb302d0a0
2014-11-17 18:35:30 +00:00
dan
d8260fd1e3 Fix a problem with the parameters to an OP_Affinity in one of the VM programs generated by sqlite3_index_writer() that was causing an OOB read.
FossilOrigin-Name: 447b33b34a9836992f5a8d50cd8647a10435c144
2014-11-17 15:07:40 +00:00
dan
48d7014067 Fix the customization interfaces so that they match the documentation.
FossilOrigin-Name: fba0b5fc7eead07a4853e78e02d788e7c714f6cd
2014-11-15 20:07:31 +00:00
drh
1728bcb07f Add the eval() SQL function extension in ext/misc/eval.c.
FossilOrigin-Name: 27cf665b957f2c0ced403e3032099e80c295598f
2014-11-10 16:49:56 +00:00
drh
051575cbf4 Do not use virtual (and hence redundant) WHERE-clause terms to restrict the
content of a automatic partial index.  Show when an automatic partial index
is used in the EXPLAIN QUERY PLAN output.

FossilOrigin-Name: b9ad601eab1d7298d369267eb697c7fa1bc16985
2014-10-25 12:28:25 +00:00
dan
08e06b0b21 Add tests to check error handling in OTA.
FossilOrigin-Name: ec7321ae482a8c4d893851a5edd17d67ef1a448b
2014-10-22 15:33:12 +00:00
dan
d6446a0abe Test that sqlite3ota_open() works with URI paths. Fix some other issues.
FossilOrigin-Name: 6fd09854feb46739f42b7e7a5e76680d5f9b8c5a
2014-10-21 19:35:03 +00:00
dan
5e3fc6e99f Add tests for another application writing the database while an ota update is ongoing.
FossilOrigin-Name: 2402baa0027ca65e9a5106b8b9c4e10f40d2cbc3
2014-10-21 18:09:58 +00:00
dan
ae0151c5a7 Merge version-3.8.7 changes with this branch.
FossilOrigin-Name: d380a6482a46478ebdf97e08b2fcf78b5d126dde
2014-10-20 16:34:03 +00:00
dan
d2f5ee20f0 Have the ota extension perform an incremental checkpoint after generating the wal file.
FossilOrigin-Name: 0bf1301aacb3b717b4cc020fbda9fab0bae331c3
2014-10-20 16:24:23 +00:00
dan
6e1a037357 Allow FTS tokenizers to choose whether or not to consider the "*" character part of tokens or not. This restores the pre-[e21bf7a2ad] behaviour. Also fix a problem causing FTS to interpret tokens beginning with "*" characters as EOF.
FossilOrigin-Name: 49dfee7cd1c9ab2901b8a871a6cd00b2ead76801
2014-10-09 15:08:17 +00:00
drh
a8950d5038 Fix a memory leak associated with the FTS4 matchinfo() function.
FossilOrigin-Name: fb8da82411b80a234c6a5481622027815450996a
2014-10-09 14:00:49 +00:00
drh
b8e8d5055a Fix a harmless compiler warning inside an assert() in FTS4.
FossilOrigin-Name: 418f3c9ad28672e5fe38d772d34e7cf8d26bc0e1
2014-10-06 12:41:57 +00:00
drh
249489331c Add the "showauth" extension in ext/misc.
FossilOrigin-Name: 28d52c1c38d849f099bc777f5987d1ef89680c2a
2014-09-21 17:51:37 +00:00
dan
93fdbfa64f Add further tests to ota5.test. Add "ota.test", for running all ota tests.
FossilOrigin-Name: 95ffdaa542df1c28fac97422e5a4b2c5cb81d50a
2014-09-19 18:08:39 +00:00
dan
d1193a9893 Add extra tests for the ota extension.
FossilOrigin-Name: 1e468fe1e408e513a1e1bbe72fe2a240f2991b3d
2014-09-19 15:06:23 +00:00
dan
be758ce3ae Update the ota extension to support SQLITE_ENABLE_8_3_NAMES builds.
FossilOrigin-Name: 718da6de870231d358384473b40e81c4394b8067
2014-09-18 17:57:46 +00:00
dan
6c5984a950 Use quotes instead of angle-brackets to include sqlite3.h from sqlite3ota.h.
FossilOrigin-Name: fce9c6ccf101d28492a84b85463433f32ef569fb
2014-09-18 16:38:10 +00:00
dan
318e63c60b Remove some c++isms from sqlite3ota.c.
FossilOrigin-Name: 0da1862b1b68f15c7c14286a982dda886d1e3b4a
2014-09-18 15:57:22 +00:00
dan
ed18c96107 Add new file ext/ota/README.txt, containing notes regarding the implementation of the ota extension.
FossilOrigin-Name: 3c6e1cbb4baaebc5958ab7276f27ff0ba14f4fa2
2014-09-18 15:22:48 +00:00
dan
4caa8fbc1e Add an API to query an ota handle for the total number of key/value operations performed so far.
FossilOrigin-Name: e3943fa7bbbfc5e16f73a494d8fa54d19e9cfcf9
2014-09-18 14:48:38 +00:00
dan
c6c3d00f33 Fix an ota bug causing attempts to write to tables with more than 8 columns to fail.
FossilOrigin-Name: 7da98ca2422166dc5d68607541707f41b77b5784
2014-09-18 11:15:17 +00:00
dan
44ed6bc5c1 Fix an unintialized variable problem in sqlite3ota.c.
FossilOrigin-Name: 01268607515a30d07559648c43034e522605748a
2014-09-17 19:05:46 +00:00
dan
abc0788663 Add tests and fixes for "PRAGMA ota_mode".
FossilOrigin-Name: 39df35c4ac65ffba76ba2c6f6727cf5e843e7517
2014-09-17 15:20:24 +00:00
dan
1b95de09bc Clarify the effects of the pager_ota_mode pragma. Add tests and fixes for the same.
FossilOrigin-Name: decaccc37cbdcd2a663233469efdf4982a810513
2014-09-16 20:02:41 +00:00
dan
15e1ec4c5b Remove the experimental sqlite3_transaction_save() and restore() APIs.
FossilOrigin-Name: 48d201cd8b68c0377cf8a2cc6439b893f9462fe2
2014-09-15 19:34:04 +00:00
dan
d4a80e6742 Merge latest trunk changes with this branch.
FossilOrigin-Name: 55b8011d5b455927f5b92a3cb911fd909fb0edab
2014-09-15 15:34:31 +00:00
dan
ee8d0b4111 Have sqlite3ota.c use grave accents instead of double-quotes to enclose identifiers in generated SQL. To avoid having the SQL engine substitute a literal string if a column reference cannot be resolved.
FossilOrigin-Name: 79f2418429aa05c56069c56d51b4d72f662a6970
2014-09-15 15:22:32 +00:00
dan
02cf6e1681 Ensure the correct collation sequences are used when sorting data in sqlite3ota.c.
FossilOrigin-Name: 473a72d7009a22ea514a98ee8869e7e7bca14cf5
2014-09-15 14:54:07 +00:00
dan
13ce7931f7 Have the sqlite3_index_writer() VMs check that the final values of records inserted into indexes on rowid tables are integers.
FossilOrigin-Name: cca376bff3510dc5e99fc5824862c3471ceced16
2014-09-15 12:18:29 +00:00
dan
d54e06ca5e Add OP_Affinity opcodes to the VMs generated by sqlite3_index_writer().
FossilOrigin-Name: b9b38cb8e21826ddfb4c87a1f166ad33c3c7b6eb
2014-09-15 10:44:24 +00:00
drh
c891c6c7ad Clean up some #includes in the extension API implementation.
FossilOrigin-Name: b149ef5c639e6bcff7bd1c7866353e7f7f468070
2014-09-11 17:14:54 +00:00
drh
7883ecfcd4 Enhance the sqlite3_user_add() interface to initialize the user
authentication logic.  Add test cases for the extra argument on the
end of the authorizer callback.

FossilOrigin-Name: 842c6da8f1a62bd13a1b4089a98b0835a46a2285
2014-09-11 16:19:31 +00:00
drh
9d5b0df132 Get the sqlite3_user_delete() interface working.
FossilOrigin-Name: 974a9c65583f7ab438d5673dc00c347ab8322855
2014-09-11 14:56:45 +00:00
drh
570f187f78 Fix the sqlite3_user_change() interface so that it does allow a
non-admin user to change their own password.

FossilOrigin-Name: 52d440c7e1b07fc03f14ed5fa4cc4c89a75cd430
2014-09-11 14:40:27 +00:00
drh
32c6a48b5e Add support for the extra parameter on the sqlite3_set_authorizer() callback
and support for failing an ATTACH with an authentication-required database
using bad credentials.  The extension is now feature complete, but much
testing and bug-fixing remains.

FossilOrigin-Name: 596e728b0eb19a34c888e33d4d37978ca2bf1e00
2014-09-11 13:44:52 +00:00
drh
d39c40ff5e Reorder parameters on the sqlite3_user_*() interfaces for consistency.
Add the first TCL test cases.

FossilOrigin-Name: 2f6d8f32eef526b5912f42ab467e3c7812480d8b
2014-09-11 00:27:53 +00:00
drh
09e60541ae Complete the implementation of the various APIs. Fix several problems.
This is another incremental check-in that does not completely work.

FossilOrigin-Name: 4eaaa7fa87aa912d24f8b35440ab60310dc08310
2014-09-10 22:46:46 +00:00
drh
f442e33e3a Add the ".user" shell command and implement the sqlite3_user_add()
routine.  Incremental check-in.  The code compiles but does not work.

FossilOrigin-Name: a0455f9deb603bf91684158d911269622720fc1a
2014-09-10 19:01:14 +00:00
drh
e933b83f02 Further ideas on user authentication. Not yet working code.
FossilOrigin-Name: c8171ecd0d6f097c9e95d5f6643bae8d67f44750
2014-09-10 17:34:28 +00:00
drh
d45309796b Non-working preliminary implementation attempts on user authentication.
FossilOrigin-Name: 8440f093bac19a41d44ee352744354eab897fe4e
2014-09-09 14:47:53 +00:00
dan
a690402b4c Add support for update statements to sqlite3ota.c.
FossilOrigin-Name: e109b27e4d66b83e1a804e7556d9c91aa37fea28
2014-09-08 17:50:35 +00:00
dan
9295d21bfd Add support for delete operations to the ota extension.
FossilOrigin-Name: f988234ba54d7c667f7deef1d04beed4e7fe6182
2014-09-06 20:19:38 +00:00
dan
4e9246e9db Switch back to using a single database connection in sqlite3ota.c.
FossilOrigin-Name: 3c2f4a078132992e33cc675173c84f8385af9cb5
2014-09-05 19:52:42 +00:00
dan
0c4ba2662e Reorganize the code in sqlite3ota.c in preparation for adding support for update and delete operations.
FossilOrigin-Name: 98387f05697526c7740e91d8a846a31f77639406
2014-09-05 19:31:15 +00:00
dan
8fa7f590cc Avoid calling sqlite3OsFetch() on a file-handle for which the xFetch method is NULL.
FossilOrigin-Name: 071f7f2decd2f786c0201a4219e9c2cc9d227085
2014-09-04 11:03:35 +00:00
dan
19b465a0ae Split part of "PRAGMA ota_mode" off into "PRAGMA pager_ota_mode". This allows some specialized custom VFS implementations to intercept and implement the expected pager-related effects of this pragma.
FossilOrigin-Name: 209f672e588b54dfbfb83c7859cacdc4497f0f2b
2014-09-03 19:30:32 +00:00
dan
98231c054b Add a command line program that uses the extension. This serves as example code and is also useful for performance testing.
FossilOrigin-Name: ffa1524ef2a4c32652183eb4745685f0d1c93af2
2014-09-03 08:25:09 +00:00
dan
b0083756f2 Add an experimental extension for applying bulk updates to databases.
FossilOrigin-Name: 2954ab501049968430011b63d046eb42ff37a56c
2014-09-02 19:59:40 +00:00
dan
4aee5dff83 Add documentation for tokenizer api to fts5.h. Also add a script to extract extension API docs and format them as html.
FossilOrigin-Name: e240d467e60b7755486aae5e8b0824f7c741f852
2014-08-25 19:58:54 +00:00
drh
5ab567078a Enhance the spellfix extension with the ability to specify a rowid when
inserting new rows.

FossilOrigin-Name: 369c480cda6fa66394b995346bbf51f3298446e1
2014-08-22 11:11:30 +00:00
drh
b6b4b79f34 Fix a faulty assert() statement. Add comments to clarify the behavior of
the sqlite3OpenTableAndIndices() routine in insert.c.  Add test cases to
verify that the assert() statement is not firing inappropriately.
Ticket [369d57fb8e5ccdff06f1].

FossilOrigin-Name: 7029b3404d3f5f698a496934f3a3f2972051b257
2014-08-21 14:10:23 +00:00
dan
6885bbc713 Add an "automerge=0" mode that disables auto-merging and falls back to fts4-style crisis merges.
FossilOrigin-Name: 2397404e152b908d838e6491294b263b05943b3f
2014-08-18 19:30:01 +00:00
dan
0bbd9c27c2 Cache the value of the "totals" record in memory during transactions.
FossilOrigin-Name: 05dfdad445b22f375b71abe0b1fa1bf7ca331be7
2014-08-12 16:07:35 +00:00
dan
e2fb318e34 Automatically resize the hash table used by fts5.
FossilOrigin-Name: f1cb48f412a5f200f1fe04f91072864f379db08f
2014-08-12 08:36:00 +00:00
dan
1a669f84a1 Simplify the way position lists are copied when merging data.
FossilOrigin-Name: 9f8d678a0ea75e169daf8b3f00bd05f52a050ea6
2014-08-11 20:26:34 +00:00
dan
c7fe7a969b Replace the hash table borrowed from fts3.
FossilOrigin-Name: 617e2fac1c128212254f71b1a8fddaf0d1d90262
2014-08-11 19:44:52 +00:00
drh
490fe86f1a Fix harmless compiler warnings.
FossilOrigin-Name: 52b03f045edf6fc29f9ba9a5cac53a59f0feb0eb
2014-08-11 14:21:32 +00:00
dan
c45f24b281 Fix an uninitialized variable causing a problem during fts5 table initialization.
FossilOrigin-Name: a14fa876f0eb66028e302b908967cc4a05ede9fc
2014-08-09 18:22:59 +00:00
dan
b191db8390 Use multiple memory allocations for a single Fts5Structure object. This is probably less efficient but much easier to get right.
FossilOrigin-Name: 2821825f7a481755a333dcdcad780b3e24448f20
2014-08-09 18:02:27 +00:00
dan
1d3ed1f46a Add "segment promotion" to fts5. This prevents the FTS index from growing indefinitely as data is added and deleted.
FossilOrigin-Name: ba359d78e166d78e0dc89e3c63a9a41e9ffea989
2014-08-07 18:47:33 +00:00
dan
d90aab8f94 Avoid writing delete markers to the oldest segment in an FTS index.
FossilOrigin-Name: 1baeb1cee61d9c56c718b50af034a24f1018a322
2014-08-06 20:04:14 +00:00
drh
858b638d1f A couple more harmless compiler warnings eliminated.
FossilOrigin-Name: bcf6d775f90f4d1ba018a1b965f2f710df130f01
2014-08-06 18:50:51 +00:00
drh
e8f2c9dc71 Fix two more harmless compiler warnings. Make sure the fts3_unicode2.c file
is in sync with mkunicode.tcl.

FossilOrigin-Name: a2a60307ea68a3230952a56cb65369ba0a208967
2014-08-06 17:49:13 +00:00
dan
7b71fbaf93 Add support for savepoints to fts5.
FossilOrigin-Name: 3b19eba042bb2eeb1be60f8d58ebaa0a045d6a5c
2014-08-06 16:30:21 +00:00
dan
192d413e95 Use doclist indexes for AND queries as well as phrases.
FossilOrigin-Name: 5d38e6edc40ef188fbf96505073797036aa6783a
2014-08-05 19:35:20 +00:00
dan
d5997d80cb Use doclist-indexes with "ORDER BY rowid ASC" fts5 queries as well.
FossilOrigin-Name: d028ba6589f3122b635474c2683c0f93d5bc6c7c
2014-08-05 19:00:22 +00:00
dan
9a67058a63 Fix fts5_index.c to use doclist-indexes when possible. Only some cases work so far.
FossilOrigin-Name: 90b82d3ef613b2915e0e280dc1d2e5a2b617d59c
2014-08-04 20:07:40 +00:00
dan
9af0705e84 Start changing things to use doclist indexes as required. code is not activated yet.
FossilOrigin-Name: b8864da95db2c0e611116304d607e35a86c9247d
2014-08-02 20:49:36 +00:00
dan
ff31da03e5 Add a special case to the integrity-check code to check that the final integer in a doclist index is as expected.
FossilOrigin-Name: c98934155cb48adfda57bd0fd1b950226d45f67a
2014-08-01 20:13:49 +00:00
dan
d34742901d Have the fts5 integrity-check verify that doclist indexes match the contents of the leaf pages that they index.
FossilOrigin-Name: 37a7d3035eb4bbad7e32fe550321ac9fae611a57
2014-08-01 19:27:07 +00:00
dan
a29284d65f Add "doclist index" records to the database. These are to make navigating within very large doclists faster. They are not yet used by queries.
FossilOrigin-Name: 89377421ff69f2450364987afe781b6d8bcbf087
2014-08-01 11:16:25 +00:00
dan
3dbfc8d8e8 Add a comment explaining why fts5 cannot cache "sorter statements".
FossilOrigin-Name: e6af3b7a3cf331210f4c87848e2af007dbd5ef30
2014-07-31 17:53:03 +00:00
dan
937490d4b4 Add further tests for the extension APIs with "ORDER BY rank" queries.
FossilOrigin-Name: 37a417d27e4ebafd4783f62728d7467316b75b17
2014-07-31 11:57:59 +00:00
dan
3fc4a856a2 Fix things so that the fts5 extension API works with "ORDER BY rank" queries.
FossilOrigin-Name: f1b4e1a98d49ecaba962beba16f8224175e4ba59
2014-07-30 20:26:24 +00:00
dan
fdb4a30af2 Add hidden column "rank". Currently this always returns the same value as the bm25() function.
FossilOrigin-Name: 4cc048c3651e830a6aeded924c7f3a60b634e133
2014-07-30 19:41:58 +00:00
dan
57ff60b19b Have calls to the xFilter() method of rtree virtual tables ensure that cursor is initialized before proceeding. Fix for [d2889096e7bdeac].
FossilOrigin-Name: 8cc41b0bf365af47c2061ffe44c86018945dd239
2014-07-29 11:54:18 +00:00
dan
92e497e517 Add the "loadfts" program, for performance testing the loading of data into fts3/fts4/fts5 tables.
FossilOrigin-Name: 770b9540c19ad1e3d24adff382332bf032065efd
2014-07-28 20:14:02 +00:00
dan
454b5ce524 Add tests and fixes for bm25() function.
FossilOrigin-Name: 71d32f53e81921e43c933cc968cb1c18d83fe1e0
2014-07-26 18:38:51 +00:00
dan
700b33d7a5 Add extension apis xRowCount, xQueryPhrase, xSetAuxdata and xGetAuxdata. And a ranking function that uses all of the above.
FossilOrigin-Name: c4d50428ab97f77e6721c4f8d03eaaf3ea91f3eb
2014-07-25 20:30:47 +00:00
dan
b30860abe2 Add a snippet() function to fts5.
FossilOrigin-Name: bdc58fd28a63ac9632c3df6c7768a9a236566605
2014-07-23 19:31:56 +00:00
drh
f5d87f77e2 Fix the index name for the shadow tables in the spellfix1 extension so that
multiple instances of the spellfix1 virtual table can each have their own
index.

FossilOrigin-Name: 438c348a40383796a710499e4e1b7a6b08f75778
2014-07-22 16:00:49 +00:00
dan
a5983da6e1 Fix DELETE and UPDATE operations on fts5 tables.
FossilOrigin-Name: d44d3a8518ff7a1a3e2c0ab97493aa590676ee8c
2014-07-21 15:45:26 +00:00
dan
5c1b820460 Add the xTokenize extension API.
FossilOrigin-Name: 8c6b0aff3443fae4b7f0b9adcbf1514992b70653
2014-07-21 14:22:38 +00:00
dan
84d6fb394f Fix the xColumnSize() extension API.
FossilOrigin-Name: 19504c4108472d2ad1281221642b8bd06eb69f4e
2014-07-21 11:44:47 +00:00
dan
e1c77bcfcd Add simple tests for the xColumnText() extension api.
FossilOrigin-Name: 1e9053abdaf5e128d44504ee00dfd909dc25f378
2014-07-19 20:27:54 +00:00
mistachkin
86ac612e8a Fix some harmess compiler warnings in the FTS3 Unicode module.
FossilOrigin-Name: c01caea5d6ad7a570628b85fb3056ac955ff03dd
2014-07-19 15:44:29 +00:00
dan
4a165c0af4 Fixes for the xColumnSize() fts5 extension API.
FossilOrigin-Name: 43fcb844726cfeeb1c8a0dbfaa0d2ca22e6ac16c
2014-07-19 15:35:09 +00:00
dan
30b650e2f4 Fix issues with position lists and NEAR constraints.
FossilOrigin-Name: 16352d3654d5672cd0251db51dbe19f779373feb
2014-07-18 19:59:00 +00:00
dan
c5b44f3d90 Fix a problem with position list processing for OR queries.
FossilOrigin-Name: 5808f30fae0d844c52a785bf18872be371d4af68
2014-07-17 15:14:07 +00:00
dan
18689f1bd4 Fixes for tcl list generation in fts5_test().
FossilOrigin-Name: c1f9a4b76c0bbc1ef9f6cdb5d62aa5d536fdf38e
2014-07-16 20:07:59 +00:00
dan
9cfd51f587 Begin adding interface for auxiliary functions.
FossilOrigin-Name: 1e2a7ba0889093416455f488fca893eaeb195d45
2014-07-16 19:15:57 +00:00
dan
48eecfb8b9 Support "ORDER BY rowid ASC".
FossilOrigin-Name: b96b5e166990e4ec363b24f66e04cfa5f00f6342
2014-07-10 20:21:12 +00:00
dan
a2b569f955 Add support for prefix queries to fts5.
FossilOrigin-Name: 75ebd3cd5904a4f89f7f3a9b25d32b2a42a31310
2014-07-08 16:27:37 +00:00
mistachkin
166c373779 Fix harmless compiler warnings in the fts3view utility program that can occur with MSVC.
FossilOrigin-Name: 1cec1e030035e5253fb7ebbdfe5c1a3029e4e29b
2014-07-07 18:03:38 +00:00
drh
42d3d37ad1 Fix a division-by-zero error in the fts3view utility program. Add the
fts3view utility program to the "main.mk" makefile.

FossilOrigin-Name: 64f02699b4bd747e4c2f0debf72d37ec275137d8
2014-07-07 16:07:43 +00:00
dan
103576dd75 Add support for AND, OR and NOT to fts5.
FossilOrigin-Name: 8682b87e794767cefcaa080fd53c8973c24c556a
2014-07-05 15:15:41 +00:00
dan
c2642d7c1e Add support for the "colname : <nearset>" syntax to fts5.
FossilOrigin-Name: 004667106e552e832a564b77e242b86f183d4441
2014-07-05 07:54:01 +00:00
dan
c18a8fe99c Add support for NEAR expressions to fts5.
FossilOrigin-Name: 250ae8d40115e2e47cc5a1e8a427fa8c0a89124d
2014-07-03 20:39:39 +00:00
dan
2eaf03d72b Change fts3/4 so that the "unicode61" is included in builds by default. It may now be excluded by defining SQLITE_DISABLE_FTS3_UNICODE.
FossilOrigin-Name: 0cc0230ae9cfc9760fd8ef2c25e82576b052dbeb
2014-07-03 12:18:22 +00:00
dan
1dfacb4675 Add support for phrase queries to fts5.
FossilOrigin-Name: 2e5652e6526b8fb3f5c163168d95bc0bb4c93686
2014-07-02 20:18:49 +00:00
dan
acf6642819 Change the position list format so that its size in bytes is stored at the start of the list itself.
FossilOrigin-Name: 62f2ff20418702ed0fbf708369edf5638445b51b
2014-07-01 20:45:18 +00:00
dan
e369fe4352 Fix minor problems in term matching.
FossilOrigin-Name: 94eeb077d08a1d2607f3ff3a9fbf18229ba475bb
2014-06-26 12:31:41 +00:00
dan
22d43ec4e8 Begin adding query support to fts5.
FossilOrigin-Name: 47a9f3cc92deefe163108e3507bd4614bf1f5da7
2014-06-25 20:28:38 +00:00
dan
d0bfb36a08 Add simple full-table-scan and rowid lookup support to fts5.
FossilOrigin-Name: 3515da85d09220c464979467b476c611da4a6a7a
2014-06-24 16:59:06 +00:00
dan
e0fa4107c2 Add some code for an experimental fts5 module. Does not work yet.
FossilOrigin-Name: 1e0648dcf283d4f1f6159db4d2433b6cc635992e
2014-06-23 11:33:22 +00:00