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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user