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

TCL tests now all pass.

FossilOrigin-Name: f864baccd3fe0ee939ac1ec20069792f649cddc0
This commit is contained in:
drh
2014-04-16 17:15:14 +00:00
parent ab908cfcb4
commit 933a5ff2d4
4 changed files with 23 additions and 19 deletions

View File

@ -1239,7 +1239,7 @@ static void traceQueue(RtreeCursor *pCur, const char *zPrefix){
*/
static void rtreeSearchPointPop(RtreeCursor *p){
int i, j, k, n;
i = p->bPoint;
i = 1 - p->bPoint;
assert( i==0 || i==1 );
if( p->aNode[i] ){
nodeRelease(RTREE_OF_CURSOR(p), p->aNode[i]);
@ -1345,7 +1345,7 @@ static int rtreeNext(sqlite3_vtab_cursor *pVtabCursor){
/* Move to the next entry that matches the configured constraints. */
RTREE_QUEUE_TRACE(pCsr, "POP-Nx:");
rtreeSearchPointPop(pCsr);
rtreeStepToLeaf(pCsr);
rc = rtreeStepToLeaf(pCsr);
return rc;
}
@ -1490,16 +1490,20 @@ static int rtreeFilter(
RtreeNode *pLeaf; /* Leaf on which the required cell resides */
RtreeSearchPoint *p; /* Search point for the the leaf */
i64 iRowid = sqlite3_value_int64(argv[0]);
p = rtreeSearchPointNew(pCsr, 0.0, 0);
if( p==0 ) return SQLITE_NOMEM;
rc = findLeafNode(pRtree, iRowid, &pLeaf, &p->id);
pCsr->aNode[0] = pLeaf;
p->eWithin = PARTLY_WITHIN;
if( rc==SQLITE_OK ){
i64 iNode = 0;
rc = findLeafNode(pRtree, iRowid, &pLeaf, &iNode);
if( rc==SQLITE_OK && pLeaf!=0 ){
p = rtreeSearchPointNew(pCsr, 0.0, 0);
assert( p!=0 ); /* Always returns pCsr->sPoint */
pCsr->aNode[0] = pLeaf;
p->id = iNode;
p->eWithin = PARTLY_WITHIN;
rc = nodeRowidIndex(pRtree, pLeaf, iRowid, &iCell);
p->iCell = iCell;
RTREE_QUEUE_TRACE(pCsr, "PUSH-F1:");
}else{
pCsr->atEOF = 1;
}
p->iCell = iCell;
RTREE_QUEUE_TRACE(pCsr, "PUSH-F1:");
}else{
/* Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array
** with the configured constraints.

View File

@ -41,7 +41,7 @@ ifcapable rtree_int_only {
INSERT INTO t1 VALUES(9223372036854775807, 150, 150, 400, 400);
SELECT rtreenode(2, data) FROM t1_node;
}
} {{{1073741824 0.000000 0.000000 100.000000 100.000000} {2147483646 0.000000 0.000000 200.000000 200.000000} {4294967296 0.000000 0.000000 300.000000 300.000000} {8589934592 20.000000 20.000000 150.000000 150.000000} {9223372036854775807 150.000000 150.000000 400.000000 400.000000}}}
} {{{1073741824 0 0 100 100} {2147483646 0 0 200 200} {4294967296 0 0 300 300} {8589934592 20 20 150 150} {9223372036854775807 150 150 400 400}}}
}
finish_test