diff options
author | dan <dan@noemail.net> | 2017-10-24 17:28:25 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2017-10-24 17:28:25 +0000 |
commit | 952523f618d75ffe9e085b65cab63f53684c464a (patch) | |
tree | e073cb3af37370441dd164485d47bddd4afaaa8e /src/vdbeblob.c | |
parent | f7902a543eceb3dbae5d9fea51bf83ed16a8d4c6 (diff) | |
download | sqlite-952523f618d75ffe9e085b65cab63f53684c464a.tar.gz sqlite-952523f618d75ffe9e085b65cab63f53684c464a.zip |
Fix a problem in the incr-blob code causing a new cursor to be opened for
every sqlite3_blob_reopen() call.
FossilOrigin-Name: 41ef34a1f0650c50cacb203665cd9d57db53a49c979bf0d5a78937517f763a2c
Diffstat (limited to 'src/vdbeblob.c')
-rw-r--r-- | src/vdbeblob.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c index 16a2c0f36..427979269 100644 --- a/src/vdbeblob.c +++ b/src/vdbeblob.c @@ -63,11 +63,12 @@ static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){ v->aMem[1].u.i = iRow; /* If the statement has been run before (and is paused at the OP_ResultRow) - ** then back it up to the point where it does the OP_SeekRowid. This could + ** then back it up to the point where it does the OP_NotExists. This could ** have been down with an extra OP_Goto, but simply setting the program ** counter is faster. */ - if( v->pc>3 ){ - v->pc = 3; + if( v->pc>4 ){ + v->pc = 4; + assert( v->aOp[v->pc].opcode==OP_NotExists ); rc = sqlite3VdbeExec(v); }else{ rc = sqlite3_step(p->pStmt); |