mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Do not raise an SQLITE_CORRUPT error in Recoverymode
if the database size in the header is larger than the physical file size. This facilitates recovery of a database in which the database size field has been corrupted. FossilOrigin-Name: 114640d920e16c85de90b19d53c485135875de5b
This commit is contained in:
@@ -2386,7 +2386,7 @@ static int lockBtree(BtShared *pBt){
|
||||
pageSize-usableSize);
|
||||
return rc;
|
||||
}
|
||||
if( nPageHeader>nPageFile ){
|
||||
if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPageHeader>nPageFile ){
|
||||
rc = SQLITE_CORRUPT_BKPT;
|
||||
goto page1_init_failed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user