]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
15 years agoAdd tests to fkey2.test to check that ON CONFLICT clauses do not affect SQLite's...
dan [Sat, 29 May 2010 08:40:37 +0000 (08:40 +0000)] 
Add tests to fkey2.test to check that ON CONFLICT clauses do not affect SQLite's behaviour when an FK constraint is violated.

FossilOrigin-Name: e9e5b1001986348ef0f88c19de87b94559a5451e

15 years agoi
dan [Sat, 29 May 2010 06:18:54 +0000 (06:18 +0000)] 
i
i
Minor changes to checksum related test cases.

FossilOrigin-Name: 60c22bde52121993d4bea11eef38ab285c737e2c

15 years agoAdd a test to walcksum.test to stress the checksum calculation.
dan [Fri, 28 May 2010 04:16:28 +0000 (04:16 +0000)] 
Add a test to walcksum.test to stress the checksum calculation.

FossilOrigin-Name: 778d0c1768f73057be912793631e0cf0575858fb

15 years agoMake sure the wal-index mapping is always large enough to cover the entire
drh [Wed, 26 May 2010 17:31:58 +0000 (17:31 +0000)] 
Make sure the wal-index mapping is always large enough to cover the entire
active area of the wal-index.

FossilOrigin-Name: 42705babba0e9d2ef078845854bebbd168f23366

15 years agoChange the semantics of xShmGet() such that it will never increase the size
drh [Wed, 26 May 2010 15:06:38 +0000 (15:06 +0000)] 
Change the semantics of xShmGet() such that it will never increase the size
of shared memory.  xShmSize() must be used to grow the size of shared memory.
A shared memory segment size cannot be shrunk (except by dropping it).

FossilOrigin-Name: 72de00731245277b2209103ec0a76e3d4f56530e

15 years agoUpdated header comments in wal.c. No functional code changes.
drh [Tue, 25 May 2010 15:53:31 +0000 (15:53 +0000)] 
Updated header comments in wal.c.  No functional code changes.

FossilOrigin-Name: 687632a6b3a0aeb006c1eda5c27d5489f08c230e

15 years agoAdd a busy-handler to a test case in walthread.test to prevent errors.
dan [Tue, 25 May 2010 15:23:51 +0000 (15:23 +0000)] 
Add a busy-handler to a test case in walthread.test to prevent errors.

FossilOrigin-Name: d3d348aa975c58c37088eb2830081880896b85e7

15 years agoModify walcrash2.test so that it works with DEFAULT_AUTOVACUUM=1.
dan [Tue, 25 May 2010 13:49:09 +0000 (13:49 +0000)] 
Modify walcrash2.test so that it works with DEFAULT_AUTOVACUUM=1.

FossilOrigin-Name: 77438882dd53ac4d98b24e2846c87a2418b4e3d8

15 years agoUpdate header comments in wal.c to correctly describe the WAL file format.
drh [Tue, 25 May 2010 13:40:03 +0000 (13:40 +0000)] 
Update header comments in wal.c to correctly describe the WAL file format.
Update the locking region offsets in os_unix.c and os_win.c and add assert()
statement to verify that the locking region offsets are correct.

FossilOrigin-Name: 40030c0739f821ea8ee188c28c579507f10448bc

15 years agoIf a writer exits unexpectedly in the middle of a transaction, have the following...
dan [Tue, 25 May 2010 10:50:56 +0000 (10:50 +0000)] 
If a writer exits unexpectedly in the middle of a transaction, have the following writer remove any wal-index hash-table entries left by the interrupted transaction.

FossilOrigin-Name: ed77556adcdf7011b95b9969b360269fb2ebe4e5

15 years agoRemove unreachable code associated with WAL from the pager.
drh [Tue, 25 May 2010 02:24:01 +0000 (02:24 +0000)] 
Remove unreachable code associated with WAL from the pager.

FossilOrigin-Name: 54c1718e6d15a20414cae15895eb5e83217722e2

15 years agoOOM errors during an auto-checkpoint are benign.
drh [Mon, 24 May 2010 20:27:44 +0000 (20:27 +0000)] 
OOM errors during an auto-checkpoint are benign.

FossilOrigin-Name: 3d252ce5d0d843e4e65beed672598e65c5745129

15 years agoRemove the walmode.test case from the inmemory_journal test of
drh [Mon, 24 May 2010 20:24:38 +0000 (20:24 +0000)] 
Remove the walmode.test case from the inmemory_journal test of
permutations.test.

FossilOrigin-Name: 27ba9c21fb591190b73010ced394cc62c1edff54

15 years agoFix the wal2.test script so that it works in auto_vacuum mode.
drh [Mon, 24 May 2010 17:00:19 +0000 (17:00 +0000)] 
Fix the wal2.test script so that it works in auto_vacuum mode.

FossilOrigin-Name: 6a818afb93ca8383abb55e3835e14c74c3e3de23

15 years agoChange the checksum used in WAL files so that each frames checksum depends on the...
dan [Mon, 24 May 2010 13:57:42 +0000 (13:57 +0000)] 
Change the checksum used in WAL files so that each frames checksum depends on the content of the WAL header and all frame headers and content up to and including the frame to which the checksum is attached.

FossilOrigin-Name: 8a53f12c83a107684b99f4a9de371b5ea3ca810a

15 years agoMake sure a WAL frame of all zeros is detected as an invalid frame.
drh [Mon, 24 May 2010 13:28:36 +0000 (13:28 +0000)] 
Make sure a WAL frame of all zeros is detected as an invalid frame.

FossilOrigin-Name: 02d99ad4b51065c67cc7689916130774be1c4c87

15 years agoFix up test_osinst.c to work with SQLITE_OMIT_VIRTUALTABLE.
drh [Mon, 24 May 2010 12:34:14 +0000 (12:34 +0000)] 
Fix up test_osinst.c to work with SQLITE_OMIT_VIRTUALTABLE.

FossilOrigin-Name: 51fd38152b92db637d1d346fca35ec2d3e4d4f57

15 years agoChange the WAL file format to support two kinds of checksums - one that is fast to...
dan [Mon, 24 May 2010 10:39:36 +0000 (10:39 +0000)] 
Change the WAL file format to support two kinds of checksums - one that is fast to calculate on little-endian architectures and another that is fast on big-endian architectures. A flag in the wal-header indicates which the file uses.

FossilOrigin-Name: 65ba804dd1d31d1eef6ae3f40a3ade344a410b84

15 years agoAdd a couple of missing methods to test_osinst.c..
dan [Sat, 22 May 2010 08:22:39 +0000 (08:22 +0000)] 
Add a couple of missing methods to test_osinst.c..

FossilOrigin-Name: 5c9e9c06ae350043e66f36087da4021a52e6ee17

15 years agoAdd several EXPENSIVE_ASSERT code blocks to validate the wal-index hash table.
drh [Sat, 22 May 2010 00:55:39 +0000 (00:55 +0000)] 
Add several EXPENSIVE_ASSERT code blocks to validate the wal-index hash table.
Fix the bugs that these code blocks fine.  Rename walClearHash() to
walCleanupHash() and simplify its interface.

FossilOrigin-Name: 7aade899e55f4565f02d301e1e83fb0bac2ea500

15 years agoFix another bug in walClearHash().
dan [Fri, 21 May 2010 19:15:04 +0000 (19:15 +0000)] 
Fix another bug in walClearHash().

FossilOrigin-Name: 40f80ffe70ca691dfa146f6d84956ed0784fc63d

15 years agoComment out the SQLITE_FCNTL_SIZE_HINT from os_unix.c since it does not
drh [Fri, 21 May 2010 18:24:06 +0000 (18:24 +0000)] 
Comment out the SQLITE_FCNTL_SIZE_HINT from os_unix.c since it does not
seem to provide any performance gain there.

FossilOrigin-Name: 7d01309da658d6b658c1b2e53bbdc5112fb0a4d9

15 years agoCorrect an off-by-one bug in the previous commit.
dan [Fri, 21 May 2010 16:23:43 +0000 (16:23 +0000)] 
Correct an off-by-one bug in the previous commit.

FossilOrigin-Name: 75a1130d86faf18e73cb46cda5d029f1e913e4e6

15 years agoRemove entries from wal-index hash tables when a rollback or savepoint rollback occurs.
dan [Fri, 21 May 2010 15:31:56 +0000 (15:31 +0000)] 
Remove entries from wal-index hash tables when a rollback or savepoint rollback occurs.

FossilOrigin-Name: 36795c2b23a78978528cace193e386138adacd41

15 years agoFix the wal-index header read routine so that it correctly detects a zero
drh [Fri, 21 May 2010 13:16:18 +0000 (13:16 +0000)] 
Fix the wal-index header read routine so that it correctly detects a zero
header as being malformed and in need of a wal-index rebuild.

FossilOrigin-Name: 1a4eb3a3efe86c7caff4d9a5894953bce378f841

15 years agoAdd a new xShmBarrier method to the VFS - a shared-memory fence operation.
drh [Thu, 20 May 2010 23:51:06 +0000 (23:51 +0000)] 
Add a new xShmBarrier method to the VFS - a shared-memory fence operation.
Implement the same in both unix and win32.  Use it to make the WAL subsystem
more robust.

FossilOrigin-Name: 1bd011c9fed5ef29fb616b4d0a52df3b82221b1f

15 years agoMake use of the extra information in the WAL header and frame header to
drh [Thu, 20 May 2010 21:21:09 +0000 (21:21 +0000)] 
Make use of the extra information in the WAL header and frame header to
enhance robustness.

FossilOrigin-Name: 9580ecb7e3beb1949a71784a3dcd1823a88e4a9d

15 years agoConvert the wal-header and frame-header to 24 bytes. Extra information in
drh [Thu, 20 May 2010 16:45:58 +0000 (16:45 +0000)] 
Convert the wal-header and frame-header to 24 bytes.  Extra information in
both headers is designed to enhance robustness after crashes, though the
extra information is currently unused.  This is a snapshot of a work in
progress.

FossilOrigin-Name: 669706431f186f92fdc0856a6206419a1e843f46

15 years agoMerge WIN32 WAL support into trunk. Still some issues with locking to resolve.
shaneh [Wed, 19 May 2010 23:41:55 +0000 (23:41 +0000)] 
Merge WIN32 WAL support into trunk.  Still some issues with locking to resolve.

FossilOrigin-Name: 43377663fc3569c361867cdea19e8abaf91a163f

15 years agoAdd the SQLITE_FCNTL_SIZE_HINT to the os_win.c VFS.
drh [Wed, 19 May 2010 19:39:26 +0000 (19:39 +0000)] 
Add the SQLITE_FCNTL_SIZE_HINT to the os_win.c VFS.

FossilOrigin-Name: 9894118d20c08951565c2096552d4a3d2413f7b0

15 years agoAdd the SQLITE_FCNTL_SIZE_HINT operator to sqlite3_file_control() and use it
drh [Wed, 19 May 2010 19:26:05 +0000 (19:26 +0000)] 
Add the SQLITE_FCNTL_SIZE_HINT operator to sqlite3_file_control() and use it
to give the VFS hints about the ultimate size of a database file when the
file is growing.

FossilOrigin-Name: 2b7e3b4a30d6a7c4a8a4b8e7dd2ed728b565c96d

15 years agoFix a bug in the new checkpoint computation. Also update the checkpoint
drh [Wed, 19 May 2010 19:09:37 +0000 (19:09 +0000)] 
Fix a bug in the new checkpoint computation.  Also update the checkpoint
algorithm in the test scripts to align with the new implementation.

FossilOrigin-Name: 8b6056f2ee596f31b157a792fac05d11f7cb63bb

15 years agoRevise the checksumming algorithm in wal.c. More variable refactoring.
drh [Wed, 19 May 2010 18:08:10 +0000 (18:08 +0000)] 
Revise the checksumming algorithm in wal.c.  More variable refactoring.

FossilOrigin-Name: 542b90eba6440a0bccef329788fd17a2d3fbeee6

15 years agoRefactoring some variable names in wal.c.
drh [Wed, 19 May 2010 17:49:50 +0000 (17:49 +0000)] 
Refactoring some variable names in wal.c.

FossilOrigin-Name: 1d201ff51f7c5ecdf71a91ed25204b7130894282

15 years agoAdd a large comment to wal.c describing the WAL and wal-index file formats.
drh [Wed, 19 May 2010 01:53:53 +0000 (01:53 +0000)] 
Add a large comment to wal.c describing the WAL and wal-index file formats.

FossilOrigin-Name: a71a22b52f4570e934063553a81b39268127dc44

15 years agoUpdate the wal-index hash format so that hash-table space is reused following
drh [Tue, 18 May 2010 23:29:52 +0000 (23:29 +0000)] 
Update the wal-index hash format so that hash-table space is reused following
a rollback, thus preventing hash table overflows.  Add assert()s to verify
that hash tables do not overfill.  Further refactoring of the wal-index code.

FossilOrigin-Name: ada9a8c7b69c5dd2d66bbf62b61181651e6d2142

15 years agoRefactoring of the WalIterator implementation.
drh [Tue, 18 May 2010 18:01:08 +0000 (18:01 +0000)] 
Refactoring of the WalIterator implementation.

FossilOrigin-Name: b5b60fdcc5dcf41f2c79912075ac241f7ce220d6

15 years agoMark the shared-memory in the WAL implementation as volatile.
drh [Tue, 18 May 2010 13:27:12 +0000 (13:27 +0000)] 
Mark the shared-memory in the WAL implementation as volatile.

FossilOrigin-Name: 0a6787908e989bd5e6af25acbdc59ebc8fa61d6d

15 years agoComment clarifications in wal.c.
drh [Tue, 18 May 2010 12:56:50 +0000 (12:56 +0000)] 
Comment clarifications in wal.c.

FossilOrigin-Name: a029be10172e2e6a2ef4e3eb2ea1bd0ca85b16ed

15 years agoRemove an unreachable test from wal.c.
drh [Mon, 17 May 2010 20:16:50 +0000 (20:16 +0000)] 
Remove an unreachable test from wal.c.

FossilOrigin-Name: 7162c45673d1068d1fda55a70207a3cd77575502

15 years agoAdd a note to the documentation of sqlite3_wal_hook() to say not to return SQLITE_ROW...
dan [Sat, 15 May 2010 10:24:46 +0000 (10:24 +0000)] 
Add a note to the documentation of sqlite3_wal_hook() to say not to return SQLITE_ROW or SQLITE_DONE. Or any other value that is not a valid SQLite error code.

FossilOrigin-Name: 2f0b6cbf7b4fa31242ff4f6163226c22ae4f8c9b

15 years agoSilently ignore errors trying to set the default journal_mode while doing
drh [Sat, 15 May 2010 01:09:38 +0000 (01:09 +0000)] 
Silently ignore errors trying to set the default journal_mode while doing
an ATTACH.

FossilOrigin-Name: b9af4ad2efadfb2fb9e338dc081a6231f1536700

15 years agoFix a typo that (by bad luck) was not a syntax error but which caused some
drh [Fri, 14 May 2010 20:15:51 +0000 (20:15 +0000)] 
Fix a typo that (by bad luck) was not a syntax error but which caused some
important lines of code to be skipped when SQLITE_DEBUG was not used.

FossilOrigin-Name: 9ef99d97d25aae81df971d40ad10c544b8f30053

15 years agoMake sure the value of an INTEGER PRIMARY KEY column supplied to triggers
drh [Fri, 14 May 2010 19:24:02 +0000 (19:24 +0000)] 
Make sure the value of an INTEGER PRIMARY KEY column supplied to triggers
and especially to FK constraints really contains the ROWID and not the
NULL that is stored in the column itself.  Ticket [dd08e5a988d00dec].

FossilOrigin-Name: 636f86095eb1f4bdcfb0c9ed846c4c6b3589c10b

15 years agoPull in all the latest changes from the trunk. wal-win32
drh [Fri, 14 May 2010 16:34:34 +0000 (16:34 +0000)] 
Pull in all the latest changes from the trunk.
Update the win32 SHM methods to work with the new interface design.

FossilOrigin-Name: 4b69f2cd315b6b66d10e5190d235114788853258

15 years agoSimplifications to the SHM implementation in os_unix.c, taking advantage
drh [Fri, 14 May 2010 14:52:25 +0000 (14:52 +0000)] 
Simplifications to the SHM implementation in os_unix.c, taking advantage
of the removal of the LinuxThreads mess.

FossilOrigin-Name: d1debe5def82a6bc72f11b8787176ac60259630f

15 years agoSimplify os_unix.c by removing support for LinuxThreads. Linux systems must
drh [Fri, 14 May 2010 12:43:01 +0000 (12:43 +0000)] 
Simplify os_unix.c by removing support for LinuxThreads.  Linux systems must
either use NPTL or else not share database connections across threads.

FossilOrigin-Name: e294b696ba91512b1ca5547774c51ea07b4cb5bc

15 years agoChange the OSTRACEn() macro to OSTRACE(()). Also rename some internal fields
drh [Fri, 14 May 2010 11:30:18 +0000 (11:30 +0000)] 
Change the OSTRACEn() macro to OSTRACE(()).  Also rename some internal fields
and variables in os_unix.c to be more meaningful and searchable.

FossilOrigin-Name: 5fe529f239cddbf4b7ea57abb02d95cc0d94f5f5

15 years agoFix test_osinst.c so that it does not depend on gettimeofday() unless SQLITE_OS_UNIX...
dan [Fri, 14 May 2010 10:43:28 +0000 (10:43 +0000)] 
Fix test_osinst.c so that it does not depend on gettimeofday() unless SQLITE_OS_UNIX is defined and NO_GETTOD is not defined.

FossilOrigin-Name: 2a4014b79b852d8b62b4941495b826f154308d86

15 years agoAdd xShmXXX methods to test_osinst.c.
dan [Fri, 14 May 2010 08:39:48 +0000 (08:39 +0000)] 
Add xShmXXX methods to test_osinst.c.

FossilOrigin-Name: b8a9b37a3c8d1005a16185c1fc4c414ca11d736a

15 years agoMake debugging elements of the sqlite3_mutex object volatile and make them
drh [Thu, 13 May 2010 20:19:17 +0000 (20:19 +0000)] 
Make debugging elements of the sqlite3_mutex object volatile and make them
only appear when compiling with SQLITE_DEBUG.  Ticket [51914f6acd2cb462].

FossilOrigin-Name: e823c60ca4c3d515b8b12dada4631fe8f44975e9

15 years agoAllow sqlite3WalCheckpoint() to be called even if the WAL is in the
drh [Thu, 13 May 2010 15:44:00 +0000 (15:44 +0000)] 
Allow sqlite3WalCheckpoint() to be called even if the WAL is in the
SQLITE_SHM_READ state, as sometimes happens after an error.

FossilOrigin-Name: 175b296f9b9680f605537f52a8a53944deaa5391

15 years agoRemerge mistaken test_osinst.c changes.
dan [Thu, 13 May 2010 09:40:30 +0000 (09:40 +0000)] 
Remerge mistaken test_osinst.c changes.

FossilOrigin-Name: e8c10d3cf601cc81a620f6c0ba5f195945a3f725

15 years agoFix mistake in test_osinst.c.
dan [Thu, 13 May 2010 09:32:30 +0000 (09:32 +0000)] 
Fix mistake in test_osinst.c.

FossilOrigin-Name: 4c3e137803f86ec5a6c68bfaa29a2847ba48fd65

15 years agoMake sure xShmGet is never called while already holding the shared-memory
drh [Thu, 13 May 2010 09:11:31 +0000 (09:11 +0000)] 
Make sure xShmGet is never called while already holding the shared-memory
segment.

FossilOrigin-Name: 92ebdbc5f64ac63796ff56c1e1aec3b95c6bdd20

15 years agoThe refactored of VFS SHM primitives are now working so merge the
drh [Thu, 13 May 2010 08:53:41 +0000 (08:53 +0000)] 
The refactored of VFS SHM primitives are now working so merge the
wal-refactor branch back into the trunk.

FossilOrigin-Name: bce21c18380715e894eac9c173c97315e0d69d93

15 years agoChange the xShmSize() implementation in os_unix.c so that it will only wal-refactor
drh [Thu, 13 May 2010 08:33:35 +0000 (08:33 +0000)] 
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

15 years agoFix for a segfault that can follow a malloc failure.
dan [Thu, 13 May 2010 07:08:53 +0000 (07:08 +0000)] 
Fix for a segfault that can follow a malloc failure.

FossilOrigin-Name: 3cab9022457ce50f82c5822d8ba6c04a3a85cb6a

15 years agoModify the VFS in test_vfs.c to match the refactoring of the xShmXXX methods.
dan [Thu, 13 May 2010 06:19:37 +0000 (06:19 +0000)] 
Modify the VFS in test_vfs.c to match the refactoring of the xShmXXX methods.

FossilOrigin-Name: 25e72f81561575051c63e9bf5d2c8e76f9fcf5c6

15 years agoChange the vfs instrumentation code in test_osinst.c to make it easier to deploy...
dan [Wed, 12 May 2010 19:02:35 +0000 (19:02 +0000)] 
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

15 years agoFix for the test_devsym.c test module for the VFS-SHM refactoring.
drh [Wed, 12 May 2010 18:30:36 +0000 (18:30 +0000)] 
Fix for the test_devsym.c test module for the VFS-SHM refactoring.

FossilOrigin-Name: 49d62933759d4e160ee3a4dd2aa316a2f5bbb4e6

15 years agoA couple simple fixes to get wal.test mostly working.
drh [Wed, 12 May 2010 18:10:52 +0000 (18:10 +0000)] 
A couple simple fixes to get wal.test mostly working.

FossilOrigin-Name: c74458127468f30b16715594c8d68e9d3c05d292

15 years agoRefactoring the VFS-SHM methods used by WAL. This version compiles and
drh [Wed, 12 May 2010 18:01:39 +0000 (18:01 +0000)] 
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

15 years agoUpdates to WAL support in os_win.c: pulled in latest changes from src/os_unix.c;...
shaneh [Wed, 12 May 2010 17:14:59 +0000 (17:14 +0000)] 
Updates to WAL support in os_win.c: pulled in latest changes from src/os_unix.c; updated tracing; misc. improvements.

FossilOrigin-Name: 76504726a1ef7f6a0445ec800776462138b22d72

15 years agoRemove the OP_Variable optimization of check-in [48b77b04935d894] since it
drh [Wed, 12 May 2010 13:50:23 +0000 (13:50 +0000)] 
Remove the OP_Variable optimization of check-in [48b77b04935d894] since it
can lead to malfunctions as described in ticket [26ff0c82d1e90].

FossilOrigin-Name: 7838163d087780a6fb403a17641b96f71baec088

15 years agoRemove a branch made redundant by the earlier exclusive-mode changes.
dan [Wed, 12 May 2010 06:54:31 +0000 (06:54 +0000)] 
Remove a branch made redundant by the earlier exclusive-mode changes.

FossilOrigin-Name: c501b2ede6aad123bef0aa7ce8b356a134eb6d26

15 years agoHave os_unix.c use the suffix "-wal-index" for wal-index files instead of "-wal-inde".
dan [Tue, 11 May 2010 16:29:54 +0000 (16:29 +0000)] 
Have os_unix.c use the suffix "-wal-index" for wal-index files instead of "-wal-inde".

FossilOrigin-Name: 885e854e7cdc79ecc9d5772d563ddc0f61753ab6

15 years agoWhen an attempt to change journal_mode fails due to locks, be sure to
drh [Tue, 11 May 2010 14:00:39 +0000 (14:00 +0000)] 
When an attempt to change journal_mode fails due to locks, be sure to
leave internal structures in a consistent state.

FossilOrigin-Name: cf3d1e0b8a739302cf2848ac3e6eaaae04e6a44c

15 years agoChanges so that WAL and exclusive-locking mode work together.
dan [Tue, 11 May 2010 12:19:26 +0000 (12:19 +0000)] 
Changes so that WAL and exclusive-locking mode work together.

FossilOrigin-Name: 71e7b1cf9f4cd02a2a9bc8a3e58acd7a7e3c7e60

15 years agoInitial port of WAL VFS support from os_unix.c to os_win.c.
shaneh [Tue, 11 May 2010 02:49:39 +0000 (02:49 +0000)] 
Initial port of WAL VFS support from os_unix.c to os_win.c.

FossilOrigin-Name: 111ad59f21d53d1ec63c084ca5f98f2aaf7cd070

15 years agoUpdates for to WAL TCL test scripts to support running on Windows.
shaneh [Tue, 11 May 2010 02:46:16 +0000 (02:46 +0000)] 
Updates for to WAL TCL test scripts to support running on Windows.

FossilOrigin-Name: 6a5630806c87b0f4e5632c37c357f98effd9608a

15 years agoFix an off-by-one error while constructing the name of the mmap file for
drh [Mon, 10 May 2010 19:51:32 +0000 (19:51 +0000)] 
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

15 years agoMerge [96d6eaf4d2] and [40b0a6357b].
dan [Mon, 10 May 2010 18:10:17 +0000 (18:10 +0000)] 
Merge [96d6eaf4d2] and [40b0a6357b].

FossilOrigin-Name: c67756c404669141fa06a1ce3f1efadefa277bc6

15 years agoFix an uninitialized variable in OSX proxy locking.
drh [Mon, 10 May 2010 17:29:28 +0000 (17:29 +0000)] 
Fix an uninitialized variable in OSX proxy locking.

FossilOrigin-Name: 96d6eaf4d2be453191b36875811d9556ad0763ed

15 years agoModify the format of the wal-index to use a hash table to index log file segments.
dan [Mon, 10 May 2010 14:46:09 +0000 (14:46 +0000)] 
Modify the format of the wal-index to use a hash table to index log file segments.

FossilOrigin-Name: 40b0a6357b160e04326ab176955a68a1cf3f8b7c

15 years agoIf an ATTACH command files due to OP_JournalMode but still attaches the
drh [Mon, 10 May 2010 14:10:57 +0000 (14:10 +0000)] 
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

15 years agoEnhance the OP_JournalMode opcode with an ignore-errors option and use that
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

15 years agoWhen running a checkpoint while in locking_mode=EXCLUSIVE, be sure to move
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

15 years agoChange the xShmOpen() method of the VFS to take the database file name as
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

15 years agoAdditional tweaks to API documentation. No functional code changes.
drh [Fri, 7 May 2010 18:23:24 +0000 (18:23 +0000)] 
Additional tweaks to API documentation.  No functional code changes.

FossilOrigin-Name: e1230782a371f09cd46dacc8ecbc6a0c5baab2d5

15 years agoUpdates to documentation on the C interfaces supporting WAL. No functional
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

15 years agoFix a recently introduced problem in wal.test.
dan [Fri, 7 May 2010 13:52:42 +0000 (13:52 +0000)] 
Fix a recently introduced problem in wal.test.

FossilOrigin-Name: 79b52d0ff7a7b717bde55b97ff05ad17418bc7d7

15 years agoChange wal.test and walhook.test so that they work with DEFAULT_AUTOVACUUM=1 builds.
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

15 years agoTest another IO error case in wal.c.
dan [Fri, 7 May 2010 09:43:50 +0000 (09:43 +0000)] 
Test another IO error case in wal.c.

FossilOrigin-Name: 8b3b5ab8fa61ca4ef22c98abaab397707ee74ea3

15 years agoFix a problem with checkpointing large log files created by an external process.
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

15 years agoSince walIndexTryHdr() can no longer encounter any error conditions, change tehe...
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

15 years agoAnother attempt to fix permutations.test so that it excludes WAL tests
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

15 years agoRemove savepoint6.test from the set of tests run by journaltest since
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

15 years agoThe PRAGMA journal_mode=WAL; command now makes WAL the default journal mode
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

15 years agoMake sure to do a clean shutdown of the library upon existing the shell
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

15 years agoExclude all WAL tests from the journaltest permutation.
drh [Thu, 6 May 2010 19:55:57 +0000 (19:55 +0000)] 
Exclude all WAL tests from the journaltest permutation.

FossilOrigin-Name: 46c97d7eee9359cd21139a6520633f5d16594ab0

15 years agoChanges to support SQLITE_OMIT_WAL.
shaneh [Thu, 6 May 2010 19:20:29 +0000 (19:20 +0000)] 
Changes to support SQLITE_OMIT_WAL.

FossilOrigin-Name: 32a8501d78714cc390eba5f993f329ef3b499878

15 years agoUpdates to the VFS SHM locking documentation.
drh [Thu, 6 May 2010 19:04:48 +0000 (19:04 +0000)] 
Updates to the VFS SHM locking documentation.

FossilOrigin-Name: 9927ce421090ac20285cf05768b38e1f91826a68

15 years agoInstead of transitioning to RECOVER state from CHECKPOINT when a recovery is required...
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

15 years agoIf recovery is run before a checkpoint, change back to a CHECKPOINT lock before perfo...
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

15 years agoOnly pass -1 as the size parameter to xShmGet when the caller does not care what...
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

15 years agoFix a bug whereby an old snapshot could be checkpointed (and subsequent transactions...
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

15 years agoAfter throwing an error to say that one cannot change into WAL mode within
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

15 years agoFurther coverage tests.
dan [Thu, 6 May 2010 15:56:28 +0000 (15:56 +0000)] 
Further coverage tests.

FossilOrigin-Name: 98a9713e0030a36ea99a18a12a2e7685c6db72b3

15 years agoUpdate configure scripts for WAL support.
shaneh [Thu, 6 May 2010 15:35:59 +0000 (15:35 +0000)] 
Update configure scripts for WAL support.

FossilOrigin-Name: 2edc5129f216abec9b13a0ad9b6640606caa9f72