Lines Matching refs:wctrlFlags
1269 if( (pWInfo->wctrlFlags & WHERE_DISTINCTBY) ){ in allocateIndexInfo()
1270 eDistinct = 2 + ((pWInfo->wctrlFlags & WHERE_SORTBYGROUP)!=0); in allocateIndexInfo()
1271 }else if( pWInfo->wctrlFlags & WHERE_GROUPBY ){ in allocateIndexInfo()
3437 && (pWInfo->wctrlFlags & (WHERE_RIGHT_JOIN|WHERE_OR_SUBCLAUSE))==0 in whereLoopAddBtree()
3516 assert( (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || b==0 ); in whereLoopAddBtree()
3569 && (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 in whereLoopAddBtree()
4358 u16 wctrlFlags, /* WHERE_GROUPBY or _DISTINCTBY or _ORDERBY_LIMIT */ in wherePathSatisfiesOrderBy() argument
4421 if( wctrlFlags & (WHERE_ORDERBY_LIMIT|WHERE_ORDERBY_MAX|WHERE_ORDERBY_MIN) ){ in wherePathSatisfiesOrderBy()
4428 if( wctrlFlags & WHERE_ORDERBY_LIMIT ) continue; in wherePathSatisfiesOrderBy()
4434 && ((wctrlFlags&(WHERE_DISTINCTBY|WHERE_SORTBYGROUP))!=WHERE_DISTINCTBY) in wherePathSatisfiesOrderBy()
4439 }else if( wctrlFlags & WHERE_DISTINCTBY ){ in wherePathSatisfiesOrderBy()
4462 assert( wctrlFlags & in wherePathSatisfiesOrderBy()
4585 testcase( wctrlFlags & WHERE_GROUPBY ); in wherePathSatisfiesOrderBy()
4586 testcase( wctrlFlags & WHERE_DISTINCTBY ); in wherePathSatisfiesOrderBy()
4588 if( (wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY))==0 ) bOnce = 0; in wherePathSatisfiesOrderBy()
4603 if( wctrlFlags & WHERE_DISTINCTBY ){ in wherePathSatisfiesOrderBy()
4609 if( isMatch && (wctrlFlags & WHERE_GROUPBY)==0 ){ in wherePathSatisfiesOrderBy()
4704 assert( pWInfo->wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY) ); in sqlite3WhereIsSorted()
4705 assert( pWInfo->wctrlFlags & WHERE_SORTBYGROUP ); in sqlite3WhereIsSorted()
4756 if( (pWInfo->wctrlFlags & WHERE_USE_LIMIT)!=0 && pWInfo->iLimit<nRow ){ in whereSortingCost()
4758 }else if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT) ){ in whereSortingCost()
4898 pWInfo->pOrderBy, pFrom, pWInfo->wctrlFlags, in wherePathSolver()
5098 if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT)!=0 in wherePathSolver()
5099 && (pWInfo->wctrlFlags & WHERE_DISTINCTBY)==0 in wherePathSolver()
5113 if( pWInfo->wctrlFlags & WHERE_DISTINCTBY ){ in wherePathSolver()
5139 && (pWInfo->wctrlFlags & (WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX))!=0 in wherePathSolver()
5144 if( (pWInfo->wctrlFlags & WHERE_SORTBYGROUP) in wherePathSolver()
5191 if( pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE ) return 0; in whereShortCut()
5253 if( pWInfo->wctrlFlags & WHERE_WANT_DISTINCT ){ in whereShortCut()
5361 assert( 0==(pWInfo->wctrlFlags & WHERE_AGG_DISTINCT) ); in whereOmitNoopJoin()
5374 if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT)==0 in whereOmitNoopJoin()
5628 u16 wctrlFlags, /* The WHERE_* flags defined in sqliteInt.h */ in sqlite3WhereBegin() argument
5646 assert( (wctrlFlags & WHERE_ONEPASS_MULTIROW)==0 || ( in sqlite3WhereBegin()
5647 (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 in sqlite3WhereBegin()
5648 && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0 in sqlite3WhereBegin()
5652 assert( (wctrlFlags & WHERE_OR_SUBCLAUSE)==0 in sqlite3WhereBegin()
5653 || (wctrlFlags & WHERE_USE_LIMIT)==0 ); in sqlite3WhereBegin()
5677 nTabList = (wctrlFlags & WHERE_OR_SUBCLAUSE) ? 1 : pTabList->nSrc; in sqlite3WhereBegin()
5703 pWInfo->wctrlFlags = wctrlFlags; in sqlite3WhereBegin()
5735 if( (wctrlFlags & WHERE_WANT_DISTINCT)!=0 in sqlite3WhereBegin()
5800 if( wctrlFlags & WHERE_WANT_DISTINCT ){ in sqlite3WhereBegin()
5804 wctrlFlags &= ~WHERE_WANT_DISTINCT; in sqlite3WhereBegin()
5805 pWInfo->wctrlFlags &= ~WHERE_WANT_DISTINCT; in sqlite3WhereBegin()
5811 pWInfo->wctrlFlags |= WHERE_DISTINCTBY; in sqlite3WhereBegin()
5819 sqlite3DebugPrintf("*** Optimizer Start *** (wctrlFlags: 0x%x",wctrlFlags); in sqlite3WhereBegin()
5820 if( wctrlFlags & WHERE_USE_LIMIT ){ in sqlite3WhereBegin()
5921 && 0==(wctrlFlags & WHERE_AGG_DISTINCT) /* condition (1) above */ in sqlite3WhereBegin()
5966 assert( (wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1 ); in sqlite3WhereBegin()
5967 if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 ){ in sqlite3WhereBegin()
5972 0!=(wctrlFlags & WHERE_ONEPASS_MULTIROW) in sqlite3WhereBegin()
5974 && (0==(wsFlags & WHERE_MULTI_OR) || (wctrlFlags & WHERE_DUPLICATES_OK)) in sqlite3WhereBegin()
5978 if( wctrlFlags & WHERE_ONEPASS_MULTIROW ){ in sqlite3WhereBegin()
6011 && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0) in sqlite3WhereBegin()
6057 assert( iAuxArg!=0 || (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 ); in sqlite3WhereBegin()
6059 && (wctrlFlags & WHERE_OR_SUBCLAUSE)!=0 in sqlite3WhereBegin()
6068 assert( wctrlFlags & WHERE_ONEPASS_DESIRED ); in sqlite3WhereBegin()
6075 }else if( iAuxArg && (wctrlFlags & WHERE_OR_SUBCLAUSE)!=0 ){ in sqlite3WhereBegin()
6095 && (pWInfo->wctrlFlags&WHERE_ORDERBY_MIN)==0 in sqlite3WhereBegin()
6187 pParse, pTabList, pLevel, wctrlFlags in sqlite3WhereBegin()
6192 if( (wsFlags&WHERE_MULTI_OR)==0 && (wctrlFlags&WHERE_OR_SUBCLAUSE)==0 ){ in sqlite3WhereBegin()