1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Add ALWAYS and NEVER macros to currently unreachable but important branches in

sqlite3ExprCompare().

FossilOrigin-Name: cee835fe902e46f283257fb8ec9d9744c7d6dd77
This commit is contained in:
drh
2013-11-15 20:06:26 +00:00
parent 8e2ea000b5
commit 85f8aa7907
3 changed files with 10 additions and 10 deletions

View File

@@ -3757,15 +3757,15 @@ int sqlite3ExprCompare(Expr *pA, Expr *pB, int iTab){
}
}
if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 2;
if( (combinedFlags & EP_TokenOnly)==0 ){
if( ALWAYS((combinedFlags & EP_TokenOnly)==0) ){
if( combinedFlags & EP_xIsSelect ) return 2;
if( sqlite3ExprCompare(pA->pLeft, pB->pLeft, iTab) ) return 2;
if( sqlite3ExprCompare(pA->pRight, pB->pRight, iTab) ) return 2;
if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;
if( (combinedFlags & EP_Reduced)==0 ){
if( ALWAYS((combinedFlags & EP_Reduced)==0) ){
if( pA->iColumn!=pB->iColumn ) return 2;
if( pA->iTable!=pB->iTable
&& (pA->iTable!=iTab || pB->iTable>=0) ) return 2;
&& (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
}
}
return 0;