1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Fix the OP_SeekScan opcode so that its variable names do not cause problems

for the test/vdbe-compress.tcl script.

FossilOrigin-Name: 7a78274a072324b94d6f79e5b7a198b2fa9321ff5d6a528b51f57d3ee95c765b
This commit is contained in:
drh
2020-10-01 15:46:21 +00:00
parent 644f43c0f7
commit deaa61072d
3 changed files with 14 additions and 14 deletions

View File

@@ -4433,7 +4433,7 @@ seek_not_found:
case OP_SeekScan: {
VdbeCursor *pC;
int res;
int n;
int nStep;
UnpackedRecord r;
assert( pOp[1].opcode==OP_SeekGE );
@@ -4455,8 +4455,8 @@ case OP_SeekScan: {
#endif
break;
}
n = pOp->p1;
assert( n>=1 );
nStep = pOp->p1;
assert( nStep>=1 );
r.pKeyInfo = pC->pKeyInfo;
r.nField = (u16)pOp[1].p4.i;
r.default_rc = 0;
@@ -4478,7 +4478,7 @@ case OP_SeekScan: {
seekscan_search_fail:
#ifdef SQLITE_DEBUG
if( db->flags&SQLITE_VdbeTrace ){
printf("... %d steps and then skip\n", pOp->p1 - n);
printf("... %d steps and then skip\n", pOp->p1 - nStep);
}
#endif
VdbeBranchTaken(1,3);
@@ -4488,14 +4488,14 @@ case OP_SeekScan: {
if( res==0 ){
#ifdef SQLITE_DEBUG
if( db->flags&SQLITE_VdbeTrace ){
printf("... %d steps and then success\n", pOp->p1 - n);
printf("... %d steps and then success\n", pOp->p1 - nStep);
}
#endif
VdbeBranchTaken(2,3);
pOp += 2;
break;
}
if( n<=0 ){
if( nStep<=0 ){
#ifdef SQLITE_DEBUG
if( db->flags&SQLITE_VdbeTrace ){
printf("... fall through after %d steps\n", pOp->p1);
@@ -4504,7 +4504,7 @@ case OP_SeekScan: {
VdbeBranchTaken(0,3);
break;
}
n--;
nStep--;
rc = sqlite3BtreeNext(pC->uc.pCursor, 0);
if( rc ){
if( rc==SQLITE_DONE ){