SQLite

Check-in [41ef34a1f0]
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
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.843
Context
2017-10-24
18:55
Version 3.21.0 (Leaf check-in: 1a584e4999 user: drh tags: release, version-3.21.0, branch-3.21)
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: 41ef34a1f0 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: 54b90b4f27 user: drh tags: branch-3.21)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeblob.c.
59
60
61
62
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77
  /* Set the value of register r[1] in the SQL statement to integer iRow. 
  ** This is done directly as a performance optimization
  */
  v->aMem[1].flags = MEM_Int;
  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
  ** have been down with an extra OP_Goto, but simply setting the program
  ** counter is faster. */
  if( v->pc>3 ){
    v->pc = 3;

    rc = sqlite3VdbeExec(v);
  }else{
    rc = sqlite3_step(p->pStmt);
  }
  if( rc==SQLITE_ROW ){
    VdbeCursor *pC = v->apCsr[0];
    u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;







|


|
|
>







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
  /* Set the value of register r[1] in the SQL statement to integer iRow. 
  ** This is done directly as a performance optimization
  */
  v->aMem[1].flags = MEM_Int;
  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_NotExists.  This could
  ** have been down with an extra OP_Goto, but simply setting the program
  ** counter is faster. */
  if( v->pc>4 ){
    v->pc = 4;
    assert( v->aOp[v->pc].opcode==OP_NotExists );
    rc = sqlite3VdbeExec(v);
  }else{
    rc = sqlite3_step(p->pStmt);
  }
  if( rc==SQLITE_ROW ){
    VdbeCursor *pC = v->apCsr[0];
    u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;