diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/resolve.c | 6 | ||||
-rw-r--r-- | src/sqliteInt.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/resolve.c b/src/resolve.c index c8cce5868..65906da90 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -477,7 +477,7 @@ static int lookupName( if( cnt==0 && zTab==0 ){ assert( pExpr->op==TK_ID ); if( ExprHasProperty(pExpr,EP_DblQuoted) - && 0==(pTopNC->ncFlags&NC_NewSchema) + && 0==(pTopNC->ncFlags&NC_NoDblQStr) ){ /* If a double-quoted identifier does not match any known column name, ** then treat it as a string. @@ -1771,8 +1771,8 @@ int sqlite3ResolveSelfReference( sNC.pParse = pParse; sNC.pSrcList = &sSrc; sNC.ncFlags = type; - if( pTab && !pParse->db->init.busy && !sqlite3WritableSchema(pParse->db) ){ - sNC.ncFlags |= NC_NewSchema; + if( !pParse->db->init.busy && !sqlite3WritableSchema(pParse->db) ){ + sNC.ncFlags |= NC_NoDblQStr; } if( (rc = sqlite3ResolveExprNames(&sNC, pExpr))!=SQLITE_OK ) return rc; if( pList ) rc = sqlite3ResolveExprListNames(&sNC, pList); diff --git a/src/sqliteInt.h b/src/sqliteInt.h index fc4b46002..630239ff4 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2793,7 +2793,8 @@ struct NameContext { #define NC_Complex 0x2000 /* True if a function or subquery seen */ #define NC_AllowWin 0x4000 /* Window functions are allowed here */ #define NC_HasWin 0x8000 /* One or more window functions seen */ -#define NC_NewSchema 0x10000 /* Currently resolving self-refs for new object */ +#define NC_NoDblQStr 0x10000 /* Do not allow double-quoted string hack. + ** Mnemonic: "NO DouBLe-Quoted STRings" */ /* ** An instance of the following object describes a single ON CONFLICT |