Commit Graph

7656 Commits

Author SHA1 Message Date
drh 7b6944047e 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
2010-04-29 15:17:48 +00:00
dan 185cca609b Close all open database connections at the end of wal.test.
FossilOrigin-Name: 3cc55a7568daa3796483f632e33478969e381cf5
2010-04-29 14:58:53 +00:00
dan 31c03907fd Fix a but in the WAL checkpoint code causing SQLite to use an inconsistent cache in a subsequent transaction.
FossilOrigin-Name: d1cadeed4eea20d8892726cc8c69f4f3f57d0cd4
2010-04-29 14:51:33 +00:00
dan b4e3a6f72f Add tests to walthread.test.
FossilOrigin-Name: 9e891e7543ea4d7dee76deb2456af940f4cac49b
2010-04-29 08:47:28 +00:00
dan e45d442692 Add a test to walthread.test for changing between WAL and rollback modes.
FossilOrigin-Name: da229e44bd4a5d512261da05958d560808c9889f
2010-04-28 18:17:23 +00:00
dan f032f5362e Merge two "wal"
leaves.

FossilOrigin-Name: 13d2d5a66e9eaa81aa6314354201ee1fbd2b3824
2010-04-28 17:49:57 +00:00
dan 5e0ce87a3f Change walthread.test so that tests can be run with either multiple threads or multiple processes.
FossilOrigin-Name: 25f85f68723e56c18e44b094d85f67b99912dc86
2010-04-28 17:48:44 +00:00
drh 9beb1584bd Changes to the interface design for the xShmLock method of the VFS.
FossilOrigin-Name: 348409de26eafe12f5cb1236e8e167a4183d4051
2010-04-28 17:21:33 +00:00
drh 833bf968e3 Rename the sqlite3_log_hook() to sqlite3_wal_hook(). Added comments to
wal.h.

FossilOrigin-Name: bbc385111b19071e20fe963fab814262c815b3e9
2010-04-28 14:42:19 +00:00
dan 4b64c1e365 Merge two "wal" leaves.
FossilOrigin-Name: 8c2d43babd61fe2225d5c402174253f412604092
2010-04-27 18:49:54 +00:00
dan 8b348af860 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
2010-04-27 18:43:16 +00:00
dan 8b5444bfae Fix a problem with identifying a corrupt database in WAL mode.
FossilOrigin-Name: c8658da44671e9c43c90ee4857bbe82c55d40f25
2010-04-27 14:37:47 +00:00
drh af75c8695b Add the xShmRelease() method to the VFS. The os_unix.c implementation of
the shared memory logic is still non-functional.

FossilOrigin-Name: ed715b47c5f7657fbf901805981867898054b14d
2010-04-27 11:49:27 +00:00
dan e106de6317 Run trans.test and avtrans.test as part of the "wal" permutation.
FossilOrigin-Name: c8893310510148f7e71ede5691606b6fc1c3df4d
2010-04-27 06:49:34 +00:00
dan 31f98fc8e4 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
2010-04-27 05:42:32 +00:00
drh 29d4beccc0 Merge in recent changes from the trunk
FossilOrigin-Name: 7a0ac682c3bffcb345321fe97434563350ac90f9
2010-04-27 01:56:21 +00:00
drh 8c6f666b26 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
2010-04-26 19:17:26 +00:00
dan e180c296ea Do not attempt to set journal_mode=wal on :memory: or temp file databases.
FossilOrigin-Name: 30d0134454734fd9335896372c30a903e9adcc64
2010-04-26 17:42:56 +00:00
drh 93791ea0ba Change the default_cache_size pragma to always store a positive value.
FossilOrigin-Name: 36fb2cae75b5dfe1fe818895f03c0b4f4190a722
2010-04-26 17:36:35 +00:00
drh c6d2b4a365 Identify the SQLite version meta-value entry in the db-header output of
showdb.

FossilOrigin-Name: 245d934b72cbc6e897193e7892195b6561995939
2010-04-26 17:30:52 +00:00
dan 4cd78b4d89 Fixes for problems with small caches and SAVEPOINT rollback in WAL mode.
FossilOrigin-Name: 6a944f028d4a070bef29e1fbc6fbef481ebcd34c
2010-04-26 16:57:10 +00:00
drh 7ecc14761e Further enhancements to the showdb utility: A page number followed by "b"
causes a btree decoding to occur on the page.

FossilOrigin-Name: 2ff824e58ce8b8f605c809ac960dcbfc51c30e30
2010-04-26 16:47:12 +00:00
drh 562cedb185 Enhancements to the showdb.c utility program. Automatically detect the
page size and adjust the display accordingly.  Add the "dbheader" display
option.

FossilOrigin-Name: 23eb408b5d08b89b41aaf245a7be8e235f30af8a
2010-04-26 15:44:07 +00:00
dan 71cb518fca Add the "wal" permutation to run existing test files savepoint.test and savepoint2.test in WAL mode.
FossilOrigin-Name: 205e5d8ac08f7d7853427b4cd235fca125155d2d
2010-04-26 12:39:03 +00:00
dan cd11fb28c3 Add mutexes to fix a race condition in wal.c. This isn't a very good fix.
FossilOrigin-Name: 3d159939cc2beb18c4ca0c8e9a99a75d4107e6e4
2010-04-26 10:40:52 +00:00
drh c438efd68a Change the names of the log.c and log.h source files to wal.c and wal.h.
FossilOrigin-Name: 56fe5d7624f840417152bcc63efbe21a5f557920
2010-04-26 00:19:45 +00:00
drh f2424c521b Begin moving WAL-specific I/O into the VFS. This checkin contains VFS
infrastructure but it is untested and is not yet hooked up to the WAL.
The version number is bumped to 3.7.0 because of the VFS extension.

FossilOrigin-Name: f5e615c28c7035a7e6d896790b51cf9bc7371d5f
2010-04-26 00:04:55 +00:00
drh a4741840f6 Remove an unreachable branch from the function initialization logic.
FossilOrigin-Name: 064d3ddd6199b7b049b1706974e4295f78fb5ab9
2010-04-25 20:58:37 +00:00
dan 56d95913eb Add comment explaining checksum mechanism.
FossilOrigin-Name: 3e9ef5153ebf0543ad0f75a7561f73d22171da53
2010-04-24 19:07:29 +00:00
dan 74d6cd887f Fix bugs in WAL mode rollback.
FossilOrigin-Name: 31215969f59be536fe87431bb9fbfa7d13027e35
2010-04-24 18:44:05 +00:00
dan 9de7943783 Merge with [0291ed974d].
Merge with [0291ed974d].
Merge with [0291ed974d].

FossilOrigin-Name: a352f6285e33a806fbe4475e720e763fdc5bb47d
2010-04-24 14:33:08 +00:00
drh 545f587fc8 When commands such as ALTER TABLE and VACUUM use SQL internally, make sure
they use only the built-in functions and not application-defined overrides
for those functions.

FossilOrigin-Name: 0291ed974d5bf1e344e2c38422530cc961b897da
2010-04-24 14:02:59 +00:00
dan 4f08d4b848 Merge with [e79dac3c2f].
FossilOrigin-Name: 1e793d3a6d46ec5d744e077b10362e7cfa118eef
2010-04-24 04:53:15 +00:00
dan ff207012e6 Reserve some space at the start of the log-summary file to apply locks to.
FossilOrigin-Name: a031aa1fa01f062b087154833738f011f7bc4eb5
2010-04-24 04:49:15 +00:00
dan 3306c4a945 Fixes and tests for backup of a WAL database.
FossilOrigin-Name: 480d12db4c0ebcc37598f7620d39193875eab15b
2010-04-23 19:15:00 +00:00
shaneh 9a6e897328 Merge of notify.c changes from experimental.
Reset stored blocking connection when registered unlock_notify callback is cleared.

FossilOrigin-Name: e79dac3c2f723ed7cc62fcef468f53952711f242
2010-04-23 14:29:04 +00:00
dan d5c99c3939 Add very simple test cases for backup and VACUUM of WAL databases. More to come.
FossilOrigin-Name: 1077d8130b8ed5716ad73f78382270909d347963
2010-04-23 11:44:40 +00:00
dan ce4f05f374 Create a version of the log checksummer that works on big-endian platforms. Remove the 512KB size limit on the log-summary.
FossilOrigin-Name: 5d6d4423d1def39bd2424703120aa985085c3f8e
2010-04-22 19:14:13 +00:00
dan ede6eb8d1d Further tests and changes related to switching between WAL and rollback modes.
FossilOrigin-Name: 1236318477787a612f02cc98caf2931bd2e99d94
2010-04-22 06:27:04 +00:00
dan b978002743 Tests for (and changes to) the code to switch between WAL and rollback modes.
FossilOrigin-Name: 9f4f933f2c6596064fcfc7fb5add87e8c5b57448
2010-04-21 18:37:57 +00:00
dan a470aeb4ac If, after obtaining a SHARED lock, there exists a *-wal file in the file-system, use WAL mode. This is necessary to recover from a crash that damages the first page of the database file.
FossilOrigin-Name: 33cabf271b8f4dda508a610bf59964273fe2cb84
2010-04-21 11:43:38 +00:00
dan 28e5386f79 Minor changes to test cases to account for the fact that databases with read/write versions of 2 are now understood.
FossilOrigin-Name: 278ed41e1d4bbff9544cb2cf4cf52dbbcf0c17df
2010-04-21 06:19:12 +00:00
dan e04dc88be5 Use the read and write version fields of the database header to mark a database as operating in wal-mode.
FossilOrigin-Name: 96bef18c1411c3e0348295886f105e1646c46320
2010-04-20 18:53:15 +00:00
dan 8d22a17411 Add the sqlite3_log_hook() interface for scheduling checkpoints.
FossilOrigin-Name: 9bda601455705475075e33bfa85687bce34b15ff
2010-04-19 18:03:51 +00:00
dan 54934f4689 Add some comments regarding file-locks to log.c.
FossilOrigin-Name: 9d51c3b754f0b94fea5ef3d669ad583b93b2b024
2010-04-17 18:50:27 +00:00
dan c511878955 Do not sync any files in wal mode if "PRAGMA synchronous=off" is set. If files are synced, pass either SQLITE_SYNC_FULL or SQLITE_SYNC_NORMAL to the xSync() callback as configured by "PRAGMA fullfsync".
FossilOrigin-Name: 0ae91b0008b242a47385fc1f295c6b645483ee22
2010-04-17 17:34:41 +00:00
drh 335c0faabd It is possible for sqlite3.pUnlockConnection to be non-NULL when
sqlite3.pBlockingConnection is NULL, as the notify1.test script
demonstrates.

FossilOrigin-Name: 95ff76ef67d6189f54375973fa485d6eb464b029
2010-04-17 16:10:19 +00:00
dan dea0a85091 Merge with trunk commit [3e646e3f4c].
FossilOrigin-Name: 43463970f5885fb116588695146f2a56cb22804a
2010-04-17 15:45:35 +00:00
dan 6703239d2f In synchronous=normal mode, do not sync the log after every transaction. In synchronous=full mode, sync the log and add any extra frames required to avoid blast-radius related problems after each transaction.
FossilOrigin-Name: 9bc9b6847303d0324543a9ded8dd0473490122d8
2010-04-17 15:42:43 +00:00
drh 3674bfd1b6 Change sqlite3_step() so that it automatically calls sqlite3_reset() instead
of returning SQLITE_MISUSE when invoked on a prepared statement that
previously returned any value other than SQLITE_ROW.

FossilOrigin-Name: 3e646e3f4cd0ca288e444561e951cecfdaee2ab5
2010-04-17 12:53:19 +00:00