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

Add a version number to the wal-index header. If SQLite encounters a version number in either the wal or wal-index files that it does not understand, the operation is abandoned and SQLITE_CANTOPEN returned.

FossilOrigin-Name: 8d0f8a7f70d6fb42369411a934b30f8c8ca8322f
This commit is contained in:
dan
2010-06-23 15:55:43 +00:00
parent b316cb22de
commit 10f5a50e57
13 changed files with 324 additions and 152 deletions

View File

@ -556,6 +556,10 @@ do_execsql_test pager1.4.5.2 {
# journal. Check that the first record in the transaction is
# played back, but not the second.
#
# pager1-4.5.6: Restore the file-system. Try to open the database with a
# readonly connection. This should fail, as a read-only
# connection cannot roll back the database file.
#
faultsim_restore_and_reopen
do_execsql_test pager1.4.5.3 {
SELECT * FROM t1;
@ -574,6 +578,14 @@ do_execsql_test pager1.4.5.5 {
SELECT * FROM t2;
} {I II III IV 3 4}
faultsim_restore_and_reopen
db close
sqlite3 db test.db -readonly 1
do_catchsql_test pager1.4.5.6 {
SELECT * FROM t1;
SELECT * FROM t2;
} {1 {disk I/O error}}
db close
tv delete