Commit Graph

7923 Commits

Author SHA1 Message Date
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
drh
e404de05c0 Remove the noop-mutex implementations of mutex_held() and mutex_notheld()
since they are both unreachable.

FossilOrigin-Name: 6767b62a9a063582889f5ceb42f95eab24c697da
2010-05-06 11:56:52 +00:00
drh
24e3971197 Add two text files containing pager design notes to the doc/ subfolder.
FossilOrigin-Name: ed817fc893e7162ae0ff4022591f7e9e3b81d622
2010-05-06 11:55:56 +00:00
dan
9a6b4e9adb Add test cases to test the libraries handling of corrupt wal-index headers.
FossilOrigin-Name: 9465b267d420120c050bbe4f143ac824146a9e4a
2010-05-06 11:32:09 +00:00
dan
8f6097c244 Add tests for handling errors returned by xShm VFS methods.
FossilOrigin-Name: fbbcacb137e8f5246b88ad09331236aaa1900f60
2010-05-06 07:43:58 +00:00
drh
5def0843f1 Change the behavior of the sqlite3_wal_hook() callback. It should now return
SQLITE_OK or an error code and the error code is propagated back up the 
stack.  If a checkpoint is desired, the callback should invoke
sqlite3_wal_callback() itself.

FossilOrigin-Name: 1b14195e05fe5551992a39246ec3bcf6a33bbfac
2010-05-05 20:00:25 +00:00
drh
ccd13d1f80 Further simplifications to the SHM locking logic. Remove the SQLITE_SHM_QUERY
option.  Unify the WRITE to READ and RECOVER to READ transitions.

FossilOrigin-Name: e9bfa6e4ce7d1edc6be8b9173ac3b6bfd180632a
2010-05-05 19:09:49 +00:00
dan
c7991bdf29 Test the handling of errors returned by the xShmXXX() APIs.
FossilOrigin-Name: 72663123d6be2b194cad7a6057d0f20dd0d9fe05
2010-05-05 19:04:59 +00:00
drh
5c10f77d52 Do not compare page sizes on source and destination of backup until
transactions are started and the page sizes are locked.  This is a
fix to check-in [7bd44794c4].

FossilOrigin-Name: ec7157788b16936b4b6e4642107b3c86aa44df24
2010-05-05 18:46:44 +00:00
drh
4bc79def36 Simplifications to the SHM locking implementation in os_unix.c.
FossilOrigin-Name: 9de05bfb09e29bafdf5782263330fe8eefcfaba3
2010-05-05 18:20:07 +00:00
drh
3289c5efc8 Prohibit backup if the destination is using WAL and has a different page
size from the source.

FossilOrigin-Name: 7bd44794c482beee16c684712545275e2bf63dfa
2010-05-05 16:23:26 +00:00
dan
1018e90b1e When closing a WAL database, if the exclusive lock on the database file is obtained and the database successfully checkpointed, delete the wal-index file from the file system.
FossilOrigin-Name: 2ac5d96c8e5831b392d83c86491d9ed8bc9c8db7
2010-05-05 15:33:05 +00:00
drh
16adb77623 Make sure the page size of the main database is fixed following a
failed VACUUM attempt.  Otherwise, two consecutive failed VACUUM attempts
with attempted page_size changes on encrypted or WAL databases could
result in database corruption.

FossilOrigin-Name: 208e7d5d3a8915433dbf50c6cc6698ec6c8df944
2010-05-05 04:11:44 +00:00
drh
811bdbd206 Do not attempt to modify the page_size when running VACUUM on a WAL database.
FossilOrigin-Name: 58a1a59be89b33c6d5fa8b43571037d7d96625a1
2010-05-05 03:39:53 +00:00
drh
fc34ad291e Get the previous mutex fix working with SQLITE_DEBUG and with the amalgamation.
FossilOrigin-Name: df19928f7ee94bca3989313ff16507c15d6efe2b
2010-05-05 00:22:21 +00:00
drh
92d7652379 When the in single-threaded mode, the sqlite3_mutex_alloc() interface
still returns a non-NULL value.  The mutex doesn't do anything, but it
tests non-NULL.  This way, extensions (or VFSes) that use sqlite3_mutex_alloc()
can tell the difference between an OOM error and mutexes being disabled.

FossilOrigin-Name: 451fd175758983c335aab449fdc4cb838156c4cb
2010-05-05 00:05:24 +00:00
drh
7721b23e0a When sqlite3PagerPagecount() is called without any locks, always return
the physical file size, not the logical file size.

FossilOrigin-Name: 4016b422286587beda7323052d27821adb1fed73
2010-05-04 18:50:40 +00:00
drh
a8e654eb38 Be sure to release all wal-index locks before closing the wal-index.
FossilOrigin-Name: b15b67fa14ff77963f470678ff6188c63be8e079
2010-05-04 17:38:42 +00:00
drh
cd058ec4ef Relax an over-zealous assert() in sqlite3WalUndo().
FossilOrigin-Name: 8f9d22d58c75ad7476c1eea8ba296347e30b7beb
2010-05-04 17:20:09 +00:00
drh
33bec22fb1 Take care not to invoke the xShmClose method of the VFS with a NULL
shared memory object.

FossilOrigin-Name: 1465d3842c52aa7471f63deb47fe5b256d4e01c2
2010-05-04 16:33:37 +00:00
dan
2cee6abf8e Add a test case to verify that log files containing pages that are not a power-of-two bytes in size are handled correctly.
FossilOrigin-Name: c2bf693f933313991d85394009e79a7903037a18
2010-05-04 15:20:45 +00:00
dan
b6e099a973 Fix problems with recovering wal files that use a page-size other than the default.
FossilOrigin-Name: 1a391f3c55dc9d4266552fa26d2a9839c6bafce4
2010-05-04 14:47:39 +00:00
dan
ef37802545 Fix a typo in walfault.test.
FossilOrigin-Name: 232dbe8ecec16485be5c5995fdf7a0ed951c2097
2010-05-04 11:06:03 +00:00
dan
8d6ad1cc2c Test that the correct number of padding frames are appended to the log file after committing a transaction in synchronous=FULL mode.
FossilOrigin-Name: a60104aa7e38e7d9f2ff2eae02687dc9c5dd5d77
2010-05-04 10:36:20 +00:00
drh
d0b2677b78 Unset some global TCL variables prior to use in test where prior tests can
have those same variables set to an array value.

FossilOrigin-Name: 49bef00e5cda600ceb964148bf745de4aff1ab62
2010-05-03 19:20:46 +00:00
drh
d5e6e4004b Fix a bug in the computation of the current time for the alternative
CURRENT_TIMESTAMP functions used when SQLITE_OMIT_DATETIME is defined.

FossilOrigin-Name: e7ded46b5efabe521008d9043dd72bd1ca748316
2010-05-03 19:17:01 +00:00
drh
324e46d424 Documentation stubs for sqlite3_wal_autocheckpoint and sqlite3_wal_checkpoint.
FossilOrigin-Name: 313762427d96954667909887a797ea996dc6304a
2010-05-03 18:51:41 +00:00
drh
0dcb0a7d7b Fix a bug in the xCurrentTime() method of the os_unix.c VFS.
FossilOrigin-Name: 551df11a5613e3edc6c5de44f0ac6abc2d0e6cdf
2010-05-03 18:22:52 +00:00
dan
5e9e482fe0 Add a test to simulate an OOM during log recovery to walfault.test.
FossilOrigin-Name: 7ed85e87dd206083310ba28afab4389885f61dac
2010-05-03 18:01:21 +00:00
drh
529b18706d Clear global variable "seconds" before use in walthread.test.
FossilOrigin-Name: a35551a5305b5160b0eb511da7f8e6fb351ef271
2010-05-03 17:24:45 +00:00
dan
76ed3bc044 Fix a couple of errors in WAL code that can occur in an OOM situation.
FossilOrigin-Name: 9d3f3736be42ef8ab48b099d4712e08dfca97873
2010-05-03 17:18:24 +00:00
drh
4c846bb148 Update the crash-test VFS in test6.c to pass-through the shared-memory
methods to the real underlying VFS.  This fixes the walcrash.test script.

FossilOrigin-Name: ea09ff37911376505e8262ee9841224995b696f2
2010-05-03 16:36:55 +00:00
drh
1fbe0f2a8f Change the VFS definition so that all methods take a VFS object pointer as
their first parameter.

FossilOrigin-Name: 43b5b07f0d996d7ef7426346b1792e9ca898f487
2010-05-03 16:30:27 +00:00
dan
af0cfd366a Have sqlite3_wal_checkpoint() handle a zero-length string in the same way as a NULL pointer. Fix "PRAGMA wal_checkpoint" so that it checkpoints all attached databases.
FossilOrigin-Name: 7fecd21f45b9ce773ffbcef6c84066474e8cd01c
2010-05-03 15:58:50 +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
e8e1c9d50e Merge the write-ahead-logging changes into the trunk.
FossilOrigin-Name: de9ae443cc8eebfb0692dcdac93bde9e4c54199a
2010-05-03 14:08:27 +00:00
dan
6fcff07f6a If the sqlite3_wal_checkpoint() API is passed a NULL pointer in place of a database name, attempt to checkpoint all attached databases.
FossilOrigin-Name: 27a5c09ce8a35039d844d08cfe5698e8b438abfe
2010-05-03 14:05:43 +00:00
drh
b033d8b9dc Make sure the mutex is held while calling sqlite3ApiExit() in
sqlite3_wal_checkpoint().  Other cleanup of WAL logic.

FossilOrigin-Name: 11a85b821abff1ecb7ec8c37bc7783be9fc4ea6d
2010-05-03 13:37:30 +00:00
dan
87c1fe1b69 Have sqlite3_wal_checkpoint() populate the database handle error message and error code (as returned by sqlite3_errmsg() and sqlite3_errcode()).
FossilOrigin-Name: ff234cf574c7ae384ab1ebc79b2171ef0541bc91
2010-05-03 12:14:15 +00:00
dan
5a299f9134 Add the "PRAGMA wal_autocheckpoint" command. Rename "PRAGMA checkpoint" to "PRAGMA wal_checkpoint".
FossilOrigin-Name: 714e5947264571386f966aa8fcdd5607b5832238
2010-05-03 11:05:08 +00:00
dan
11398e5e54 Merge two wal leaves.
FossilOrigin-Name: 23c0e6c3f333e878fe5a2ae5d61df0d765f437b4
2010-05-03 08:19:34 +00:00
dan
586b9c8a94 Add the sqlite3_wal_checkpoint() and sqlite3_wal_autocheckpoint() APIs.
FossilOrigin-Name: 9803196dec85e3aa4105cc477e9cfe98d370e486
2010-05-03 08:04:49 +00:00
drh
2d536e187f Change the SHM interface so that it does not take the name of the shared
object but rather the name of the WAL file and derives its own name from
that.  Remove the xShmDelete method from the VFS and replace it with a
delete flag on xShmClose.

FossilOrigin-Name: 94dea5f9c11a68564220cec76ac3fae2ba90e907
2010-05-01 20:17:30 +00:00
drh
f72a8751c9 Remove the xShmPush and xShmPull methods from the VFS.
FossilOrigin-Name: 69e07fdbde5054593de948b76dfac157cf5d4058
2010-05-01 18:23:08 +00:00
drh
bee6f4ebe2 Define an invariant to guarantee deadlock-free operation of SHM in os_unix.c
and check that invariant with assert() statements.

FossilOrigin-Name: 6af2dca75b8139134ea394c1d71aefc6523f02e9
2010-05-01 17:57:36 +00:00
drh
77b95a379c Rework mutexes on the SHM implemention for os_unix to avoid a deadlock during
WAL recovery.

FossilOrigin-Name: 1a0f69bef2c489e81a3d4b910b426972e9ed4054
2010-05-01 17:50:37 +00:00
dan
5cf53537a8 Support compile-time option SQLITE_OMIT_WAL, for building without WAL support.
FossilOrigin-Name: 9b230c43dfa112e3e1589f9775926807bd36b36e
2010-05-01 16:40:20 +00:00
drh
057f1ecddb Fix a typo in the walmode.test test script introducted yesterday.
FossilOrigin-Name: dcabc90ca588281fa7a290972ec8af6816932489
2010-05-01 11:33:13 +00:00
drh
7aba8fdef7 Fix the sqlite3_mutex_alloc() interface to return NULL (not segfault) when
operating in threadsafe mode.  (This is a general-purpose bug fix which
really ought to be ported to trunk.)

FossilOrigin-Name: 64840a3caf569959c9d5e63bdbc0cf675fda3882
2010-05-01 11:19:07 +00:00
dan
bb16ff75dd Add test case demonstrating deadlock during recovery of very large log files. No fix yet.
FossilOrigin-Name: 63ea318eb19d264667909c70185b8a5cdc4454c0
2010-05-01 08:30:34 +00:00
drh
d80b233850 Do not allow journal_mode=WAL if the underlying VFS does not support xShmOpen.
FossilOrigin-Name: d1fcccecdc8e9ac5d0d022914e51c545f4e1b04f
2010-05-01 00:59:37 +00:00
drh
27d52b2b19 Merge in changes from the trunk.
FossilOrigin-Name: 76bf0eee1fd4003a3f1c39922f8f059611d41dd0
2010-04-30 22:28:06 +00:00
drh
be837bddad Avoid assertion faults in queries using indices with redundant columns.
Ticket [3dbdcdb14e7f41].

FossilOrigin-Name: 946e06cd2a2cc209b0786b7e9d28c0746320d646
2010-04-30 21:03:24 +00:00
drh
6dea3248ae Change the SHM VFS logic in os_unix.c so that it does not hold an exclusive
lock n the mapped memory when also holding a CHECKPOINT lock.  This
improves concurrency between readers and checkpointers.

FossilOrigin-Name: 8660cda6f8ef43bd276897ef3b5fc2376b5684dc
2010-04-30 17:47:51 +00:00
drh
1b48aa49a4 Remove some obsolete debugging parameters.
FossilOrigin-Name: a012aed498bf41a5f6f3006182b0c4c2ab0fe1bb
2010-04-30 17:28:35 +00:00
dan
fe05aa144c Fix a problem with resizing the wal-index mapping after the mapping has been extended by an external process.
FossilOrigin-Name: 79d356fea6008a8adf8ebd4906571375f3cf5213
2010-04-30 17:05:23 +00:00
dan
c9d53dbe5a Fix a problem with calculating the required size of the wal-index when appending frames.
FossilOrigin-Name: 9526b11130f3ed2f5227386a26263c767214603a
2010-04-30 16:50:00 +00:00
drh
400df2ea70 In the debugging output for SHM-LOCK in os_unix.c, use symbolic names
for the lock states rather than raw numbers.

FossilOrigin-Name: 2afc33de2b2012d034fb0d2057a5a45e304516ca
2010-04-30 16:48:19 +00:00
dan
43a56b812c Fix a problem in the previous commit. Both unixShm.lockState and unixShm.readLock should be set to READ when downgrading from a WRITE to a READ lock
FossilOrigin-Name: 90119fecbce06c8db82194dfd9d5045be29b1cda
2010-04-30 16:41:53 +00:00
dan
78daa5a7d9 Fix a bug whereby upgrading from a READ_FULL to a WRITE lock, and then back to a read lock was dropping all WAL locks.
FossilOrigin-Name: 55f5af5e174df7a28deeb36faa51138926669897
2010-04-30 16:38:59 +00:00
dan
30c8629e67 Reapply commits [837d82a929] and [c05e7dca17] that were accidentally overwritten.
FossilOrigin-Name: 598de52700ba13e3228289220a74fc62073c62d4
2010-04-30 16:24:46 +00:00
dan
6ddb4bf938 Add xShmXXX() methods to the test VFS in test_devsym.test.
FossilOrigin-Name: 1d20342424b452ea96aaf161de1f98f26a9155a0
2010-04-30 16:19:39 +00:00
drh
49156b2b5e Correctly record the fact that the SHM lock reached PENDING if it did so
but failed to reach CHECKPOINT.

FossilOrigin-Name: d9250e84ac1fc6590f8670e1d801630650c7846a
2010-04-30 16:12:04 +00:00
drh
d749084ad0 Fix a couple uninitialized variables in the xShmLock method of the unix VFS.
Improved debugging logic for xShmLock.

FossilOrigin-Name: 69567c5fca9e30b7660e6f56350be929c3890d7e
2010-04-30 15:54:46 +00:00
dan
a7ad518ef0 When closing a WAL connection, attempt an exclusive lock on the database file. If the lock is obtained, checkpoint the database and delete the wal and wal-index files.
FossilOrigin-Name: c05e7dca172719f33e245c08d0c0e8ab47e5a537
2010-04-30 15:49:27 +00:00
dan
6045461eee If a reader attempts to upgrade to a writer, but is not reading the most recent database snapshot, return SQLITE_BUSY.
FossilOrigin-Name: 837d82a92977cbfa0963411daf8160d286a7ed32
2010-04-30 15:24:43 +00:00
drh
5530b764a8 Separate the concepts of underlying storage size and mapped size in the
VFS shared-memory implementation.

FossilOrigin-Name: 4cbe49f13fed288f94ff305bcfd99df907bf7baf
2010-04-30 14:39:50 +00:00
dan
87bfb51ef8 Add a missing walIndexUnmap() call to the checkpoint code. Change a couple of SQLITE_CANTOPEN constants to SQLITE_CANTOPEN_BKPT.
FossilOrigin-Name: 1f9e8c5c27ae2c68bc01d8e2bb2c662be7b3f161
2010-04-30 11:43:28 +00:00
dan
1bc6171c23 Fix an assert() in sqlite3WalRead().
FossilOrigin-Name: 2e7a0050e192dd197d4db92393ab120897c14836
2010-04-30 10:24:54 +00:00
dan
e93808dde2 Add missing mutexes to unixShmClose().
FossilOrigin-Name: a4741cb54dd5e753d48fd05ac9dbe27ee4aa1ec0
2010-04-30 10:06:09 +00:00
dan
4c97b53425 Fix a couple of assert() statements in os_unix.c and wal.c. Combine sqlite3WalIsDirty() with sqlite3WalUndo().
FossilOrigin-Name: a8f958be804ee05c4137b3cd110db344713af5f2
2010-04-30 09:52:17 +00:00
dan
ba51590bcd Add a missing walIndexUnmap() to sqlite3WalSnapshotOpen().
FossilOrigin-Name: 72b95fde15dae56390dc8d4168fb2757447e289e
2010-04-30 09:32:06 +00:00
dan
5047af405b Merge latest bugfix into wal branch.
FossilOrigin-Name: 265e66e6984c32999bf93981e3b1d19887dfe599
2010-04-30 06:02:30 +00:00
drh
79e6c78ccc The first 6 WAL tests now work. It's a start.
FossilOrigin-Name: a92c1851da10acf51e7f6f086b8a23bd731940b3
2010-04-30 02:13:26 +00:00
dan
6908343c65 Zero the "immediate FK constraint counter" associated with a statement object when sqlite3_reset() is called. Fix for [c39ff61c43].
FossilOrigin-Name: f660be615a0c1f4641782a83744533f5d3119218
2010-04-29 22:57:56 +00:00
drh
7ed91f2344 Refactor wal.c to use the VFS. This check-in compiles and links and works
ok as long as you leave WAL turned off, but WAL does not work.

FossilOrigin-Name: 62db5fa3b61be885b2d94e9b9ce3877b2c588350
2010-04-29 22:34:07 +00:00
drh
31cbbbad1c Untested implementation of the shared-memory dead-man-switch.
FossilOrigin-Name: 706611283ea2575c2942543391026b36061cfc1c
2010-04-29 16:40:51 +00:00
drh
7b6944047e Progress towards a VFS that will support WAL. Locking code is in place
but is untested.  Still no support for the DMS.

FossilOrigin-Name: 1bde41cf081570ad257f927b641e752dff4ed014
2010-04-29 15:17:48 +00:00
dan
185cca609b Close all open database connections at the end of wal.test.
FossilOrigin-Name: 3cc55a7568daa3796483f632e33478969e381cf5
2010-04-29 14:58:53 +00:00
dan
31c03907fd Fix a but in the WAL checkpoint code causing SQLite to use an inconsistent cache in a subsequent transaction.
FossilOrigin-Name: d1cadeed4eea20d8892726cc8c69f4f3f57d0cd4
2010-04-29 14:51:33 +00:00
dan
b4e3a6f72f Add tests to walthread.test.
FossilOrigin-Name: 9e891e7543ea4d7dee76deb2456af940f4cac49b
2010-04-29 08:47:28 +00:00
dan
e45d442692 Add a test to walthread.test for changing between WAL and rollback modes.
FossilOrigin-Name: da229e44bd4a5d512261da05958d560808c9889f
2010-04-28 18:17:23 +00:00
dan
f032f5362e Merge two "wal"
leaves.

FossilOrigin-Name: 13d2d5a66e9eaa81aa6314354201ee1fbd2b3824
2010-04-28 17:49:57 +00:00
dan
5e0ce87a3f Change walthread.test so that tests can be run with either multiple threads or multiple processes.
FossilOrigin-Name: 25f85f68723e56c18e44b094d85f67b99912dc86
2010-04-28 17:48:44 +00:00
drh
9beb1584bd Changes to the interface design for the xShmLock method of the VFS.
FossilOrigin-Name: 348409de26eafe12f5cb1236e8e167a4183d4051
2010-04-28 17:21:33 +00:00
drh
833bf968e3 Rename the sqlite3_log_hook() to sqlite3_wal_hook(). Added comments to
wal.h.

FossilOrigin-Name: bbc385111b19071e20fe963fab814262c815b3e9
2010-04-28 14:42:19 +00:00
dan
4b64c1e365 Merge two "wal" leaves.
FossilOrigin-Name: 8c2d43babd61fe2225d5c402174253f412604092
2010-04-27 18:49:54 +00:00
dan
8b348af860 Add a test to check that a checkpointer releases its locks before returning, even if it has been prevented by a conflicting lock from checkpointing the database.
Add a test to check that a checkpointer releases its locks before returning, even if it has been prevented by a conflicting lock from checkpointing the database.

FossilOrigin-Name: be44349d2b790fb470fcc9fb6a12e8b1076dc645
2010-04-27 18:43:16 +00:00
dan
8b5444bfae Fix a problem with identifying a corrupt database in WAL mode.
FossilOrigin-Name: c8658da44671e9c43c90ee4857bbe82c55d40f25
2010-04-27 14:37:47 +00:00
drh
af75c8695b Add the xShmRelease() method to the VFS. The os_unix.c implementation of
the shared memory logic is still non-functional.

FossilOrigin-Name: ed715b47c5f7657fbf901805981867898054b14d
2010-04-27 11:49:27 +00:00
dan
e106de6317 Run trans.test and avtrans.test as part of the "wal" permutation.
FossilOrigin-Name: c8893310510148f7e71ede5691606b6fc1c3df4d
2010-04-27 06:49:34 +00:00
dan
31f98fc8e4 Fix a problem that occurs when one process causes the log-summary file to grow and then a second process attempts to read the database.
FossilOrigin-Name: b51a5f8bc660616aa264025dd7ad4bdab458814b
2010-04-27 05:42:32 +00:00
drh
29d4beccc0 Merge in recent changes from the trunk
FossilOrigin-Name: 7a0ac682c3bffcb345321fe97434563350ac90f9
2010-04-27 01:56:21 +00:00
drh
8c6f666b26 Optimization: Convert an ORDER BY clause into a no-op if the query also
contains a GROUP BY clause that will force the same output order.

FossilOrigin-Name: ca9d86baf70f210d331ce93102177c8005c494cb
2010-04-26 19:17:26 +00:00
dan
e180c296ea Do not attempt to set journal_mode=wal on :memory: or temp file databases.
FossilOrigin-Name: 30d0134454734fd9335896372c30a903e9adcc64
2010-04-26 17:42:56 +00:00
drh
93791ea0ba Change the default_cache_size pragma to always store a positive value.
FossilOrigin-Name: 36fb2cae75b5dfe1fe818895f03c0b4f4190a722
2010-04-26 17:36:35 +00:00
drh
c6d2b4a365 Identify the SQLite version meta-value entry in the db-header output of
showdb.

FossilOrigin-Name: 245d934b72cbc6e897193e7892195b6561995939
2010-04-26 17:30:52 +00:00
dan
4cd78b4d89 Fixes for problems with small caches and SAVEPOINT rollback in WAL mode.
FossilOrigin-Name: 6a944f028d4a070bef29e1fbc6fbef481ebcd34c
2010-04-26 16:57:10 +00:00
drh
7ecc14761e Further enhancements to the showdb utility: A page number followed by "b"
causes a btree decoding to occur on the page.

FossilOrigin-Name: 2ff824e58ce8b8f605c809ac960dcbfc51c30e30
2010-04-26 16:47:12 +00:00
drh
562cedb185 Enhancements to the showdb.c utility program. Automatically detect the
page size and adjust the display accordingly.  Add the "dbheader" display
option.

FossilOrigin-Name: 23eb408b5d08b89b41aaf245a7be8e235f30af8a
2010-04-26 15:44:07 +00:00
dan
71cb518fca Add the "wal" permutation to run existing test files savepoint.test and savepoint2.test in WAL mode.
FossilOrigin-Name: 205e5d8ac08f7d7853427b4cd235fca125155d2d
2010-04-26 12:39:03 +00:00
dan
cd11fb28c3 Add mutexes to fix a race condition in wal.c. This isn't a very good fix.
FossilOrigin-Name: 3d159939cc2beb18c4ca0c8e9a99a75d4107e6e4
2010-04-26 10:40:52 +00:00
drh
c438efd68a Change the names of the log.c and log.h source files to wal.c and wal.h.
FossilOrigin-Name: 56fe5d7624f840417152bcc63efbe21a5f557920
2010-04-26 00:19:45 +00:00
drh
f2424c521b Begin moving WAL-specific I/O into the VFS. This checkin contains VFS
infrastructure but it is untested and is not yet hooked up to the WAL.
The version number is bumped to 3.7.0 because of the VFS extension.

FossilOrigin-Name: f5e615c28c7035a7e6d896790b51cf9bc7371d5f
2010-04-26 00:04:55 +00:00
drh
a4741840f6 Remove an unreachable branch from the function initialization logic.
FossilOrigin-Name: 064d3ddd6199b7b049b1706974e4295f78fb5ab9
2010-04-25 20:58:37 +00:00
dan
56d95913eb Add comment explaining checksum mechanism.
FossilOrigin-Name: 3e9ef5153ebf0543ad0f75a7561f73d22171da53
2010-04-24 19:07:29 +00:00
dan
74d6cd887f Fix bugs in WAL mode rollback.
FossilOrigin-Name: 31215969f59be536fe87431bb9fbfa7d13027e35
2010-04-24 18:44:05 +00:00
dan
9de7943783 Merge with [0291ed974d].
Merge with [0291ed974d].
Merge with [0291ed974d].

FossilOrigin-Name: a352f6285e33a806fbe4475e720e763fdc5bb47d
2010-04-24 14:33:08 +00:00
drh
545f587fc8 When commands such as ALTER TABLE and VACUUM use SQL internally, make sure
they use only the built-in functions and not application-defined overrides
for those functions.

FossilOrigin-Name: 0291ed974d5bf1e344e2c38422530cc961b897da
2010-04-24 14:02:59 +00:00
dan
4f08d4b848 Merge with [e79dac3c2f].
FossilOrigin-Name: 1e793d3a6d46ec5d744e077b10362e7cfa118eef
2010-04-24 04:53:15 +00:00
dan
ff207012e6 Reserve some space at the start of the log-summary file to apply locks to.
FossilOrigin-Name: a031aa1fa01f062b087154833738f011f7bc4eb5
2010-04-24 04:49:15 +00:00
dan
3306c4a945 Fixes and tests for backup of a WAL database.
FossilOrigin-Name: 480d12db4c0ebcc37598f7620d39193875eab15b
2010-04-23 19:15:00 +00:00
shaneh
9a6e897328 Merge of notify.c changes from experimental.
Reset stored blocking connection when registered unlock_notify callback is cleared.

FossilOrigin-Name: e79dac3c2f723ed7cc62fcef468f53952711f242
2010-04-23 14:29:04 +00:00
dan
d5c99c3939 Add very simple test cases for backup and VACUUM of WAL databases. More to come.
FossilOrigin-Name: 1077d8130b8ed5716ad73f78382270909d347963
2010-04-23 11:44:40 +00:00
dan
ce4f05f374 Create a version of the log checksummer that works on big-endian platforms. Remove the 512KB size limit on the log-summary.
FossilOrigin-Name: 5d6d4423d1def39bd2424703120aa985085c3f8e
2010-04-22 19:14:13 +00:00
dan
ede6eb8d1d Further tests and changes related to switching between WAL and rollback modes.
FossilOrigin-Name: 1236318477787a612f02cc98caf2931bd2e99d94
2010-04-22 06:27:04 +00:00
dan
b978002743 Tests for (and changes to) the code to switch between WAL and rollback modes.
FossilOrigin-Name: 9f4f933f2c6596064fcfc7fb5add87e8c5b57448
2010-04-21 18:37:57 +00:00
dan
a470aeb4ac If, after obtaining a SHARED lock, there exists a *-wal file in the file-system, use WAL mode. This is necessary to recover from a crash that damages the first page of the database file.
FossilOrigin-Name: 33cabf271b8f4dda508a610bf59964273fe2cb84
2010-04-21 11:43:38 +00:00
dan
28e5386f79 Minor changes to test cases to account for the fact that databases with read/write versions of 2 are now understood.
FossilOrigin-Name: 278ed41e1d4bbff9544cb2cf4cf52dbbcf0c17df
2010-04-21 06:19:12 +00:00
dan
e04dc88be5 Use the read and write version fields of the database header to mark a database as operating in wal-mode.
FossilOrigin-Name: 96bef18c1411c3e0348295886f105e1646c46320
2010-04-20 18:53:15 +00:00
dan
8d22a17411 Add the sqlite3_log_hook() interface for scheduling checkpoints.
FossilOrigin-Name: 9bda601455705475075e33bfa85687bce34b15ff
2010-04-19 18:03:51 +00:00
dan
54934f4689 Add some comments regarding file-locks to log.c.
FossilOrigin-Name: 9d51c3b754f0b94fea5ef3d669ad583b93b2b024
2010-04-17 18:50:27 +00:00
dan
c511878955 Do not sync any files in wal mode if "PRAGMA synchronous=off" is set. If files are synced, pass either SQLITE_SYNC_FULL or SQLITE_SYNC_NORMAL to the xSync() callback as configured by "PRAGMA fullfsync".
FossilOrigin-Name: 0ae91b0008b242a47385fc1f295c6b645483ee22
2010-04-17 17:34:41 +00:00
drh
335c0faabd It is possible for sqlite3.pUnlockConnection to be non-NULL when
sqlite3.pBlockingConnection is NULL, as the notify1.test script
demonstrates.

FossilOrigin-Name: 95ff76ef67d6189f54375973fa485d6eb464b029
2010-04-17 16:10:19 +00:00
dan
dea0a85091 Merge with trunk commit [3e646e3f4c].
FossilOrigin-Name: 43463970f5885fb116588695146f2a56cb22804a
2010-04-17 15:45:35 +00:00
dan
6703239d2f In synchronous=normal mode, do not sync the log after every transaction. In synchronous=full mode, sync the log and add any extra frames required to avoid blast-radius related problems after each transaction.
FossilOrigin-Name: 9bc9b6847303d0324543a9ded8dd0473490122d8
2010-04-17 15:42:43 +00:00
drh
3674bfd1b6 Change sqlite3_step() so that it automatically calls sqlite3_reset() instead
of returning SQLITE_MISUSE when invoked on a prepared statement that
previously returned any value other than SQLITE_ROW.

FossilOrigin-Name: 3e646e3f4cd0ca288e444561e951cecfdaee2ab5
2010-04-17 12:53:19 +00:00
dan
3de777fd8c Enhancements to wal-mode locking scheme.
FossilOrigin-Name: 8549c286497f3d2cd118be1334fce00d6f8a26c4
2010-04-17 12:31:37 +00:00
shaneh
4b93f6bd1e Changes for branch coverage of notify.c. Fixed quirk of
unlock_notify() where it would still think it was blocked
after a callback was cleared (even after the transaction
on the blocking connection was closed).

FossilOrigin-Name: c54e8dad01b0ecaf8d66b10e64e862dcad8a6746
2010-04-16 22:05:31 +00:00
dan
97a313554d Change the log file format to include a small (12 byte) header at the start of the file.
FossilOrigin-Name: 9865d14d6041874bc1239ce7a061d5c75f2d33c9
2010-04-16 13:59:31 +00:00
dan
4a4b01dc1c Fix bug in log recovery (last frame in log was being ignored). Also remove an incorrect assert statement.
FossilOrigin-Name: 67d2a89ec2d593a077eb19a6ea2b06cb1c2e9ba8
2010-04-16 11:30:18 +00:00
drh
f391327824 Disable query flattening when the outer query is a compound SELECT and
the inner query has a LIMIT clause.  Ticket [02a8e81d44].

FossilOrigin-Name: f96782b389b5b97b488dc5814f7082e0393f64cd
2010-04-15 23:24:29 +00:00
dan
4cc6fb6165 Allow writers to write dirty pages to the log mid-transaction in order to free memory.
FossilOrigin-Name: ecd828f96909895535d7dc744e5a8530e234e04d
2010-04-15 16:45:34 +00:00
dan
bb2e9c97fc Merge two leaves on the WAL branch.
FossilOrigin-Name: c9ed66cc3994b3b0d67a6c950b552a1a869f2ed2
2010-04-15 13:33:18 +00:00
drh
ed808acd1b The query planner fix of check-in [33b1f584ef] should have been on the trunk.
FossilOrigin-Name: f538d759beda67e042b66181b65bd432488f7650
2010-04-15 13:29:37 +00:00
drh
521a72b1fa Fix a problem in the result set size estimation logic of the query planner -
a problem introduced by the two previous changes.

FossilOrigin-Name: 33b1f584ef712625c4df8e2aefe895fa89f6a795
2010-04-15 12:36:06 +00:00
dan
39c79f587c Change the way checksums are calculated.
FossilOrigin-Name: 84955c2e9ce526c5a3ed479aa09f093a7e37c7d0
2010-04-15 10:58:51 +00:00
drh
ce2f88d95b Bring over the recent query planner enhancements from the trunk.
FossilOrigin-Name: 82969f27e5ea843cb379666d8a02e4a3fddc03b2
2010-04-15 02:37:10 +00:00
drh
ed754ce2cc Further refinements to table order selection on join query planning.
FossilOrigin-Name: defaf0d99a807027f8883bf821b6482025f9f54e
2010-04-15 01:04:54 +00:00
drh
1e0f4a83d6 The query planner uses non-indexable WHERE clause terms to reduce the
estimated number of output rows, then uses the estimated number of output
rows as a tie-breaker when choosing table order.

FossilOrigin-Name: b87cb0c2bd9c52a938795a974e101879b81210e3
2010-04-14 19:01:44 +00:00
dan
49320f8568 Add tests and fix bugs in WAL locking mechanism.
FossilOrigin-Name: c18077f2465fc34830f11c9832e76be5746eaeea
2010-04-14 18:50:08 +00:00
dan
e264d983d1 Add tests to check inter-process WAL locking.
FossilOrigin-Name: 9435f3135849e0d38fde1669201db508561a6308
2010-04-14 18:06:50 +00:00
dan
02bb596649 Improve the logLockRegion() function in log.c.
FossilOrigin-Name: 5e9dd3bd8e829376408925fb4cfcd5bb1eb1105f
2010-04-14 15:49:40 +00:00
dan
b9bf16bfde Fixes for locking issues in WAL mode.
FossilOrigin-Name: a9617eff39177250e2f118f25fdd4b3acb8b0478
2010-04-14 11:23:30 +00:00
dan
64d039e512 Add experimental locking scheme.
FossilOrigin-Name: 3f958e87c33d667d299b03ffdef58db5dc6363f4
2010-04-13 19:27:31 +00:00
drh
622194c0d2 Fix an uninitialized variable in readDbPage of pager.c.
FossilOrigin-Name: f4e1150fed2c520c7c52612cb1019429d78dc32a
2010-04-13 15:30:53 +00:00
dan
f05c86dd73 Remove old code to interpret an argument (no longer used) to "PRAGMA checkpoint".
FossilOrigin-Name: 27dc5977c19e717afd65d3805557e38dec7bedcb
2010-04-13 11:56:03 +00:00
dan
80a1526a9a Fix other problems in the WAL test scripts.
FossilOrigin-Name: dcb31181db246dd3f81ce63b144dd0cf95f06ee3
2010-04-13 11:45:31 +00:00
dan
d3f8f94652 Fix test script issues preventing walthread.test from running.
FossilOrigin-Name: d90b1dde0702ceb0eae2a3da36733a7e5b1a6b3a
2010-04-13 11:35:01 +00:00
dan
9281bf2a9f Fix a pager bug introduced by the wal code.
FossilOrigin-Name: 4a0b29dc5e573a5d696ede17db5d7acf8d23aa98
2010-04-13 11:18:40 +00:00
dan
835ae8bcdd Sync wal branch with [012cf101bf].
FossilOrigin-Name: 9d690f24f634696f76fa38372461cfa69263e91e
2010-04-13 06:20:45 +00:00
dan
c9206ed56e Test that the rollback-hook is invoked if a commit-hook implementation returns non-zero (causing a rollback). Remove documentation comment that says otherwise from sqlite.h.in.
FossilOrigin-Name: 012cf101bf8be9e39c138786ea5a5039b8131e55
2010-04-13 06:18:02 +00:00
drh
08ede1d08b Add e_fts3.test to the set of tests excluded from the inmemory_journal
exclusion list, since it does simulated OOM errors which trigger I/O errors
and SQLite is unable to recover from I/O errors without a persistent journal.

FossilOrigin-Name: e7e7127f0b0db582274338a9fefc30a0c0be07c3
2010-04-12 20:54:13 +00:00
drh
09c0f6d02d Recent changes cause the xSync method of the memory journal implementation
to be used, so remove the assert(0).

FossilOrigin-Name: 1f2cb9402838373f6370660dfc885013df079895
2010-04-12 19:44:22 +00:00
drh
02927cc1f3 Clear a global variable in e_fts3.test before it is used.
FossilOrigin-Name: ae89dfd26b65fb1a3633a4338f5cb5e54a7d2035
2010-04-12 19:43:43 +00:00
drh
63ca1dba52 Remove duplicate secure_delete pragma implemention.
FossilOrigin-Name: c15fda145b621fc86402914aa5b015e53590555a
2010-04-12 19:31:59 +00:00
dan
6700d02cce Add "log.h", which should have been part of the previous commit.
FossilOrigin-Name: 8de9f010044fc992b5b45a7bb0da1284b404ecdb
2010-04-12 19:05:58 +00:00
dan
7c24610e64 Import experimental write-ahead-logging code.
FossilOrigin-Name: 409d61baeb0a19d1700c973f16c8acef7b8506cd
2010-04-12 19:00:29 +00:00
dan
eada58aa49 Fix a problem where a process in exclusive mode could delete a hot-journal file without rolling it back from within sqlite3_close() or DETACH. This problem was introduced by the previous commit, it is not present in any releases.
FossilOrigin-Name: 51a613950824698687c0db83b7884db33d45f7f5
2010-04-12 17:08:44 +00:00
drh
47f18f7294 Reset the simulated device in the test harness to its default
configuration whenever it is restarted.

FossilOrigin-Name: 562d20e662da474ea326165730ecfdfcf9b414ee
2010-04-12 14:51:10 +00:00