1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Early detection of a corrupt R-Tree in the R-Tree search algorithm.

FossilOrigin-Name: 2bf5a4c16457562dc942bcc6ec06d9b4e795ef3ea8e31550e18857bbebd08a76
This commit is contained in:
drh
2019-07-20 18:00:46 +00:00
parent bcb0e64c82
commit 7fc296aa66
3 changed files with 13 additions and 7 deletions

View File

@ -1595,6 +1595,12 @@ static int rtreeStepToLeaf(RtreeCursor *pCur){
x.iLevel = p->iLevel - 1;
if( x.iLevel ){
x.id = readInt64(pCellData);
for(ii=0; ii<pCur->nPoint; ii++){
if( pCur->aPoint[ii].id==x.id ){
RTREE_IS_CORRUPT(pRtree);
return SQLITE_CORRUPT_VTAB;
}
}
x.iCell = 0;
}else{
x.id = p->id;