drh
43f58d6a17
Fix various internal #defines to conform to new C-language naming restrictions,
...
specifically that private-use macros names must not begin with "_".
FossilOrigin-Name: 5471aca0158851d3fb0a2517306917536deb38bb
2016-07-09 16:14:45 +00:00
drh
8f2ce91462
Since the return value of sqlite3OsClose() is always ignored, we might as
...
well make it "void" instead of "int", and thereby save 50 bytes in the
compiled binary.
FossilOrigin-Name: 7ee570e7a9a2159a8c0d41805c00f91ca0de00e3
2016-04-14 13:16:58 +00:00
drh
1b9f2141a7
Experimental implementation of the sqlite3_system_errno() interface.
...
FossilOrigin-Name: 6782c87b3722fbd09684a5b1e5df05247956f1c6
2016-03-17 16:01:23 +00:00
dan
2491de28f1
Extend the code in memjournal.c so that it subsumes the role of journal.c. And (untested) can flush journal or statement journal files to disk after they grow to a specified size.
...
FossilOrigin-Name: e0b0b4316531fc8afa74b4882d9c74a91030ec69
2016-02-27 20:14:55 +00:00
mistachkin
fad3039c51
Enhance ability to debug out-of-memory errors.
...
FossilOrigin-Name: 6a9c4a3ebfb7cc0738ef6634440ccab44a21ff28
2016-02-13 23:43:46 +00:00
mistachkin
c04c54b842
Enhance the MSVC makefile to enable building 'testfixture' fully from source code.
...
FossilOrigin-Name: 54ff3a26bc45a1c3c0690119e8fd00b02e2a16ba
2016-02-11 21:28:16 +00:00
drh
9ca95730e3
Add the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work in
...
progress and is not yet completely functional.
FossilOrigin-Name: c297a84bc678f81ffc0aa9139ab73f0ca87c1971
2014-10-24 00:35:58 +00:00
dan
1001ee8819
Do not inject OOM faults into SQLITE_FCNTL_COMMIT_PHASE_TWO file-control invocations. It causes problems for test scripts.
...
FossilOrigin-Name: 8eb28d23e353139d24a8af78309d39249ab9eaf0
2013-12-19 17:04:58 +00:00
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
188d488409
Disable the use of memory-mapped I/O if the SQLITE_DISABLE_MMAP macro is
...
defined. Automatically define this macro for OpenBSD and QNX. Other
systems are likely to be added to the disabled list over time.
FossilOrigin-Name: 8a4314a398c6c6efb25e6993c826b7e60d9bb1f9
2013-04-08 20:47:49 +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
df737fe6f5
Change the signature of the xUnfetch method to "int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p)".
...
FossilOrigin-Name: 115b830509e8f0aa9d5965c1e9cd4f2ed9d01938
2013-03-25 17:00:24 +00:00
dan
f23da96636
Replace the sqlite3_io_methods.xMremap interface with sqlite3_io_methods.xFetch and xUnfetch.
...
FossilOrigin-Name: 1431be95579160fb70408d43e17fc23c7b69ab4a
2013-03-23 21:00:41 +00:00
dan
eb97b29345
When possible, use memory mapping when appending new pages to a database file.
...
FossilOrigin-Name: 14135da3cdbafd699563a29608f32347cda28338
2013-03-20 14:26:59 +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
drh
c02372ce6f
Refactor sqlite3OsFileControlNoFail() into sqlite3FileControlHint().
...
FossilOrigin-Name: 722735a4f316630c907149f08d3d7dccc0facd9a
2012-01-10 17:59:59 +00:00
dan
6f2f19a154
Add function sqlite3OsFileControlNoFail(), which is the same as sqlite3OsFileControl() except that it does not simulate OOM errors. This saves adding calls to the BenignMalloc() functions around each of the invocations of sqliteOsFileControl() that ignore the return code.
...
FossilOrigin-Name: af59b182d797642e5ec3ddf291cf62662a136bd1
2012-01-10 16:56:39 +00:00
drh
e349519f1e
Change the unix VFS so that it ignores all but the least-significant bit
...
of the syncDir flag to xDelete. Add an assert to prove that the core only
ever uses that one bit.
FossilOrigin-Name: e75fd3b27423272b988921ac0e272f9600818b8c
2012-01-05 16:07:30 +00:00
dan
44659c9417
Fix some typos in comments. No code changes.
...
FossilOrigin-Name: 4edc5994b26e1fd3245572cb80242d07ba20a475
2011-12-30 05:08:41 +00:00
mistachkin
6c3c1a0951
Make sure to flag benign malloc failures in the Windows VFS as such. Expand use of the DO_OS_MALLOC_TEST to cover the VFS functions that can now return an out of memory error. Support an experimental --match option to the test suite that will run only those tests matching the specified pattern.
...
FossilOrigin-Name: 76dec8aa9dbbc39e0a7c3b358b58ce7f7a477a2b
2011-11-12 03:17:40 +00:00
drh
30ddce6ff4
Added the tool/warnings-clang.sh script. Changes so that there are no
...
warnings with either gcc or clang even including FTS4 and RTREE and
both with and without SQLITE_THREADSAFE=0.
FossilOrigin-Name: 39408702a989f907261c298bf0947f3e68bd10fe
2011-10-15 00:16:30 +00:00
mistachkin
f1c40f4fd4
Make sure the file structure is zeroed prior to calling the VFS to open a file.
...
FossilOrigin-Name: 29c4d0dd43d41650e54824afd70dd40f1b91cc86
2011-09-17 15:34:50 +00:00
drh
877eeb3b56
All the SQLITE_OPEN_URI flag to propagate down into the VFS.
...
FossilOrigin-Name: 29866f9598502a007816410fade34f1d0952dea0
2011-07-20 17:13:30 +00:00
drh
bfccdaf16e
Identify additional requirements in the sqlite3_vfs object documentation.
...
FossilOrigin-Name: 47064453c396d5204a851b8ec08d665e2b12228a
2010-09-01 19:29:57 +00:00
dan
ddb0ac4b9f
On unix, try to create the *-wal and *-shm files with the same permissions as the associated database file.
...
FossilOrigin-Name: e5d180eed245437b61bfb257ee01e2571c93afe7
2010-07-14 14:48:58 +00:00
drh
e11fedc589
Change the name of the xShmClose VFS method to xShmUnmap, everywhere.
...
FossilOrigin-Name: c2d27cf51d33e6f38bab37008d39074051f75274
2010-07-14 00:14:30 +00:00
dan
da9fe0c327
Changes so that the xShmOpen VFS method is no longer required. Its job can be done by the first call to xShmMap. Rename xShmClose to xShmUnmap.
...
FossilOrigin-Name: f4780bde62c6c19146d2723c101540b8db898d38
2010-07-13 18:44:03 +00:00
shaneh
fd28639f12
Changes to os_win.c to have it return same error code as os_unix.c.
...
FossilOrigin-Name: 33b6f069d8059903312282962181839ff983e5c4
2010-07-02 19:49:38 +00:00
dan
c396d4af58
Additional test cases to cover branches in pager.c.
...
FossilOrigin-Name: eddfb2b4062f8a8b907f0c7bc08a05c16692e900
2010-07-02 11:27:43 +00:00
dan
188019153d
Remove xShmGet/Size/Release from the sqlite3_vfs structure. Change the name of xShmPage to xShmMap. Remove some code that is now unused from os_unix.c and some of the test VFS implementations.
...
FossilOrigin-Name: fc0cabc15c97dde6a852b4f07df6d30f1d2c04bc
2010-06-14 14:07:50 +00:00
dan
13a3cb82ce
Experimental change to the xShmXXX parts of the VFS interface.
...
FossilOrigin-Name: ca68472db01c14a899892007d1cbaff5e86ae193
2010-06-11 19:04:21 +00:00
drh
73b64e4d2e
Initial code for incremental checkpoint in WAL mode. This check-in compiles
...
on unix and runs as long as you do not engage WAL mode. WAL mode crashes and
burns. Consider this check-in a baseline implementation for getting the new
capability up and running.
FossilOrigin-Name: ef3ba7a17ff90674d702e5694b9e792851ab6998
2010-05-30 19:55:15 +00:00
drh
286a288493
Add a new xShmBarrier method to the VFS - a shared-memory fence operation.
...
Implement the same in both unix and win32. Use it to make the WAL subsystem
more robust.
FossilOrigin-Name: 1bd011c9fed5ef29fb616b4d0a52df3b82221b1f
2010-05-20 23:51:06 +00:00
drh
5939f44375
Mark the shared-memory in the WAL implementation as volatile.
...
FossilOrigin-Name: 0a6787908e989bd5e6af25acbdc59ebc8fa61d6d
2010-05-18 13:27:12 +00:00
drh
d9e5c4f6ed
Refactoring the VFS-SHM methods used by WAL. This version compiles and
...
runs non-WAL test cases but crashes and burns on wal.test.
FossilOrigin-Name: 2b00152c1ac0b3735aa6cfab61259ff04d81c701
2010-05-12 18:01:39 +00:00
drh
b7e8ea2015
Use VFS method xCurrentTimeInt64 instead of xCurrentTime when it is available.
...
Provide an implementation of xCurrentTimeInt64 for os_unix.c.
FossilOrigin-Name: ab77b3ae6da3370d8bc3b2c9c0edc723b69f5a95
2010-05-03 14:32:30 +00:00
drh
10a76c90e4
Make the TEMP file tables use the page size set for the main database.
...
Ticket [b80eeab588c4].
Also copy over the changes from apple-osx check-in [7c3bede3f2].
FossilOrigin-Name: 5dcfb0c9e420d27e54a299b3991b98776651a507
2010-01-26 01:25:26 +00:00
drh
68ff78b1b0
Make sure the output of sqlite3OsFullPathname is initialized even if the
...
fails due to I/O or OOM errors.
FossilOrigin-Name: e4943adb83819dee06e2e9da25ff6d967ca170de
2009-11-16 23:36:33 +00:00
drh
c81c11f62c
Remove the obsolete "$Id:$" RCS identifier strings from the source code.
...
FossilOrigin-Name: f6c045f649036958078cb15cd9d5453680c82b0c
2009-11-10 01:30:52 +00:00
drh
f1f12688d8
Added SQLITE_OPEN_SHAREDCACHE and SQLITE_OPEN_PRIVATECACHE flags as
...
possibilities to sqlite3_open_v2(), to override the global shared
cache mode setting. Ticket [9fd0bc36639c15]
FossilOrigin-Name: f509eb8b488bb39deda4ca88f66ed40c6784af02
2009-09-09 14:17:52 +00:00
drh
adad77a6c6
Always call sqlite3_malloc() in sqlite3OsInit(), even when not compiled
...
with SQLITE_TEST.
FossilOrigin-Name: b98a8706a61ad27c881b6820eee10d06bfb27417
2009-08-17 16:01:11 +00:00
dan
3d6e060b48
Move error simulation code from the sqlite3_os_init() functions into a wrapper.
...
FossilOrigin-Name: 67ad21abf88abb7a3e2eacddcaf1ab5d54149807
2009-08-17 15:52:25 +00:00
danielk1977
b5a1920816
Do not simulate OOM conditions in the sqlite3OsXXX() calls if the underlying file is an in-memory journal file. (CVS 6946)
...
FossilOrigin-Name: d486811715350f315374cc41f3d808a75d140afb
2009-07-27 11:41:20 +00:00
drh
072db2fb13
When a VFS.xOpen fails, make sure the pMethods pointer is zeroed on the
...
sqlite3_file object so that subsequent xClose() operations against that
same file handler are no-ops. Bug in the test_async.c module only - not
in the core library. Ticket #3744 . (CVS 6384)
FossilOrigin-Name: c32b454118f4b0cc615edb9b35f749db45f6b36d
2009-03-25 14:24:41 +00:00
drh
1875f7a3db
The amalgamation now compiles cleanly on GCC with options
...
-pedantic-errors -Wno-long-long. (CVS 5991)
FossilOrigin-Name: 73c7302c5f76a2f61ecd75f8bda69bb500d3119c
2008-12-08 18:19:17 +00:00
drh
18472fa7b8
Remove the SQLITE_MUTEX_APPDEF compile-time option. The SQLITE_THREADSAFE=0
...
option always removes all mutex code. For application-defined mutexes only,
use SQLITE_THREADSAFE=1 with SQLITE_MUTEX_NOOP=1. Ticket #3421 . (CVS 5779)
FossilOrigin-Name: 02a12eb1cfe9307c66556105a1a99d657cc01ab5
2008-10-07 15:25:48 +00:00
danielk1977
98c21903bd
Always transform error code SQLITE_IOERR_NOMEM to SQLITE_NOMEM before returning. This was already happening in most places. (CVS 5738)
...
FossilOrigin-Name: 046ef07261d520c9399bd8cdfdfd5281956b7a27
2008-09-23 16:41:29 +00:00
danielk1977
95e80d61af
Fix the position of the SQLITE_WSD macro in the declaration of global variable vfsList. (CVS 5665)
...
FossilOrigin-Name: e869446119724b9b1568b1f8e56e9f29ff6d3816
2008-09-02 17:18:51 +00:00
danielk1977
5c8f858790
Change some more global variables to work with OMIT_WSD. (CVS 5660)
...
FossilOrigin-Name: 46acaf58e11ebe69e4fb5f171d3ee29f056d8e68
2008-09-02 10:22:00 +00:00
drh
633e6d57d9
Implement the "lookaside" memory allocation cache. Use of this cache makes
...
the speed1.test script run about 15% faster. Added new interfaces to
control the cache. (CVS 5488)
FossilOrigin-Name: e48f9697e9fea339e150ddc32940760027dd07d9
2008-07-28 19:34:53 +00:00