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

Remove some redundant code: Call sqlite3ResolveExprListNames() rather than

calling sqlite3ResolveExprNames() in a loop - in two places.

FossilOrigin-Name: bdaf66465b6b1bdad10c08d9527b98e7000a41e4
This commit is contained in:
drh
2015-08-24 20:54:06 +00:00
parent 108aa00a87
commit fea870be38
4 changed files with 14 additions and 19 deletions

View File

@@ -1507,7 +1507,6 @@ void sqlite3ResolveSelfReference(
){
SrcList sSrc; /* Fake SrcList for pParse->pNewTable */
NameContext sNC; /* Name context for pParse->pNewTable */
int i; /* Loop counter */
assert( type==NC_IsCheck || type==NC_PartIdx );
memset(&sNC, 0, sizeof(sNC));
@@ -1520,11 +1519,5 @@ void sqlite3ResolveSelfReference(
sNC.pSrcList = &sSrc;
sNC.ncFlags = type;
if( sqlite3ResolveExprNames(&sNC, pExpr) ) return;
if( pList ){
for(i=0; i<pList->nExpr; i++){
if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
return;
}
}
}
if( pList ) sqlite3ResolveExprListNames(&sNC, pList);
}