/ Check-in [069f4560]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Do not clear the error code or error message in sqlite3_clear_bindings(). Ticket #3063. (CVS 5111)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 069f4560107246fdc31e1f15c3ad7d3dae2b9ad8
User & Date: drh 2008-05-09 14:39:45
Context
2008-05-09
16:57
Fix a problem with recovering from an IO error in exclusive-locking mode. (CVS 5112) check-in: 7a44fb96 user: danielk1977 tags: trunk
14:39
Do not clear the error code or error message in sqlite3_clear_bindings(). Ticket #3063. (CVS 5111) check-in: 069f4560 user: drh tags: trunk
14:17
Fix the ALTER TABLE RENAME algorithm so that it is not confused by comments in the CREATE TABLE statement. Ticket #3102. (CVS 5110) check-in: ab18b4e7 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

237
238
239
240
241
242
243

244
245
246
247
248
249

250
251
252
253
254
255
256

/*
** Set all the parameters in the compiled SQL statement to NULL.
*/
int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
  int i;
  int rc = SQLITE_OK;

#ifndef SQLITE_MUTEX_NOOP
  sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
#endif
  sqlite3_mutex_enter(mutex);
  for(i=1; rc==SQLITE_OK && i<=sqlite3_bind_parameter_count(pStmt); i++){
    rc = sqlite3_bind_null(pStmt, i);

  }
  sqlite3_mutex_leave(mutex);
  return rc;
}


/**************************** sqlite3_value_  *******************************







>




|
|
>







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258

/*
** Set all the parameters in the compiled SQL statement to NULL.
*/
int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
  int i;
  int rc = SQLITE_OK;
  Vdbe *p = (Vdbe*)pStmt;
#ifndef SQLITE_MUTEX_NOOP
  sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
#endif
  sqlite3_mutex_enter(mutex);
  for(i=0; i<p->nVar; i++){
    sqlite3VdbeMemRelease(&p->aVar[i]);
    p->aVar[i].flags = MEM_Null;
  }
  sqlite3_mutex_leave(mutex);
  return rc;
}


/**************************** sqlite3_value_  *******************************