]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Mon, 10 May 2010 11:20:05 +0000 (11:20 +0000)]
Enhance the OP_JournalMode opcode with an ignore-errors option and use that
option the ATTACH command.
FossilOrigin-Name:
0bdea4cfbd7832f2a00c01b93c92ba13d20139ef
drh [Fri, 7 May 2010 20:34:17 +0000 (20:34 +0000)]
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
drh [Fri, 7 May 2010 20:02:23 +0000 (20:02 +0000)]
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
drh [Fri, 7 May 2010 18:23:24 +0000 (18:23 +0000)]
Additional tweaks to API documentation. No functional code changes.
FossilOrigin-Name:
e1230782a371f09cd46dacc8ecbc6a0c5baab2d5
drh [Fri, 7 May 2010 13:57:11 +0000 (13:57 +0000)]
Updates to documentation on the C interfaces supporting WAL. No functional
changes to code.
FossilOrigin-Name:
681ba20cf077e9a0fccd51ed50101ad0f2c67eb3
dan [Fri, 7 May 2010 13:52:42 +0000 (13:52 +0000)]
Fix a recently introduced problem in wal.test.
FossilOrigin-Name:
79b52d0ff7a7b717bde55b97ff05ad17418bc7d7
dan [Fri, 7 May 2010 12:49:22 +0000 (12:49 +0000)]
Change wal.test and walhook.test so that they work with DEFAULT_AUTOVACUUM=1 builds.
FossilOrigin-Name:
4cde92909c20982f7d4e6b550f55d786df398ccd
dan [Fri, 7 May 2010 09:43:50 +0000 (09:43 +0000)]
Test another IO error case in wal.c.
FossilOrigin-Name:
8b3b5ab8fa61ca4ef22c98abaab397707ee74ea3
dan [Fri, 7 May 2010 06:59:08 +0000 (06:59 +0000)]
Fix a problem with checkpointing large log files created by an external process.
FossilOrigin-Name:
8f94bde568be52ecc5a976b7a09776ea7b4bb511
dan [Fri, 7 May 2010 05:46:23 +0000 (05:46 +0000)]
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
drh [Fri, 7 May 2010 00:28:41 +0000 (00:28 +0000)]
Another attempt to fix permutations.test so that it excludes WAL tests
from the journaltest permutation.
FossilOrigin-Name:
58c404429c5af167a82899fc4c736ed7489ed746
drh [Thu, 6 May 2010 22:21:14 +0000 (22:21 +0000)]
Remove savepoint6.test from the set of tests run by journaltest since
savepoint6.test uses journal_mode=WAL.
FossilOrigin-Name:
811b45a96bfaa0ef2394b86c06e8f099a07ee9f0
drh [Thu, 6 May 2010 21:37:22 +0000 (21:37 +0000)]
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
drh [Thu, 6 May 2010 20:19:55 +0000 (20:19 +0000)]
Make sure to do a clean shutdown of the library upon existing the shell
in order to remove WAL files.
FossilOrigin-Name:
c1762dda00b8bdb7c3247617ac4cb654f1d95cf7
drh [Thu, 6 May 2010 19:55:57 +0000 (19:55 +0000)]
Exclude all WAL tests from the journaltest permutation.
FossilOrigin-Name:
46c97d7eee9359cd21139a6520633f5d16594ab0
shaneh [Thu, 6 May 2010 19:20:29 +0000 (19:20 +0000)]
Changes to support SQLITE_OMIT_WAL.
FossilOrigin-Name:
32a8501d78714cc390eba5f993f329ef3b499878
drh [Thu, 6 May 2010 19:04:48 +0000 (19:04 +0000)]
Updates to the VFS SHM locking documentation.
FossilOrigin-Name:
9927ce421090ac20285cf05768b38e1f91826a68
dan [Thu, 6 May 2010 18:48:27 +0000 (18:48 +0000)]
Instead of transitioning to RECOVER state from CHECKPOINT when a recovery is required, perform the recovery while holding the CHECKPOINT lock.
FossilOrigin-Name:
bb0b6021e721c2e4f1533ab18381604c6b7b31d5
dan [Thu, 6 May 2010 18:27:19 +0000 (18:27 +0000)]
If recovery is run before a checkpoint, change back to a CHECKPOINT lock before performing the actual checkpoint.
FossilOrigin-Name:
dc98ee169cfa43c89f1b36fb1150d4788710fda3
dan [Thu, 6 May 2010 18:04:50 +0000 (18:04 +0000)]
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
dan [Thu, 6 May 2010 17:28:08 +0000 (17:28 +0000)]
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
drh [Thu, 6 May 2010 16:06:38 +0000 (16:06 +0000)]
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
dan [Thu, 6 May 2010 15:56:28 +0000 (15:56 +0000)]
Further coverage tests.
FossilOrigin-Name:
98a9713e0030a36ea99a18a12a2e7685c6db72b3
shaneh [Thu, 6 May 2010 15:35:59 +0000 (15:35 +0000)]
Update configure scripts for WAL support.
FossilOrigin-Name:
2edc5129f216abec9b13a0ad9b6640606caa9f72
dan [Thu, 6 May 2010 14:42:34 +0000 (14:42 +0000)]
Add tests to cover a couple of branches in wal.c.
FossilOrigin-Name:
429f437fb776fc974a6adf791b729e25bea82fef
dan [Thu, 6 May 2010 13:36:47 +0000 (13:36 +0000)]
Unset a tcl variable before reusing it in wal.test.
FossilOrigin-Name:
e83efb232fe8d30714f4c7cffeef80092aea4df7
dan [Thu, 6 May 2010 12:15:48 +0000 (12:15 +0000)]
Add tests for some lock-contention cases.
FossilOrigin-Name:
f0fcb9c9a67e2bf7bbedbedbc27791b605a21dd1
drh [Thu, 6 May 2010 11:56:52 +0000 (11:56 +0000)]
Remove the noop-mutex implementations of mutex_held() and mutex_notheld()
since they are both unreachable.
FossilOrigin-Name:
6767b62a9a063582889f5ceb42f95eab24c697da
drh [Thu, 6 May 2010 11:55:56 +0000 (11:55 +0000)]
Add two text files containing pager design notes to the doc/ subfolder.
FossilOrigin-Name:
ed817fc893e7162ae0ff4022591f7e9e3b81d622
dan [Thu, 6 May 2010 11:32:09 +0000 (11:32 +0000)]
Add test cases to test the libraries handling of corrupt wal-index headers.
FossilOrigin-Name:
9465b267d420120c050bbe4f143ac824146a9e4a
dan [Thu, 6 May 2010 07:43:58 +0000 (07:43 +0000)]
Add tests for handling errors returned by xShm VFS methods.
FossilOrigin-Name:
fbbcacb137e8f5246b88ad09331236aaa1900f60
drh [Wed, 5 May 2010 20:00:25 +0000 (20:00 +0000)]
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
drh [Wed, 5 May 2010 19:09:49 +0000 (19:09 +0000)]
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
dan [Wed, 5 May 2010 19:04:59 +0000 (19:04 +0000)]
Test the handling of errors returned by the xShmXXX() APIs.
FossilOrigin-Name:
72663123d6be2b194cad7a6057d0f20dd0d9fe05
drh [Wed, 5 May 2010 18:46:44 +0000 (18:46 +0000)]
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
drh [Wed, 5 May 2010 18:20:07 +0000 (18:20 +0000)]
Simplifications to the SHM locking implementation in os_unix.c.
FossilOrigin-Name:
9de05bfb09e29bafdf5782263330fe8eefcfaba3
drh [Wed, 5 May 2010 16:23:26 +0000 (16:23 +0000)]
Prohibit backup if the destination is using WAL and has a different page
size from the source.
FossilOrigin-Name:
7bd44794c482beee16c684712545275e2bf63dfa
dan [Wed, 5 May 2010 15:33:05 +0000 (15:33 +0000)]
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
drh [Wed, 5 May 2010 04:11:44 +0000 (04:11 +0000)]
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
drh [Wed, 5 May 2010 03:39:53 +0000 (03:39 +0000)]
Do not attempt to modify the page_size when running VACUUM on a WAL database.
FossilOrigin-Name:
58a1a59be89b33c6d5fa8b43571037d7d96625a1
drh [Wed, 5 May 2010 00:22:21 +0000 (00:22 +0000)]
Get the previous mutex fix working with SQLITE_DEBUG and with the amalgamation.
FossilOrigin-Name:
df19928f7ee94bca3989313ff16507c15d6efe2b
drh [Wed, 5 May 2010 00:05:24 +0000 (00:05 +0000)]
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
drh [Tue, 4 May 2010 18:50:40 +0000 (18:50 +0000)]
When sqlite3PagerPagecount() is called without any locks, always return
the physical file size, not the logical file size.
FossilOrigin-Name:
4016b422286587beda7323052d27821adb1fed73
drh [Tue, 4 May 2010 17:38:42 +0000 (17:38 +0000)]
Be sure to release all wal-index locks before closing the wal-index.
FossilOrigin-Name:
b15b67fa14ff77963f470678ff6188c63be8e079
drh [Tue, 4 May 2010 17:20:09 +0000 (17:20 +0000)]
Relax an over-zealous assert() in sqlite3WalUndo().
FossilOrigin-Name:
8f9d22d58c75ad7476c1eea8ba296347e30b7beb
drh [Tue, 4 May 2010 16:33:37 +0000 (16:33 +0000)]
Take care not to invoke the xShmClose method of the VFS with a NULL
shared memory object.
FossilOrigin-Name:
1465d3842c52aa7471f63deb47fe5b256d4e01c2
dan [Tue, 4 May 2010 15:20:45 +0000 (15:20 +0000)]
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
dan [Tue, 4 May 2010 14:47:39 +0000 (14:47 +0000)]
Fix problems with recovering wal files that use a page-size other than the default.
FossilOrigin-Name:
1a391f3c55dc9d4266552fa26d2a9839c6bafce4
dan [Tue, 4 May 2010 11:06:03 +0000 (11:06 +0000)]
Fix a typo in walfault.test.
FossilOrigin-Name:
232dbe8ecec16485be5c5995fdf7a0ed951c2097
dan [Tue, 4 May 2010 10:36:20 +0000 (10:36 +0000)]
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
drh [Mon, 3 May 2010 19:20:46 +0000 (19:20 +0000)]
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
drh [Mon, 3 May 2010 19:17:01 +0000 (19:17 +0000)]
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
drh [Mon, 3 May 2010 18:51:41 +0000 (18:51 +0000)]
Documentation stubs for sqlite3_wal_autocheckpoint and sqlite3_wal_checkpoint.
FossilOrigin-Name:
313762427d96954667909887a797ea996dc6304a
drh [Mon, 3 May 2010 18:22:52 +0000 (18:22 +0000)]
Fix a bug in the xCurrentTime() method of the os_unix.c VFS.
FossilOrigin-Name:
551df11a5613e3edc6c5de44f0ac6abc2d0e6cdf
dan [Mon, 3 May 2010 18:01:21 +0000 (18:01 +0000)]
Add a test to simulate an OOM during log recovery to walfault.test.
FossilOrigin-Name:
7ed85e87dd206083310ba28afab4389885f61dac
drh [Mon, 3 May 2010 17:24:45 +0000 (17:24 +0000)]
Clear global variable "seconds" before use in walthread.test.
FossilOrigin-Name:
a35551a5305b5160b0eb511da7f8e6fb351ef271
dan [Mon, 3 May 2010 17:18:24 +0000 (17:18 +0000)]
Fix a couple of errors in WAL code that can occur in an OOM situation.
FossilOrigin-Name:
9d3f3736be42ef8ab48b099d4712e08dfca97873
drh [Mon, 3 May 2010 16:36:55 +0000 (16:36 +0000)]
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
drh [Mon, 3 May 2010 16:30:27 +0000 (16:30 +0000)]
Change the VFS definition so that all methods take a VFS object pointer as
their first parameter.
FossilOrigin-Name:
43b5b07f0d996d7ef7426346b1792e9ca898f487
dan [Mon, 3 May 2010 15:58:50 +0000 (15:58 +0000)]
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
drh [Mon, 3 May 2010 14:32:30 +0000 (14:32 +0000)]
Use VFS method xCurrentTimeInt64 instead of xCurrentTime when it is available.
Provide an implementation of xCurrentTimeInt64 for os_unix.c.
FossilOrigin-Name:
ab77b3ae6da3370d8bc3b2c9c0edc723b69f5a95
drh [Mon, 3 May 2010 14:08:27 +0000 (14:08 +0000)]
Merge the write-ahead-logging changes into the trunk.
FossilOrigin-Name:
de9ae443cc8eebfb0692dcdac93bde9e4c54199a
dan [Mon, 3 May 2010 14:05:43 +0000 (14:05 +0000)]
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
drh [Mon, 3 May 2010 13:37:30 +0000 (13:37 +0000)]
Make sure the mutex is held while calling sqlite3ApiExit() in
sqlite3_wal_checkpoint(). Other cleanup of WAL logic.
FossilOrigin-Name:
11a85b821abff1ecb7ec8c37bc7783be9fc4ea6d
dan [Mon, 3 May 2010 12:14:15 +0000 (12:14 +0000)]
Have sqlite3_wal_checkpoint() populate the database handle error message and error code (as returned by sqlite3_errmsg() and sqlite3_errcode()).
FossilOrigin-Name:
ff234cf574c7ae384ab1ebc79b2171ef0541bc91
dan [Mon, 3 May 2010 11:05:08 +0000 (11:05 +0000)]
Add the "PRAGMA wal_autocheckpoint" command. Rename "PRAGMA checkpoint" to "PRAGMA wal_checkpoint".
FossilOrigin-Name:
714e5947264571386f966aa8fcdd5607b5832238
dan [Mon, 3 May 2010 08:19:34 +0000 (08:19 +0000)]
Merge two wal leaves.
FossilOrigin-Name:
23c0e6c3f333e878fe5a2ae5d61df0d765f437b4
dan [Mon, 3 May 2010 08:04:49 +0000 (08:04 +0000)]
Add the sqlite3_wal_checkpoint() and sqlite3_wal_autocheckpoint() APIs.
FossilOrigin-Name:
9803196dec85e3aa4105cc477e9cfe98d370e486
drh [Sat, 1 May 2010 20:17:30 +0000 (20:17 +0000)]
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
drh [Sat, 1 May 2010 18:23:08 +0000 (18:23 +0000)]
Remove the xShmPush and xShmPull methods from the VFS.
FossilOrigin-Name:
69e07fdbde5054593de948b76dfac157cf5d4058
drh [Sat, 1 May 2010 17:57:36 +0000 (17:57 +0000)]
Define an invariant to guarantee deadlock-free operation of SHM in os_unix.c
and check that invariant with assert() statements.
FossilOrigin-Name:
6af2dca75b8139134ea394c1d71aefc6523f02e9
drh [Sat, 1 May 2010 17:50:37 +0000 (17:50 +0000)]
Rework mutexes on the SHM implemention for os_unix to avoid a deadlock during
WAL recovery.
FossilOrigin-Name:
1a0f69bef2c489e81a3d4b910b426972e9ed4054
dan [Sat, 1 May 2010 16:40:20 +0000 (16:40 +0000)]
Support compile-time option SQLITE_OMIT_WAL, for building without WAL support.
FossilOrigin-Name:
9b230c43dfa112e3e1589f9775926807bd36b36e
drh [Sat, 1 May 2010 11:33:13 +0000 (11:33 +0000)]
Fix a typo in the walmode.test test script introducted yesterday.
FossilOrigin-Name:
dcabc90ca588281fa7a290972ec8af6816932489
drh [Sat, 1 May 2010 11:19:07 +0000 (11:19 +0000)]
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
dan [Sat, 1 May 2010 08:30:34 +0000 (08:30 +0000)]
Add test case demonstrating deadlock during recovery of very large log files. No fix yet.
FossilOrigin-Name:
63ea318eb19d264667909c70185b8a5cdc4454c0
drh [Sat, 1 May 2010 00:59:37 +0000 (00:59 +0000)]
Do not allow journal_mode=WAL if the underlying VFS does not support xShmOpen.
FossilOrigin-Name:
d1fcccecdc8e9ac5d0d022914e51c545f4e1b04f
drh [Fri, 30 Apr 2010 22:28:06 +0000 (22:28 +0000)]
Merge in changes from the trunk.
FossilOrigin-Name:
76bf0eee1fd4003a3f1c39922f8f059611d41dd0
drh [Fri, 30 Apr 2010 21:03:24 +0000 (21:03 +0000)]
Avoid assertion faults in queries using indices with redundant columns.
Ticket [
3dbdcdb14e7f41 ].
FossilOrigin-Name:
946e06cd2a2cc209b0786b7e9d28c0746320d646
drh [Fri, 30 Apr 2010 17:47:51 +0000 (17:47 +0000)]
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
drh [Fri, 30 Apr 2010 17:28:35 +0000 (17:28 +0000)]
Remove some obsolete debugging parameters.
FossilOrigin-Name:
a012aed498bf41a5f6f3006182b0c4c2ab0fe1bb
dan [Fri, 30 Apr 2010 17:05:23 +0000 (17:05 +0000)]
Fix a problem with resizing the wal-index mapping after the mapping has been extended by an external process.
FossilOrigin-Name:
79d356fea6008a8adf8ebd4906571375f3cf5213
dan [Fri, 30 Apr 2010 16:50:00 +0000 (16:50 +0000)]
Fix a problem with calculating the required size of the wal-index when appending frames.
FossilOrigin-Name:
9526b11130f3ed2f5227386a26263c767214603a
drh [Fri, 30 Apr 2010 16:48:19 +0000 (16:48 +0000)]
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
dan [Fri, 30 Apr 2010 16:41:53 +0000 (16:41 +0000)]
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
dan [Fri, 30 Apr 2010 16:38:59 +0000 (16:38 +0000)]
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
dan [Fri, 30 Apr 2010 16:24:46 +0000 (16:24 +0000)]
Reapply commits [
837d82a929 ] and [
c05e7dca17 ] that were accidentally overwritten.
FossilOrigin-Name:
598de52700ba13e3228289220a74fc62073c62d4
dan [Fri, 30 Apr 2010 16:19:39 +0000 (16:19 +0000)]
Add xShmXXX() methods to the test VFS in test_devsym.test.
FossilOrigin-Name:
1d20342424b452ea96aaf161de1f98f26a9155a0
drh [Fri, 30 Apr 2010 16:12:04 +0000 (16:12 +0000)]
Correctly record the fact that the SHM lock reached PENDING if it did so
but failed to reach CHECKPOINT.
FossilOrigin-Name:
d9250e84ac1fc6590f8670e1d801630650c7846a
drh [Fri, 30 Apr 2010 15:54:46 +0000 (15:54 +0000)]
Fix a couple uninitialized variables in the xShmLock method of the unix VFS.
Improved debugging logic for xShmLock.
FossilOrigin-Name:
69567c5fca9e30b7660e6f56350be929c3890d7e
dan [Fri, 30 Apr 2010 15:49:27 +0000 (15:49 +0000)]
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
dan [Fri, 30 Apr 2010 15:24:43 +0000 (15:24 +0000)]
If a reader attempts to upgrade to a writer, but is not reading the most recent database snapshot, return SQLITE_BUSY.
FossilOrigin-Name:
837d82a92977cbfa0963411daf8160d286a7ed32
drh [Fri, 30 Apr 2010 14:39:50 +0000 (14:39 +0000)]
Separate the concepts of underlying storage size and mapped size in the
VFS shared-memory implementation.
FossilOrigin-Name:
4cbe49f13fed288f94ff305bcfd99df907bf7baf
dan [Fri, 30 Apr 2010 11:43:28 +0000 (11:43 +0000)]
Add a missing walIndexUnmap() call to the checkpoint code. Change a couple of SQLITE_CANTOPEN constants to SQLITE_CANTOPEN_BKPT.
FossilOrigin-Name:
1f9e8c5c27ae2c68bc01d8e2bb2c662be7b3f161
dan [Fri, 30 Apr 2010 10:24:54 +0000 (10:24 +0000)]
Fix an assert() in sqlite3WalRead().
FossilOrigin-Name:
2e7a0050e192dd197d4db92393ab120897c14836
dan [Fri, 30 Apr 2010 10:06:09 +0000 (10:06 +0000)]
Add missing mutexes to unixShmClose().
FossilOrigin-Name:
a4741cb54dd5e753d48fd05ac9dbe27ee4aa1ec0
dan [Fri, 30 Apr 2010 09:52:17 +0000 (09:52 +0000)]
Fix a couple of assert() statements in os_unix.c and wal.c. Combine sqlite3WalIsDirty() with sqlite3WalUndo().
FossilOrigin-Name:
a8f958be804ee05c4137b3cd110db344713af5f2
dan [Fri, 30 Apr 2010 09:32:06 +0000 (09:32 +0000)]
Add a missing walIndexUnmap() to sqlite3WalSnapshotOpen().
FossilOrigin-Name:
72b95fde15dae56390dc8d4168fb2757447e289e
dan [Fri, 30 Apr 2010 06:02:30 +0000 (06:02 +0000)]
Merge latest bugfix into wal branch.
FossilOrigin-Name:
265e66e6984c32999bf93981e3b1d19887dfe599
drh [Fri, 30 Apr 2010 02:13:26 +0000 (02:13 +0000)]
The first 6 WAL tests now work. It's a start.
FossilOrigin-Name:
a92c1851da10acf51e7f6f086b8a23bd731940b3