/ Check-in [41ef34a1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a problem in the incr-blob code causing a new cursor to be opened for every sqlite3_blob_reopen() call.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.21
Files: files | file ages | folders
SHA3-256: 41ef34a1f0650c50cacb203665cd9d57db53a49c979bf0d5a78937517f763a2c
User & Date: dan 2017-10-24 17:28:25
Context
2017-10-24
18:55
Version 3.21.0 Leaf check-in: 1a584e49 user: drh tags: release, branch-3.21, version-3.21.0
17:28
Fix a problem in the incr-blob code causing a new cursor to be opened for every sqlite3_blob_reopen() call. check-in: 41ef34a1 user: dan tags: branch-3.21
2017-10-23
21:24
On the amalgamation package, enable the sqlite_dbpage virtual table so that the .dbinfo command works in the CLI. check-in: 54b90b4f user: drh tags: branch-3.21
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeblob.c.

    59     59     /* Set the value of register r[1] in the SQL statement to integer iRow. 
    60     60     ** This is done directly as a performance optimization
    61     61     */
    62     62     v->aMem[1].flags = MEM_Int;
    63     63     v->aMem[1].u.i = iRow;
    64     64   
    65     65     /* If the statement has been run before (and is paused at the OP_ResultRow)
    66         -  ** then back it up to the point where it does the OP_SeekRowid.  This could
           66  +  ** then back it up to the point where it does the OP_NotExists.  This could
    67     67     ** have been down with an extra OP_Goto, but simply setting the program
    68     68     ** counter is faster. */
    69         -  if( v->pc>3 ){
    70         -    v->pc = 3;
           69  +  if( v->pc>4 ){
           70  +    v->pc = 4;
           71  +    assert( v->aOp[v->pc].opcode==OP_NotExists );
    71     72       rc = sqlite3VdbeExec(v);
    72     73     }else{
    73     74       rc = sqlite3_step(p->pStmt);
    74     75     }
    75     76     if( rc==SQLITE_ROW ){
    76     77       VdbeCursor *pC = v->apCsr[0];
    77     78       u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;