Ensure that when the source of a backup is a database that is zero bytes in size, the final destination database consists of at least one page. Truncating it to zero bytes is equivalent to zeroing the schema cookie and change counter, which can cause problems for existing clients.

FossilOrigin-Name: af5c9ee4a453f71c03f24ad08824ced6c1b97afb
This commit is contained in:
dan
2012-10-13 19:58:11 +00:00
parent 026262b4d8
commit b483eba051
7 changed files with 148 additions and 14 deletions
+1 -1
View File
@@ -1365,7 +1365,7 @@ do_test pager1-9.4.1 {
} {SQLITE_DONE SQLITE_OK}
do_test pager1-9.4.2 {
list [file size test.db2] [file size test.db]
} {0 0}
} {1024 0}
db2 close
#-------------------------------------------------------------------------