mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Remove the unused P5 flag from the OP_Rewind opcode.
FossilOrigin-Name: c2edbf3b8c643edcd5823eb907fd7531cf5be8a8b6a014fa1b123eb0ea3231cf
This commit is contained in:
10
src/vdbe.c
10
src/vdbe.c
@@ -5114,7 +5114,7 @@ case OP_Sort: { /* jump */
|
||||
p->aCounter[SQLITE_STMTSTATUS_SORT]++;
|
||||
/* Fall through into OP_Rewind */
|
||||
}
|
||||
/* Opcode: Rewind P1 P2 * * P5
|
||||
/* Opcode: Rewind P1 P2 * * *
|
||||
**
|
||||
** The next use of the Rowid or Column or Next instruction for P1
|
||||
** will refer to the first entry in the database table or index.
|
||||
@@ -5122,10 +5122,6 @@ case OP_Sort: { /* jump */
|
||||
** If the table or index is not empty, fall through to the following
|
||||
** instruction.
|
||||
**
|
||||
** If P5 is non-zero and the table is not empty, then the "skip-next"
|
||||
** flag is set on the cursor so that the next OP_Next instruction
|
||||
** executed on it is a no-op.
|
||||
**
|
||||
** This opcode leaves the cursor configured to move in forward order,
|
||||
** from the beginning toward the end. In other words, the cursor is
|
||||
** configured to use Next, not Prev.
|
||||
@@ -5136,6 +5132,7 @@ case OP_Rewind: { /* jump */
|
||||
int res;
|
||||
|
||||
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
|
||||
assert( pOp->p5==0 );
|
||||
pC = p->apCsr[pOp->p1];
|
||||
assert( pC!=0 );
|
||||
assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) );
|
||||
@@ -5150,9 +5147,6 @@ case OP_Rewind: { /* jump */
|
||||
pCrsr = pC->uc.pCursor;
|
||||
assert( pCrsr );
|
||||
rc = sqlite3BtreeFirst(pCrsr, &res);
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
if( pOp->p5 ) sqlite3BtreeSkipNext(pCrsr);
|
||||
#endif
|
||||
pC->deferredMoveto = 0;
|
||||
pC->cacheStatus = CACHE_STALE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user