mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Better resolution of table and column names in joins where some of the
terms of the FROM clause are parenthesized. FossilOrigin-Name: 7344e791b9456286ecdca6d45f2f5260fb3f10e2
This commit is contained in:
@@ -3392,7 +3392,8 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||
ExprList *pNew = 0;
|
||||
int flags = pParse->db->flags;
|
||||
int longNames = (flags & SQLITE_FullColNames)!=0
|
||||
&& (flags & SQLITE_ShortColNames)==0;
|
||||
&& (flags & SQLITE_ShortColNames)==0
|
||||
&& (p->selFlags & SF_NestedFrom)==0;
|
||||
|
||||
for(k=0; k<pEList->nExpr; k++){
|
||||
Expr *pE = a[k].pExpr;
|
||||
@@ -3479,6 +3480,9 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||
sColname.z = zColname;
|
||||
sColname.n = sqlite3Strlen30(zColname);
|
||||
sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
|
||||
if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
|
||||
pNew->a[pNew->nExpr-1].zSpan = sqlite3DbStrDup(db, zTabName);
|
||||
}
|
||||
sqlite3DbFree(db, zToFree);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user