mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user