diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-09-06 14:19:11 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-09-06 14:19:11 +0000 |
commit | fdd8e5bab84722c09a5a1a8146e3430058c6dea8 (patch) | |
tree | d74e590bf8847262b7063dc9f712290933756b45 /src | |
parent | f7cbfae96a47cae17161de8649fc0a623b9cf7fe (diff) | |
download | sqlite-fdd8e5bab84722c09a5a1a8146e3430058c6dea8.tar.gz sqlite-fdd8e5bab84722c09a5a1a8146e3430058c6dea8.zip |
Deallocate a temp register allocated by codeEqualityTerm() in where.c. If it is not deallocated, its value may be reused by the column-cache mechanism. However, by the time it is used, the value may have been clobbered by a sub-routine that also uses the same temp register. Fix for #3357. (CVS 5679)
FossilOrigin-Name: 7c0f638ef3d7ff9156f07d6fb01448453ffcf5ac
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 57b4cbcc8..12ddd7ceb 100644 --- a/src/where.c +++ b/src/where.c @@ -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.321 2008/08/25 12:08:22 drh Exp $ +** $Id: where.c,v 1.322 2008/09/06 14:19:11 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -2423,6 +2423,7 @@ WhereInfo *sqlite3WhereBegin( nxt = pLevel->nxt; sqlite3VdbeAddOp2(v, OP_MustBeInt, r1, nxt); sqlite3VdbeAddOp3(v, OP_NotExists, iCur, nxt, r1); + sqlite3ReleaseTempReg(pParse, r1); VdbeComment((v, "pk")); pLevel->op = OP_Noop; }else if( pLevel->flags & WHERE_ROWID_RANGE ){ |