mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Remove a NEVER() that is no longer true. Fix for [36ffedcb9].
FossilOrigin-Name: 597896ed0ae9e2960a8f39576bd7f77a11dccc1da84b6a44ebb5c38d90ebc330
This commit is contained in:
13
src/expr.c
13
src/expr.c
@@ -5449,12 +5449,13 @@ struct SrcCount {
|
||||
** Count the number of references to columns.
|
||||
*/
|
||||
static int exprSrcCount(Walker *pWalker, Expr *pExpr){
|
||||
/* The NEVER() on the second term is because sqlite3FunctionUsesThisSrc()
|
||||
** is always called before sqlite3ExprAnalyzeAggregates() and so the
|
||||
** TK_COLUMNs have not yet been converted into TK_AGG_COLUMN. If
|
||||
** sqlite3FunctionUsesThisSrc() is used differently in the future, the
|
||||
** NEVER() will need to be removed. */
|
||||
if( pExpr->op==TK_COLUMN || NEVER(pExpr->op==TK_AGG_COLUMN) ){
|
||||
/* There was once a NEVER() on the second term on the grounds that
|
||||
** sqlite3FunctionUsesThisSrc() was always called before
|
||||
** sqlite3ExprAnalyzeAggregates() and so the TK_COLUMNs have not yet
|
||||
** been converted into TK_AGG_COLUMN. But this is no longer true due
|
||||
** to window functions - sqlite3WindowRewrite() may now indirectly call
|
||||
** FunctionUsesThisSrc() when creating a new sub-select. */
|
||||
if( pExpr->op==TK_COLUMN || pExpr->op==TK_AGG_COLUMN ){
|
||||
int i;
|
||||
struct SrcCount *p = pWalker->u.pSrcCount;
|
||||
SrcList *pSrc = p->pSrc;
|
||||
|
||||
Reference in New Issue
Block a user