Remove the unused P5 flag from the OP_Rewind opcode.
FossilOrigin-Name: c2edbf3b8c643edcd5823eb907fd7531cf5be8a8b6a014fa1b123eb0ea3231cf
This commit is contained in:
parent
3580843595
commit
038ebf6875
18
manifest
18
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\sa\sfairly\sobscure\sproblem\scausing\sthe\splanner\sto\ssometimes\schoose\ssub-optimal\splans\sfor\sa\squery\swith\sa\ssingle\svirtual\stable\sin\sthe\sFROM\sclause,\sand\sat\sleast\sone\sIN(...)\sconstraint\sin\sthe\sWHERE\sclause.
|
||||
D 2019-03-29T13:17:50.351
|
||||
C Remove\sthe\sunused\sP5\sflag\sfrom\sthe\sOP_Rewind\sopcode.
|
||||
D 2019-03-29T15:21:22.609
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -457,8 +457,8 @@ F src/auth.c 0fac71038875693a937e506bceb492c5f136dd7b1249fbd4ae70b4e8da14f9df
|
||||
F src/backup.c 78d3cecfbe28230a3a9a1793e2ead609f469be43e8f486ca996006be551857ab
|
||||
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
||||
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||
F src/btree.c a644e8f3b71205e1e360ed5a28d8fc8feaa5c63fee3a49a36711ff83f4bdf6d2
|
||||
F src/btree.h 63b94fb38ce571c15eb6a3661815561b501d23d5948b2d1e951fbd7a2d04e8d3
|
||||
F src/btree.c bf2e05e26c26df4acc67ef09a7d43052b4a3759f81f77619bc2a9339c6a14c4c
|
||||
F src/btree.h c11446f07ec0e9dc85af8041cb0855c52f5359c8b2a43e47e02a685282504d89
|
||||
F src/btreeInt.h 6111c15868b90669f79081039d19e7ea8674013f907710baa3c814dc3f8bfd3f
|
||||
F src/build.c 241006a97dee8a3e762a724aa549ca79171826a5b0b1d8e7ee41ffcd92bc5328
|
||||
F src/callback.c 25dda5e1c2334a367b94a64077b1d06b2553369f616261ca6783c48bcb6bda73
|
||||
@ -587,7 +587,7 @@ F src/upsert.c 0dd81b40206841814d46942a7337786932475f085716042d0cb2fc7791bf8ca4
|
||||
F src/utf.c 810fbfebe12359f10bc2a011520a6e10879ab2a163bcb26c74768eab82ea62a5
|
||||
F src/util.c 82a2e3f691a3b654be872e305dab1f455e565dedf5e6a90c818c1ab307c00432
|
||||
F src/vacuum.c 532553ee1d47f69c1198858107b1f3af3d16af25f2ab4ce3b1263d9e333f26e2
|
||||
F src/vdbe.c 8f824b423460fbbd6a140f557b9d3cb26fa55404d03aee43584d11c7d1011b02
|
||||
F src/vdbe.c 75d5ccb13010c9cf8c9f2a2be9dc6935950e313c6cea4bc16e7c40e5527fda76
|
||||
F src/vdbe.h 712bca562eaed1c25506b9faf9680bdc75fc42e2f4a1cd518d883fa79c7a4237
|
||||
F src/vdbeInt.h a76d5eed62c76bcd8de7afd3147fac1bc40c5a870582664bcd7d071ef437c37f
|
||||
F src/vdbeapi.c 7a052df80d7e2e55382076174633e888f21fe200feb5d49b1b441b4c38ab851a
|
||||
@ -1813,7 +1813,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 040d5d515bcb37bea05e0d156dbaf066c68052ac574f1b0b2cb118d473a353e0
|
||||
R e546ad670b8973ed4f54c42d6a6b4e3e
|
||||
U dan
|
||||
Z 48108f154421a71bdf9883e42b6bbc73
|
||||
P f5752517f590b37bfc0267650f5800320e22a8ecaba34aa6893281ce8d268026
|
||||
R 52c966134f5bf9130baedd9b89ea4a62
|
||||
U drh
|
||||
Z b847805c39c91cec51745d9c89877e86
|
||||
|
@ -1 +1 @@
|
||||
f5752517f590b37bfc0267650f5800320e22a8ecaba34aa6893281ce8d268026
|
||||
c2edbf3b8c643edcd5823eb907fd7531cf5be8a8b6a014fa1b123eb0ea3231cf
|
17
src/btree.c
17
src/btree.c
@ -5273,23 +5273,6 @@ int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** This function is a no-op if cursor pCur does not point to a valid row.
|
||||
** Otherwise, if pCur is valid, configure it so that the next call to
|
||||
** sqlite3BtreeNext() is a no-op.
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
void sqlite3BtreeSkipNext(BtCursor *pCur){
|
||||
/* We believe that the cursor must always be in the valid state when
|
||||
** this routine is called, but the proof is difficult, so we add an
|
||||
** ALWaYS() test just in case we are wrong. */
|
||||
if( ALWAYS(pCur->eState==CURSOR_VALID) ){
|
||||
pCur->eState = CURSOR_SKIPNEXT;
|
||||
pCur->skipNext = 1;
|
||||
}
|
||||
}
|
||||
#endif /* SQLITE_OMIT_WINDOWFUNC */
|
||||
|
||||
/* Move the cursor to the last entry in the table. Return SQLITE_OK
|
||||
** on success. Set *pRes to 0 if the cursor actually points to something
|
||||
** or set *pRes to 1 if the table is empty.
|
||||
|
@ -301,9 +301,6 @@ struct BtreePayload {
|
||||
int sqlite3BtreeInsert(BtCursor*, const BtreePayload *pPayload,
|
||||
int flags, int seekResult);
|
||||
int sqlite3BtreeFirst(BtCursor*, int *pRes);
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
void sqlite3BtreeSkipNext(BtCursor*);
|
||||
#endif
|
||||
int sqlite3BtreeLast(BtCursor*, int *pRes);
|
||||
int sqlite3BtreeNext(BtCursor*, int flags);
|
||||
int sqlite3BtreeEof(BtCursor*);
|
||||
|
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user