Improved database corruption detection in the dbstat virtual table.

FossilOrigin-Name: fc5ecc88f8a0855ba90039177ee284721b2035e4de56a1024e323216f011f0af
This commit is contained in:
drh
2019-01-09 11:19:41 +00:00
parent 3e08ba4521
commit 8eaf565feb
3 changed files with 11 additions and 7 deletions
+4
View File
@@ -531,6 +531,10 @@ statNextRestart:
goto statNextRestart; /* Tail recursion */
}
pCsr->iPage++;
if( pCsr->iPage>=ArraySize(pCsr->aPage) ){
statResetCsr(pCsr);
return SQLITE_CORRUPT_BKPT;
}
assert( p==&pCsr->aPage[pCsr->iPage-1] );
if( p->iCell==p->nCell ){