1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

A vdbe stack element might have a string value even after a call to

Integerify().  Ticket #641. (CVS 1283)

FossilOrigin-Name: 3cac4b7b526d6c5dbf394009b534707bcb65b0da
This commit is contained in:
drh
2004-03-03 01:51:24 +00:00
parent b1aa04fccc
commit 79f14b7240
4 changed files with 20 additions and 15 deletions

View File

@@ -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.267 2004/02/22 17:49:34 drh Exp $
** $Id: vdbe.c,v 1.268 2004/03/03 01:51:25 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -1179,8 +1179,9 @@ case OP_ShiftRight: {
assert( (pTos->flags & MEM_Dyn)==0 );
assert( (pNos->flags & MEM_Dyn)==0 );
pTos--;
Release(pTos);
pTos->i = a;
assert( pTos->flags==MEM_Int );
pTos->flags = MEM_Int;
break;
}
@@ -1700,8 +1701,9 @@ case OP_Not: {
assert( pTos>=p->aStack );
if( pTos->flags & MEM_Null ) break; /* Do nothing to NULLs */
Integerify(pTos);
assert( pTos->flags==MEM_Int );
Release(pTos);
pTos->i = !pTos->i;
pTos->flags = MEM_Int;
break;
}
@@ -1715,8 +1717,9 @@ case OP_BitNot: {
assert( pTos>=p->aStack );
if( pTos->flags & MEM_Null ) break; /* Do nothing to NULLs */
Integerify(pTos);
assert( pTos->flags==MEM_Int );
Release(pTos);
pTos->i = ~pTos->i;
pTos->flags = MEM_Int;
break;
}
@@ -2299,7 +2302,7 @@ case OP_SetCookie: {
aMeta[1+pOp->p2] = pTos->i;
rc = sqliteBtreeUpdateMeta(db->aDb[pOp->p1].pBt, aMeta);
}
assert( pTos->flags==MEM_Int );
Release(pTos);
pTos--;
break;
}
@@ -3767,7 +3770,7 @@ case OP_ListWrite: {
}
Integerify(pTos);
pKeylist->aKey[pKeylist->nUsed++] = pTos->i;
assert( pTos->flags==MEM_Int );
Release(pTos);
pTos--;
break;
}