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

Remove an incorrect assert() statement (ticket [beba9cae6345a]). Fix other

minor problems in the name resolution logic.

FossilOrigin-Name: afe96a118c8a9627819ba5960aa83a607e734087
This commit is contained in:
drh
2013-01-03 16:54:20 +00:00
parent 3e3f1a5b49
commit c75e09c761
5 changed files with 56 additions and 17 deletions

View File

@@ -262,9 +262,6 @@ static int lookupName(
pTab = pItem->pTab;
assert( pTab!=0 && pTab->zName!=0 );
assert( pTab->nCol>0 );
if( zDb && pTab->pSchema!=pSchema ){
continue;
}
if( pItem->pSelect && (pItem->pSelect->selFlags & SF_NestedFrom)!=0 ){
ExprList *pEList = pItem->pSelect->pEList;
int hit = 0;
@@ -278,6 +275,9 @@ static int lookupName(
}
if( hit || zTab==0 ) continue;
}
if( zDb && pTab->pSchema!=pSchema ){
continue;
}
if( zTab ){
const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
assert( zTabName!=0 );