1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Make sure sqlite3_value_bytes() does not reformat the content after a

call to sqlite3_value_blob().  Add documentation to explain this hazard.
Add many new tests.  Ticket #2321. (CVS 3880)

FossilOrigin-Name: e92bd97a3726bbb7978489e2994747127c4aefcf
This commit is contained in:
drh
2007-04-27 17:16:20 +00:00
parent ba6d351486
commit 9310ef23e2
8 changed files with 430 additions and 35 deletions

View File

@@ -37,6 +37,9 @@ int sqlite3_expired(sqlite3_stmt *pStmt){
const void *sqlite3_value_blob(sqlite3_value *pVal){
Mem *p = (Mem*)pVal;
if( p->flags & (MEM_Blob|MEM_Str) ){
if( (p->flags & MEM_Term)==0 ){
p->flags &= ~MEM_Str;
}
return p->z;
}else{
return sqlite3_value_text(pVal);