drh
7721b23e0a
When sqlite3PagerPagecount() is called without any locks, always return
...
the physical file size, not the logical file size.
FossilOrigin-Name: 4016b422286587beda7323052d27821adb1fed73
2010-05-04 18:50:40 +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
5cf53537a8
Support compile-time option SQLITE_OMIT_WAL, for building without WAL support.
...
FossilOrigin-Name: 9b230c43dfa112e3e1589f9775926807bd36b36e
2010-05-01 16:40:20 +00:00
dan
4c97b53425
Fix a couple of assert() statements in os_unix.c and wal.c. Combine sqlite3WalIsDirty() with sqlite3WalUndo().
...
FossilOrigin-Name: a8f958be804ee05c4137b3cd110db344713af5f2
2010-04-30 09:52:17 +00:00
drh
7ed91f2344
Refactor wal.c to use the VFS. This check-in compiles and links and works
...
ok as long as you leave WAL turned off, but WAL does not work.
FossilOrigin-Name: 62db5fa3b61be885b2d94e9b9ce3877b2c588350
2010-04-29 22:34:07 +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
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
dan
74d6cd887f
Fix bugs in WAL mode rollback.
...
FossilOrigin-Name: 31215969f59be536fe87431bb9fbfa7d13027e35
2010-04-24 18:44:05 +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
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
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
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
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
dan
3de777fd8c
Enhancements to wal-mode locking scheme.
...
FossilOrigin-Name: 8549c286497f3d2cd118be1334fce00d6f8a26c4
2010-04-17 12:31:37 +00:00
dan
4a4b01dc1c
Fix bug in log recovery (last frame in log was being ignored). Also remove an incorrect assert statement.
...
FossilOrigin-Name: 67d2a89ec2d593a077eb19a6ea2b06cb1c2e9ba8
2010-04-16 11:30:18 +00:00
dan
4cc6fb6165
Allow writers to write dirty pages to the log mid-transaction in order to free memory.
...
FossilOrigin-Name: ecd828f96909895535d7dc744e5a8530e234e04d
2010-04-15 16:45:34 +00:00
dan
64d039e512
Add experimental locking scheme.
...
FossilOrigin-Name: 3f958e87c33d667d299b03ffdef58db5dc6363f4
2010-04-13 19:27:31 +00:00
drh
622194c0d2
Fix an uninitialized variable in readDbPage of pager.c.
...
FossilOrigin-Name: f4e1150fed2c520c7c52612cb1019429d78dc32a
2010-04-13 15:30:53 +00:00
dan
f05c86dd73
Remove old code to interpret an argument (no longer used) to "PRAGMA checkpoint".
...
FossilOrigin-Name: 27dc5977c19e717afd65d3805557e38dec7bedcb
2010-04-13 11:56:03 +00:00
dan
9281bf2a9f
Fix a pager bug introduced by the wal code.
...
FossilOrigin-Name: 4a0b29dc5e573a5d696ede17db5d7acf8d23aa98
2010-04-13 11:18:40 +00:00
dan
7c24610e64
Import experimental write-ahead-logging code.
...
FossilOrigin-Name: 409d61baeb0a19d1700c973f16c8acef7b8506cd
2010-04-12 19:00:29 +00:00
dan
eada58aa49
Fix a problem where a process in exclusive mode could delete a hot-journal file without rolling it back from within sqlite3_close() or DETACH. This problem was introduced by the previous commit, it is not present in any releases.
...
FossilOrigin-Name: 51a613950824698687c0db83b7884db33d45f7f5
2010-04-12 17:08:44 +00:00
drh
91781bd72f
Fix issues and clarify the operation of pager_playback_one_page().
...
A block comment in pager.c identifies 13 invariants on the pager subsystem.
Ticket [9d68c883132c8].
FossilOrigin-Name: 0906597698b697ab2993a460f257e326cb58e475
2010-04-10 17:52:57 +00:00
drh
05f69dd388
Candidate fix for a pager bug associated with sqlite3PagerMovepage().
...
FossilOrigin-Name: 8c046eb6d16682d5e755624deb4f76f57350b9c9
2010-04-09 15:34:06 +00:00
drh
8d83c0fdd5
Silently abandon a rollback if the journal has been truncated.
...
FossilOrigin-Name: 7626f6c9ea04d1a5690dd11bb13e8c3c04e3b0f5
2010-04-03 13:08:09 +00:00
drh
34e2b837d5
Check for a failure in the call to sqlite3PagerPagecount() from within
...
sqlite3PagerWrite(). (Error discovered by valgrind.)
FossilOrigin-Name: d64d181c79aee3501be6f7eb8c11ab2cc9a8d63c
2010-04-02 13:25:22 +00:00
drh
cce75d3343
Pager changes for code coverage testing.
...
FossilOrigin-Name: b04a45ea9714e7a35372b5d6a58868b307d10502
2010-04-02 03:38:59 +00:00
drh
45b355dc4f
Do not journal the content of freelist leaf pages. This restores an
...
optimization that was accidently undone by check-in [12f7346c13] on
[2009-01-20].
FossilOrigin-Name: b1e7a1a677e1c2a6c2ab83a67070605465a3e495
2010-04-01 13:41:10 +00:00
drh
9afb1abe42
Remove a NEVER in sqlite3PagerPagecount() that can in fact be true.
...
FossilOrigin-Name: 8f00533782a0eae5613caaf86608384cb702fc51
2010-04-01 02:47:01 +00:00
drh
a792dc5c4a
Make sure an OOM error on sqlite3PagerPagecount() is detected and reported
...
out to the interface.
FossilOrigin-Name: 8aecf302a5aac66e43a8cc6c4e0d917f74e9e0de
2010-03-31 23:20:04 +00:00
drh
97b59a56d2
Increase test coverage following the introduction of the new
...
filesize-in-header logic.
FossilOrigin-Name: dbc2c3c0144d2c76aec04f80892302c532947dc8
2010-03-31 02:31:33 +00:00
drh
b1299158c7
Continuing refinements to the filesize-in-header enhancement.
...
FossilOrigin-Name: 79e22b95038c50b9b7f35e09262805ff6338b59b
2010-03-30 22:58:33 +00:00
drh
dd3cd977cc
Experimental changes that cause SQLite to use bytes 28..31 of the database
...
header to determine the database size, rather than using the actual database
size. This allows database space to be preallocated.
FossilOrigin-Name: b844ac6fcb72595a71e5c5283ec461309a87ba79
2010-03-27 17:12:36 +00:00
dan
bb23e7f91b
After a rollback that writes or truncates the database file, sync the database file before invalidating the journal contents.
...
FossilOrigin-Name: b21b911f233842357af9ccc14525bbd48a38edb1
2010-03-22 17:13:53 +00:00
drh
f92a4e35c5
Store the SQLite version number of the last writer in bits 96..99 of the header.
...
FossilOrigin-Name: 146d4f5d3459235d8b2d27a5d77beb7645f75185
2010-03-19 16:55:47 +00:00
drh
e9c2d34c5b
Make sure the in-journal boolean vector is cleared and released when ending
...
a transaction. This fixes an obscure problem with the previous check-in.
FossilOrigin-Name: 69d749d93d6565b848ce5c07f2738d144c6564bf
2010-03-19 16:52:53 +00:00
drh
ba726f4939
Do create, open, or initialize the rollback journal until something actually
...
needs to be written into the journal. That way, expensive filesystem
operations are avoided if the transaction ends up being a no-op.
FossilOrigin-Name: b78e58ae1570ab4d66a69db445a752c6456038a0
2010-03-19 15:48:13 +00:00
drh
ed37690afd
Store the database size in pages in bytes 28..31 of the header. Currently
...
this is for forensic use only, but it might be used in the future.
FossilOrigin-Name: 59f75bba028e1107ed41d447c27aef31a6656b68
2010-03-13 02:15:49 +00:00
drh
63da089314
Add the SQLITE_DBSTATUS_CACHE_SIZE verb for sqlite3_db_status(). The
...
highwater mark does not yet work on this verb.
FossilOrigin-Name: 418c6d8113bc337556b0d47acfd6a7d865d1121f
2010-03-10 21:42:07 +00:00
drh
3517324ddc
Add NEVER and assert macros and explanatory comments for unreachable
...
conditions.
FossilOrigin-Name: ffb6596e6c80e284c1542b03f2c7bbfce0bd87d9
2010-03-08 21:40:13 +00:00
drh
29391c5b49
Make sure the dbFileVers field in the Pager object is properly initialized
...
even if there is an I/O error while reading its content off of disk.
FossilOrigin-Name: 81ff698f62c8133818a3db1997ae7427705da23f
2010-03-05 20:17:45 +00:00
drh
9978c97ec5
Remove the obsolete sqlite3SafetyOn() mechanism. Add additional logging
...
output for CORRUPT, and CANTOPEN errors.
FossilOrigin-Name: 7c4cca6d1a23a6d1591b62f58c3716a944969947
2010-02-23 17:36:32 +00:00
drh
4ec84f35e2
Fix an assertion-fault/segfault problem that comes up when trying to
...
VACUUM an auto-vacuumed database with a large schema.
Ticket [da1151f97df244].
FossilOrigin-Name: 86d50ce57feb78440956192e37a03686ffa1e196
2010-02-22 23:17:42 +00:00
drh
5b47efa662
All the secure-delete setting to be changed at run-time using a pragma.
...
The SQLITE_SECURE_DELETE compile-time option determines the default setting.
FossilOrigin-Name: f72f8a870a0fc98a9f2b564ffafe7946bbce506e
2010-02-12 18:18:39 +00:00
shaneh
6885de360d
Avoid truncating non-in-memory sub-journals when releasing a savepoint for a small performance improvement.
...
FossilOrigin-Name: 27dc5b1c52eaa5f99cf44ee31204f62598fbf011
2010-02-05 16:28:00 +00:00
drh
3918795951
Make sure new pages are zeroed even when loading a freelist page using the
...
noContent option. This prevents a harmless valgrind warning.
FossilOrigin-Name: e47e213369a2652d7eb6bddd58617959e21ca82b
2010-01-05 13:40:35 +00:00