]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
15 years agoAdd tests to cover a couple of branches in wal.c.
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

15 years agoUnset a tcl variable before reusing it in wal.test.
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

15 years agoAdd tests for some lock-contention cases.
dan [Thu, 6 May 2010 12:15:48 +0000 (12:15 +0000)] 
Add tests for some lock-contention cases.

FossilOrigin-Name: f0fcb9c9a67e2bf7bbedbedbc27791b605a21dd1

15 years agoRemove the noop-mutex implementations of mutex_held() and mutex_notheld()
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

15 years agoAdd two text files containing pager design notes to the doc/ subfolder.
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

15 years agoAdd test cases to test the libraries handling of corrupt wal-index headers.
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

15 years agoAdd tests for handling errors returned by xShm VFS methods.
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

15 years agoChange the behavior of the sqlite3_wal_hook() callback. It should now return
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

15 years agoFurther simplifications to the SHM locking logic. Remove the SQLITE_SHM_QUERY
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

15 years agoTest the handling of errors returned by the xShmXXX() APIs.
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

15 years agoDo not compare page sizes on source and destination of backup until
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

15 years agoSimplifications to the SHM locking implementation in os_unix.c.
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

15 years agoProhibit backup if the destination is using WAL and has a different page
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

15 years agoWhen closing a WAL database, if the exclusive lock on the database file is obtained...
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

15 years agoMake sure the page size of the main database is fixed following a
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

15 years agoDo not attempt to modify the page_size when running VACUUM on a WAL database.
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

15 years agoGet the previous mutex fix working with SQLITE_DEBUG and with the amalgamation.
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

15 years agoWhen the in single-threaded mode, the sqlite3_mutex_alloc() interface
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

15 years agoWhen sqlite3PagerPagecount() is called without any locks, always return
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

15 years agoBe sure to release all wal-index locks before closing the wal-index.
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

15 years agoRelax an over-zealous assert() in sqlite3WalUndo().
drh [Tue, 4 May 2010 17:20:09 +0000 (17:20 +0000)] 
Relax an over-zealous assert() in sqlite3WalUndo().

FossilOrigin-Name: 8f9d22d58c75ad7476c1eea8ba296347e30b7beb

15 years agoTake care not to invoke the xShmClose method of the VFS with a NULL
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

15 years agoAdd a test case to verify that log files containing pages that are not a power-of...
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

15 years agoFix problems with recovering wal files that use a page-size other than the default.
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

15 years agoFix a typo in walfault.test.
dan [Tue, 4 May 2010 11:06:03 +0000 (11:06 +0000)] 
Fix a typo in walfault.test.

FossilOrigin-Name: 232dbe8ecec16485be5c5995fdf7a0ed951c2097

15 years agoTest that the correct number of padding frames are appended to the log file after...
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

15 years agoUnset some global TCL variables prior to use in test where prior tests can
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

15 years agoFix a bug in the computation of the current time for the alternative
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

15 years agoDocumentation stubs for sqlite3_wal_autocheckpoint and sqlite3_wal_checkpoint.
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

15 years agoFix a bug in the xCurrentTime() method of the os_unix.c VFS.
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

15 years agoAdd a test to simulate an OOM during log recovery to walfault.test.
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

15 years agoClear global variable "seconds" before use in walthread.test.
drh [Mon, 3 May 2010 17:24:45 +0000 (17:24 +0000)] 
Clear global variable "seconds" before use in walthread.test.

FossilOrigin-Name: a35551a5305b5160b0eb511da7f8e6fb351ef271

15 years agoFix a couple of errors in WAL code that can occur in an OOM situation.
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

15 years agoUpdate the crash-test VFS in test6.c to pass-through the shared-memory
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

15 years agoChange the VFS definition so that all methods take a VFS object pointer as
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

15 years agoHave sqlite3_wal_checkpoint() handle a zero-length string in the same way as a NULL...
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

15 years agoUse VFS method xCurrentTimeInt64 instead of xCurrentTime when it is available.
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

15 years agoMerge the write-ahead-logging changes into the trunk.
drh [Mon, 3 May 2010 14:08:27 +0000 (14:08 +0000)] 
Merge the write-ahead-logging changes into the trunk.

FossilOrigin-Name: de9ae443cc8eebfb0692dcdac93bde9e4c54199a

15 years agoIf the sqlite3_wal_checkpoint() API is passed a NULL pointer in place of a database... wal
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

15 years agoMake sure the mutex is held while calling sqlite3ApiExit() in
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

15 years agoHave sqlite3_wal_checkpoint() populate the database handle error message and error...
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

15 years agoAdd the "PRAGMA wal_autocheckpoint" command. Rename "PRAGMA checkpoint" to "PRAGMA...
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

15 years agoMerge two wal leaves.
dan [Mon, 3 May 2010 08:19:34 +0000 (08:19 +0000)] 
Merge two wal leaves.

FossilOrigin-Name: 23c0e6c3f333e878fe5a2ae5d61df0d765f437b4

15 years agoAdd the sqlite3_wal_checkpoint() and sqlite3_wal_autocheckpoint() APIs.
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

15 years agoChange the SHM interface so that it does not take the name of the shared
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

15 years agoRemove the xShmPush and xShmPull methods from the VFS.
drh [Sat, 1 May 2010 18:23:08 +0000 (18:23 +0000)] 
Remove the xShmPush and xShmPull methods from the VFS.

FossilOrigin-Name: 69e07fdbde5054593de948b76dfac157cf5d4058

15 years agoDefine an invariant to guarantee deadlock-free operation of SHM in os_unix.c
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

15 years agoRework mutexes on the SHM implemention for os_unix to avoid a deadlock during
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

15 years agoSupport compile-time option SQLITE_OMIT_WAL, for building without WAL support.
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

15 years agoFix a typo in the walmode.test test script introducted yesterday.
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

15 years agoFix the sqlite3_mutex_alloc() interface to return NULL (not segfault) when
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

15 years agoAdd test case demonstrating deadlock during recovery of very large log files. No...
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

15 years agoDo not allow journal_mode=WAL if the underlying VFS does not support xShmOpen.
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

15 years agoMerge in changes from the trunk.
drh [Fri, 30 Apr 2010 22:28:06 +0000 (22:28 +0000)] 
Merge in changes from the trunk.

FossilOrigin-Name: 76bf0eee1fd4003a3f1c39922f8f059611d41dd0

15 years agoAvoid assertion faults in queries using indices with redundant columns.
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

15 years agoChange the SHM VFS logic in os_unix.c so that it does not hold an exclusive
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

15 years agoRemove some obsolete debugging parameters.
drh [Fri, 30 Apr 2010 17:28:35 +0000 (17:28 +0000)] 
Remove some obsolete debugging parameters.

FossilOrigin-Name: a012aed498bf41a5f6f3006182b0c4c2ab0fe1bb

15 years agoFix a problem with resizing the wal-index mapping after the mapping has been extended...
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

15 years agoFix a problem with calculating the required size of the wal-index when appending...
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

15 years agoIn the debugging output for SHM-LOCK in os_unix.c, use symbolic names
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

15 years agoFix a problem in the previous commit. Both unixShm.lockState and unixShm.readLock...
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

15 years agoFix a bug whereby upgrading from a READ_FULL to a WRITE lock, and then back to a...
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

15 years agoReapply commits [837d82a929] and [c05e7dca17] that were accidentally overwritten.
dan [Fri, 30 Apr 2010 16:24:46 +0000 (16:24 +0000)] 
Reapply commits [837d82a929] and [c05e7dca17] that were accidentally overwritten.

FossilOrigin-Name: 598de52700ba13e3228289220a74fc62073c62d4

15 years agoAdd xShmXXX() methods to the test VFS in test_devsym.test.
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

15 years agoCorrectly record the fact that the SHM lock reached PENDING if it did so
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

15 years agoFix a couple uninitialized variables in the xShmLock method of the unix VFS.
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

15 years agoWhen closing a WAL connection, attempt an exclusive lock on the database file. If...
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

15 years agoIf a reader attempts to upgrade to a writer, but is not reading the most recent datab...
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

15 years agoSeparate the concepts of underlying storage size and mapped size in the
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

15 years agoAdd a missing walIndexUnmap() call to the checkpoint code. Change a couple of SQLITE_...
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

15 years agoFix an assert() in sqlite3WalRead().
dan [Fri, 30 Apr 2010 10:24:54 +0000 (10:24 +0000)] 
Fix an assert() in sqlite3WalRead().

FossilOrigin-Name: 2e7a0050e192dd197d4db92393ab120897c14836

15 years agoAdd missing mutexes to unixShmClose().
dan [Fri, 30 Apr 2010 10:06:09 +0000 (10:06 +0000)] 
Add missing mutexes to unixShmClose().

FossilOrigin-Name: a4741cb54dd5e753d48fd05ac9dbe27ee4aa1ec0

15 years agoFix a couple of assert() statements in os_unix.c and wal.c. Combine sqlite3WalIsDirty...
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

15 years agoAdd a missing walIndexUnmap() to sqlite3WalSnapshotOpen().
dan [Fri, 30 Apr 2010 09:32:06 +0000 (09:32 +0000)] 
Add a missing walIndexUnmap() to sqlite3WalSnapshotOpen().

FossilOrigin-Name: 72b95fde15dae56390dc8d4168fb2757447e289e

15 years agoMerge latest bugfix into wal branch.
dan [Fri, 30 Apr 2010 06:02:30 +0000 (06:02 +0000)] 
Merge latest bugfix into wal branch.

FossilOrigin-Name: 265e66e6984c32999bf93981e3b1d19887dfe599

15 years agoThe first 6 WAL tests now work. It's a start.
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

15 years agoZero the "immediate FK constraint counter" associated with a statement object when...
dan [Thu, 29 Apr 2010 22:57:56 +0000 (22:57 +0000)] 
Zero the "immediate FK constraint counter" associated with a statement object when sqlite3_reset() is called. Fix for [c39ff61c43].

FossilOrigin-Name: f660be615a0c1f4641782a83744533f5d3119218

15 years agoRefactor wal.c to use the VFS. This check-in compiles and links and works
drh [Thu, 29 Apr 2010 22:34:07 +0000 (22:34 +0000)] 
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

15 years agoUntested implementation of the shared-memory dead-man-switch.
drh [Thu, 29 Apr 2010 16:40:51 +0000 (16:40 +0000)] 
Untested implementation of the shared-memory dead-man-switch.

FossilOrigin-Name: 706611283ea2575c2942543391026b36061cfc1c

15 years agoProgress towards a VFS that will support WAL. Locking code is in place
drh [Thu, 29 Apr 2010 15:17:48 +0000 (15:17 +0000)] 
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

15 years agoClose all open database connections at the end of wal.test.
dan [Thu, 29 Apr 2010 14:58:53 +0000 (14:58 +0000)] 
Close all open database connections at the end of wal.test.

FossilOrigin-Name: 3cc55a7568daa3796483f632e33478969e381cf5

15 years agoFix a but in the WAL checkpoint code causing SQLite to use an inconsistent cache...
dan [Thu, 29 Apr 2010 14:51:33 +0000 (14:51 +0000)] 
Fix a but in the WAL checkpoint code causing SQLite to use an inconsistent cache in a subsequent transaction.

FossilOrigin-Name: d1cadeed4eea20d8892726cc8c69f4f3f57d0cd4

15 years agoAdd tests to walthread.test.
dan [Thu, 29 Apr 2010 08:47:28 +0000 (08:47 +0000)] 
Add tests to walthread.test.

FossilOrigin-Name: 9e891e7543ea4d7dee76deb2456af940f4cac49b

15 years agoAdd a test to walthread.test for changing between WAL and rollback modes.
dan [Wed, 28 Apr 2010 18:17:23 +0000 (18:17 +0000)] 
Add a test to walthread.test for changing between WAL and rollback modes.

FossilOrigin-Name: da229e44bd4a5d512261da05958d560808c9889f

15 years agoMerge two "wal"
dan [Wed, 28 Apr 2010 17:49:57 +0000 (17:49 +0000)] 
Merge two "wal"
leaves.

FossilOrigin-Name: 13d2d5a66e9eaa81aa6314354201ee1fbd2b3824

15 years agoChange walthread.test so that tests can be run with either multiple threads or multip...
dan [Wed, 28 Apr 2010 17:48:44 +0000 (17:48 +0000)] 
Change walthread.test so that tests can be run with either multiple threads or multiple processes.

FossilOrigin-Name: 25f85f68723e56c18e44b094d85f67b99912dc86

15 years agoChanges to the interface design for the xShmLock method of the VFS.
drh [Wed, 28 Apr 2010 17:21:33 +0000 (17:21 +0000)] 
Changes to the interface design for the xShmLock method of the VFS.

FossilOrigin-Name: 348409de26eafe12f5cb1236e8e167a4183d4051

15 years agoRename the sqlite3_log_hook() to sqlite3_wal_hook(). Added comments to
drh [Wed, 28 Apr 2010 14:42:19 +0000 (14:42 +0000)] 
Rename the sqlite3_log_hook() to sqlite3_wal_hook().  Added comments to
wal.h.

FossilOrigin-Name: bbc385111b19071e20fe963fab814262c815b3e9

15 years agoMerge two "wal" leaves.
dan [Tue, 27 Apr 2010 18:49:54 +0000 (18:49 +0000)] 
Merge two "wal" leaves.

FossilOrigin-Name: 8c2d43babd61fe2225d5c402174253f412604092

15 years agoAdd a test to check that a checkpointer releases its locks before returning, even...
dan [Tue, 27 Apr 2010 18:43:16 +0000 (18:43 +0000)] 
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

15 years agoFix a problem with identifying a corrupt database in WAL mode.
dan [Tue, 27 Apr 2010 14:37:47 +0000 (14:37 +0000)] 
Fix a problem with identifying a corrupt database in WAL mode.

FossilOrigin-Name: c8658da44671e9c43c90ee4857bbe82c55d40f25

15 years agoAdd the xShmRelease() method to the VFS. The os_unix.c implementation of
drh [Tue, 27 Apr 2010 11:49:27 +0000 (11:49 +0000)] 
Add the xShmRelease() method to the VFS.  The os_unix.c implementation of
the shared memory logic is still non-functional.

FossilOrigin-Name: ed715b47c5f7657fbf901805981867898054b14d

15 years agoRun trans.test and avtrans.test as part of the "wal" permutation.
dan [Tue, 27 Apr 2010 06:49:34 +0000 (06:49 +0000)] 
Run trans.test and avtrans.test as part of the "wal" permutation.

FossilOrigin-Name: c8893310510148f7e71ede5691606b6fc1c3df4d

15 years agoFix a problem that occurs when one process causes the log-summary file to grow and...
dan [Tue, 27 Apr 2010 05:42:32 +0000 (05:42 +0000)] 
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

15 years agoMerge in recent changes from the trunk
drh [Tue, 27 Apr 2010 01:56:21 +0000 (01:56 +0000)] 
Merge in recent changes from the trunk

FossilOrigin-Name: 7a0ac682c3bffcb345321fe97434563350ac90f9

15 years agoOptimization: Convert an ORDER BY clause into a no-op if the query also
drh [Mon, 26 Apr 2010 19:17:26 +0000 (19:17 +0000)] 
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

15 years agoDo not attempt to set journal_mode=wal on :memory: or temp file databases.
dan [Mon, 26 Apr 2010 17:42:56 +0000 (17:42 +0000)] 
Do not attempt to set journal_mode=wal on :memory: or temp file databases.

FossilOrigin-Name: 30d0134454734fd9335896372c30a903e9adcc64

15 years agoChange the default_cache_size pragma to always store a positive value.
drh [Mon, 26 Apr 2010 17:36:35 +0000 (17:36 +0000)] 
Change the default_cache_size pragma to always store a positive value.

FossilOrigin-Name: 36fb2cae75b5dfe1fe818895f03c0b4f4190a722

15 years agoIdentify the SQLite version meta-value entry in the db-header output of
drh [Mon, 26 Apr 2010 17:30:52 +0000 (17:30 +0000)] 
Identify the SQLite version meta-value entry in the db-header output of
showdb.

FossilOrigin-Name: 245d934b72cbc6e897193e7892195b6561995939

15 years agoFixes for problems with small caches and SAVEPOINT rollback in WAL mode.
dan [Mon, 26 Apr 2010 16:57:10 +0000 (16:57 +0000)] 
Fixes for problems with small caches and SAVEPOINT rollback in WAL mode.

FossilOrigin-Name: 6a944f028d4a070bef29e1fbc6fbef481ebcd34c