mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
The OP_SeekScan opcode is a no-op if the cursor is not pointing to a valid
row upon entry. FossilOrigin-Name: 4afc96b5fe80bd192a23e0230edc207e641931c3bf48296b1a385c786386f1b7
This commit is contained in:
10
src/vdbe.c
10
src/vdbe.c
@@ -4407,10 +4407,8 @@ seek_not_found:
|
||||
** is the desired entry that we want the cursor SeekGE.P1 to be pointing
|
||||
** to. Call this SeekGE.P4/P5 row the "target".
|
||||
**
|
||||
** If the OP_SeekGE opcode that immediately follows this opcode has
|
||||
** never run before, which is to say if the SeekGE.P1 cursor is not pointing
|
||||
** to a valid raow, then this opcode is a no-op and control passes
|
||||
** through into the OP_SeekGE.
|
||||
** If the SeekGE.P1 cursor is not currently pointing to a valid row,
|
||||
** then this opcode is a no-op and control passes through into the OP_SeekGE.
|
||||
**
|
||||
** If the SeekGE.P1 cursor is pointing to a valid row, then that row
|
||||
** might be the target row, or it might be near and slightly before the
|
||||
@@ -4449,10 +4447,10 @@ case OP_SeekScan: {
|
||||
assert( pC!=0 );
|
||||
assert( pC->eCurType==CURTYPE_BTREE );
|
||||
assert( !pC->isTable );
|
||||
if( pC->nullRow ){
|
||||
if( !sqlite3BtreeCursorIsValidNN(pC->uc.pCursor) ){
|
||||
#ifdef SQLITE_DEBUG
|
||||
if( db->flags&SQLITE_VdbeTrace ){
|
||||
printf("... no prior seeks - fall through\n");
|
||||
printf("... cursor not valid - fall through\n");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
Reference in New Issue
Block a user