Commit Graph

7961 Commits

Author SHA1 Message Date
dan
e08341c664 Change things so that journal2.test works with ENABLE_ATOMIC_WRITE.
FossilOrigin-Name: a64d96db09ef2b7651fa4e98d3c7bf3ae5d3fe96
2010-06-21 12:34:29 +00:00
dan
153eda0aa4 Add further pager tests.
FossilOrigin-Name: 4104b175a8c3560a7680f3d2b54416821bb2e19d
2010-06-21 07:45:47 +00:00
dan
248af428ea Merge latest trunk change.
FossilOrigin-Name: f6d26e07b70965e332b1589804ca938593a5f432
2010-06-21 06:00:15 +00:00
dan
672b41beaa Fix jrnlmode2.test so that it works on systems where UNDELETABLE_WHEN_OPEN is defined.
FossilOrigin-Name: 59be370e52ec814c45efa6cbac45b6df94661b54
2010-06-21 05:40:49 +00:00
drh
19515c8da1 Fix an uninitialized variable in os_unix.c.
FossilOrigin-Name: 822a0283c6bc1c75001f3d1c528a4ff89c6b039c
2010-06-19 23:53:11 +00:00
dan
c548b78310 Fix an assert() failure that could occur if compiling with OMIT_SHARED_CACHE.
FossilOrigin-Name: 3e76a9f2c041a6d36614f540bb89588703d85925
2010-06-19 19:06:33 +00:00
dan
8ce49d6ac0 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
2010-06-19 18:12:02 +00:00
dan
146ed78b78 Add tests to pager1.test and pagerfault.test.
FossilOrigin-Name: f5df83fd875073eee8e2269e87e2a8c9c7abc981
2010-06-19 17:26:37 +00:00
drh
7234c6d6f6 Change the unix VFS to always allocate shared-memory using a file in the
same directory as the database.  Otherwise, a chroot might cause different
processes to use different shared memory files resulting in database
corruption.

FossilOrigin-Name: 2241788bc85fbc48e9cfecb95fe0a858338e37cb
2010-06-19 15:10:09 +00:00
dan
de4996e2ee Add tests to pager1.test and pagerfault.test.
FossilOrigin-Name: 58c0b5bfed8c67cc3f2f4a6784d08c14e652c265
2010-06-19 11:30:41 +00:00
dan
1f4cb65a9e Add tests to pager1.test.
FossilOrigin-Name: 582fca89195af54e9668af249691654cfea63d04
2010-06-18 18:59:49 +00:00
dan
d956efebea Rearrange some code in OP_JournalMode to avoid incorrect returns from subsequent invocations of "PRAGMA journal_mode" following an IO error.
FossilOrigin-Name: ce0a4a9b5f981d066822a9ae63740c91b35bfc60
2010-06-18 16:13:45 +00:00
dan
83acd423a1 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
2010-06-18 11:10:06 +00:00
dan
be5c10477c Apply [b9b11855e8] (the alternate fix to [fc62af4523]) to the trunk.
FossilOrigin-Name: 9a949a3a5c32b8bfbb94e10e18d050ec80a25553
2010-06-17 17:05:53 +00:00
dan
cd27cffa97 Merge trunk change [7c3a86b9c7].
FossilOrigin-Name: bd7bc4e0e28bc749034ff1a9290a69330c5d8ca4
2010-06-17 16:44:52 +00:00
dan
731bf5bcf8 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
2010-06-17 16:44:21 +00:00
drh
0cf68fa4c6 Fix the tkt-fc62af4523.test to work around non-randomness of the
randomblob() function when in testing mode.

FossilOrigin-Name: 7c3a86b9c7e2a35ce755c32b38e911e79d843fad
2010-06-17 16:08:53 +00:00
dan
b70f82a7a5 Fix bug in journal2.test.
FossilOrigin-Name: c1e04f1d4e8575ebc41b5b4403dbfe3f60d578dc
2010-06-17 11:36:28 +00:00
dan
24827d0c0f Merge trunk updates with experimental branch.
FossilOrigin-Name: 9f6ea1de5abab0ca28688e257ddf03c66413cf6e
2010-06-17 10:52:07 +00:00
dan
7c6d618615 Do not delete the journal file in "PRAGMA journal_mode" commands. This fixes [fc62af4523].
FossilOrigin-Name: 1ec74591a93e8b27ad3ac739914a48a91972e82c
2010-06-17 10:42:06 +00:00
dan
cb0a7a7267 Add test case for [fc62af4523].
FossilOrigin-Name: cccd32c692057beb08a994102c6a10126ddeb937
2010-06-17 10:24:27 +00:00
dan
c002518074 Merge fix [f80c3f922a] with experimental changes.
FossilOrigin-Name: 20133e9ca98f5e6c42051ed3d65e4eb71d5366a5
2010-06-17 06:19:53 +00:00
drh
b28e59bbbb 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
2010-06-17 02:13:39 +00:00
dan
2a321c7547 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
2010-06-16 19:04:23 +00:00
dan
53f04f3b3f Add extra test cases to pager1.test.
FossilOrigin-Name: ad3209572d0e6afe5c8b52313e334509661045e2
2010-06-16 12:30:10 +00:00
dan
b0ac3e3a17 Fix a memory leak that can occur in os_unix.c if an IO error occurs within the xUnlock method.
FossilOrigin-Name: 6c5c04eea1f0e8d61883ee8675c249fbf895dc01
2010-06-16 10:55:42 +00:00
dan
a4a9095ec0 Rationalize a common pattern in tcl test cases into proc do_multiclient_test.
FossilOrigin-Name: efe44564983f115017658dd8a130226366d42bab
2010-06-15 19:07:42 +00:00
dan
2fce9ab3f8 Fix a problem introduced into lock2.test by the previous commit.
FossilOrigin-Name: c1c9f6fa9d75df740e577dbc5e6a24b91ad2bdd0
2010-06-15 18:00:06 +00:00
dan
e91a54e1be Add test file pager1.test, containing tests of inter-process locking in non-wal mode.
FossilOrigin-Name: 6e43eed9310bae9ca5e91f8fd9eafc45a16b7019
2010-06-15 17:44:47 +00:00
dan
3a3803b61a Run extra iterations in wal3.test to ensure test coverage.
FossilOrigin-Name: ea80cbe51e33d6a3f15a4ad56f360fc5323866de
2010-06-15 14:21:17 +00:00
dan
422309c447 Merge in [2c5e48a485].
Merge in [2c5e48a485].
Merge in [2c5e48a485].

FossilOrigin-Name: 03c0f4fd9cbb655477b63ebbb6af7822715644aa
2010-06-15 14:06:06 +00:00
drh
cc3af5156e Minor tweaks to the interface documentation - adding hyperlinks.
FossilOrigin-Name: 07b2fdd1cebbdbde5098a662eea65a0c9e8b5442
2010-06-15 12:09:06 +00:00
drh
ffca43014b Updates to comments and testcase() macros in wal.c.
FossilOrigin-Name: 4d90cc0bc07e791b2838fc384866bd5c2282f681
2010-06-15 11:21:54 +00:00
dan
0626dfc3dc Changes to the way tcl test scripts work. No changes to production code.
FossilOrigin-Name: 2c5e48a4855e2ec4572697c8fcfe4433e302ef33
2010-06-15 06:56:37 +00:00
drh
f886b4f851 Fix an error in the walfault.test script introduced by the previous check-in.
FossilOrigin-Name: a2b9374fc6f0aba2d465d432e1124bd957aab548
2010-06-14 18:06:20 +00:00
drh
6b017cc6d4 Move the xShmMap method to in between xShmLock and xShmBarrier, since it seems
to fit in there logically.

FossilOrigin-Name: 58dfd83d8b7905391e2a06bb918ffa209c6de6b5
2010-06-14 18:01:46 +00:00
drh
6f72beb20c Merge the experimental shared-memory mmap-by-chunk changes into the trunk.
FossilOrigin-Name: f295e7ed5f04f6b8bffdaff8b565be3836ce4e80
2010-06-14 17:09:53 +00:00
dan
9785fc9510 Add the new xShmMap (formerly xShmPage) to os_win.c.
FossilOrigin-Name: 13e7a8242206bca4b5bf356ef074e66474d39609
2010-06-14 16:16:33 +00:00
dan
188019153d 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
2010-06-14 14:07:50 +00:00
dan
ad3cadd8b2 Update some comments in wal.c. No code changes.
FossilOrigin-Name: 1ce9c92bffa5d7f8431c005b29d698b0f5b95875
2010-06-14 11:49:26 +00:00
dan
d60bf11036 Change the interface to internal function walGetHash() to make it easier to follow.
FossilOrigin-Name: 5e8e2e978ea48ce4ad93a936c838934f33d665df
2010-06-14 11:18:50 +00:00
dan
067f3165d8 Add the xShmPage method to the "crash" vfs in test6.c.
FossilOrigin-Name: 1008f536440840da7d56c01ec147a25295fd1fd4
2010-06-14 10:30:12 +00:00
dan
5d656852f7 Add some fault-injection tests to improve coverage.
FossilOrigin-Name: 37b26d125f4b1d8e75bb38800fefd145611f94aa
2010-06-14 07:53:26 +00:00
dan
4280eb3004 Fix some problems with handling IO errors on the experimental branch.
FossilOrigin-Name: eade8bc238df580412f5cf1b91a91532ae671e46
2010-06-12 12:02:35 +00:00
dan
13a3cb82ce Experimental change to the xShmXXX parts of the VFS interface.
FossilOrigin-Name: ca68472db01c14a899892007d1cbaff5e86ae193
2010-06-11 19:04:21 +00:00
drh
0b9b4301b8 Refactor and simplify the logic used to change journalmode.
FossilOrigin-Name: 95cc3f6fdec5494560c3cd4439d06870d1c62506
2010-06-11 17:01:24 +00:00
drh
5130c31b0c Adding original art for the new SQLite logo.
FossilOrigin-Name: af353bd89e5ec89f113d217225cc59cbc8373d64
2010-06-10 16:25:55 +00:00
drh
23e35723a7 Add the SQLITE_TESTCTRL_PGHDRSZ verb for sqlite3_test_control() used to get
the size of pcache headers for testing purposes.

FossilOrigin-Name: 5d694f04fecf47ca325e108d463c24f42def55d5
2010-06-10 14:07:40 +00:00
drh
007d6c3a36 Update the test VFS in test_journal.c so that it implements the
xCurrentTimeInt64 method.

FossilOrigin-Name: ec3b4a7e5d3d7bd737d356b8a09ce94f8f0f8ce0
2010-06-10 10:51:27 +00:00
dan
026e598d0f 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
2010-06-10 06:53:26 +00:00