diff options
author | drh <drh@noemail.net> | 2007-09-18 15:55:07 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-09-18 15:55:07 +0000 |
commit | 728b577934d318253193d2638263ddc38767187c (patch) | |
tree | 9d5303ccee9d07d351f1feb533dd924ded5562b5 /src/expr.c | |
parent | adfb9b0501e005d10aaec727fa56ed5beff0d7d0 (diff) | |
download | sqlite-728b577934d318253193d2638263ddc38767187c.tar.gz sqlite-728b577934d318253193d2638263ddc38767187c.zip |
Remove unneeded pSchema field from the Expr structure. (CVS 4434)
FossilOrigin-Name: b2d605a2714245febb316a24edc7a076e21a3849
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/expr.c b/src/expr.c index 5281c6a0e..0a7091a09 100644 --- a/src/expr.c +++ b/src/expr.c @@ -12,7 +12,7 @@ ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.312 2007/09/01 18:24:55 danielk1977 Exp $ +** $Id: expr.c,v 1.313 2007/09/18 15:55:07 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -1014,6 +1014,7 @@ static int lookupName( struct SrcList_item *pItem; /* Use for looping over pSrcList items */ struct SrcList_item *pMatch = 0; /* The matching pSrcList item */ NameContext *pTopNC = pNC; /* First namecontext in the list */ + Schema *pSchema = 0; /* Schema of the expression */ assert( pColumnToken && pColumnToken->z ); /* The Z in X.Y.Z cannot be NULL */ zDb = sqlite3NameFromToken(db, pDbToken); @@ -1052,7 +1053,7 @@ static int lookupName( } if( 0==(cntTab++) ){ pExpr->iTable = pItem->iCursor; - pExpr->pSchema = pTab->pSchema; + pSchema = pTab->pSchema; pMatch = pItem; } for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){ @@ -1062,7 +1063,7 @@ static int lookupName( cnt++; pExpr->iTable = pItem->iCursor; pMatch = pItem; - pExpr->pSchema = pTab->pSchema; + pSchema = pTab->pSchema; /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */ pExpr->iColumn = j==pTab->iPKey ? -1 : j; pExpr->affinity = pTab->aCol[j].affinity; @@ -1116,7 +1117,7 @@ static int lookupName( int iCol; Column *pCol = pTab->aCol; - pExpr->pSchema = pTab->pSchema; + pSchema = pTab->pSchema; cntTab++; for(iCol=0; iCol < pTab->nCol; iCol++, pCol++) { if( sqlite3StrICmp(pCol->zName, zCol)==0 ){ @@ -1263,7 +1264,7 @@ lookupname_end_2: sqlite3_free(zCol); if( cnt==1 ){ assert( pNC!=0 ); - sqlite3AuthRead(pParse, pExpr, pNC->pSrcList); + sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList); if( pMatch && !pMatch->pSelect ){ pExpr->pTab = pMatch->pTab; } |