mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Improved corrupt database detection in balance_nonroot().
FossilOrigin-Name: 5d54d9fd406381383afdf10612bfd590afc4142215d9bca09e227e3aa5baa102
This commit is contained in:
@@ -7975,6 +7975,9 @@ static int balance_nonroot(
|
||||
apOld[i] = 0;
|
||||
rc = sqlite3PagerWrite(pNew->pDbPage);
|
||||
nNew++;
|
||||
if( sqlite3PagerPageRefcount(pNew->pDbPage)!=1+(i==(iParentIdx-nxDiv)) ){
|
||||
rc = SQLITE_CORRUPT_BKPT;
|
||||
}
|
||||
if( rc ) goto balance_cleanup;
|
||||
}else{
|
||||
assert( i>0 );
|
||||
|
Reference in New Issue
Block a user