1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Optimize some cases of restarting an RBU vacuum.

FossilOrigin-Name: cdc09867ed6522026ae7bfac1f59cd79b60fba6d07d49b99b030a501a7059ee4
This commit is contained in:
dan
2019-05-04 20:04:42 +00:00
parent 664d6d139e
commit c245855702
5 changed files with 142 additions and 24 deletions

View File

@ -89,16 +89,16 @@ proc step_rbu_legacy {target rbu} {
proc do_rbu_vacuum_test {tn step {statedb state.db}} {
forcedelete $statedb
if {$statedb=="" && $step==1} breakpoint
uplevel [list do_test $tn.1 [string map [list %state% $statedb] {
if {$step==0} { sqlite3rbu_vacuum rbu test.db {%state%}}
uplevel [list do_test $tn.1 [string map [list %state% $statedb %step% $step] {
if {%step%==0} { sqlite3rbu_vacuum rbu test.db {%state%}}
while 1 {
if {$step==1} { sqlite3rbu_vacuum rbu test.db {%state%}}
if {%step%==1} { sqlite3rbu_vacuum rbu test.db {%state%}}
set state [rbu state]
check_prestep_state test.db $state
set rc [rbu step]
check_poststep_state $rc test.db $state
if {$rc!="SQLITE_OK"} break
if {$step==1} { rbu close }
if {%step%==1} { rbu close }
}
rbu close
}] {SQLITE_DONE}]