/ Check-in [0bedbe09]
Login

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

Overview
Comment:Free Mem.z buffers when a vdbe statement is reset. (CVS 5002)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0bedbe092aa3079dc49157a9bcaa7716b00e0bdb
User & Date: danielk1977 2008-04-14 15:15:23
Context
2008-04-14
15:27
Make sure the page size in crash6.test does not exceed the maximum configured page size. (CVS 5003) check-in: 36b6610b user: drh tags: trunk
15:15
Free Mem.z buffers when a vdbe statement is reset. (CVS 5002) check-in: 0bedbe09 user: danielk1977 tags: trunk
14:34
Cleanup some #ifdefs to make their meaning clearly. No logical changes. (CVS 5001) check-in: b8bc5f3a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
int sqlite3_reset(sqlite3_stmt *pStmt){
  int rc;
  if( pStmt==0 ){
    rc = SQLITE_OK;
  }else{
    Vdbe *v = (Vdbe*)pStmt;
    sqlite3_mutex_enter(v->db->mutex);
    rc = sqlite3VdbeReset(v, 0);
    stmtLruAdd(v);
    sqlite3VdbeMakeReady(v, -1, 0, 0, 0);
    assert( (rc & (v->db->errMask))==rc );
    sqlite3_mutex_leave(v->db->mutex);
  }
  return rc;
}







|







220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
int sqlite3_reset(sqlite3_stmt *pStmt){
  int rc;
  if( pStmt==0 ){
    rc = SQLITE_OK;
  }else{
    Vdbe *v = (Vdbe*)pStmt;
    sqlite3_mutex_enter(v->db->mutex);
    rc = sqlite3VdbeReset(v, 1);
    stmtLruAdd(v);
    sqlite3VdbeMakeReady(v, -1, 0, 0, 0);
    assert( (rc & (v->db->errMask))==rc );
    sqlite3_mutex_leave(v->db->mutex);
  }
  return rc;
}