diff options
author | drh <drh@noemail.net> | 2013-11-20 02:53:58 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-11-20 02:53:58 +0000 |
commit | 79353dbd5fbb4ab914159b596b50ac62f2aea2e5 (patch) | |
tree | 1f9d2ef28f3af5c4ddd92744a7cce934ff8ea39d /src | |
parent | 83b301b0af0831b7f65f4608e1ab00228c74defa (diff) | |
download | sqlite-79353dbd5fbb4ab914159b596b50ac62f2aea2e5.tar.gz sqlite-79353dbd5fbb4ab914159b596b50ac62f2aea2e5.zip |
Simplifications to the VdbeCursor object.
FossilOrigin-Name: 5562cd343d8f69242e06a51a7f1aef7ee7d78eec
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.c | 2 | ||||
-rw-r--r-- | src/vdbe.c | 1 | ||||
-rw-r--r-- | src/vdbeInt.h | 8 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/expr.c b/src/expr.c index 048146b37..ce541ed8a 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1193,7 +1193,7 @@ static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){ /* Consider functions to be constant if all their arguments are constant ** and pWalker->u.i==2 */ case TK_FUNCTION: - if( pWalker->u.i==2 ) return 0; + if( pWalker->u.i==2 ) return WRC_Continue; /* Fall through */ case TK_ID: case TK_COLUMN: diff --git a/src/vdbe.c b/src/vdbe.c index 21d0dfaab..bee9a4efe 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -4504,7 +4504,6 @@ case OP_Rewind: { /* jump */ pCrsr = pC->pCursor; assert( pCrsr ); rc = sqlite3BtreeFirst(pCrsr, &res); - pC->atFirst = res==0 ?1:0; pC->deferredMoveto = 0; pC->cacheStatus = CACHE_STALE; pC->rowidIsValid = 0; diff --git a/src/vdbeInt.h b/src/vdbeInt.h index 4f63189f5..d5cad65ec 100644 --- a/src/vdbeInt.h +++ b/src/vdbeInt.h @@ -61,12 +61,10 @@ struct VdbeCursor { BtCursor *pCursor; /* The cursor structure of the backend */ Btree *pBt; /* Separate file holding temporary table */ KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */ - int iDb; /* Index of cursor database in db->aDb[] (or -1) */ int pseudoTableReg; /* Register holding pseudotable content. */ - int nField; /* Number of fields in the header */ - Bool zeroed; /* True if zeroed out and ready for reuse */ + i16 nField; /* Number of fields in the header */ + i8 iDb; /* Index of cursor database in db->aDb[] (or -1) */ Bool rowidIsValid; /* True if lastRowid is valid */ - Bool atFirst; /* True if pointing to first entry */ Bool useRandomRowid; /* Generate new record numbers semi-randomly */ Bool nullRow; /* True if pointing to a row with no data */ Bool deferredMoveto; /* A call to sqlite3BtreeMoveto() is needed */ @@ -79,7 +77,7 @@ struct VdbeCursor { const sqlite3_module *pModule; /* Module for cursor pVtabCursor */ i64 seqCount; /* Sequence counter */ i64 movetoTarget; /* Argument to the deferred sqlite3BtreeMoveto() */ - i64 lastRowid; /* Last rowid from a Next or NextIdx operation */ + i64 lastRowid; /* Rowid being deleted by OP_Delete */ VdbeSorter *pSorter; /* Sorter object for OP_SorterOpen cursors */ /* Result of last sqlite3BtreeMoveto() done by an OP_NotExists */ |