1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Do not report corruption if the the db size header field is greater than the file size on disk unless the two change-counter header fields are identical. Fix for ticket [89b8c9ac54].

FossilOrigin-Name: 00c4596f0b270120848ab8d06dcdec7813a9a315
This commit is contained in:
dan
2011-02-09 18:19:20 +00:00
parent d01f9cb2b4
commit ecac670a8b
6 changed files with 32 additions and 12 deletions

View File

@@ -2381,7 +2381,7 @@ static int lockBtree(BtShared *pBt){
pageSize-usableSize);
return rc;
}
if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPageHeader>nPageFile ){
if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPage>nPageFile ){
rc = SQLITE_CORRUPT_BKPT;
goto page1_init_failed;
}