Fix a vdbe stack leak that could occur where one side of a WHERE clause inequality evaluated to SQL null. (CVS 4045)

FossilOrigin-Name: 17152bf1a268e130f0c43046bb438b617a747ff5
This commit is contained in:
danielk1977
2007-06-02 07:54:37 +00:00
parent 9afe689ea4
commit 39984cdc8b
4 changed files with 43 additions and 11 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
** so is applicable. Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
** $Id: where.c,v 1.249 2007/05/29 12:11:30 danielk1977 Exp $
** $Id: where.c,v 1.250 2007/06/02 07:54:38 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -2414,7 +2414,7 @@ WhereInfo *sqlite3WhereBegin(
pX = pTerm->pExpr;
assert( (pTerm->flags & TERM_CODED)==0 );
sqlite3ExprCode(pParse, pX->pRight);
sqlite3VdbeAddOp(v, OP_IsNull, -(nEq+1), nxt);
sqlite3VdbeAddOp(v, OP_IsNull, -(nEq*2+1), nxt);
topEq = pTerm->eOperator & (WO_LE|WO_GE);
disableTerm(pLevel, pTerm);
testOp = OP_IdxGE;