/ Check-in [651c1efb]
Login

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

Overview
Comment:Fix an incorrect assert() in vdbeUnbind().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:651c1efb998b34f218694c45865fbe20b837a2ac
User & Date: drh 2009-10-19 20:15:39
Context
2009-10-19
22:41
Remove an unreachable condition in the WHERE clause processing of bound parameters and replace it with an assert(), for test coverage. check-in: 3bcd78a1 user: drh tags: trunk
20:15
Fix an incorrect assert() in vdbeUnbind(). check-in: 651c1efb user: drh tags: trunk
18:30
Fix an assert() that may fail if sqlite3_step() is called on a statement after a previous call has already returned SQLITE_SCHEMA. check-in: 63bf7345 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

914
915
916
917
918
919
920
921
922

923
924
925
926
927
928
929
....
1209
1210
1211
1212
1213
1214
1215
1216
  sqlite3VdbeMemRelease(pVar);
  pVar->flags = MEM_Null;
  sqlite3Error(p->db, SQLITE_OK, 0);

  /* If the bit corresponding to this variable in Vdbe.expmask is set, then 
  ** binding a new value to this variable invalidates the current query plan.
  */
  assert( p->isPrepareV2 || p->expmask==0 );
  if( (i<32 && p->expmask & ((u32)1 << i)) || p->expmask==0xffffffff ){

    p->expired = 1;
  }
  return SQLITE_OK;
}

/*
** Bind a text or BLOB value.
................................................................................
*/
int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
  Vdbe *pVdbe = (Vdbe*)pStmt;
  int v = pVdbe->aCounter[op-1];
  if( resetFlag ) pVdbe->aCounter[op-1] = 0;
  return v;
}








|
|
>







 







<
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
....
1210
1211
1212
1213
1214
1215
1216

  sqlite3VdbeMemRelease(pVar);
  pVar->flags = MEM_Null;
  sqlite3Error(p->db, SQLITE_OK, 0);

  /* If the bit corresponding to this variable in Vdbe.expmask is set, then 
  ** binding a new value to this variable invalidates the current query plan.
  */
  if( p->isPrepareV2 &&
     ((i<32 && p->expmask & ((u32)1 << i)) || p->expmask==0xffffffff)
  ){
    p->expired = 1;
  }
  return SQLITE_OK;
}

/*
** Bind a text or BLOB value.
................................................................................
*/
int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
  Vdbe *pVdbe = (Vdbe*)pStmt;
  int v = pVdbe->aCounter[op-1];
  if( resetFlag ) pVdbe->aCounter[op-1] = 0;
  return v;
}