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

Do not allow a Mem object to be both NULL and some other type at the same time.

FossilOrigin-Name: e698db1956bb3aba32cd3ec633ec20f5d19b1a10bc68d3772903bca3c87ee158
This commit is contained in:
drh
2017-04-17 20:50:34 +00:00
parent 4bee5599c0
commit e2bc6552fe
4 changed files with 15 additions and 10 deletions

View File

@@ -486,6 +486,7 @@ static void registerTrace(int iReg, Mem *p){
printf("REG[%d] = ", iReg);
memTracePrint(p);
printf("\n");
sqlite3VdbeCheckMemInvariants(p);
}
#endif
@@ -1151,7 +1152,7 @@ case OP_Null: { /* out2 */
case OP_SoftNull: {
assert( pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor) );
pOut = &aMem[pOp->p1];
pOut->flags = (pOut->flags|MEM_Null)&~MEM_Undefined;
pOut->flags = (pOut->flags&~(MEM_Undefined|MEM_AffMask))|MEM_Null;
break;
}