mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Fix an RBU problem causing spurious SQLITE_CONSTRAINT errors when restarting
an RBU update in which more than one source table writes to a single target database table. FossilOrigin-Name: 564ae8297d417ba4b7978e430d41f125007177673163f6ed9adc3a3974f73d24
This commit is contained in:
@ -70,6 +70,22 @@ proc step_rbu {target rbu} {
|
||||
set rc
|
||||
}
|
||||
|
||||
proc step_rbu_legacy {target rbu} {
|
||||
while 1 {
|
||||
sqlite3rbu rbu $target $rbu
|
||||
set state [rbu state]
|
||||
check_prestep_state $target $state
|
||||
set rc [rbu step]
|
||||
check_poststep_state $rc $target $state
|
||||
rbu close
|
||||
if {$rc != "SQLITE_OK"} break
|
||||
sqlite3 tmpdb $rbu
|
||||
tmpdb eval { DELETE FROM rbu_state WHERE k==10 }
|
||||
tmpdb close
|
||||
}
|
||||
set rc
|
||||
}
|
||||
|
||||
proc do_rbu_vacuum_test {tn step} {
|
||||
forcedelete state.db
|
||||
uplevel [list do_test $tn.1 {
|
||||
|
Reference in New Issue
Block a user