aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-08-06 16:56:44 +0000
committerdrh <drh@noemail.net>2013-08-06 16:56:44 +0000
commit3535ec3e10555c1b75b4854dd6c7a52b99cde816 (patch)
tree83823701abb1d3f147fa5f23254b4b918f043ec0 /src/expr.c
parent2d463113f0e374b89bb3b74c1fb65678c1ccc7b5 (diff)
downloadsqlite-3535ec3e10555c1b75b4854dd6c7a52b99cde816.tar.gz
sqlite-3535ec3e10555c1b75b4854dd6c7a52b99cde816.zip
Remove unreachable branches in expr.c, replacing them with assert() and
testcase() statements. FossilOrigin-Name: 9103c27ceb3f4023ea3a41b679a10717d3f80210
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/expr.c b/src/expr.c
index 3857d5d84..5fca1f12c 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1739,10 +1739,11 @@ int sqlite3CodeSubselect(
return 0;
}
pEList = pExpr->x.pSelect->pEList;
- if( pKeyInfo && ALWAYS(pEList!=0 && pEList->nExpr>0) ){
- pKeyInfo->aColl[0] = sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft,
- pEList->a[0].pExpr);
- }
+ assert( pKeyInfo!=0 ); /* OOM will exit after sqlite3Select() */
+ assert( pEList!=0 );
+ assert( pEList->nExpr>0 );
+ pKeyInfo->aColl[0] = sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft,
+ pEList->a[0].pExpr);
}else if( ALWAYS(pExpr->x.pList!=0) ){
/* Case 2: expr IN (exprlist)
**