diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-05-16 15:24:58 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-05-16 15:24:58 +0000 |
commit | 1e740c6f88cad3a7e3b3784b87aa007b91c2b743 (patch) | |
tree | 602ada085eff88c80c48e26bd9fcb89af75f43f0 /src | |
parent | 822a51628f33d99303d792108b1333430c6147fa (diff) | |
download | sqlite-1e740c6f88cad3a7e3b3784b87aa007b91c2b743.tar.gz sqlite-1e740c6f88cad3a7e3b3784b87aa007b91c2b743.zip |
Check that the encoding of values passed to sqlite3_bind_value() matches that of the database. (CVS 5138)
FossilOrigin-Name: e94a2883060b9ef59809ff4de9525d897d95546c
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbeapi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 40eec30cc..d9d4a93db 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -13,7 +13,7 @@ ** This file contains code use to implement APIs that are part of the ** VDBE. ** -** $Id: vdbeapi.c,v 1.131 2008/05/16 04:51:55 danielk1977 Exp $ +** $Id: vdbeapi.c,v 1.132 2008/05/16 15:24:58 danielk1977 Exp $ */ #include "sqliteInt.h" #include "vdbeInt.h" @@ -1131,6 +1131,9 @@ int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ rc = vdbeUnbind(p, i); if( rc==SQLITE_OK ){ rc = sqlite3VdbeMemCopy(&p->aVar[i-1], pValue); + if( rc==SQLITE_OK ){ + rc = sqlite3VdbeChangeEncoding(&p->aVar[i-1], ENC(p->db)); + } } rc = sqlite3ApiExit(p->db, rc); sqlite3_mutex_leave(p->db->mutex); |