]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
15 years agoChange the name of IOCAP_SAFE_DELETE to IOCAP_UNDELETABLE_WHEN_OPEN. Have the xDevice...
dan [Sat, 19 Jun 2010 18:12:02 +0000 (18:12 +0000)] 
Change the name of IOCAP_SAFE_DELETE to IOCAP_UNDELETABLE_WHEN_OPEN. Have the xDeviceCharacteristics() method of the win32 VFS return this flag.

FossilOrigin-Name: 5a5ff4e3e4c707464f227907d0aefb8ef42180dd

15 years agoAdd tests to pager1.test and pagerfault.test.
dan [Sat, 19 Jun 2010 17:26:37 +0000 (17:26 +0000)] 
Add tests to pager1.test and pagerfault.test.

FossilOrigin-Name: f5df83fd875073eee8e2269e87e2a8c9c7abc981

15 years agoAdd tests to pager1.test and pagerfault.test.
dan [Sat, 19 Jun 2010 11:30:41 +0000 (11:30 +0000)] 
Add tests to pager1.test and pagerfault.test.

FossilOrigin-Name: 58c0b5bfed8c67cc3f2f4a6784d08c14e652c265

15 years agoAdd tests to pager1.test.
dan [Fri, 18 Jun 2010 18:59:49 +0000 (18:59 +0000)] 
Add tests to pager1.test.

FossilOrigin-Name: 582fca89195af54e9668af249691654cfea63d04

15 years agoRearrange some code in OP_JournalMode to avoid incorrect returns from subsequent...
dan [Fri, 18 Jun 2010 16:13:45 +0000 (16:13 +0000)] 
Rearrange some code in OP_JournalMode to avoid incorrect returns from subsequent invocations of "PRAGMA journal_mode" following an IO error.

FossilOrigin-Name: ce0a4a9b5f981d066822a9ae63740c91b35bfc60

15 years agoChange the implementation of the unix implementation of xAccess() so that it returns...
dan [Fri, 18 Jun 2010 11:10:06 +0000 (11:10 +0000)] 
Change the implementation of the unix implementation of xAccess() so that it returns 0 (does not exist) to an SQLITE_ACCESS_EXISTS query on a file that exists but is zero bytes in size.

FossilOrigin-Name: 077b0e5bcd849130c8df373fc2134c4b44351882

15 years agoMerge trunk change [7c3a86b9c7].
dan [Thu, 17 Jun 2010 16:44:52 +0000 (16:44 +0000)] 
Merge trunk change [7c3a86b9c7].

FossilOrigin-Name: bd7bc4e0e28bc749034ff1a9290a69330c5d8ca4

15 years agoA different fix to [fc62af4523]. When changing from journal_mode=PERSIST or TRINCATE...
dan [Thu, 17 Jun 2010 16:44:21 +0000 (16:44 +0000)] 
A different fix to [fc62af4523]. When changing from journal_mode=PERSIST or TRINCATE to some other rollback mode, delete the journal file only if a RESERVED lock can be obtained on the database file first.

FossilOrigin-Name: b9b11855e8a9522309dd30e5256bb67d67e1353a

15 years agoFix the tkt-fc62af4523.test to work around non-randomness of the
drh [Thu, 17 Jun 2010 16:08:53 +0000 (16:08 +0000)] 
Fix the tkt-fc62af4523.test to work around non-randomness of the
randomblob() function when in testing mode.

FossilOrigin-Name: 7c3a86b9c7e2a35ce755c32b38e911e79d843fad

15 years agoFix bug in journal2.test.
dan [Thu, 17 Jun 2010 11:36:28 +0000 (11:36 +0000)] 
Fix bug in journal2.test.

FossilOrigin-Name: c1e04f1d4e8575ebc41b5b4403dbfe3f60d578dc

15 years agoMerge trunk updates with experimental branch.
dan [Thu, 17 Jun 2010 10:52:07 +0000 (10:52 +0000)] 
Merge trunk updates with experimental branch.

FossilOrigin-Name: 9f6ea1de5abab0ca28688e257ddf03c66413cf6e

15 years agoDo not delete the journal file in "PRAGMA journal_mode" commands. This fixes [fc62af4...
dan [Thu, 17 Jun 2010 10:42:06 +0000 (10:42 +0000)] 
Do not delete the journal file in "PRAGMA journal_mode" commands. This fixes [fc62af4523].

FossilOrigin-Name: 1ec74591a93e8b27ad3ac739914a48a91972e82c

15 years agoAdd test case for [fc62af4523].
dan [Thu, 17 Jun 2010 10:24:27 +0000 (10:24 +0000)] 
Add test case for [fc62af4523].

FossilOrigin-Name: cccd32c692057beb08a994102c6a10126ddeb937

15 years agoMerge fix [f80c3f922a] with experimental changes.
dan [Thu, 17 Jun 2010 06:19:53 +0000 (06:19 +0000)] 
Merge fix [f80c3f922a] with experimental changes.

FossilOrigin-Name: 20133e9ca98f5e6c42051ed3d65e4eb71d5366a5

15 years agoBug fix: Only trust the database size number at offset 28 if the change
drh [Thu, 17 Jun 2010 02:13:39 +0000 (02:13 +0000)] 
Bug fix:  Only trust the database size number at offset 28 if the change
counter at offset 24 matches the version number counter at offset 92.
This prevents corruption in the case of two applications writing to the
database where one is an older version of SQLite and the other is a newer
version.

FossilOrigin-Name: f80c3f922a114e738613955a939db46cf0847038

15 years agoExperimental change: On systems where it is not possible to unlink a file while one...
dan [Wed, 16 Jun 2010 19:04:23 +0000 (19:04 +0000)] 
Experimental change: On systems where it is not possible to unlink a file while one or more processes has it open (i.e. not unix), avoid closing the journal file each time the database is unlocked and reopening it at the start of each transaction.

FossilOrigin-Name: bede8c8a148fb9be5ffbf38df7fa733e35cc68c3

15 years agoAdd extra test cases to pager1.test.
dan [Wed, 16 Jun 2010 12:30:10 +0000 (12:30 +0000)] 
Add extra test cases to pager1.test.

FossilOrigin-Name: ad3209572d0e6afe5c8b52313e334509661045e2

15 years agoFix a memory leak that can occur in os_unix.c if an IO error occurs within the xUnloc...
dan [Wed, 16 Jun 2010 10:55:42 +0000 (10:55 +0000)] 
Fix a memory leak that can occur in os_unix.c if an IO error occurs within the xUnlock method.

FossilOrigin-Name: 6c5c04eea1f0e8d61883ee8675c249fbf895dc01

15 years agoRationalize a common pattern in tcl test cases into proc do_multiclient_test.
dan [Tue, 15 Jun 2010 19:07:42 +0000 (19:07 +0000)] 
Rationalize a common pattern in tcl test cases into proc do_multiclient_test.

FossilOrigin-Name: efe44564983f115017658dd8a130226366d42bab

15 years agoFix a problem introduced into lock2.test by the previous commit.
dan [Tue, 15 Jun 2010 18:00:06 +0000 (18:00 +0000)] 
Fix a problem introduced into lock2.test by the previous commit.

FossilOrigin-Name: c1c9f6fa9d75df740e577dbc5e6a24b91ad2bdd0

15 years agoAdd test file pager1.test, containing tests of inter-process locking in non-wal mode.
dan [Tue, 15 Jun 2010 17:44:47 +0000 (17:44 +0000)] 
Add test file pager1.test, containing tests of inter-process locking in non-wal mode.

FossilOrigin-Name: 6e43eed9310bae9ca5e91f8fd9eafc45a16b7019

15 years agoRun extra iterations in wal3.test to ensure test coverage.
dan [Tue, 15 Jun 2010 14:21:17 +0000 (14:21 +0000)] 
Run extra iterations in wal3.test to ensure test coverage.

FossilOrigin-Name: ea80cbe51e33d6a3f15a4ad56f360fc5323866de

15 years agoMerge in [2c5e48a485].
dan [Tue, 15 Jun 2010 14:06:06 +0000 (14:06 +0000)] 
Merge in [2c5e48a485].
Merge in [2c5e48a485].
Merge in [2c5e48a485].

FossilOrigin-Name: 03c0f4fd9cbb655477b63ebbb6af7822715644aa

15 years agoMinor tweaks to the interface documentation - adding hyperlinks.
drh [Tue, 15 Jun 2010 12:09:06 +0000 (12:09 +0000)] 
Minor tweaks to the interface documentation - adding hyperlinks.

FossilOrigin-Name: 07b2fdd1cebbdbde5098a662eea65a0c9e8b5442

15 years agoUpdates to comments and testcase() macros in wal.c.
drh [Tue, 15 Jun 2010 11:21:54 +0000 (11:21 +0000)] 
Updates to comments and testcase() macros in wal.c.

FossilOrigin-Name: 4d90cc0bc07e791b2838fc384866bd5c2282f681

15 years agoChanges to the way tcl test scripts work. No changes to production code.
dan [Tue, 15 Jun 2010 06:56:37 +0000 (06:56 +0000)] 
Changes to the way tcl test scripts work. No changes to production code.

FossilOrigin-Name: 2c5e48a4855e2ec4572697c8fcfe4433e302ef33

15 years agoFix an error in the walfault.test script introduced by the previous check-in.
drh [Mon, 14 Jun 2010 18:06:20 +0000 (18:06 +0000)] 
Fix an error in the walfault.test script introduced by the previous check-in.

FossilOrigin-Name: a2b9374fc6f0aba2d465d432e1124bd957aab548

15 years agoMove the xShmMap method to in between xShmLock and xShmBarrier, since it seems
drh [Mon, 14 Jun 2010 18:01:46 +0000 (18:01 +0000)] 
Move the xShmMap method to in between xShmLock and xShmBarrier, since it seems
to fit in there logically.

FossilOrigin-Name: 58dfd83d8b7905391e2a06bb918ffa209c6de6b5

15 years agoMerge the experimental shared-memory mmap-by-chunk changes into the trunk.
drh [Mon, 14 Jun 2010 17:09:53 +0000 (17:09 +0000)] 
Merge the experimental shared-memory mmap-by-chunk changes into the trunk.

FossilOrigin-Name: f295e7ed5f04f6b8bffdaff8b565be3836ce4e80

15 years agoAdd the new xShmMap (formerly xShmPage) to os_win.c.
dan [Mon, 14 Jun 2010 16:16:33 +0000 (16:16 +0000)] 
Add the new xShmMap (formerly xShmPage) to os_win.c.

FossilOrigin-Name: 13e7a8242206bca4b5bf356ef074e66474d39609

15 years agoRemove xShmGet/Size/Release from the sqlite3_vfs structure. Change the name of xShmPa...
dan [Mon, 14 Jun 2010 14:07:50 +0000 (14:07 +0000)] 
Remove xShmGet/Size/Release from the sqlite3_vfs structure. Change the name of xShmPage to xShmMap. Remove some code that is now unused from os_unix.c and some of the test VFS implementations.

FossilOrigin-Name: fc0cabc15c97dde6a852b4f07df6d30f1d2c04bc

15 years agoUpdate some comments in wal.c. No code changes.
dan [Mon, 14 Jun 2010 11:49:26 +0000 (11:49 +0000)] 
Update some comments in wal.c. No code changes.

FossilOrigin-Name: 1ce9c92bffa5d7f8431c005b29d698b0f5b95875

15 years agoChange the interface to internal function walGetHash() to make it easier to follow.
dan [Mon, 14 Jun 2010 11:18:50 +0000 (11:18 +0000)] 
Change the interface to internal function walGetHash() to make it easier to follow.

FossilOrigin-Name: 5e8e2e978ea48ce4ad93a936c838934f33d665df

15 years agoAdd the xShmPage method to the "crash" vfs in test6.c.
dan [Mon, 14 Jun 2010 10:30:12 +0000 (10:30 +0000)] 
Add the xShmPage method to the "crash" vfs in test6.c.

FossilOrigin-Name: 1008f536440840da7d56c01ec147a25295fd1fd4

15 years agoAdd some fault-injection tests to improve coverage.
dan [Mon, 14 Jun 2010 07:53:26 +0000 (07:53 +0000)] 
Add some fault-injection tests to improve coverage.

FossilOrigin-Name: 37b26d125f4b1d8e75bb38800fefd145611f94aa

15 years agoFix some problems with handling IO errors on the experimental branch.
dan [Sat, 12 Jun 2010 12:02:35 +0000 (12:02 +0000)] 
Fix some problems with handling IO errors on the experimental branch.

FossilOrigin-Name: eade8bc238df580412f5cf1b91a91532ae671e46

15 years agoExperimental change to the xShmXXX parts of the VFS interface.
dan [Fri, 11 Jun 2010 19:04:21 +0000 (19:04 +0000)] 
Experimental change to the xShmXXX parts of the VFS interface.

FossilOrigin-Name: ca68472db01c14a899892007d1cbaff5e86ae193

15 years agoRefactor and simplify the logic used to change journalmode.
drh [Fri, 11 Jun 2010 17:01:24 +0000 (17:01 +0000)] 
Refactor and simplify the logic used to change journalmode.

FossilOrigin-Name: 95cc3f6fdec5494560c3cd4439d06870d1c62506

15 years agoAdding original art for the new SQLite logo.
drh [Thu, 10 Jun 2010 16:25:55 +0000 (16:25 +0000)] 
Adding original art for the new SQLite logo.

FossilOrigin-Name: af353bd89e5ec89f113d217225cc59cbc8373d64

15 years agoAdd the SQLITE_TESTCTRL_PGHDRSZ verb for sqlite3_test_control() used to get
drh [Thu, 10 Jun 2010 14:07:40 +0000 (14:07 +0000)] 
Add the SQLITE_TESTCTRL_PGHDRSZ verb for sqlite3_test_control() used to get
the size of pcache headers for testing purposes.

FossilOrigin-Name: 5d694f04fecf47ca325e108d463c24f42def55d5

15 years agoUpdate the test VFS in test_journal.c so that it implements the
drh [Thu, 10 Jun 2010 10:51:27 +0000 (10:51 +0000)] 
Update the test VFS in test_journal.c so that it implements the
xCurrentTimeInt64 method.

FossilOrigin-Name: ec3b4a7e5d3d7bd737d356b8a09ce94f8f0f8ce0

15 years agoStore the MemPage structure in memory following, instead of preceding, the page data...
dan [Thu, 10 Jun 2010 06:53:26 +0000 (06:53 +0000)] 
Store the MemPage structure in memory following, instead of preceding, the page data for cached pages. This reduces the likelihood of a corrupt database page image causing SQLite to read past the end of a buffer.

FossilOrigin-Name: 0ce42e76654d9ba52dac74c940d38b17866016ba

15 years agoRemove a condition that must always be true. Replace it with an assert().
drh [Thu, 10 Jun 2010 01:07:42 +0000 (01:07 +0000)] 
Remove a condition that must always be true.  Replace it with an assert().

FossilOrigin-Name: 7abcd54ec09e8025193d1e0ea57775051d823801

15 years agoFix test script problems causing errors in the "inmemory_journal" permutations.
dan [Wed, 9 Jun 2010 19:01:02 +0000 (19:01 +0000)] 
Fix test script problems causing errors in the "inmemory_journal" permutations.

FossilOrigin-Name: ea05b7f929e4696175dbc3ded36dba8ed2a6b575

15 years agoWhen restarting (wrapping) a log file, set all unused aReadMark[] slots to READMARK_N...
dan [Wed, 9 Jun 2010 16:58:49 +0000 (16:58 +0000)] 
When restarting (wrapping) a log file, set all unused aReadMark[] slots to READMARK_NOT_USED instead of 0. Setting them to 0 does not cause a problem, but may cause SQLite to obtain and release a few more file locks than would otherwise be necessary.

FossilOrigin-Name: 0797b10c0cc08ae38e26685d1f8331e37d428781

15 years agoFix for ticket [f973c7ac31].
dan [Wed, 9 Jun 2010 15:47:11 +0000 (15:47 +0000)] 
Fix for ticket [f973c7ac31].

FossilOrigin-Name: 6eb058dda8d5f87b02378d8efd821fe64a525dcc

15 years agoShift the meaning of aReadMark[] back so that +1 offset from mxFrame is
drh [Wed, 9 Jun 2010 14:45:12 +0000 (14:45 +0000)] 
Shift the meaning of aReadMark[] back so that +1 offset from mxFrame is
removed.  Add the new READMARK_NOT_USED value (0xffffffff) instead of
zero to signal an aReadMark[] that is not in use.

FossilOrigin-Name: c576827d55c156572b76cf7063e9f253ca6e7403

15 years agoSimpler fix for the race condition also fixed by [7c102c7b5f]
dan [Wed, 9 Jun 2010 11:28:43 +0000 (11:28 +0000)] 
Simpler fix for the race condition also fixed by [7c102c7b5f]

FossilOrigin-Name: 3c2de820034e01c2e939bd90a05a58159f60df50

15 years agoClose database opened by tester.tcl when it is sourced in all.test. Because test...
dan [Tue, 8 Jun 2010 15:50:53 +0000 (15:50 +0000)] 
Close database opened by tester.tcl when it is sourced in all.test. Because test scripts are now run in slave interpreters, this connection was not being closed by the first script run as it was previously.

FossilOrigin-Name: b072e9f69ad5ec68b8ec4c716556070001f885e0

15 years agoChanges to wal3.test to support small default cache size settings. And builds that...
dan [Tue, 8 Jun 2010 15:16:10 +0000 (15:16 +0000)] 
Changes to wal3.test to support small default cache size settings. And builds that create autovacuum databases by default.

FossilOrigin-Name: ac4cc2574bafce30390a34f13228380d017791cb

15 years agoIn os_unix.c, call munmap() to unmap a shared-memory region prior to closing the...
dan [Mon, 7 Jun 2010 19:26:54 +0000 (19:26 +0000)] 
In os_unix.c, call munmap() to unmap a shared-memory region prior to closing the associated file descriptor.

FossilOrigin-Name: 95cc976f1520bdaedd8f93b0e9fbef94e4e2c8cc

15 years agoChange all.test, quick.test and permutations.test so that they use a separate interpr...
dan [Mon, 7 Jun 2010 17:47:26 +0000 (17:47 +0000)] 
Change all.test, quick.test and permutations.test so that they use a separate interpreter for each test file.

FossilOrigin-Name: 7c33eb5a5add8fe76dd412ecab5b6ff8cd78a98d

15 years agoRefactor some of the global variables and commands used by tester.tcl.
dan [Mon, 7 Jun 2010 14:28:16 +0000 (14:28 +0000)] 
Refactor some of the global variables and commands used by tester.tcl.

FossilOrigin-Name: c2edf8e17f874d0ca4e94b75575bf6e14eea1f05

15 years agoAdd a couple of extra coverage tests for wal.c.
dan [Mon, 7 Jun 2010 06:11:39 +0000 (06:11 +0000)] 
Add a couple of extra coverage tests for wal.c.

FossilOrigin-Name: cfe60254df50f086014b115f1a2d9e31c85d67fd

15 years agoAdd further test cases for the logic in sqlite3WalBeginReadTransaction().
dan [Sat, 5 Jun 2010 19:18:59 +0000 (19:18 +0000)] 
Add further test cases for the logic in sqlite3WalBeginReadTransaction().

FossilOrigin-Name: a49713db39d0d6940b368206d4e669aa69aa1fe5

15 years agoClarify the purpose of a test for a race-condition in walIndexReadHdr().
dan [Sat, 5 Jun 2010 18:34:26 +0000 (18:34 +0000)] 
Clarify the purpose of a test for a race-condition in walIndexReadHdr().

FossilOrigin-Name: c041c6a9786bc9ebb82527f7a2c96d255aec927f

15 years agoRemove a condition from sqlite3WalRead() that is unreachable as of the changes to...
dan [Sat, 5 Jun 2010 18:12:23 +0000 (18:12 +0000)] 
Remove a condition from sqlite3WalRead() that is unreachable as of the changes to clear entries out of the wal-index hash tables on transaction or savepoint rollback.

FossilOrigin-Name: 394204735a842b04b677cca20485b1578e475d4c

15 years agoMark a condition in wal.c as ALWAYS().
dan [Sat, 5 Jun 2010 14:42:57 +0000 (14:42 +0000)] 
Mark a condition in wal.c as ALWAYS().

FossilOrigin-Name: 3fe0cc784ac586358c08f87fba458dfbb5eec6f2

15 years agoAdd extra coverage test cases for wal.c. No changes to production code.
dan [Sat, 5 Jun 2010 11:53:34 +0000 (11:53 +0000)] 
Add extra coverage test cases for wal.c. No changes to production code.

FossilOrigin-Name: f9d4ae0e8cc5d32c52eb78799f7959dd236ea9de

15 years agoClarify an assert in sqlite3WalExclusiveMode().
dan [Fri, 4 Jun 2010 18:37:59 +0000 (18:37 +0000)] 
Clarify an assert in sqlite3WalExclusiveMode().

FossilOrigin-Name: 255850699ddbf4aad8cc3223aefbada35daa0703

15 years agoRemove an unnecessary branch from wal.c.
dan [Fri, 4 Jun 2010 17:16:52 +0000 (17:16 +0000)] 
Remove an unnecessary branch from wal.c.

FossilOrigin-Name: 8e54786c9a0c5c399f228f56c73271f84d75694b

15 years agoAdd an English language error message to corresponding to SQLITE_PROTOCOL. "locking...
dan [Fri, 4 Jun 2010 15:59:58 +0000 (15:59 +0000)] 
Add an English language error message to corresponding to SQLITE_PROTOCOL. "locking protocol".

FossilOrigin-Name: ca327e32cfe1633f2c9d3f058e411f108aaa2b3c

15 years agoAdd test for the code that detects an inconsistent pair of wal-index headers to wal2...
dan [Fri, 4 Jun 2010 12:22:35 +0000 (12:22 +0000)] 
Add test for the code that detects an inconsistent pair of wal-index headers to wal2.test.

FossilOrigin-Name: 157feba10f7ac01eecf79715c44bb16c98958280

15 years agoIf an attempt to sync the database file as part of a checkpoint fails, do not update...
dan [Fri, 4 Jun 2010 11:56:22 +0000 (11:56 +0000)] 
If an attempt to sync the database file as part of a checkpoint fails, do not update the shared "nBackfill" variable. Otherwise, another process could wrap the log and overwrite content before it is synced into the database.

FossilOrigin-Name: b813233d7604a5fd91e1af91d5d812032eec700a

15 years agoFix a problem where an SQLITE_BUSY in the checkpoint code was being treated as an...
dan [Fri, 4 Jun 2010 10:37:05 +0000 (10:37 +0000)] 
Fix a problem where an SQLITE_BUSY in the checkpoint code was being treated as an IO error (abandoning, instead of just limiting, the checkpoint).

FossilOrigin-Name: 02c4040ce2b4c970b3dee09f7c9ad5a2a3a9aa49

15 years agoFix another problem in test_vfs.c.
dan [Thu, 3 Jun 2010 19:10:08 +0000 (19:10 +0000)] 
Fix another problem in test_vfs.c.

FossilOrigin-Name: df7d59899ceb2743764b0433cb68f4bc33f16344

15 years agoHave test_vfs.c simulate IO errors in xShmLock.
dan [Thu, 3 Jun 2010 18:20:19 +0000 (18:20 +0000)] 
Have test_vfs.c simulate IO errors in xShmLock.

FossilOrigin-Name: fcbf7cf189506e43fc2f0820aedffb195038d3a9

15 years agoPerformance fix for winShmClose().
drh [Thu, 3 Jun 2010 18:02:48 +0000 (18:02 +0000)] 
Performance fix for winShmClose().

FossilOrigin-Name: ed7774de04978803e979580240148eba1de9166d

15 years agoAdd extra tests for removing elements from wal-index hash tables as part of a rollback.
dan [Thu, 3 Jun 2010 16:58:46 +0000 (16:58 +0000)] 
Add extra tests for removing elements from wal-index hash tables as part of a rollback.

FossilOrigin-Name: af3e598ad9315a4642dd8fa098dfdbd727770aed

15 years agoDelay opening the sub-journal until SQLite actually needs to write data to it.
dan [Thu, 3 Jun 2010 12:35:28 +0000 (12:35 +0000)] 
Delay opening the sub-journal until SQLite actually needs to write data to it.

FossilOrigin-Name: c43deb33ae5f191ea2e054181759beeeb9ea71bf

15 years agoRemove global variables when compiled with SQLITE_OMIT_WSD
drh [Thu, 3 Jun 2010 12:09:52 +0000 (12:09 +0000)] 
Remove global variables when compiled with SQLITE_OMIT_WSD

FossilOrigin-Name: dd10a547f10364058025c48b28d8fd240bf46aff

15 years agoEnhancements to test_vfs.c and walfault.test.
dan [Thu, 3 Jun 2010 09:25:10 +0000 (09:25 +0000)] 
Enhancements to test_vfs.c and walfault.test.

FossilOrigin-Name: ac0de2f39e948f3b00e96eebf56ebee70472020d

15 years agoIf an error (OOM or SQLITE_FULL error) occurs while executing an SQL statement and...
dan [Thu, 3 Jun 2010 09:17:38 +0000 (09:17 +0000)] 
If an error (OOM or SQLITE_FULL error) occurs while executing an SQL statement and a statement-transaction is automatically rolled back as a result, if a second error occurs during the statement rollback do a full transaction rollback instead. Otherwise the client can be left with an inconsistent cache.

FossilOrigin-Name: eb80ddc665132c607c258b59131025a296269dad

15 years agoIf a malloc fails while allocating a savepoint object at the pager level, do not...
dan [Thu, 3 Jun 2010 09:01:11 +0000 (09:01 +0000)] 
If a malloc fails while allocating a savepoint object at the pager level, do not try to roll that savepoint back later on.

FossilOrigin-Name: 91cb08ffb6332a142542c012b58aa49206ee5704

15 years agoWhen a lock fails due to an I/O error (not an SQLITE_BUSY) then the checkpoint
drh [Wed, 2 Jun 2010 20:38:20 +0000 (20:38 +0000)] 
When a lock fails due to an I/O error (not an SQLITE_BUSY) then the checkpoint
should fail.

FossilOrigin-Name: c6eb0a27270df69018576232d8f97c16d63d8f6e

15 years agoFix a problem with rolling back to a savepoint opened before the writer decided to...
dan [Wed, 2 Jun 2010 18:59:03 +0000 (18:59 +0000)] 
Fix a problem with rolling back to a savepoint opened before the writer decided to wrap the log file.

FossilOrigin-Name: 6b4aed6aae7dc9e92807d27375cbe1e83c15841b

15 years agoIf an error occurs while writing frames to the log to commit a transaction, do not...
dan [Wed, 2 Jun 2010 17:15:24 +0000 (17:15 +0000)] 
If an error occurs while writing frames to the log to commit a transaction, do not mark the pages as clean in the cache. Otherwise, the subsequent rollback does not roll them back (leaving the client to continue with a cache that makes it appear that the transaction was committed - inconsistent with the database on disk).

FossilOrigin-Name: cb571c1b71a37b3a10d640987c77a6eec508235d

15 years agoAdded implementation of vfslog_time() for Windows testing.
shaneh [Wed, 2 Jun 2010 16:40:54 +0000 (16:40 +0000)] 
Added implementation of vfslog_time() for Windows testing.

FossilOrigin-Name: b3109f85bde0b24bfbcfe6c0f7bbe973be196c1d

15 years agoUpdated wal2.test for windows testing.
shaneh [Wed, 2 Jun 2010 16:39:53 +0000 (16:39 +0000)] 
Updated wal2.test for windows testing.

FossilOrigin-Name: c3606f3985e4ab38479409c13f3a01d1be4f8189

15 years agoMake sure the directory used by os_unix.c for shared-memory files is always
drh [Wed, 2 Jun 2010 15:59:05 +0000 (15:59 +0000)] 
Make sure the directory used by os_unix.c for shared-memory files is always
the same, regardless of individual client permissions and environment
variable settings.

FossilOrigin-Name: f97bd520f06a16c61ccdd9ebeda7e138896b9ac2

15 years agoWhen walTryBeginRead() encounters an I/O error trying to set a lock
drh [Wed, 2 Jun 2010 15:43:18 +0000 (15:43 +0000)] 
When walTryBeginRead() encounters an I/O error trying to set a lock
(as opposed to SQLITE_BUSY) be sure to propagate that error back up
the call stack.

FossilOrigin-Name: aa2c2b67a7f50c97a44cca1af5c437bf5410869c

15 years agoChanges to make WAL more robust against SHM locking failures and OOM errors.
drh [Wed, 2 Jun 2010 14:45:51 +0000 (14:45 +0000)] 
Changes to make WAL more robust against SHM locking failures and OOM errors.

FossilOrigin-Name: ebf4041383c3cdddb5861960359abd209d4a1028

15 years agoIn the rowhash.test, make sure global variables are cleared prior to use.
drh [Wed, 2 Jun 2010 14:43:30 +0000 (14:43 +0000)] 
In the rowhash.test, make sure global variables are cleared prior to use.

FossilOrigin-Name: 28efe0a40405567f3eaf334b6603282d5adac792

15 years agoUndo one of the "const" markers from the previous check-in because the
drh [Wed, 2 Jun 2010 12:58:22 +0000 (12:58 +0000)] 
Undo one of the "const" markers from the previous check-in because the
value needs to be changable, even if it is not actually ever changed in
the current implementation.

FossilOrigin-Name: c24ac3563f46fc6bcf7e45ee171afd3ae7d2faa8

15 years agoAdd some 'const' markers to static data that is really constant.
dan [Wed, 2 Jun 2010 05:53:53 +0000 (05:53 +0000)] 
Add some 'const' markers to static data that is really constant.

FossilOrigin-Name: e7073e23b80e7cae0c76d42f014ee9b2d40a8f2f

15 years agoThe shared-memory used by WAL on linux now really is shared memory in /dev/shm.
drh [Tue, 1 Jun 2010 21:02:51 +0000 (21:02 +0000)] 
The shared-memory used by WAL on linux now really is shared memory in /dev/shm.
On other unix flavors, the file is in a temporary directory rather than in the
same directory as the database.

FossilOrigin-Name: fc18c4aadb908c3b6f9b6481a2efca6a0daadc64

15 years agoChanges to the way faults are injected into xShmXXX VFS calls.
dan [Tue, 1 Jun 2010 19:15:18 +0000 (19:15 +0000)] 
Changes to the way faults are injected into xShmXXX VFS calls.

FossilOrigin-Name: 716d99f3929b466c7a17190e0f18de8ab0e7f1fa

15 years agoChange the OOM and IO error test cases in walfault.test so that each test case runs...
dan [Tue, 1 Jun 2010 17:46:38 +0000 (17:46 +0000)] 
Change the OOM and IO error test cases in walfault.test so that each test case runs both types of error simulation.

FossilOrigin-Name: b627e1536822bb7e3ef91867661a53be0efc13ef

15 years agoDelay the decision to restart the log file until data is actually ready to be written...
dan [Tue, 1 Jun 2010 15:44:57 +0000 (15:44 +0000)] 
Delay the decision to restart the log file until data is actually ready to be written to the log file (instead of at the start of a write transaction).

FossilOrigin-Name: b1abfaaf5309cc0d0dda4fb2c237862c8cf83261

15 years agoThe incremental checkpoint feature is not perfect yet, but it is working
drh [Tue, 1 Jun 2010 15:24:29 +0000 (15:24 +0000)] 
The incremental checkpoint feature is not perfect yet, but it is working
well enough to merge it into the trunk.

FossilOrigin-Name: 1d3e569e59ba89cc167f0a48951ecd82f10322ba

15 years agoMerge with [15abbc3416]. wal-incr-ckpt
dan [Tue, 1 Jun 2010 14:30:49 +0000 (14:30 +0000)] 
Merge with [15abbc3416].

FossilOrigin-Name: f4b9003a2d3db88eaabb4b291e6cea8e8ea6ff51

15 years agoIf an attempt to get a read-lock on the WAL fails with SQLITE_BUSY_RECOVER, call...
dan [Tue, 1 Jun 2010 14:12:45 +0000 (14:12 +0000)] 
If an attempt to get a read-lock on the WAL fails with SQLITE_BUSY_RECOVER, call the busy-handler at the btree level.

FossilOrigin-Name: ce64496509a213c08c9dedae2a7a456b393d22e5

15 years agoFix a bug introduced by the previous check-in but only seen if
drh [Tue, 1 Jun 2010 13:17:44 +0000 (13:17 +0000)] 
Fix a bug introduced by the previous check-in but only seen if
SQLITE_ENABLE_EXPENSIVE_ASSERTS is turned on.

FossilOrigin-Name: 9c9ec8994bf701249efce6c7bb911de4525808c8

15 years agoFix an off-by-one boundary-value issue in walCleanupHash().
drh [Tue, 1 Jun 2010 12:58:41 +0000 (12:58 +0000)] 
Fix an off-by-one boundary-value issue in walCleanupHash().

FossilOrigin-Name: f039552e6330b6a04281748f985b41937f534bd0

15 years agoDo not hold the shared-memory mutex in os_unix.c if returning NULL.
dan [Tue, 1 Jun 2010 11:08:56 +0000 (11:08 +0000)] 
Do not hold the shared-memory mutex in os_unix.c if returning NULL.

FossilOrigin-Name: 9622dd468c8914262e9d8bd8dbca9e22ec6ee75c

15 years agoIf the checkpoint fails to obtain an exclusive lock on one of the read-lock bytes...
dan [Tue, 1 Jun 2010 10:44:28 +0000 (10:44 +0000)] 
If the checkpoint fails to obtain an exclusive lock on one of the read-lock bytes, do not consider this an error.

FossilOrigin-Name: 9e95e35728cf69a0ae50e774d7f6c71a41b17d97

15 years agoFixes to the test cases in wal2.test.
dan [Tue, 1 Jun 2010 07:51:47 +0000 (07:51 +0000)] 
Fixes to the test cases in wal2.test.

FossilOrigin-Name: cd5fbcbce8b55f24c0bf349b179c26e333ff7172

15 years agoComment edits and cleanup in wal.c. No functional code changes.
drh [Tue, 1 Jun 2010 01:08:08 +0000 (01:08 +0000)] 
Comment edits and cleanup in wal.c.  No functional code changes.

FossilOrigin-Name: e8e666ab8273f5db5265f0773b39820f75b6df1a

15 years agoAttempt to get the filectrl.test script running.
drh [Tue, 1 Jun 2010 00:28:42 +0000 (00:28 +0000)] 
Attempt to get the filectrl.test script running.

FossilOrigin-Name: e46a8f2b752f86c4d8942ee125210516026ffdc2

15 years agoFix os_unix.c so that it will compile and build on a Mac.
drh [Tue, 1 Jun 2010 00:03:57 +0000 (00:03 +0000)] 
Fix os_unix.c so that it will compile and build on a Mac.

FossilOrigin-Name: bc707c83e5f9849d9d201d695d0d071ca9ed93cb