Commit Graph

7944 Commits

Author SHA1 Message Date
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
drh
0350c7fa26 Remove a condition that must always be true. Replace it with an assert().
FossilOrigin-Name: 7abcd54ec09e8025193d1e0ea57775051d823801
2010-06-10 01:07:42 +00:00
dan
3ccd20a7a9 Fix test script problems causing errors in the "inmemory_journal" permutations.
FossilOrigin-Name: ea05b7f929e4696175dbc3ded36dba8ed2a6b575
2010-06-09 19:01:02 +00:00
dan
199100e2cd 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
2010-06-09 16:58:49 +00:00
dan
6ac4339439 Fix for ticket [f973c7ac31].
FossilOrigin-Name: 6eb058dda8d5f87b02378d8efd821fe64a525dcc
2010-06-09 15:47:11 +00:00
drh
db7f647e41 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
2010-06-09 14:45:12 +00:00
dan
15651f61df Simpler fix for the race condition also fixed by [7c102c7b5f]
FossilOrigin-Name: 3c2de820034e01c2e939bd90a05a58159f60df50
2010-06-09 11:28:43 +00:00
dan
e4bddc1fab 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
2010-06-08 15:50:53 +00:00
dan
c60f10a27f Changes to wal3.test to support small default cache size settings. And builds that create autovacuum databases by default.
FossilOrigin-Name: ac4cc2574bafce30390a34f13228380d017791cb
2010-06-08 15:16:10 +00:00
dan
7df6c2c04b In os_unix.c, call munmap() to unmap a shared-memory region prior to closing the associated file descriptor.
FossilOrigin-Name: 95cc976f1520bdaedd8f93b0e9fbef94e4e2c8cc
2010-06-07 19:26:54 +00:00
dan
430e74cd9b Change all.test, quick.test and permutations.test so that they use a separate interpreter for each test file.
FossilOrigin-Name: 7c33eb5a5add8fe76dd412ecab5b6ff8cd78a98d
2010-06-07 17:47:26 +00:00
dan
c1a60c51dc Refactor some of the global variables and commands used by tester.tcl.
FossilOrigin-Name: c2edf8e17f874d0ca4e94b75575bf6e14eea1f05
2010-06-07 14:28:16 +00:00
dan
23f719207f Add a couple of extra coverage tests for wal.c.
FossilOrigin-Name: cfe60254df50f086014b115f1a2d9e31c85d67fd
2010-06-07 06:11:39 +00:00
dan
640aac48f3 Add further test cases for the logic in sqlite3WalBeginReadTransaction().
FossilOrigin-Name: a49713db39d0d6940b368206d4e669aa69aa1fe5
2010-06-05 19:18:59 +00:00
dan
eb8cb3a851 Clarify the purpose of a test for a race-condition in walIndexReadHdr().
FossilOrigin-Name: c041c6a9786bc9ebb82527f7a2c96d255aec927f
2010-06-05 18:34:26 +00:00
dan
493cc590b6 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
2010-06-05 18:12:23 +00:00
dan
0626bd65fb Mark a condition in wal.c as ALWAYS().
FossilOrigin-Name: 3fe0cc784ac586358c08f87fba458dfbb5eec6f2
2010-06-05 14:42:57 +00:00
dan
ef4ee8f274 Add extra coverage test cases for wal.c. No changes to production code.
FossilOrigin-Name: f9d4ae0e8cc5d32c52eb78799f7959dd236ea9de
2010-06-05 11:53:34 +00:00