diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 3 | ||||
-rw-r--r-- | src/vdbemem.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index e8d544c5b..3d1f6e42d 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -43,7 +43,7 @@ ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** -** $Id: vdbe.c,v 1.387 2004/06/22 17:59:56 drh Exp $ +** $Id: vdbe.c,v 1.388 2004/06/22 22:54:23 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -1258,6 +1258,7 @@ case OP_Function: { ctx.s.flags = MEM_Null; ctx.s.z = 0; + ctx.s.xDel = 0; ctx.isError = 0; ctx.isStep = 0; if( ctx.pFunc->needCollSeq ){ diff --git a/src/vdbemem.c b/src/vdbemem.c index 8c5891dec..860ed831d 100644 --- a/src/vdbemem.c +++ b/src/vdbemem.c @@ -576,6 +576,8 @@ void sqlite3VdbeMemSanity(Mem *pMem, u8 db_enc){ /* Mem.z points to Mem.zShort iff the subtype is MEM_Short */ assert( (pMem->flags & MEM_Short)==0 || pMem->z==pMem->zShort ); assert( (pMem->flags & MEM_Short)!=0 || pMem->z!=pMem->zShort ); + /* No destructor unless there is MEM_Dyn */ + assert( pMem->xDel==0 || (pMem->flags & MEM_Dyn)!=0 ); if( (flags & MEM_Str) ){ assert( pMem->enc==SQLITE_UTF8 || @@ -592,6 +594,7 @@ void sqlite3VdbeMemSanity(Mem *pMem, u8 db_enc){ }else{ /* Cannot define a string subtype for non-string objects */ assert( (pMem->flags & (MEM_Static|MEM_Dyn|MEM_Ephem|MEM_Short))==0 ); + assert( pMem->xDel==0 ); } /* MEM_Null excludes all other types */ assert( (pMem->flags&(MEM_Str|MEM_Int|MEM_Real|MEM_Blob))==0 |