1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Add experimental command "PRAGMA wal_blocking_checkpoint", which uses the busy-handler to block until all readers have finished in order to ensure the next writer will be able to wrap around to the start of the log file.

FossilOrigin-Name: 7e3fc2c833a5baa08820c499867b6902bdc2ed5a
This commit is contained in:
dan
2010-11-16 18:56:51 +00:00
parent 95aa47b10a
commit a58f26f93f
14 changed files with 256 additions and 67 deletions

View File

@ -18,7 +18,9 @@ proc wal_file_size {nFrame pgsz} {
}
proc wal_frame_count {zFile pgsz} {
if {[file exists $zFile]==0} { return 0 }
set f [file size $zFile]
if {$f < 32} { return 0 }
expr {($f - 32) / ($pgsz+24)}
}