diff options
author | drh <drh@noemail.net> | 2016-09-16 11:53:10 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-09-16 11:53:10 +0000 |
commit | a0daa751f85d7150e8fe4b143253d6f771204d46 (patch) | |
tree | 709e24ab2cf7ae98e78d0a33252f5c6d4cfac1cb /src/resolve.c | |
parent | 760c8162fffd53f660adf4b3cdaf7aee7070d845 (diff) | |
download | sqlite-a0daa751f85d7150e8fe4b143253d6f771204d46.tar.gz sqlite-a0daa751f85d7150e8fe4b143253d6f771204d46.zip |
Fix SQLITE_OMIT_AUTHORIZATION so that it compiles cleanly.
FossilOrigin-Name: a3e3b3e1c57178ccd38fc7375ec1de8e8ae45372
Diffstat (limited to 'src/resolve.c')
-rw-r--r-- | src/resolve.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/resolve.c b/src/resolve.c index a5cc06b91..2171533ef 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -646,7 +646,6 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ 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 */ - int auth; /* Authorization to use the function */ int nId; /* Number of characters in function name */ const char *zId; /* The function name. */ FuncDef *pDef; /* Information about the function */ @@ -690,15 +689,17 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ } } #ifndef SQLITE_OMIT_AUTHORIZATION - auth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0, pDef->zName, 0); - if( auth!=SQLITE_OK ){ - if( auth==SQLITE_DENY ){ - sqlite3ErrorMsg(pParse, "not authorized to use function: %s", - pDef->zName); - pNC->nErr++; + { + int auth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0,pDef->zName,0); + if( auth!=SQLITE_OK ){ + if( auth==SQLITE_DENY ){ + sqlite3ErrorMsg(pParse, "not authorized to use function: %s", + pDef->zName); + pNC->nErr++; + } + pExpr->op = TK_NULL; + return WRC_Prune; } - pExpr->op = TK_NULL; - return WRC_Prune; } #endif if( pDef->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG) ){ |