1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-24 14:17:58 +03:00

Automatically cast BLOBs to strings prior to handing them over to

functions like LIKE that want strings.  Ticket #1605. (CVS 2928)

FossilOrigin-Name: 730ddb0b74ed23c916dabd7ce893bd6bc55f3549
This commit is contained in:
drh
2006-01-12 19:42:41 +00:00
parent 8079a0d3f5
commit f1f6c587eb
4 changed files with 25 additions and 9 deletions

View File

@@ -751,6 +751,8 @@ const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
if( pVal->flags&MEM_Null ){
return 0;
}
assert( (MEM_Blob>>3) == MEM_Str );
pVal->flags |= (pVal->flags & MEM_Blob)>>3;
if( pVal->flags&MEM_Str ){
sqlite3VdbeChangeEncoding(pVal, enc);
}else if( !(pVal->flags&MEM_Blob) ){