Commit Graph

7832 Commits

Author SHA1 Message Date
dan a49ba7c835 Fix mistake in test_osinst.c.
FossilOrigin-Name: 4c3e137803f86ec5a6c68bfaa29a2847ba48fd65
2010-05-13 09:32:30 +00:00
drh 5500a1f1e6 Make sure xShmGet is never called while already holding the shared-memory
segment.

FossilOrigin-Name: 92ebdbc5f64ac63796ff56c1e1aec3b95c6bdd20
2010-05-13 09:11:31 +00:00
drh 043c20e63e The refactored of VFS SHM primitives are now working so merge the
wal-refactor branch back into the trunk.

FossilOrigin-Name: bce21c18380715e894eac9c173c97315e0d69d93
2010-05-13 08:53:41 +00:00
drh a925fd256b Change the xShmSize() implementation in os_unix.c so that it will only
increase and never decrease the size of a shared-memory segment.

FossilOrigin-Name: 149d2ae4a6fe2f86822f286d2a7092c51bec7ebb
2010-05-13 08:33:35 +00:00
dan bd50ddeb42 Fix for a segfault that can follow a malloc failure.
FossilOrigin-Name: 3cab9022457ce50f82c5822d8ba6c04a3a85cb6a
2010-05-13 07:08:53 +00:00
dan 7fd555a634 Modify the VFS in test_vfs.c to match the refactoring of the xShmXXX methods.
FossilOrigin-Name: 25e72f81561575051c63e9bf5d2c8e76f9fcf5c6
2010-05-13 06:19:37 +00:00
dan fbefb894cc Change the vfs instrumentation code in test_osinst.c to make it easier to deploy. Add a vtab implementation for reading the binary log file format.
FossilOrigin-Name: ee13c8849d234931bb3be36e42383d228b3cbfcb
2010-05-12 19:02:35 +00:00
drh 365e2d255b Fix for the test_devsym.c test module for the VFS-SHM refactoring.
FossilOrigin-Name: 49d62933759d4e160ee3a4dd2aa316a2f5bbb4e6
2010-05-12 18:30:36 +00:00
drh 686138fe88 A couple simple fixes to get wal.test mostly working.
FossilOrigin-Name: c74458127468f30b16715594c8d68e9d3c05d292
2010-05-12 18:10:52 +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
shaneh 50f6455f41 Updates to WAL support in os_win.c: pulled in latest changes from src/os_unix.c; updated tracing; misc. improvements.
FossilOrigin-Name: 76504726a1ef7f6a0445ec800776462138b22d72
2010-05-12 17:14:59 +00:00
drh eaf52d883a Remove the OP_Variable optimization of check-in [48b77b04935d894] since it
can lead to malfunctions as described in ticket [26ff0c82d1e90].

FossilOrigin-Name: 7838163d087780a6fb403a17641b96f71baec088
2010-05-12 13:50:23 +00:00
dan ed36020daf Remove a branch made redundant by the earlier exclusive-mode changes.
FossilOrigin-Name: c501b2ede6aad123bef0aa7ce8b356a134eb6d26
2010-05-12 06:54:31 +00:00
dan 97c1f6c8f2 Have os_unix.c use the suffix "-wal-index" for wal-index files instead of "-wal-inde".
FossilOrigin-Name: 885e854e7cdc79ecc9d5772d563ddc0f61753ab6
2010-05-11 16:29:54 +00:00
drh be5481578a When an attempt to change journal_mode fails due to locks, be sure to
leave internal structures in a consistent state.

FossilOrigin-Name: cf3d1e0b8a739302cf2848ac3e6eaaae04e6a44c
2010-05-11 14:00:39 +00:00
dan 5543759b1b Changes so that WAL and exclusive-locking mode work together.
FossilOrigin-Name: 71e7b1cf9f4cd02a2a9bc8a3e58acd7a7e3c7e60
2010-05-11 12:19:26 +00:00
shaneh 04882a9e4a Initial port of WAL VFS support from os_unix.c to os_win.c.
FossilOrigin-Name: 111ad59f21d53d1ec63c084ca5f98f2aaf7cd070
2010-05-11 02:49:39 +00:00
shaneh a10069dd22 Updates for to WAL TCL test scripts to support running on Windows.
FossilOrigin-Name: 6a5630806c87b0f4e5632c37c357f98effd9608a
2010-05-11 02:46:16 +00:00
drh 09b1330026 Fix an off-by-one error while constructing the name of the mmap file for
the wal-index under os_unix.c.

FossilOrigin-Name: 6e3735f72cb7d2f4d16c8f9bc59ff159c75243e5
2010-05-10 19:51:32 +00:00
dan 7ddccd2aad Merge [96d6eaf4d2] and [40b0a6357b].
FossilOrigin-Name: c67756c404669141fa06a1ce3f1efadefa277bc6
2010-05-10 18:10:17 +00:00
drh 1c5bb4d69c Fix an uninitialized variable in OSX proxy locking.
FossilOrigin-Name: 96d6eaf4d2be453191b36875811d9556ad0763ed
2010-05-10 17:29:28 +00:00
dan bb23aff3df Modify the format of the wal-index to use a hash table to index log file segments.
FossilOrigin-Name: 40b0a6357b160e04326ab176955a68a1cf3f8b7c
2010-05-10 14:46:09 +00:00
drh acd0781892 If an ATTACH command files due to OP_JournalMode but still attaches the
database, make sure VACUUM still detaches it when done.

FossilOrigin-Name: 6ecdc7ba2b5e79e8b5862fb49cf6c2b99a40659a
2010-05-10 14:10:57 +00:00
drh ab9b74443c Enhance the OP_JournalMode opcode with an ignore-errors option and use that
option the ATTACH command.

FossilOrigin-Name: 0bdea4cfbd7832f2a00c01b93c92ba13d20139ef
2010-05-10 11:20:05 +00:00
drh 2905f053ef When running a checkpoint while in locking_mode=EXCLUSIVE, be sure to move
the wal-index lock to UNLOCK from READ prior to promoting to CHECKPOINT.

FossilOrigin-Name: be114bdf9bb98c7287f8cb54340c630b0c412e9d
2010-05-07 20:34:17 +00:00
drh e874d9ed79 Change the xShmOpen() method of the VFS to take the database file name as
its argument, not the WAL file name.  Also fix some unrelated compiler
warnings.

FossilOrigin-Name: a65c2939267ef6acec4e355a207f98f217e263d6
2010-05-07 20:02:23 +00:00
drh 6a2607a131 Additional tweaks to API documentation. No functional code changes.
FossilOrigin-Name: e1230782a371f09cd46dacc8ecbc6a0c5baab2d5
2010-05-07 18:23:24 +00:00
drh 005e19c4c1 Updates to documentation on the C interfaces supporting WAL. No functional
changes to code.

FossilOrigin-Name: 681ba20cf077e9a0fccd51ed50101ad0f2c67eb3
2010-05-07 13:57:11 +00:00
dan c6315a44b2 Fix a recently introduced problem in wal.test.
FossilOrigin-Name: 79b52d0ff7a7b717bde55b97ff05ad17418bc7d7
2010-05-07 13:52:42 +00:00
dan 65bddc1223 Change wal.test and walhook.test so that they work with DEFAULT_AUTOVACUUM=1 builds.
FossilOrigin-Name: 4cde92909c20982f7d4e6b550f55d786df398ccd
2010-05-07 12:49:22 +00:00
dan 65f2ac58b6 Test another IO error case in wal.c.
FossilOrigin-Name: 8b3b5ab8fa61ca4ef22c98abaab397707ee74ea3
2010-05-07 09:43:50 +00:00
dan 998ad21271 Fix a problem with checkpointing large log files created by an external process.
FossilOrigin-Name: 8f94bde568be52ecc5a976b7a09776ea7b4bb511
2010-05-07 06:59:08 +00:00
dan 846705021d Since walIndexTryHdr() can no longer encounter any error conditions, change tehe function signature so that it does not return an error code. This removes unreachable branches from other code.
FossilOrigin-Name: 061a282cc0bf76541ab1f99b351a49d489ff93ec
2010-05-07 05:46:23 +00:00
drh 2c47d194a2 Another attempt to fix permutations.test so that it excludes WAL tests
from the journaltest permutation.

FossilOrigin-Name: 58c404429c5af167a82899fc4c736ed7489ed746
2010-05-07 00:28:41 +00:00
drh 6763e3550d Remove savepoint6.test from the set of tests run by journaltest since
savepoint6.test uses journal_mode=WAL.

FossilOrigin-Name: 811b45a96bfaa0ef2394b86c06e8f099a07ee9f0
2010-05-06 22:21:14 +00:00
drh 3ebaee9633 The PRAGMA journal_mode=WAL; command now makes WAL the default journal mode
for new databases added with ATTACH, so the behavior is consistent with the
other journal modes.

FossilOrigin-Name: c3520460a4a39fc5e981c3033068ffbb422a4af2
2010-05-06 21:37:22 +00:00
drh 72af0774f9 Make sure to do a clean shutdown of the library upon existing the shell
in order to remove WAL files.

FossilOrigin-Name: c1762dda00b8bdb7c3247617ac4cb654f1d95cf7
2010-05-06 20:19:55 +00:00
drh fb4a626da0 Exclude all WAL tests from the journaltest permutation.
FossilOrigin-Name: 46c97d7eee9359cd21139a6520633f5d16594ab0
2010-05-06 19:55:57 +00:00
shaneh fd06863881 Changes to support SQLITE_OMIT_WAL.
FossilOrigin-Name: 32a8501d78714cc390eba5f993f329ef3b499878
2010-05-06 19:20:29 +00:00
drh 08fba00781 Updates to the VFS SHM locking documentation.
FossilOrigin-Name: 9927ce421090ac20285cf05768b38e1f91826a68
2010-05-06 19:04:48 +00:00
dan 65be0d8cce Instead of transitioning to RECOVER state from CHECKPOINT when a recovery is required, perform the recovery while holding the CHECKPOINT lock.
FossilOrigin-Name: bb0b6021e721c2e4f1533ab18381604c6b7b31d5
2010-05-06 18:48:27 +00:00
dan 5273f58f37 If recovery is run before a checkpoint, change back to a CHECKPOINT lock before performing the actual checkpoint.
FossilOrigin-Name: dc98ee169cfa43c89f1b36fb1150d4788710fda3
2010-05-06 18:27:19 +00:00
dan 576bc3294d Only pass -1 as the size parameter to xShmGet when the caller does not care what size mapping is returned. Only call xShmSize when the underlying allocation (not the mapping) should be resized.
FossilOrigin-Name: 637f51ddf9e4a57e1f171b6d2c6c93152074267e
2010-05-06 18:04:50 +00:00
dan b7d53f54ae Fix a bug whereby an old snapshot could be checkpointed (and subsequent transactions discarded) if the last connection to disconnect from a WAL database happended to be holding an out-of-date wal-index header.
FossilOrigin-Name: d0c0034b0baa83046c1d6b94c886f7039e4e06f5
2010-05-06 17:28:08 +00:00
drh 6e5b37faef After throwing an error to say that one cannot change into WAL mode within
a tranactions, do not then go and change into WAL mode.

FossilOrigin-Name: 56a17dae91600a3863903f8d654ed52a0f720caf
2010-05-06 16:06:38 +00:00
dan d41a29a653 Further coverage tests.
FossilOrigin-Name: 98a9713e0030a36ea99a18a12a2e7685c6db72b3
2010-05-06 15:56:28 +00:00
shaneh 84aab39782 Update configure scripts for WAL support.
FossilOrigin-Name: 2edc5129f216abec9b13a0ad9b6640606caa9f72
2010-05-06 15:35:59 +00:00
dan a861469a07 Add tests to cover a couple of branches in wal.c.
FossilOrigin-Name: 429f437fb776fc974a6adf791b729e25bea82fef
2010-05-06 14:42:34 +00:00
dan c9e4665e7d Unset a tcl variable before reusing it in wal.test.
FossilOrigin-Name: e83efb232fe8d30714f4c7cffeef80092aea4df7
2010-05-06 13:36:47 +00:00
dan ff6dfc73fe Add tests for some lock-contention cases.
FossilOrigin-Name: f0fcb9c9a67e2bf7bbedbedbc27791b605a21dd1
2010-05-06 12:15:48 +00:00