mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix minor problems with the new join table name resolution logic.
FossilOrigin-Name: 3a6b0db4519072dbd41b1c105bf1a0c6b4dd90380e94a5662645d8d41483c707
This commit is contained in:
17
src/select.c
17
src/select.c
@@ -2219,7 +2219,7 @@ int sqlite3ColumnsFromExprList(
|
||||
cnt = 0;
|
||||
while( zName && (pCollide = sqlite3HashFind(&ht, zName))!=0 ){
|
||||
if( pCollide->bUsingTerm ){
|
||||
pCol->colFlags |= COLFLAG_HIDDEN;
|
||||
pCol->colFlags |= COLFLAG_NOEXPAND;
|
||||
}
|
||||
nName = sqlite3Strlen30(zName);
|
||||
if( nName>0 ){
|
||||
@@ -5872,10 +5872,17 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||
** result-set list unless the SELECT has the SF_IncludeHidden
|
||||
** bit set.
|
||||
*/
|
||||
if( (selFlags & SF_IncludeHidden)==0
|
||||
&& IsHiddenColumn(&pTab->aCol[j]) && zTName==0
|
||||
){
|
||||
continue;
|
||||
if( pTab->aCol[j].colFlags & (COLFLAG_HIDDEN|COLFLAG_NOEXPAND) ){
|
||||
if( IsHiddenColumn(&pTab->aCol[j])
|
||||
&& (selFlags & SF_IncludeHidden)==0
|
||||
){
|
||||
continue;
|
||||
}
|
||||
if( (pTab->aCol[j].colFlags & COLFLAG_NOEXPAND)!=0
|
||||
&& zTName==0
|
||||
){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
tableSeen = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user