SQLite

Check-in [da0b7948]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a NEVER() around a branch in sqlite3ExprAffinity() that is designed to prevent an infinite loop, but which can now never be reached due to recent changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: da0b794852f8ccba5bd30395892044ec71b148075608406867785395e1f50b31
User & Date: drh 2024-06-29 12:22:32
Context
2024-06-29
15:57
Fix a typo in a comment in a test case. No changes to code. (check-in: f501166d user: drh tags: trunk)
12:22
Add a NEVER() around a branch in sqlite3ExprAffinity() that is designed to prevent an infinite loop, but which can now never be reached due to recent changes. (check-in: da0b7948 user: drh tags: trunk)
2024-06-28
18:21
Update fts5 comment/docs to include the order matches are visited in by the xPhraseFirst/xPhraseNext API. (check-in: e41930ef user: dan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/expr.c.

81
82
83
84
85
86
87
88


89
90
91
92
93
94
95
      assert( pExpr->op==TK_COLLATE
           || pExpr->op==TK_IF_NULL_ROW
           || (pExpr->op==TK_REGISTER && pExpr->op2==TK_IF_NULL_ROW) );
      pExpr = pExpr->pLeft;
      op = pExpr->op;
      continue;
    }
    if( op!=TK_REGISTER || (op = pExpr->op2)==TK_REGISTER ) break;


  }
  return pExpr->affExpr;
}

/*
** Make a guess at all the possible datatypes of the result that could
** be returned by an expression.  Return a bitmask indicating the answer:







|
>
>







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
      assert( pExpr->op==TK_COLLATE
           || pExpr->op==TK_IF_NULL_ROW
           || (pExpr->op==TK_REGISTER && pExpr->op2==TK_IF_NULL_ROW) );
      pExpr = pExpr->pLeft;
      op = pExpr->op;
      continue;
    }
    if( op!=TK_REGISTER ) break;
    op = pExpr->op2;
    if( NEVER( op==TK_REGISTER ) ) break;
  }
  return pExpr->affExpr;
}

/*
** Make a guess at all the possible datatypes of the result that could
** be returned by an expression.  Return a bitmask indicating the answer: