1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Add ALWAYS() and NEVER() on branches made unreachable by recent changes.

FossilOrigin-Name: c50e6c2ace49d0928b05cbfd877c621e9a0f77dc4e056ccb1dbe5cf118a00d00
This commit is contained in:
drh
2023-12-19 14:53:39 +00:00
parent 3e2ec83e0b
commit 09259aff6c
3 changed files with 9 additions and 9 deletions

View File

@@ -2740,7 +2740,7 @@ int sqlite3ExprCanBeNull(const Expr *p){
case TK_COLUMN:
assert( ExprUseYTab(p) );
return ExprHasProperty(p, EP_CanBeNull) ||
p->y.pTab==0 || /* Reference to column of index on expression */
NEVER(p->y.pTab==0) || /* Reference to column of index on expr */
(p->iColumn>=0
&& p->y.pTab->aCol!=0 /* Possible due to prior error */
&& ALWAYS(p->iColumn>=0)
@@ -6477,7 +6477,7 @@ static int exprRefToSrcList(Walker *pWalker, Expr *pExpr){
int i;
struct RefSrcList *p = pWalker->u.pRefSrcList;
SrcList *pSrc = p->pRef;
int nSrc = pSrc ? pSrc->nSrc : 0;
int nSrc = ALWAYS(pSrc) ? pSrc->nSrc : 0;
for(i=0; i<nSrc; i++){
if( pExpr->iTable==pSrc->a[i].iCursor ){
pWalker->eCode |= 1;