1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Refactor names of flags for improved legibility.

FossilOrigin-Name: 411e8ec2219bb4181aaf2209fb1e7baf5e8df8b8c8adb82a69b48cf7e8e7e7d4
This commit is contained in:
drh
2020-01-06 15:25:41 +00:00
parent 67c826536f
commit 2928a15b3c
9 changed files with 101 additions and 54 deletions

View File

@@ -887,17 +887,18 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
pDef = 0;
}else
if( (pDef->funcFlags & (SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE))!=0
&& ExprHasProperty(pExpr, EP_Indirect)
&& ExprHasProperty(pExpr, EP_FromDDL)
&& !IN_RENAME_OBJECT
){
if( (pDef->funcFlags & SQLITE_FUNC_DIRECT)!=0
|| (pParse->db->flags & SQLITE_UnsafeDDL)==0
|| (pParse->db->flags & SQLITE_UnsafeSchema)!=0
){
/* Functions prohibited in triggers and views if:
** (1) tagged with SQLITE_DIRECTONLY
** (2) not tagged with SQLITE_INNOCUOUS (which means it
** is tagged with SQLITE_FUNC_UNSAFE) and
** SQLITE_DBCONFIG_ENABLE_UNSAFE_DDL is off
** SQLITE_DBCONFIG_UNTRUSTED_SCHEMA is off (meaning
** that the schema is fully trustworthy).
*/
sqlite3ErrorMsg(pParse, "%s() prohibited in triggers and views",
pDef->zName);