Commit Graph

2963 Commits

Author SHA1 Message Date
dan
8f6097c244 Add tests for handling errors returned by xShm VFS methods.
FossilOrigin-Name: fbbcacb137e8f5246b88ad09331236aaa1900f60
2010-05-06 07:43:58 +00:00
drh
5def0843f1 Change the behavior of the sqlite3_wal_hook() callback. It should now return
SQLITE_OK or an error code and the error code is propagated back up the 
stack.  If a checkpoint is desired, the callback should invoke
sqlite3_wal_callback() itself.

FossilOrigin-Name: 1b14195e05fe5551992a39246ec3bcf6a33bbfac
2010-05-05 20:00:25 +00:00
dan
c7991bdf29 Test the handling of errors returned by the xShmXXX() APIs.
FossilOrigin-Name: 72663123d6be2b194cad7a6057d0f20dd0d9fe05
2010-05-05 19:04:59 +00:00
dan
2cee6abf8e Add a test case to verify that log files containing pages that are not a power-of-two bytes in size are handled correctly.
FossilOrigin-Name: c2bf693f933313991d85394009e79a7903037a18
2010-05-04 15:20:45 +00:00
dan
b6e099a973 Fix problems with recovering wal files that use a page-size other than the default.
FossilOrigin-Name: 1a391f3c55dc9d4266552fa26d2a9839c6bafce4
2010-05-04 14:47:39 +00:00
dan
ef37802545 Fix a typo in walfault.test.
FossilOrigin-Name: 232dbe8ecec16485be5c5995fdf7a0ed951c2097
2010-05-04 11:06:03 +00:00
dan
8d6ad1cc2c Test that the correct number of padding frames are appended to the log file after committing a transaction in synchronous=FULL mode.
FossilOrigin-Name: a60104aa7e38e7d9f2ff2eae02687dc9c5dd5d77
2010-05-04 10:36:20 +00:00
drh
d0b2677b78 Unset some global TCL variables prior to use in test where prior tests can
have those same variables set to an array value.

FossilOrigin-Name: 49bef00e5cda600ceb964148bf745de4aff1ab62
2010-05-03 19:20:46 +00:00
dan
5e9e482fe0 Add a test to simulate an OOM during log recovery to walfault.test.
FossilOrigin-Name: 7ed85e87dd206083310ba28afab4389885f61dac
2010-05-03 18:01:21 +00:00
drh
529b18706d Clear global variable "seconds" before use in walthread.test.
FossilOrigin-Name: a35551a5305b5160b0eb511da7f8e6fb351ef271
2010-05-03 17:24:45 +00:00
dan
76ed3bc044 Fix a couple of errors in WAL code that can occur in an OOM situation.
FossilOrigin-Name: 9d3f3736be42ef8ab48b099d4712e08dfca97873
2010-05-03 17:18:24 +00:00
dan
af0cfd366a Have sqlite3_wal_checkpoint() handle a zero-length string in the same way as a NULL pointer. Fix "PRAGMA wal_checkpoint" so that it checkpoints all attached databases.
FossilOrigin-Name: 7fecd21f45b9ce773ffbcef6c84066474e8cd01c
2010-05-03 15:58:50 +00:00
dan
87c1fe1b69 Have sqlite3_wal_checkpoint() populate the database handle error message and error code (as returned by sqlite3_errmsg() and sqlite3_errcode()).
FossilOrigin-Name: ff234cf574c7ae384ab1ebc79b2171ef0541bc91
2010-05-03 12:14:15 +00:00
dan
5a299f9134 Add the "PRAGMA wal_autocheckpoint" command. Rename "PRAGMA checkpoint" to "PRAGMA wal_checkpoint".
FossilOrigin-Name: 714e5947264571386f966aa8fcdd5607b5832238
2010-05-03 11:05:08 +00:00
dan
586b9c8a94 Add the sqlite3_wal_checkpoint() and sqlite3_wal_autocheckpoint() APIs.
FossilOrigin-Name: 9803196dec85e3aa4105cc477e9cfe98d370e486
2010-05-03 08:04:49 +00:00
dan
5cf53537a8 Support compile-time option SQLITE_OMIT_WAL, for building without WAL support.
FossilOrigin-Name: 9b230c43dfa112e3e1589f9775926807bd36b36e
2010-05-01 16:40:20 +00:00
drh
057f1ecddb Fix a typo in the walmode.test test script introducted yesterday.
FossilOrigin-Name: dcabc90ca588281fa7a290972ec8af6816932489
2010-05-01 11:33:13 +00:00
dan
bb16ff75dd Add test case demonstrating deadlock during recovery of very large log files. No fix yet.
FossilOrigin-Name: 63ea318eb19d264667909c70185b8a5cdc4454c0
2010-05-01 08:30:34 +00:00
drh
d80b233850 Do not allow journal_mode=WAL if the underlying VFS does not support xShmOpen.
FossilOrigin-Name: d1fcccecdc8e9ac5d0d022914e51c545f4e1b04f
2010-05-01 00:59:37 +00:00
drh
27d52b2b19 Merge in changes from the trunk.
FossilOrigin-Name: 76bf0eee1fd4003a3f1c39922f8f059611d41dd0
2010-04-30 22:28:06 +00:00
drh
be837bddad Avoid assertion faults in queries using indices with redundant columns.
Ticket [3dbdcdb14e7f41].

FossilOrigin-Name: 946e06cd2a2cc209b0786b7e9d28c0746320d646
2010-04-30 21:03:24 +00:00
drh
1b48aa49a4 Remove some obsolete debugging parameters.
FossilOrigin-Name: a012aed498bf41a5f6f3006182b0c4c2ab0fe1bb
2010-04-30 17:28:35 +00:00
dan
5047af405b Merge latest bugfix into wal branch.
FossilOrigin-Name: 265e66e6984c32999bf93981e3b1d19887dfe599
2010-04-30 06:02:30 +00:00
dan
6908343c65 Zero the "immediate FK constraint counter" associated with a statement object when sqlite3_reset() is called. Fix for [c39ff61c43].
FossilOrigin-Name: f660be615a0c1f4641782a83744533f5d3119218
2010-04-29 22:57:56 +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
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
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
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
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
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
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
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
3306c4a945 Fixes and tests for backup of a WAL database.
FossilOrigin-Name: 480d12db4c0ebcc37598f7620d39193875eab15b
2010-04-23 19:15:00 +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