aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/expr.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/expr.c b/src/expr.c
index 9eb893d26..0d2292e94 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -2764,15 +2764,10 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
zId = pExpr->u.zToken;
nId = sqlite3Strlen30(zId);
pDef = sqlite3FindFunction(db, zId, nId, nFarg, enc, 0);
- if( pDef==0 ){
+ if( pDef==0 || pDef->xFunc==0 ){
sqlite3ErrorMsg(pParse, "unknown function: %.*s()", nId, zId);
break;
}
- if( pDef->xFunc==0 ){
- sqlite3ErrorMsg(pParse, "misuse of aggregate function: %.*s()",
- nId, zId);
- break;
- }
/* Attempt a direct implementation of the built-in COALESCE() and
** IFNULL() functions. This avoids unnecessary evalation of