diff options
author | drh <drh@noemail.net> | 2016-02-02 02:22:30 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-02-02 02:22:30 +0000 |
commit | 33c1eb64772caf48a33d92e1a3c5a577c9ba1aa9 (patch) | |
tree | e820c4a4276381c4c71f8cf891e75dc67302fa8b /src/vdbeapi.c | |
parent | e1ed0bb6077cc223fa54f58ae835f133d1c4aa59 (diff) | |
parent | b8db549832d2acc2fc30327e6fb5c0474820f122 (diff) | |
download | sqlite-33c1eb64772caf48a33d92e1a3c5a577c9ba1aa9.tar.gz sqlite-33c1eb64772caf48a33d92e1a3c5a577c9ba1aa9.zip |
Merge all recent enhancements from trunk.
FossilOrigin-Name: f3f9200115caf4b356f90ec97c351d1afbcb9bf6
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r-- | src/vdbeapi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 4b8ebd6fa..2743caa35 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -188,7 +188,8 @@ sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){ return sqlite3VdbeIntValue((Mem*)pVal); } unsigned int sqlite3_value_subtype(sqlite3_value *pVal){ - return ((Mem*)pVal)->eSubtype; + Mem *pMem = (Mem*)pVal; + return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0); } const unsigned char *sqlite3_value_text(sqlite3_value *pVal){ return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); @@ -369,8 +370,10 @@ void sqlite3_result_null(sqlite3_context *pCtx){ sqlite3VdbeMemSetNull(pCtx->pOut); } void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ - assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); - pCtx->pOut->eSubtype = eSubtype & 0xff; + Mem *pOut = pCtx->pOut; + assert( sqlite3_mutex_held(pOut->db->mutex) ); + pOut->eSubtype = eSubtype & 0xff; + pOut->flags |= MEM_Subtype; } void sqlite3_result_text( sqlite3_context *pCtx, |