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

The R-tree module should not assume that its shadow tables are consistent.

If a problem is found in a shadow table, return SQLITE_CORRUPT.

FossilOrigin-Name: 7f2f71cc9e3c39093f09231f448576cff6afb5fe
This commit is contained in:
drh
2010-08-24 01:49:47 +00:00
parent 507f94d763
commit ee2c813b72
3 changed files with 15 additions and 12 deletions

View File

@ -438,8 +438,11 @@ nodeAcquire(
pRtree->iDepth = readInt16(pNode->zData);
}
assert( (rc==SQLITE_OK && pNode) || (pNode==0 && rc!=SQLITE_OK) );
nodeHashInsert(pRtree, pNode);
if( pNode!=0 ){
nodeHashInsert(pRtree, pNode);
}else if( rc==SQLITE_OK ){
rc = SQLITE_CORRUPT;
}
return rc;
}