diff options
author | drh <drh@noemail.net> | 2017-03-07 03:40:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-03-07 03:40:48 +0000 |
commit | a92b81f487d8f71ef460817be8f4838e9f13816b (patch) | |
tree | e7385e375cecc5360e405da48966c5a703d73b19 /src/resolve.c | |
parent | 3cf48e3e89ff34d61436751d5a47f15eba570b8a (diff) | |
download | sqlite-a92b81f487d8f71ef460817be8f4838e9f13816b.tar.gz sqlite-a92b81f487d8f71ef460817be8f4838e9f13816b.zip |
More size and speed improvements in the expression name resolver.
FossilOrigin-Name: e0a3d39f51a50420bae97e2bc9a8c01a5b0d3db8
Diffstat (limited to 'src/resolve.c')
-rw-r--r-- | src/resolve.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/resolve.c b/src/resolve.c index 59157996c..6b3caa625 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -229,7 +229,8 @@ static int lookupName( } /* Start at the inner-most context and move outward until a match is found */ - while( pNC && cnt==0 ){ + assert( pNC && cnt==0 ); + do{ ExprList *pEList; SrcList *pSrcList = pNC->pSrcList; @@ -414,11 +415,11 @@ static int lookupName( /* Advance to the next name context. The loop will exit when either ** we have a match (cnt>0) or when we run out of name contexts. */ - if( cnt==0 ){ - pNC = pNC->pNext; - nSubquery++; - } - } + if( cnt ) break; + pNC = pNC->pNext; + nSubquery++; + }while( pNC ); + /* ** If X and Y are NULL (in other words if only the column name Z is |