From: drh Date: Mon, 21 Apr 2014 15:53:45 +0000 (+0000) Subject: Be sure to initialize the sqlite3_rtree_query_info.iRowid field for the X-Git-Tag: version-3.13.0~148^2~145^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74188329ce6084e428e3fa9ddc9d1c5419819718;p=thirdparty%2Fsqlite.git Be sure to initialize the sqlite3_rtree_query_info.iRowid field for the leaves of the R-Tree when doing a query callback search. FossilOrigin-Name: 4394693882c04c19ebe87ef7547c57e679554397 --- diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c index 4f843a3d46..a471514c53 100644 --- a/ext/rtree/rtree.c +++ b/ext/rtree/rtree.c @@ -962,6 +962,9 @@ static int rtreeCallbackConstraint( assert( pConstraint->op==RTREE_MATCH || pConstraint->op==RTREE_QUERY ); assert( nCoord==2 || nCoord==4 || nCoord==6 || nCoord==8 || nCoord==10 ); + if( pConstraint->op==RTREE_MATCH && pSearch->iLevel==1 ){ + pInfo->iRowid = readInt64(pCellData); + } pCellData += 8; for(i=0; i