drh
7e9e70b170
Add ALWAYS() macros in wal.c to cover branches that are no longer reachable
...
following the pager refactoring.
FossilOrigin-Name: 24f24c927c77bb3bb4d26a23dd5d94f964db8033
2010-08-16 14:17:59 +00:00
drh
9b78f79183
Adjustments for better 64K page size handling.
...
FossilOrigin-Name: faf1974e2de321bfefb68b81d702ae69771933ef
2010-08-14 21:21:24 +00:00
drh
b2eced5de2
Increase the maximum page size from 32k to 64k.
...
FossilOrigin-Name: 45362437d491fbe0f033a67b398f8ba68cbf1b3b
2010-08-12 02:41:12 +00:00
dan
007820d65d
Fix a problem causing the return code of an xSync call to be ignored in wal.c.
...
FossilOrigin-Name: f1b2b5f9c3a5561ea6108283ae08404106c3f8bc
2010-08-09 07:51:40 +00:00
dan
7a76197f40
In WAL mode, ignore any error returned by an xFileControl(FCNTL_SIZE_HINT) call. This matches the behaviour in rollback mode.
...
FossilOrigin-Name: 158a309737bd4cdc033cd504a6d0cc43c15b6e17
2010-08-09 07:07:37 +00:00
dan
73d66fdb22
Fix minor problems and update comments in pager.c.
...
FossilOrigin-Name: 92e456374b052aceff356d10317b5b94fcdeaa5c
2010-08-07 16:17:48 +00:00
dan
763afe62e1
Incremental checkin on pager state refactoring.
...
FossilOrigin-Name: 0a636798bdb6961a47327091715b254f79add823
2010-08-03 06:42:39 +00:00
dan
502019c8bb
Support FCNTL_CHUNK_SIZE on windows too.
...
FossilOrigin-Name: a038688c991435967b935946c2283707820bb5da
2010-07-28 14:26:17 +00:00
dan
1e5de5a13d
Changes to wal.c so that SQLite can read even if the WAL file is opened read-only, provided the wal-index (shm file) is opened read/write.
...
FossilOrigin-Name: 932d19da73c9673cdd4cc01289b17761c23d23cb
2010-07-15 18:20:53 +00:00
dan
7d4514a4e1
Handle the case where xShmMap returns SQLITE_BUSY.
...
FossilOrigin-Name: 75f5354876c4300a8e53fe551dc837dd383d1e38
2010-07-15 17:54:14 +00:00
dan
50833e32c1
Test the libaries response to read-only or unreadable database, WAL and wal-index files. If a WAL file cannot be opened in read/write mode, return SQLITE_CANTOPEN to the caller.
...
FossilOrigin-Name: 45bb84c6283d803fc29077fdc2d06fa50ec06a59
2010-07-14 16:37:17 +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
55897967cc
Fix warning under MSVC.
...
FossilOrigin-Name: 0c32c4bbdd74297767dcf4ec4295f9cc72875af0
2010-07-09 12:57:53 +00:00
drh
519426aaf8
Reformat WAL code for clearer presentation. Update comments for correctness.
...
Add checks to ensure that corruption in shared-memory does not result in
an infinite loop.
FossilOrigin-Name: 40eaada7ec45e70bdf64d060051f24c5c5e3faf3
2010-07-09 03:19:07 +00:00
drh
2327f5a454
Make the initial salt values in the WAL header random values, not zero.
...
FossilOrigin-Name: baa5eddd0539342945c14a2793c2579efb7e3b26
2010-07-07 21:06:48 +00:00
drh
e9187b4371
Remove two more testcase() macros that require 4GiB WAL files to hit.
...
FossilOrigin-Name: 16e18f2706e67210eae62edfb748758fd27f23d7
2010-07-07 14:39:59 +00:00
drh
09b5dbc519
Remove a testcase() macro that would require a 4GiB WAL to reach.
...
FossilOrigin-Name: 15f9c2713bdfd3d6c8d8d4298f101d128e39b99a
2010-07-07 14:35:58 +00:00
drh
3e8e7ecbc4
Add testcase macros to ensure that large-file cases are tested in WAL.
...
FossilOrigin-Name: 8156b57ac33161ae6dd8a9413127ecce3c9eae83
2010-07-07 13:43:19 +00:00
dan
bd0e9070e5
Fix a problem with writing to databases larger than 2^32 bytes with WAL mode.
...
FossilOrigin-Name: b956ddca75d64ba662fa0b03b643822d836b6501
2010-07-07 09:48:44 +00:00
dan
3e875ef3b5
Allocate a buffer containing the full path-name to the associated WAL file when a pager is created. This saves having to construct a new buffer each time a new read-transaction is opened and SQLite checks for the existance of a WAL file.
...
FossilOrigin-Name: 3053a4ad15343a56efa430503797b77bb6d1e770
2010-07-05 19:03:35 +00:00
shaneh
8a300f8095
Fix a couple more compiler warnings under MSVC.
...
FossilOrigin-Name: 26bc27e3f4c8a666f3358f73fc21eccdec3508f6
2010-07-02 18:15:31 +00:00
shaneh
5eba1f60fe
Fix some warnings when compiling under MSVC.
...
FossilOrigin-Name: 708338773919fa024abbba55180654beb60e6d84
2010-07-02 17:05:03 +00:00
drh
7750ab48f5
Make walIndexTryHdr() a private function. Fix an issue with SQLITE_MUTEX_NOOP.
...
FossilOrigin-Name: ec65bbd06bdd3bf16a742c5bb1fab0dce756c01a
2010-06-26 22:16:02 +00:00
drh
ff82894faa
Suppress various compiler warnings.
...
FossilOrigin-Name: e82d008eaffb5522080cad6c69c1b194b78eadbd
2010-06-26 21:34:06 +00:00
drh
7d113eb0ab
Suppress a couple uninitialized variable warnings.
...
FossilOrigin-Name: 29571e228cc85f7768c3ad57d0c7af96b5a54983
2010-06-26 20:00:54 +00:00
dan
52d6fc0eda
Reduce the average (but not maximum) size of the allocations made as part of a checkpoint.
...
FossilOrigin-Name: 4a7fd91b7ab2c5d21fbac7f6f123820c8f4ec7f6
2010-06-25 16:34:32 +00:00
dan
bdf1e2437e
Reduce the size of the large allocation (approx 8KB for every 4000 frames in the log) that occurs during checkpoint. Use the 'scratch' memory for this allocation instead of the general purpose allocation.
...
FossilOrigin-Name: 29887487ed549f97c3c9b37f852bae179b6ea9a9
2010-06-25 15:16:25 +00:00
dan
f544b4c4b8
Modify the merge-sort in wal.c so that it does not use recursion.
...
FossilOrigin-Name: daea6c054cee3564d8460d876b78a325ebc382dd
2010-06-25 11:35:52 +00:00
drh
a927e94e71
Make sure the wal-index reader detects an incorrect version number even if
...
it had to hold a lock in order to read the wal-index. Also, expand and enhance
various comments in wal.c.
FossilOrigin-Name: 2e6a462cebc05bfd4648d26dd5ae70b68844aa5f
2010-06-24 02:46:48 +00:00
drh
cd28508e58
Fix and/or improve comments in wal.c. No code changes.
...
FossilOrigin-Name: ee9991be082202c6637adb47affc777e7917be04
2010-06-23 22:00:35 +00:00
dan
10f5a50e57
Add a version number to the wal-index header. If SQLite encounters a version number in either the wal or wal-index files that it does not understand, the operation is abandoned and SQLITE_CANTOPEN returned.
...
FossilOrigin-Name: 8d0f8a7f70d6fb42369411a934b30f8c8ca8322f
2010-06-23 15:55:43 +00:00
drh
a715211820
Disable code used only by the codec when the codec is not deployed.
...
FossilOrigin-Name: 2c90276e340aa19d78d2e33c9f759f8eda0b82a3
2010-06-22 21:15:49 +00:00
dan
47ee386f06
Add codec support to wal mode.
...
FossilOrigin-Name: 393741eba353d5d242b8e3c96db3ea2b92228036
2010-06-22 15:18:44 +00:00
drh
ffca43014b
Updates to comments and testcase() macros in wal.c.
...
FossilOrigin-Name: 4d90cc0bc07e791b2838fc384866bd5c2282f681
2010-06-15 11:21:54 +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
ad3cadd8b2
Update some comments in wal.c. No code changes.
...
FossilOrigin-Name: 1ce9c92bffa5d7f8431c005b29d698b0f5b95875
2010-06-14 11:49:26 +00:00
dan
d60bf11036
Change the interface to internal function walGetHash() to make it easier to follow.
...
FossilOrigin-Name: 5e8e2e978ea48ce4ad93a936c838934f33d665df
2010-06-14 11:18:50 +00:00
dan
067f3165d8
Add the xShmPage method to the "crash" vfs in test6.c.
...
FossilOrigin-Name: 1008f536440840da7d56c01ec147a25295fd1fd4
2010-06-14 10:30:12 +00:00
dan
5d656852f7
Add some fault-injection tests to improve coverage.
...
FossilOrigin-Name: 37b26d125f4b1d8e75bb38800fefd145611f94aa
2010-06-14 07:53:26 +00:00
dan
4280eb3004
Fix some problems with handling IO errors on the experimental branch.
...
FossilOrigin-Name: eade8bc238df580412f5cf1b91a91532ae671e46
2010-06-12 12:02:35 +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
dan
199100e2cd
When restarting (wrapping) a log file, set all unused aReadMark[] slots to READMARK_NOT_USED instead of 0. Setting them to 0 does not cause a problem, but may cause SQLite to obtain and release a few more file locks than would otherwise be necessary.
...
FossilOrigin-Name: 0797b10c0cc08ae38e26685d1f8331e37d428781
2010-06-09 16:58:49 +00:00
drh
db7f647e41
Shift the meaning of aReadMark[] back so that +1 offset from mxFrame is
...
removed. Add the new READMARK_NOT_USED value (0xffffffff) instead of
zero to signal an aReadMark[] that is not in use.
FossilOrigin-Name: c576827d55c156572b76cf7063e9f253ca6e7403
2010-06-09 14:45:12 +00:00
dan
15651f61df
Simpler fix for the race condition also fixed by [7c102c7b5f]
...
FossilOrigin-Name: 3c2de820034e01c2e939bd90a05a58159f60df50
2010-06-09 11:28:43 +00:00
dan
640aac48f3
Add further test cases for the logic in sqlite3WalBeginReadTransaction().
...
FossilOrigin-Name: a49713db39d0d6940b368206d4e669aa69aa1fe5
2010-06-05 19:18:59 +00:00
dan
eb8cb3a851
Clarify the purpose of a test for a race-condition in walIndexReadHdr().
...
FossilOrigin-Name: c041c6a9786bc9ebb82527f7a2c96d255aec927f
2010-06-05 18:34:26 +00:00
dan
493cc590b6
Remove a condition from sqlite3WalRead() that is unreachable as of the changes to clear entries out of the wal-index hash tables on transaction or savepoint rollback.
...
FossilOrigin-Name: 394204735a842b04b677cca20485b1578e475d4c
2010-06-05 18:12:23 +00:00
dan
0626bd65fb
Mark a condition in wal.c as ALWAYS().
...
FossilOrigin-Name: 3fe0cc784ac586358c08f87fba458dfbb5eec6f2
2010-06-05 14:42:57 +00:00