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

Have calls to the xFilter() method of rtree virtual tables ensure that cursor is initialized before proceeding. Fix for [d2889096e7bdeac].

FossilOrigin-Name: 8cc41b0bf365af47c2061ffe44c86018945dd239
This commit is contained in:
dan
2014-07-29 11:54:18 +00:00
parent e6bc1ef68f
commit 57ff60b19b
4 changed files with 36 additions and 10 deletions

View File

@ -1533,9 +1533,13 @@ static int rtreeFilter(
rtreeReference(pRtree);
/* Reset the cursor to the same state as rtreeOpen() leaves it in. */
freeCursorConstraints(pCsr);
pCsr->iStrategy = idxNum;
sqlite3_free(pCsr->aPoint);
memset(pCsr, 0, sizeof(RtreeCursor));
pCsr->base.pVtab = (sqlite3_vtab*)pRtree;
pCsr->iStrategy = idxNum;
if( idxNum==1 ){
/* Special case - lookup by rowid. */
RtreeNode *pLeaf; /* Leaf on which the required cell resides */