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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user