Commit Graph

8 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 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 893c0ffc29 Add a test that simulates an error in mmap().
FossilOrigin-Name: 6ec7367d8e98425f00eeb8215ca8964313c1d0b7
2013-03-25 19:05:07 +00:00
dan ea83bc614e In os_unix.c, do not return SQLITE_BUSY to SQLite following an error in fcntl(F_UNLCK), regardless of the value of errno.
FossilOrigin-Name: ff6dfe6ed74f9ff1669b2bda41d61a01cd0a1bc6
2011-04-01 11:56:32 +00:00
dan 661d71af8c Further tests for os_unix.c.
FossilOrigin-Name: a84f7711949ea3885b0e36e48118d2c76a8a5b82
2011-03-30 19:08:03 +00:00
dan 5ef47bf002 Add tests to syscall.test and sysfault.test.
FossilOrigin-Name: 3d2de011814002e2e25b7645f94ff8fc7aab9cdd
2011-03-29 18:28:35 +00:00
dan 60939d0ade Fix a problem whereby following an IO error in CommitPhaseTwo() of a multi-file transaction the b-tree layer could be left in TRANS_WRITE state, causing problems later on.
FossilOrigin-Name: dbe569a099c2855480e35c0cc4d9332821ad80da
2011-03-29 15:40:55 +00:00
dan 213ca0a8cf Add test infrastructure (and some tests) to inject faults into os_unix.c using the new xSetSystemCall interface.
FossilOrigin-Name: 0e1d20dfaeea5ab285d16aa4b8f02b61b1d2bc10
2011-03-28 19:10:06 +00:00