mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Improved detection of a corrupt database schema. Fix for a problem discovered
by dbsqlfuzz. FossilOrigin-Name: 30735432bc33cb953b6d7d2a2de9eb378f9740e0e663f50c727c3f138cd43a2b
This commit is contained in:
@@ -8772,7 +8772,11 @@ int sqlite3BtreeInsert(
|
||||
assert( pPage->intKey || pX->nKey>=0 );
|
||||
assert( pPage->leaf || !pPage->intKey );
|
||||
if( pPage->nFree<0 ){
|
||||
rc = btreeComputeFreeSpace(pPage);
|
||||
if( pCur->eState>CURSOR_INVALID ){
|
||||
rc = SQLITE_CORRUPT_BKPT;
|
||||
}else{
|
||||
rc = btreeComputeFreeSpace(pPage);
|
||||
}
|
||||
if( rc ) return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user