diff options
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index e6ac84db9..9eb893d26 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2768,6 +2768,11 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){ 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 |