mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Do not clear the error code or error message in sqlite3_clear_bindings().
Ticket #3063. (CVS 5111) FossilOrigin-Name: 069f4560107246fdc31e1f15c3ad7d3dae2b9ad8
This commit is contained in:
@@ -241,12 +241,14 @@ int sqlite3_reset(sqlite3_stmt *pStmt){
|
||||
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=1; rc==SQLITE_OK && i<=sqlite3_bind_parameter_count(pStmt); i++){
|
||||
rc = sqlite3_bind_null(pStmt, i);
|
||||
for(i=0; i<p->nVar; i++){
|
||||
sqlite3VdbeMemRelease(&p->aVar[i]);
|
||||
p->aVar[i].flags = MEM_Null;
|
||||
}
|
||||
sqlite3_mutex_leave(mutex);
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user