diff options
author | drh <drh@noemail.net> | 2016-08-24 00:51:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-08-24 00:51:48 +0000 |
commit | ac6b47d164a73101d700f244384a2339f31a8e5b (patch) | |
tree | b3bf7ca6bc16052282f988e189c932680fb4c5ad /src/wherecode.c | |
parent | 894241c8473aa2079a73a82debf3f81eb7cac74b (diff) | |
download | sqlite-ac6b47d164a73101d700f244384a2339f31a8e5b.tar.gz sqlite-ac6b47d164a73101d700f244384a2339f31a8e5b.zip |
The previous OOM fix was bad. Back it out and replace it with a better one.
FossilOrigin-Name: 1e3bc3698a4b779e6af8e3c727929c4dbddf3edb
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index 2ef9a46b5..fbf6ad194 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -383,7 +383,7 @@ static int codeEqualityTerm( sqlite3VdbeAddOp2(v, OP_Null, 0, iReg); #ifndef SQLITE_OMIT_SUBQUERY }else{ - int eType; + int eType = IN_INDEX_NOOP; int iTab; struct InLoop *pIn; WhereLoop *pLoop = pLevel->pWLoop; @@ -436,13 +436,13 @@ static int codeEqualityTerm( pLhs = sqlite3ExprListAppend(pParse, pLhs, pNewLhs); } } - - pX->x.pSelect->pEList = pRhs; - pX->pLeft->x.pList = pLhs; - - eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap); - pX->x.pSelect->pEList = pOrigRhs; - pX->pLeft->x.pList = pOrigLhs; + if( !db->mallocFailed ){ + pX->x.pSelect->pEList = pRhs; + pX->pLeft->x.pList = pLhs; + eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap); + pX->x.pSelect->pEList = pOrigRhs; + pX->pLeft->x.pList = pOrigLhs; + } sqlite3ExprListDelete(pParse->db, pLhs); sqlite3ExprListDelete(pParse->db, pRhs); } |