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

Add another test case to cover a previously uncovered branch in the RBU module.

FossilOrigin-Name: 30392985612c51d4583a905f8fe766f08cd31b86d0e30a977adc6a6705649e00
This commit is contained in:
dan
2019-05-08 21:14:48 +00:00
parent 97afa309d7
commit ad5536fca1
4 changed files with 38 additions and 10 deletions

View File

@ -43,6 +43,7 @@ do_test 1.1 {
INSERT INTO data_ VALUES(3, 3, 3, 0);
INSERT INTO dat VALUES(3, 3, 3, 0);
}
rbu close
} {}
do_test 1.2 {
@ -50,4 +51,30 @@ do_test 1.2 {
db eval { SELECT * FROM x1 }
} {1 1 1 2 2 2}
do_test 1.3 {
db eval { DELETE FROM x1 }
sqlite3 rbu rbu.db
rbu eval { DELETE FROM rbu_state }
rbu close
step_rbu test.db rbu.db
db eval { SELECT * FROM x1 }
} {1 1 1 2 2 2}
do_test 1.4 {
db eval { DELETE FROM x1 }
sqlite3 rbu rbu.db
rbu eval { DELETE FROM rbu_state }
rbu close
sqlite3rbu rbu test.db rbu.db
rbu step
rbu step
rbu close
forcecopy test.db-oal test.db-wal
sqlite3rbu rbu test.db rbu.db
rbu step
list [catch { rbu close } msg] $msg
} {1 {SQLITE_ERROR - cannot update wal mode database}}
finish_test