1
0
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:
drh
2011-01-12 17:56:26 +00:00
parent da56b15e95
commit efd95a7aca
6 changed files with 22 additions and 12 deletions

View File

@@ -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;
}