Lines Matching refs:pTemplate

134885 static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){
134886 if( (pTemplate->wsFlags & WHERE_INDEXED)==0 ) return;
134888 if( p->iTab!=pTemplate->iTab ) continue;
134890 if( whereLoopCheaperProperSubset(p, pTemplate) ){
134894 pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut-1));
134895 pTemplate->rRun = p->rRun;
134896 pTemplate->nOut = p->nOut - 1;
134897 }else if( whereLoopCheaperProperSubset(pTemplate, p) ){
134901 pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut+1));
134902 pTemplate->rRun = p->rRun;
134903 pTemplate->nOut = p->nOut + 1;
134924 const WhereLoop *pTemplate
134928 if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){
134937 assert( p->rSetup==0 || pTemplate->rSetup==0
134938 || p->rSetup==pTemplate->rSetup );
134943 assert( p->rSetup>=pTemplate->rSetup );
134949 && (pTemplate->nSkip)==0
134950 && (pTemplate->wsFlags & WHERE_INDEXED)!=0
134951 && (pTemplate->wsFlags & WHERE_COLUMN_EQ)!=0
134952 && (p->prereq & pTemplate->prereq)==pTemplate->prereq
134962 if( (p->prereq & pTemplate->prereq)==p->prereq /* (1) */
134963 && p->rSetup<=pTemplate->rSetup /* (2a) */
134964 && p->rRun<=pTemplate->rRun /* (2b) */
134965 && p->nOut<=pTemplate->nOut /* (2c) */
134975 if( (p->prereq & pTemplate->prereq)==pTemplate->prereq /* (1) */
134976 && p->rRun>=pTemplate->rRun /* (2a) */
134977 && p->nOut>=pTemplate->nOut /* (2b) */
134979 assert( p->rSetup>=pTemplate->rSetup ); /* SETUP-INVARIANT above */
135010 static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
135020 if( pTemplate->nLTerm ){
135025 whereOrInsert(pBuilder->pOrSet, pTemplate->prereq, pTemplate->rRun,
135026 pTemplate->nOut);
135030 whereLoopPrint(pTemplate, pBuilder->pWC);
135039 whereLoopAdjustCost(pWInfo->pLoops, pTemplate);
135040 ppPrev = whereLoopFindLesser(&pWInfo->pLoops, pTemplate);
135048 whereLoopPrint(pTemplate, pBuilder->pWC);
135069 whereLoopPrint(pTemplate, pBuilder->pWC);
135085 ppTail = whereLoopFindLesser(ppTail, pTemplate);
135099 rc = whereLoopXfer(db, p, pTemplate);