diff options
Diffstat (limited to 'src/vdbe.c')
-rw-r--r-- | src/vdbe.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index ac3e20868..d65995be0 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -43,7 +43,7 @@ ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** -** $Id: vdbe.c,v 1.760 2008/07/10 00:32:42 drh Exp $ +** $Id: vdbe.c,v 1.761 2008/07/11 21:02:54 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -1670,7 +1670,6 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ int flags; int res; char affinity; - Mem x1, x3; flags = pIn1->flags|pIn3->flags; @@ -3808,6 +3807,7 @@ case OP_Prev: /* jump */ case OP_Next: { /* jump */ Cursor *pC; BtCursor *pCrsr; + int res; CHECK_FOR_INTERRUPT; assert( pOp->p1>=0 && pOp->p1<p->nCursor ); @@ -3817,19 +3817,17 @@ case OP_Next: { /* jump */ } pCrsr = pC->pCursor; assert( pCrsr ); - if( pC->nullRow==0 ){ - int res = 1; - assert( pC->deferredMoveto==0 ); - rc = pOp->opcode==OP_Next ? sqlite3BtreeNext(pCrsr, &res) : - sqlite3BtreePrevious(pCrsr, &res); - pC->nullRow = res; - pC->cacheStatus = CACHE_STALE; - if( res==0 ){ - pc = pOp->p2 - 1; + res = 1; + assert( pC->deferredMoveto==0 ); + rc = pOp->opcode==OP_Next ? sqlite3BtreeNext(pCrsr, &res) : + sqlite3BtreePrevious(pCrsr, &res); + pC->nullRow = res; + pC->cacheStatus = CACHE_STALE; + if( res==0 ){ + pc = pOp->p2 - 1; #ifdef SQLITE_TEST - sqlite3_search_count++; + sqlite3_search_count++; #endif - } } pC->rowidIsValid = 0; break; |