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:
@ -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)}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user