Commit Graph

134 Commits

Author SHA1 Message Date
drh 9b4c59fa1b Refactoring the mmap interface. The controlling pragma is now "mmap_size"
instead of "mmap_limit".  Also change SQLITE_CONFIG_MMAP_LIMIT and
SQLITE_FCNTL_MMAP_LIMIT to SQLITE_CONFIG_MMAP_SIZE and
SQLITE_FCNTL_MMAP_SIZE, respecctively.  
The default mmap_size is now always 0, meaning that
memory mapped I/O is off by default.  There is a new compile-time option
SQLITE_MAX_MMAP_SIZE that determines a hard upper bound on the mmap_size.
Setting SQLITE_MAX_MMAP_SIZE to zero disables the memory-mapped I/O logic
and causes it to be omitted from the build.  An extra argument is added
to SQLITE_CONFIG_MMAP_SIZE that can optionally lower the SQLITE_MAX_MMAP_SIZE
at start-time. The SQLITE_MAX_MMAP_SIZE is zero for platforms where we 
know that it does not work, meaning that it cannot be turned on by mistake
on those platforms.

FossilOrigin-Name: ea1404a10abd7f68e1f8e0708c8a3199d1f79665
2013-04-15 17:03:42 +00:00
drh 41f89cc676 Previous check-in accidently left mmap turned off by default. This checkin
fixes that.  Unfortunately, shared.test is now segfaulting.  All other
veryquick tests appear to work, however.

FossilOrigin-Name: a850c7319c20b5757983443df05cf2aa4250053b
2013-03-26 01:07:50 +00:00
drh 0d0614bdc6 Memory-mapped I/O is now on by default. The "PRAGMA mmap_limit(N)" can be
used to issue a hint to the VFS to limit mmap space to N bytes.  The VFS
is free to ignore that hint if desired.  However, if "PRAGMA mmap_limit(0)"
is used, xFetch is never called.

FossilOrigin-Name: 1b37c4effdd03aa2ea938a71b4f22ed27391689b
2013-03-25 23:09:28 +00:00
dan a64d5a15b7 Simulate OOM errors in the sqlite3OsFetch() function. Run malloc.test as part of the "mmap" permutation.
FossilOrigin-Name: 77443ef2cd0b29b7822eea544ab8c6c4a93cb67b
2013-03-25 18:25:49 +00:00
dan 7909e54a22 Update wal mode tests so that they work with the mmap test permutation.
FossilOrigin-Name: f7295872a36539d10edaf0c633f935f25cf73657
2013-03-22 20:15:31 +00:00
dan aa1d67b1d9 Fix a case where the mapped part of a database file may be written during a backup operation.
FossilOrigin-Name: c8d67aefff7299dd5c8abeb2a3a52109c0a823ee
2013-03-22 19:17:45 +00:00
dan 5d8a137218 Add the sqlite3_io_methods.xMremap() method to the VFS interface. Also "PRAGMA mmap_size".
FossilOrigin-Name: 6183f1bd86ceed76d22d9762f3d7eb33262c62d1
2013-03-19 19:28:06 +00:00
dan b2d3de3bf4 Use mmap() to read from the database file in rollback mode. This branch is unix only for now.
FossilOrigin-Name: 6f21d9cbf5d457e63a7282015a89ae785526cf6d
2013-03-14 18:34:37 +00:00
mistachkin c60941f814 Allow SQLite to work on Win32 with SQLITE_OS_WINNT=0 as long as WAL is disabled.
FossilOrigin-Name: c1a8557008e56aa9bcb4565e4178fc57295c563d
2012-09-13 01:51:02 +00:00
drh 373cfbc760 Exclude the atof1.test test script from the valgrind permutations test since
valgrind sets up the floating point hardware in an unusual way that makes
atof1 fail.

FossilOrigin-Name: d3cf6832a59fe4c5723761abb4c89614406b03db
2012-08-30 20:24:39 +00:00
dan 2aba5d96f4 Add extra tests for secure-delete mode.
FossilOrigin-Name: e380cd3ce34d509e184081ecccf27fda11ce1da7
2012-08-07 17:41:50 +00:00
dan a879342b0e Fix a malloc/free mismatch in pager.c (sqlite3_free() called on a buffer allocated by sqlite3DbMalloc()).
FossilOrigin-Name: 506008f000ba4af0b35da023b8c52f7a3f5033bd
2012-06-07 07:24:04 +00:00
dan 3d403c71a8 Add an experimental tokenizer to fts4 - "unicode". This tokenizer works in the same way except that it understands unicode "simple case folding" and recognizes all characters not classified as "Letters" or "Numbers" by unicode as token separators.
FossilOrigin-Name: 0c13570ec78c6887103dc99b81b470829fa28385
2012-05-25 17:50:19 +00:00
dan cbcd9f5357 Add an experimental integrity-check function to FTS.
FossilOrigin-Name: 40fc8804743dfb005991e9c5ef7b0ebcb3c2e731
2012-03-26 10:36:55 +00:00
dan 5730ef599c Add tests for incremental merge code.
FossilOrigin-Name: 570473729d6561d81e6e5f8884fd18487008636e
2012-03-14 20:01:52 +00:00
dan 996073b3ae Add the xLanguageid method to sqlite3_fts3_tokenizer versions 1 and greater.
FossilOrigin-Name: f8e9c445dd358c40e5a7bf3756b9f291909dbea7
2012-03-03 18:46:41 +00:00
dan 6b4e9a849b Omit test file zerodamage.test from the inmemory_journal permutation.
FossilOrigin-Name: 0c0051b1a548591180e4b02f2e74a1a8a63318a3
2012-01-13 10:51:52 +00:00
dan 730f85a34e Have test_multiplex.c add a second nul-terminator byte to the strings that it passes to the xOpen method of the underlying VFS, in case that VFS passes the string to sqlite3_uri_parameter() or similar.
FossilOrigin-Name: 12f5b8c9c9a15bd9e6aabdc708d4e869ff918e76
2012-01-09 11:37:34 +00:00
dan 533100d3a3 Add tests to walcrash3.test.
FossilOrigin-Name: d76880428013ae2c5be00d87bb3e1695af6f706f
2011-12-17 08:10:34 +00:00
dan 3f1ea8d114 If a token within an FTS query is prefixed with a '^' character, it must be the first token in a column of data to match.
FossilOrigin-Name: 63ac33c860eb32ce96699f06bf83121cec2ffaca
2011-10-18 19:39:41 +00:00
dan cc5b81464a Add tests to check that modifying the schema of an FTS content table does not cause a crash in the FTS module. Also disable the deferred token optimization for content=xxx FTS tables.
FossilOrigin-Name: be86c7061b68f403730bf63ea1f7dc0d9ceb0a3b
2011-10-04 16:37:35 +00:00
dan d8e454e19a Add experimental 'content' option to FTS4.
FossilOrigin-Name: 1d27ea741f61c624e18bdc6a3b1c2d8574a64ddc
2011-10-04 11:22:59 +00:00
dan 15bf39034a Merge latest trunk changes into experimental branch.
FossilOrigin-Name: 7e515055f219b01dd72df4e27bdcabfa2f9be5c2
2011-08-12 16:30:30 +00:00
dan 5279112ea3 Add fault-injection and other tests (and fixes) to improve coverage of vdbesort.c.
FossilOrigin-Name: 0e6defa6aa540b413ea3f4bb6dcd86364d547067
2011-08-08 16:44:25 +00:00
drh 8b0228f1a6 Exclude the 8_3_names.test script from the inmemory_journal permutation.
FossilOrigin-Name: 78fc94c8d1229a8bdc9390e98b53c57aeef7fc46
2011-08-02 20:14:55 +00:00
drh 82be3b03a8 Also exclude backcompat.test from inmemory_journal since inmemory_journal
is not compatible with WAL mode.

FossilOrigin-Name: 861a5b62430d0ada07a46d0e394fcf0b0faab1cd
2011-08-02 19:59:39 +00:00
drh d88d10566c Omit backcompat.test from the journaltest permutation because it uses WAL
mode which is incompatible with journaltest.

FossilOrigin-Name: 2bbf3150a4b7108e88ed81c1d40af6f06089e148
2011-08-02 19:30:20 +00:00
dan c431fd5580 Add a case to permutations.test to run the veryquick test suite using sqlite3_prepare() instead of sqlite3_prepare_v2(). This helps to test the fix for bug [25ee812710].
FossilOrigin-Name: d9f7993bfa2ecb30c44455de538eb6f8a4a59087
2011-06-27 16:55:50 +00:00
drh d80138af2c Do not run test tkt-2d1a5c67d.test in the inmemory_journal permutation
since that test requires WAL mode which does not work with inmemory_journal.

FossilOrigin-Name: 228c43c726e637daadc0c9b5a8b24243f239b1cf
2011-06-19 21:17:35 +00:00
dan 2cf1a1de4b Fix another bug caused by NEAR/matchinfo/order=DESC interaction.
FossilOrigin-Name: 04907fbadeb743c95cc9f3529e63ef388684799f
2011-06-14 09:00:27 +00:00
dan e414854800 Changes to improve performance and support LIMIT clauses on fts3 tables. This branch is unstable for now.
FossilOrigin-Name: 28149a7882a1e9dfe4a75ec5b91d176ebe6284e9
2011-06-02 19:57:24 +00:00
dan 28f9b0b5fd Fix some test cases in walfault.test. Extend one test case to restore code coverage. Add wal5.test to the "coverage-wal" permutation.
FossilOrigin-Name: f83b07ace340c9dd3e0cbe3cd3c106db003b0bd4
2011-02-07 16:24:39 +00:00
dan a240fd01b6 Add virtual table module "fts4aux", used to inspect the full-text index of an fts4 table directly. Also add the "compress" and "uncompress" fts4 options.
FossilOrigin-Name: b010ddcc52889160af2183a33c5f483bb0ae91b9
2011-02-01 16:34:32 +00:00
dan 1ce1b4a780 Run some of the existing test scripts with optimizations disabled as part of all.test.
FossilOrigin-Name: b0634d2f909fb192d20315e59fa31fcd8f316541
2010-12-07 14:32:28 +00:00
dan 25568441f5 Add the "valgrind" permutation. This is the same as veryquick.test except that it omits the multi-process tests that do not work under valgrind. No changes to production or existing test code.
FossilOrigin-Name: 49531300676b303f2ccec8d8d587b389c9eae98b
2010-12-03 10:32:06 +00:00
dan af4c214e1f Changes to allow FTS4 tables to be created without the underlying %_docsize table (in order to save space).
FossilOrigin-Name: 31989b18f53d97eddfb39660ef04fbf9463583e0
2010-11-02 17:41:52 +00:00
dan 8c40800439 If a database file with the WAL flag set is opened in exclusive-locking mode, use heap memory to store the wal-index instead of shared-memory.
FossilOrigin-Name: 8dd5c69198619866923c6053b71899c1fb8c4c67
2010-11-01 17:38:24 +00:00
dan ddf80eb8ce Test coverage improvements for fts3.c.
FossilOrigin-Name: a8b1d99899678b72c2a487909eabed321593d55f
2010-10-25 12:47:43 +00:00
dan 74c3e78cad Add test for matchinfo when a phrase includes some common tokens.
FossilOrigin-Name: 80a54ebc41e4224ab93d92cb390524db1c398155
2010-10-25 09:01:57 +00:00
dan 4f7c5e684a Experimental changes to fts4 to try to selectively avoid loading very large doclists.
FossilOrigin-Name: 5ae0ba447a561e3b6637b52f9b83a9fc683d2572
2010-10-19 14:07:59 +00:00
dan fa2a477226 Fix some test failures found running releasetest.tcl.
FossilOrigin-Name: 56a9ce7774a6f163a62684dd8d5357ce16a07de1
2010-09-14 10:53:45 +00:00
dan b0c6a8884b If MEM_STATUS is disabled, avoid holding the STATIC_MEM mutex when calling the user-defined xMalloc method. Holding the mutex causes problems for memsys3 and memsys5.
FossilOrigin-Name: 4f20f8ba73691c8a1dc33d2fcd1e793dd08f00a8
2010-09-02 10:08:41 +00:00
dan 897230eb7a Fix a couple of memory leaks in r-tree that can occur following an OOM condition.
FossilOrigin-Name: 1975a27cdec09e1dad4ca8281a87dd7754c02c3e
2010-08-26 14:15:37 +00:00
dan 763afe62e1 Incremental checkin on pager state refactoring.
FossilOrigin-Name: 0a636798bdb6961a47327091715b254f79add823
2010-08-03 06:42:39 +00:00
dan a69f7d5aa5 Re-introduce the prefix-search optimization of [feef1b15d6], which was lost in a reorganization of FTS3 code.
FossilOrigin-Name: d692434b4935e8e7858230af1c126b0be8203077
2010-07-19 11:16:36 +00:00
dan 3757556873 Do not run journal3.test with the inmemory_journal permutation.
FossilOrigin-Name: e1d228e992fe8da1fc5aef95d9bc8be62c6b46c7
2010-07-17 09:27:31 +00:00
dan 2acd4c6375 Fixes to the pcache10 and pcache90 permutations.
FossilOrigin-Name: 597d40fa529073123a50ae6afc762c59404f8f5f
2010-07-13 14:22:39 +00:00
shaneh c3b84830bd Exclude a few more FTS modules from the "in memory" permutation test suite.
FossilOrigin-Name: 4e9d69cd5ac3cc4d12ccea3028cba73e3c3f2965
2010-07-09 19:32:28 +00:00
shaneh decd09cbe5 Exclude fts3cov.test from the "in memory" permutation test suite to avoid a false positive.
FossilOrigin-Name: 6af6794cac5516f8cbc425cb8c73468ca371a1ad
2010-07-09 18:43:40 +00:00
dan cb35460330 Changes to test scripts so that the "inmemory_journal" permutation works with [ef126e775a].
FossilOrigin-Name: f553c8ed04b4b2df8ff4929e0754e3ffd1d01ba4
2010-07-08 09:44:42 +00:00