/ Check-in [1d134ba2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When converting a result type from TEXT to BLOB using the sqlite3_value_blob() interface, continue to report SQLITE_TEXT as the true type from sqlite3_value_text() as long as that text is still valid. The maintains legacy behavior from before the noMemType change.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1d134ba2edbdb8c0cf9e99590a69cd17e0b874a9
User & Date: drh 2014-03-05 14:40:22
References
2014-03-05
15:04
Add a test case for the problem fixed by [1d134ba2ed]. check-in: d4fbc05d user: dan tags: trunk
Context
2014-03-05
15:04
Add a test case for the problem fixed by [1d134ba2ed]. check-in: d4fbc05d user: dan tags: trunk
14:49
Merge in various obscure bug fixes and the removal of Mem.memType from trunk. check-in: 0828975d user: drh tags: sessions
14:40
When converting a result type from TEXT to BLOB using the sqlite3_value_blob() interface, continue to report SQLITE_TEXT as the true type from sqlite3_value_text() as long as that text is still valid. The maintains legacy behavior from before the noMemType change. check-in: 1d134ba2 user: drh tags: trunk
12:47
Separate the column NULL value constant into a separate routine for greater commonality with the sessions branch. check-in: 12cbebb9 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

   131    131   ** The following routines extract information from a Mem or sqlite3_value
   132    132   ** structure.
   133    133   */
   134    134   const void *sqlite3_value_blob(sqlite3_value *pVal){
   135    135     Mem *p = (Mem*)pVal;
   136    136     if( p->flags & (MEM_Blob|MEM_Str) ){
   137    137       sqlite3VdbeMemExpandBlob(p);
   138         -    p->flags &= ~MEM_Str;
   139    138       p->flags |= MEM_Blob;
   140    139       return p->n ? p->z : 0;
   141    140     }else{
   142    141       return sqlite3_value_text(pVal);
   143    142     }
   144    143   }
   145    144   int sqlite3_value_bytes(sqlite3_value *pVal){