From: dan Date: Fri, 13 Sep 2019 17:05:48 +0000 (+0000) Subject: Change the meaning of the SQLITE_SUBTYPE flag so that it indicates that the user... X-Git-Tag: version-3.30.0~58^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01a3b6b1b2dae46b1a54264ce78ff95fb7fc2d95;p=thirdparty%2Fsqlite.git Change the meaning of the SQLITE_SUBTYPE flag so that it indicates that the user-defined function cares about the subtypes of its arguments. FossilOrigin-Name: af1bc20f502816db460d2b2d353f715da5cf660e59095de5214c829c1cb20981 --- diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 1c63c3e409..b3130eaf07 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -2504,14 +2504,14 @@ int sqlite3Json1Init(sqlite3 *db){ #endif for(i=0; idb; - int i; - for(i=0; inExpr; i++){ - Expr *p = pList->a[i].pExpr; - if( p->op==TK_FUNCTION ){ - FuncDef *pDef; - int nArg = 0; - if( !ExprHasProperty(p, EP_TokenOnly) && p->x.pList ){ - nArg = p->x.pList->nExpr; - } - pDef = sqlite3FindFunction(db, p->u.zToken, nArg, db->enc, 0); - if( pDef && (pDef->funcFlags & SQLITE_FUNC_SUBTYPE) ){ - return 1; - } - } - } - } - return 0; -} - /* ** Append a copy of each expression in expression-list pAppend to ** expression list pList. Return a pointer to the result list. @@ -992,7 +966,7 @@ int sqlite3WindowRewrite(Parse *pParse, Select *p){ ** results. */ for(pWin=pMWin; pWin; pWin=pWin->pNextWin){ ExprList *pArgs = pWin->pOwner->x.pList; - if( exprListContainsSubtype(pParse, pArgs) ){ + if( pWin->pFunc->funcFlags & SQLITE_FUNC_SUBTYPE ){ selectWindowRewriteEList(pParse, pMWin, pSrc, pArgs, pTab, &pSublist); pWin->iArgCol = (pSublist ? pSublist->nExpr : 0); pWin->bExprArgs = 1;