1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-11 12:22:51 +03:00

Fix the application-defined function logic so that functions with a variable

number of parameters can be replaced or deleted correctly.  Also refactor
some of the function-finder code for clarity of presentation.

FossilOrigin-Name: 09d5581c81fb6a9bf6a369d0abf5ef6b54637576
This commit is contained in:
drh
2012-04-07 00:09:21 +00:00
parent 370026242a
commit 89d5d6a2a7
5 changed files with 65 additions and 46 deletions

View File

@@ -533,7 +533,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
nId = sqlite3Strlen30(zId);
pDef = sqlite3FindFunction(pParse->db, zId, nId, n, enc, 0);
if( pDef==0 ){
pDef = sqlite3FindFunction(pParse->db, zId, nId, -1, enc, 0);
pDef = sqlite3FindFunction(pParse->db, zId, nId, -2, enc, 0);
if( pDef==0 ){
no_such_func = 1;
}else{