aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-10-05 18:10:02 +0000
committerdan <Dan Kennedy>2024-10-05 18:10:02 +0000
commitd564bdb0507aabce5d64905734d5d7e050a2c86d (patch)
tree30cf80a5761d65c2b9caffb15df0d5fa02a87c2a /src/expr.c
parentc857b9eb5d9cfab1366fb80e5d1c306e340b6d65 (diff)
downloadsqlite-d564bdb0507aabce5d64905734d5d7e050a2c86d.tar.gz
sqlite-d564bdb0507aabce5d64905734d5d7e050a2c86d.zip
Allow expressions with subtypes to be read from indexes unless they are being used as direct or indirect parameters to SQLITE_SUBTYPE functions.
FossilOrigin-Name: aa440e78e9004c7ca3e03beaf264f54d0070ad7298a3c96ca097d8b35c872e5f
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/expr.c b/src/expr.c
index 83b1ff56c..506b92c82 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1164,7 +1164,6 @@ Expr *sqlite3ExprFunction(
){
Expr *pNew;
sqlite3 *db = pParse->db;
- int ii;
assert( pToken );
pNew = sqlite3ExprAlloc(db, TK_FUNCTION, pToken, 1);
if( pNew==0 ){
@@ -1179,11 +1178,6 @@ Expr *sqlite3ExprFunction(
){
sqlite3ErrorMsg(pParse, "too many arguments on function %T", pToken);
}
- if( pList && pParse->nErr==0 ){
- for(ii=0; ii<pList->nExpr; ii++){
- ExprSetProperty(pList->a[ii].pExpr, EP_FuncArg);
- }
- }
pNew->x.pList = pList;
ExprSetProperty(pNew, EP_HasFunc);
assert( ExprUseXList(pNew) );
@@ -4650,7 +4644,7 @@ static SQLITE_NOINLINE int sqlite3IndexedExprLookup(
** value taken from an expression index if they are themselves an
** argument to another scalar function or aggregate.
** https://sqlite.org/forum/forumpost/68d284c86b082c3e */
- if( ExprHasProperty(pExpr, EP_FuncArg)
+ if( ExprHasProperty(pExpr, EP_SubtArg)
&& sqlite3ExprCanReturnSubtype(pParse, pExpr)
){
continue;