diff options
author | drh <> | 2024-09-20 12:58:15 +0000 |
---|---|---|
committer | drh <> | 2024-09-20 12:58:15 +0000 |
commit | 7f0e0c7dbfdf7c0c408d13f7324adb208e4832c9 (patch) | |
tree | b9f27132887a0f0ca9221348519fbaf456006131 /src/resolve.c | |
parent | db467f57778bedcdf2b1c2de2228457c4f8c065e (diff) | |
download | sqlite-7f0e0c7dbfdf7c0c408d13f7324adb208e4832c9.tar.gz sqlite-7f0e0c7dbfdf7c0c408d13f7324adb208e4832c9.zip |
New assert()s to help verify union access. No logic changes. Testing and
validation code only.
FossilOrigin-Name: b7b64c53f5d7f6b405ee3f1f1be1d84230aa79db5a502c8ad78d3e524f4384fb
Diffstat (limited to 'src/resolve.c')
-rw-r--r-- | src/resolve.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resolve.c b/src/resolve.c index b755cc864..2e4462ac0 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -1119,8 +1119,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ /* Resolve function names */ case TK_FUNCTION: { - ExprList *pList = pExpr->x.pList; /* The argument list */ - int n = pList ? pList->nExpr : 0; /* Number of arguments */ + ExprList *pList; /* The argument list */ + int n; /* Number of arguments */ int no_such_func = 0; /* True if no such function exists */ int wrong_num_args = 0; /* True if wrong number of arguments */ int is_agg = 0; /* True if is an aggregate function */ @@ -1133,6 +1133,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ #endif assert( !ExprHasProperty(pExpr, EP_xIsSelect|EP_IntValue) ); assert( pExpr->pLeft==0 || pExpr->pLeft->op==TK_ORDER ); + pList = pExpr->x.pList; + n = pList ? pList->nExpr : 0; zId = pExpr->u.zToken; pDef = sqlite3FindFunction(pParse->db, zId, n, enc, 0); if( pDef==0 ){ |