aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2022-01-24 16:47:12 +0000
committerdrh <>2022-01-24 16:47:12 +0000
commit0c7d3d399d4706db18789dbd50466e4d589e5fcd (patch)
tree8af14619211686909126dc8521403bb24562f389 /src/wherecode.c
parentc692df2784db52587fdf2a2ae20340ad8e7fc034 (diff)
downloadsqlite-0c7d3d399d4706db18789dbd50466e4d589e5fcd.tar.gz
sqlite-0c7d3d399d4706db18789dbd50466e4d589e5fcd.zip
Remove many redundant checks for sqlite3.mallocFailed now that any OOM should
cause Parse.nErr to be non-zero. FossilOrigin-Name: 1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 77ee738f0..b3ae06cae 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -841,7 +841,8 @@ static int codeAllEqualityTerms(
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
VdbeCoverage(v);
}
- if( pParse->db->mallocFailed==0 && pParse->nErr==0 ){
+ if( pParse->nErr==0 ){
+ assert( pParse->db->mallocFailed==0 );
if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){
zAff[j] = SQLITE_AFF_BLOB;
}
@@ -2359,7 +2360,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
WHERETRACE(0xffff, ("Subplan for OR-clause:\n"));
pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrExpr, 0, 0,
WHERE_OR_SUBCLAUSE, iCovCur);
- assert( pSubWInfo || pParse->nErr || db->mallocFailed );
+ assert( pSubWInfo || pParse->nErr );
if( pSubWInfo ){
WhereLoop *pSubLoop;
int addrExplain = sqlite3WhereExplainOneScan(