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

Simplified "hidden" and "no-expand" handling in the *-expander.

FossilOrigin-Name: c6c3115f3a008cf9b0d7c5c812f17e38c8a75a904032c5f05f0bea03a7340527
This commit is contained in:
drh
2022-05-10 00:24:01 +00:00
parent f71b8123df
commit adef15986a
3 changed files with 17 additions and 19 deletions

View File

@@ -5882,18 +5882,16 @@ static int selectExpander(Walker *pWalker, Select *p){
** result-set list unless the SELECT has the SF_IncludeHidden
** bit set.
*/
if( pTab->aCol[j].colFlags & (COLFLAG_HIDDEN|COLFLAG_NOEXPAND) ){
if( IsHiddenColumn(&pTab->aCol[j])
&& ALWAYS((selFlags & SF_IncludeHidden)==0)
){
continue;
}
if( ALWAYS((pTab->aCol[j].colFlags & COLFLAG_NOEXPAND)!=0)
&& zTName==0
&& (selFlags & (SF_NestedFrom))==0
){
continue;
}
if( (p->selFlags & SF_IncludeHidden)==0
&& IsHiddenColumn(&pTab->aCol[j])
){
continue;
}
if( (pTab->aCol[j].colFlags & COLFLAG_NOEXPAND)!=0
&& zTName==0
&& (selFlags & (SF_NestedFrom))==0
){
continue;
}
tableSeen = 1;