aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-08-18 16:05:46 +0000
committerdrh <drh@noemail.net>2009-08-18 16:05:46 +0000
commitfeb306f556fb5737e30721f2fa3ca54bfa249d64 (patch)
treeb6dadd323f6981ed977e385c34b2da0d7e57696d /src/expr.c
parent1b25753b30781a3d2a2fc7ed263b4d920dc010e9 (diff)
downloadsqlite-feb306f556fb5737e30721f2fa3ca54bfa249d64.tar.gz
sqlite-feb306f556fb5737e30721f2fa3ca54bfa249d64.zip
Unknown functions in the DEFAULT clause of a table cause an error when
the DEFAULT value is needed. Ticket [2d401a94287b5]. FossilOrigin-Name: 093917d7fda442012dfd1a1b2f20f85d2eefa093
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c
index 9460163bf..b4d84d158 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -11,8 +11,6 @@
*************************************************************************
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
-**
-** $Id: expr.c,v 1.448 2009/07/27 10:05:05 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -2372,7 +2370,10 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
zId = pExpr->u.zToken;
nId = sqlite3Strlen30(zId);
pDef = sqlite3FindFunction(db, zId, nId, nFarg, enc, 0);
- assert( pDef!=0 );
+ if( pDef==0 ){
+ sqlite3ErrorMsg(pParse, "unknown function: %.*s()", nId, zId);
+ break;
+ }
if( pFarg ){
r1 = sqlite3GetTempRange(pParse, nFarg);
sqlite3ExprCodeExprList(pParse, pFarg, r1, 1);