dan
a1afc7425a
Fix a case in the pager where an xFetch() reference was being leaked following an OOM error.
...
FossilOrigin-Name: 5885ba6ce768658ec25b60747430d147b315b55c
2013-03-25 13:50:49 +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
9d56c6df9a
Fix a case where a checkpoint operation could write to an invalid part of a memory mapped region.
...
FossilOrigin-Name: 8dbe89d05ce91428c69003f0da79d883fa23e2b5
2013-03-23 14:20:42 +00:00
dan
99bd10979a
Allow the database file to be memory mapped in wal mode.
...
FossilOrigin-Name: d190ddabc386bc9654b99e33fb81b2f6e67b54d6
2013-03-22 18:20:14 +00:00
mistachkin
48864df97d
Many spelling fixes in comments. No changes to code.
...
FossilOrigin-Name: 6f6e2d50941e444ebc83604daddcc034137a05b7
2013-03-21 21:20:32 +00:00
dan
b26e6c14fe
Fix cases where xRead() was being used to read from a memory mapped part of the database file.
...
FossilOrigin-Name: 5c9e9df27b9f2c46cd55388a858d4e78ee564975
2013-03-21 20:39:55 +00:00
dan
7c49427fc2
Avoid calling xRead() on a part of the database file that is memory mapped.
...
FossilOrigin-Name: c8eac290a7240d69494bd0dad5ed1fdc2505f703
2013-03-21 20:00:07 +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
dan
a72014faf5
When possible, use memcpy() to and from the mapped region instead of xWrite() and xRead().
...
FossilOrigin-Name: f8ca5622d99bedca957caa9ad311d798f63b3ce9
2013-03-16 20:19:21 +00:00
dan
7af6547a5a
Fix a dropped error code in pager.c.
...
FossilOrigin-Name: 022fdc986b33701abfd39621072ac3d9f9f7d43e
2013-03-15 19:13:42 +00:00
dan
11dcd11913
Allow read-only cursors to use mmap pages even if there is an open write transaction.
...
FossilOrigin-Name: b387e2f9d24dccac1fd040e309f6fc7ec1cfffba
2013-03-15 18:29:18 +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
dan
e3664fb03c
Add extended error code SQLITE_READONLY_ROLLBACK. Returned if a read-only connection cannot read the database because doing so would require it to roll back a hot-journal.
...
FossilOrigin-Name: 39247b14a52b0c0222fe5a848bf0aef0854058c4
2013-03-05 15:09:25 +00:00
dan
e0ac363c62
Remove an assert() statement that has been incorrect since the recent incremental-vacuum related changes in [26e235b7a4].
...
FossilOrigin-Name: 090a47127fde90616a92a324d26bf9ddd4053120
2013-03-04 16:35:06 +00:00
drh
6ffb4975f7
Fix an overly restrictive assert() in the pager.
...
FossilOrigin-Name: f476eace86102fd5442cfbba169c18f6ee44eae2
2013-03-01 21:01:05 +00:00
dan
bc1a3c6ce2
If a rollback mode transaction reduces the size of the database file, avoid actually truncating the file until after the transaction has been committed (but before the db has been unlocked). This means pages that are removed from the database by truncating the file need not be journalled.
...
FossilOrigin-Name: b73847f17b7ae1298dfc52de6c4c4bc809bc77a3
2013-02-23 16:40:46 +00:00
dan
44c4fcb9d8
Since errors are ignored anyway, use sqlite3OsFileControlHint() instead of OsFileControl() to invoke the SQLITE_FCNTL_BUSY_HANDLER file-control.
...
FossilOrigin-Name: bdceca2738eb3e8acc44d0384cf2a3a969ee8170
2012-12-05 11:30:28 +00:00
dan
3de0f18476
If the atomic-write property is enabled, a transaction may be committed in journal_mode=DELETE mode without ever actually creating a journal file on disk. In this case, do not attempt to unlink() the journal file when committing the transaction.
...
FossilOrigin-Name: 11aa47b0a837858b644c304638e1cbbf482de2f0
2012-12-05 10:01:35 +00:00
dan
9fc5b4a539
Change os_unix.c to propagate ENOENT errors back to sqlite as SQLITE_IOERR_DELETE_NOENT. Have SQLite ignore these where they are benign and propagate them back to the caller where they may indicate a file-system malfunction of some description.
...
FossilOrigin-Name: bed9c172ce624ab7b5b9de9ad42444891717ad9a
2012-11-09 20:17:26 +00:00
drh
c0a23e5c9c
Remove an incorrect "#ifndef SQLITE_OMIT_AUTOVACUUM" from pager.
...
FossilOrigin-Name: bf44d73d3e4ec403947d361d2fa150cc240c4d45
2012-10-17 13:15:02 +00:00
drh
aa2db79a2e
Mark an always-true conditional as such.
...
FossilOrigin-Name: ae025cae2266a91d4226bbdb66f82b9d7714750a
2012-10-13 20:55:12 +00:00
drh
f7c7031f52
Define the sqlite3PagerWalFramesize() function even if SQLITE_OMIT_WAL is used.
...
FossilOrigin-Name: 96247853ef3d556a13b899b4c907b9fa2c78d513
2012-10-10 12:14:09 +00:00
mistachkin
c197eedbb4
Fix several compiler warnings seen with MSVC.
...
FossilOrigin-Name: 8b5f617c2a5f0bf7bdbd9144aee58d69564db1e2
2012-10-01 20:12:30 +00:00
dan
80bb6f8217
Add SQLITE_FCNTL_BUSYHANDLER. Invoked to provide access to the busy-handler callback to custom VFS implementations.
...
FossilOrigin-Name: 1262d2f471214a3417dd02159a7aa2355b18f789
2012-10-01 18:44:33 +00:00
dan
c9a5326974
Ensure that the value returned by xSectorSize() is reasonable (currently defined as between 2^5 and 2^16 bytes) before using it to calculate the amount of padding to add to a wal file.
...
FossilOrigin-Name: 6b4ff83bff07d427af585c9fd03be90abf2fc82f
2012-10-01 06:50:55 +00:00
drh
55b4c226d1
Make sure the name of rollback journal files are double-zero terminated
...
when they are passed into the VFS.
FossilOrigin-Name: 8711a8447d28275602287faf533de3d6e50d535d
2012-09-15 13:39:24 +00:00
mistachkin
d5578433ff
Fix all known instances of 'repeated the' style typos in comments. No changes to code.
...
FossilOrigin-Name: 9b19b847533f944f289d93dcdba29c0d67bf251c
2012-08-25 10:01:29 +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
drh
5e0c493860
Fix harmless Clang warnings.
...
FossilOrigin-Name: 31fe1985ad6be5eb04bbe85da378c2385c503ceb
2012-06-06 23:59:36 +00:00
drh
d4e0bb0e65
Have user interfaces report out the filename of in-memory databases as an
...
empty string, as it always has. This simplifies the changes.
FossilOrigin-Name: 595dfdbffefb2598cba89980f885289d1c5f5833
2012-05-27 01:19:04 +00:00
drh
4ab9d254e0
Only allow :memory: databases to share cache if there are created using a
...
URI filename. This minimizes the risk of breakages in legacy applications
that have shared-cache enabled but also use :memory: databases which they
expect to keep separate.
FossilOrigin-Name: e3ad61e0308a8442c2bdb7cdb3465576cd39ed4a
2012-05-26 20:08:49 +00:00
drh
afc8b7f0c1
Enable the use of shared cache for an in-memory database, so that separate
...
database connections can share the same in-memory database.
FossilOrigin-Name: 4590e433f2a595bb80fb061024b0a3d2ca25b7b2
2012-05-26 18:06:38 +00:00
drh
a4c5860e6f
Fix a minor deviation from the coding style guidelines.
...
FossilOrigin-Name: 1e51bffe777587cd05bd7db5e02d6291c3eb8c1a
2012-04-27 16:38:11 +00:00
drh
9ad3ee40f2
Add SQLITE_DBSTATUS_CACHE_WRITE. Used to query a database connection for the cumulative number of database pages written.
...
FossilOrigin-Name: 05f98d4eec0f029b76fd471f8d9edf2807de6b55
2012-03-24 20:06:14 +00:00
drh
70708600b5
Add #ifdef SQLITE_ENABLE_ZIPVFS around those bits of code that are only
...
used by ZIPVFS.
FossilOrigin-Name: 3130275c64a60c5cfacbd11123305e6d99ea866d
2012-02-24 14:33:28 +00:00
dan
bf24261b7b
Fix a typo made inside an assert() statement in the previous commit.
...
FossilOrigin-Name: f0640615f25ebe8bf2eed0e1a0f2e309471889fe
2012-02-23 16:45:42 +00:00
dan
b3bdc72ded
Add the sqlite3PagerWalFramesize() function to pager.c. This is used by zipvfs.
...
FossilOrigin-Name: 786e24dc56504d1958db0618e645610f2600a087
2012-02-23 15:35:49 +00:00
drh
33f111dc72
Remove the undocumented PRAGMA omit_readlock hack.
...
FossilOrigin-Name: 96900c47e4fc6ed55cefc10d55d3d8d16bcb1d31
2012-01-17 15:29:14 +00:00
drh
a71a98df88
Remove code made unreachable by the enhancement of the previous check-in.
...
FossilOrigin-Name: 9e31a275ef494ea8713a1d60a15b84157e57c3ff
2012-01-11 16:16:08 +00:00
drh
935de7e81a
Make the pager less vulnerable to problems caused by shifting sector sizes
...
when rolling back a hot journal.
FossilOrigin-Name: 629108c8e5376f989cd66e11437949a54c33a5b8
2012-01-11 15:47:42 +00:00
drh
c02a43afae
Only require double-zero terminators on database filenames, not any every
...
files supplied to the xOpen method. This backs out [2544f233f1]. Also
refactor the fillInUnixFile() routine in os_unix.c to reduce the number
of parameters.
FossilOrigin-Name: cb774b26e13745cfad0d76a71e47466d703e0007
2012-01-10 23:18:38 +00:00
drh
c02372ce6f
Refactor sqlite3OsFileControlNoFail() into sqlite3FileControlHint().
...
FossilOrigin-Name: 722735a4f316630c907149f08d3d7dccc0facd9a
2012-01-10 17:59:59 +00:00
dan
04333f9b3e
Avoid passing strings with a single nul-terminator (two are required) to the VFS xOpen() method from within the code that checks to see if a master-journal file may be safely deleted.
...
FossilOrigin-Name: 2544f233f1041a42bbdbb5413d2bc92b2a2e0397
2012-01-10 17:28:10 +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
92c45cf0fe
Remove the BenignMalloc() from around the call to FCNTL_OVERWRITE. Add
...
new ones around sqlite3OsDelete(). Fix an assert that causes problems for
the nx-devkit.
FossilOrigin-Name: 38bc4236d5a9d9f22a525bf9308d90cd4d9ce5a4
2012-01-10 00:24:59 +00:00
drh
52bcde0e2d
Make sure filenames passed into sqlite3OsOpen() always have the extra
...
zero-terminators needed by sqlite3_uri_parameter().
FossilOrigin-Name: d73e93cfdc9441ade77b796dcdcf6eeb753cb398
2012-01-03 14:50:45 +00:00
dan
aa584af088
Have SQLITE_FCNTL_SYNC_OMITTED use the normal method of returning an error code.
...
FossilOrigin-Name: fd3822f1f2e6ea181f663e99bfe788d8404176ee
2012-01-02 14:50:12 +00:00
dan
b3ce3d6d92
Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_SIZE_HINT call in pager.c.
...
FossilOrigin-Name: c17a3f5e5d72187c06b598ef071d43ef89328e19
2011-12-30 18:16:02 +00:00
dan
0e208252c9
Change an implicit i64-to-int cast in pager.c to an explicit cast.
...
FossilOrigin-Name: 6a71ba9ce930838d44ed8d399075ba0723c9132b
2011-12-30 09:00:19 +00:00