Lines Matching refs:pTemplate

134869 static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){
134870 if( (pTemplate->wsFlags & WHERE_INDEXED)==0 ) return;
134872 if( p->iTab!=pTemplate->iTab ) continue;
134874 if( whereLoopCheaperProperSubset(p, pTemplate) ){
134878 pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut-1));
134879 pTemplate->rRun = p->rRun;
134880 pTemplate->nOut = p->nOut - 1;
134881 }else if( whereLoopCheaperProperSubset(pTemplate, p) ){
134885 pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut+1));
134886 pTemplate->rRun = p->rRun;
134887 pTemplate->nOut = p->nOut + 1;
134908 const WhereLoop *pTemplate
134912 if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){
134921 assert( p->rSetup==0 || pTemplate->rSetup==0
134922 || p->rSetup==pTemplate->rSetup );
134927 assert( p->rSetup>=pTemplate->rSetup );
134933 && (pTemplate->nSkip)==0
134934 && (pTemplate->wsFlags & WHERE_INDEXED)!=0
134935 && (pTemplate->wsFlags & WHERE_COLUMN_EQ)!=0
134936 && (p->prereq & pTemplate->prereq)==pTemplate->prereq
134946 if( (p->prereq & pTemplate->prereq)==p->prereq /* (1) */
134947 && p->rSetup<=pTemplate->rSetup /* (2a) */
134948 && p->rRun<=pTemplate->rRun /* (2b) */
134949 && p->nOut<=pTemplate->nOut /* (2c) */
134959 if( (p->prereq & pTemplate->prereq)==pTemplate->prereq /* (1) */
134960 && p->rRun>=pTemplate->rRun /* (2a) */
134961 && p->nOut>=pTemplate->nOut /* (2b) */
134963 assert( p->rSetup>=pTemplate->rSetup ); /* SETUP-INVARIANT above */
134994 static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
135004 if( pTemplate->nLTerm ){
135009 whereOrInsert(pBuilder->pOrSet, pTemplate->prereq, pTemplate->rRun,
135010 pTemplate->nOut);
135014 whereLoopPrint(pTemplate, pBuilder->pWC);
135023 whereLoopAdjustCost(pWInfo->pLoops, pTemplate);
135024 ppPrev = whereLoopFindLesser(&pWInfo->pLoops, pTemplate);
135032 whereLoopPrint(pTemplate, pBuilder->pWC);
135053 whereLoopPrint(pTemplate, pBuilder->pWC);
135069 ppTail = whereLoopFindLesser(ppTail, pTemplate);
135083 rc = whereLoopXfer(db, p, pTemplate);