Lines Matching refs:pWC
33 WhereClause *pWC; /* The Where clause being analyzed */ member
314 WhereClause *pWC; /* Shorthand for pScan->pWC */ in whereScanNext() local
319 pWC = pScan->pWC; in whereScanNext()
323 assert( pWC!=0 ); in whereScanNext()
326 for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){ in whereScanNext()
356 Parse *pParse = pWC->pWInfo->pParse; in whereScanNext()
377 pScan->pWC = pWC; in whereScanNext()
395 pWC = pWC->pOuter; in whereScanNext()
397 }while( pWC!=0 ); in whereScanNext()
399 pWC = pScan->pOrigWC; in whereScanNext()
438 WhereClause *pWC, /* The WHERE clause to be scanned */ in whereScanInit() argument
444 pScan->pOrigWC = pWC; in whereScanInit()
445 pScan->pWC = pWC; in whereScanInit()
501 WhereClause *pWC, /* The WHERE clause to be searched */ in sqlite3WhereFindTerm() argument
512 p = whereScanInit(&scan, pWC, iCur, iColumn, op, pIdx); in sqlite3WhereFindTerm()
590 WhereClause *pWC, /* The WHERE clause */ in isDistinctRedundant() argument
633 if( 0==sqlite3WhereFindTerm(pWC, iBase, i, ~(Bitmask)0, WO_EQ, pIdx) ){ in isDistinctRedundant()
822 const WhereClause *pWC, /* The WHERE clause */ in constructAutomaticIndex() argument
861 pWCEnd = &pWC->a[pWC->nTerm]; in constructAutomaticIndex()
864 for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){ in constructAutomaticIndex()
930 for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){ in constructAutomaticIndex()
984 pTabItem = &pWC->pWInfo->pTabList->a[pLevel->iFrom]; in constructAutomaticIndex()
1169 WhereClause *pWC, /* The WHERE clause being analyzed */ in allocateIndexInfo() argument
1198 for(i=nTerm=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){ in allocateIndexInfo()
1294 pHidden->pWC = pWC; in allocateIndexInfo()
1298 for(i=j=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){ in allocateIndexInfo()
2129 void sqlite3WhereClausePrint(WhereClause *pWC){ in sqlite3WhereClausePrint() argument
2131 for(i=0; i<pWC->nTerm; i++){ in sqlite3WhereClausePrint()
2132 sqlite3WhereTermPrint(&pWC->a[i], i); in sqlite3WhereClausePrint()
2141 void sqlite3WhereLoopPrint(WhereLoop *p, WhereClause *pWC){ in sqlite3WhereLoopPrint() argument
2142 WhereInfo *pWInfo = pWC->pWInfo; in sqlite3WhereLoopPrint()
2514 sqlite3WhereLoopPrint(pTemplate, pBuilder->pWC); in whereLoopInsert()
2531 sqlite3WhereLoopPrint(pTemplate, pBuilder->pWC); in whereLoopInsert()
2547 sqlite3WhereLoopPrint(p, pBuilder->pWC); in whereLoopInsert()
2552 sqlite3WhereLoopPrint(pTemplate, pBuilder->pWC); in whereLoopInsert()
2576 sqlite3WhereLoopPrint(pToDel, pBuilder->pWC); in whereLoopInsert()
2622 WhereClause *pWC, /* The WHERE clause */ in whereLoopOutputAdjust() argument
2632 for(i=pWC->nBase, pTerm=pWC->a; i>0; i--, pTerm++){ in whereLoopOutputAdjust()
2641 if( pX->iParent>=0 && (&pWC->a[pX->iParent])==pTerm ) break; in whereLoopOutputAdjust()
2655 || (pWC->pWInfo->pTabList->a[pLoop->iTab].fg.jointype in whereLoopOutputAdjust()
2838 pTerm = whereScanInit(&scan, pBuilder->pWC, pSrc->iCursor, saved_nEq, in whereLoopAddBtreeIndex()
2989 assert( (pTop-(pTerm->pWC->a))<pTerm->pWC->nTerm ); in whereLoopAddBtreeIndex()
3105 whereLoopOutputAdjust(pBuilder->pWC, pNew, rSize); in whereLoopAddBtreeIndex()
3222 WhereClause *pWC, /* The WHERE clause of the query */ in whereUsablePartialIndex() argument
3230 pParse = pWC->pWInfo->pParse; in whereUsablePartialIndex()
3232 if( !whereUsablePartialIndex(iTab,jointype,pWC,pWhere->pLeft) ) return 0; in whereUsablePartialIndex()
3236 for(i=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){ in whereUsablePartialIndex()
3390 WhereClause *pWC; /* The parsed WHERE clause */ in whereLoopAddBtree() local
3398 pWC = pBuilder->pWC; in whereLoopAddBtree()
3449 WhereTerm *pWCEnd = pWC->a + pWC->nTerm; in whereLoopAddBtree()
3451 for(pTerm=pWC->a; rc==SQLITE_OK && pTerm<pWCEnd; pTerm++){ in whereLoopAddBtree()
3495 && !whereUsablePartialIndex(pSrc->iCursor, pSrc->fg.jointype, pWC, in whereLoopAddBtree()
3544 whereLoopOutputAdjust(pWC, pNew, rSize); in whereLoopAddBtree()
3608 whereLoopOutputAdjust(pWC, pNew, rSize); in whereLoopAddBtree()
3681 WhereClause *pWC = pBuilder->pWC; in whereLoopAddVirtualOne() local
3701 WhereTerm *pTerm = &pWC->a[pIdxCons->iTermOffset]; in whereLoopAddVirtualOne()
3749 || j>=pWC->nTerm in whereLoopAddVirtualOne()
3759 testcase( j==pWC->nTerm-1 ); in whereLoopAddVirtualOne()
3760 pTerm = &pWC->a[j]; in whereLoopAddVirtualOne()
3870 Expr *pX = pHidden->pWC->a[iTerm].pExpr; in sqlite3_vtab_collation()
3916 WhereTerm *pTerm = &pH->pWC->a[pIdxInfo->aConstraint[iCons].iTermOffset]; in sqlite3_vtab_rhs_value()
4003 WhereClause *pWC; /* The WHERE clause */ in whereLoopAddVirtual() local
4016 pWC = pBuilder->pWC; in whereLoopAddVirtual()
4020 p = allocateIndexInfo(pWInfo, pWC, mUnusable, pSrc, &mNoOmit); in whereLoopAddVirtual()
4078 pWC->a[p->aConstraint[i].iTermOffset].prereqRight & ~mPrereq in whereLoopAddVirtual()
4132 WhereClause *pWC; in whereLoopAddOr() local
4142 pWC = pBuilder->pWC; in whereLoopAddOr()
4143 pWCEnd = pWC->a + pWC->nTerm; in whereLoopAddOr()
4152 for(pTerm=pWC->a; pTerm<pWCEnd && rc==SQLITE_OK; pTerm++){ in whereLoopAddOr()
4168 sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc; in whereLoopAddOr()
4170 tempWC.pWInfo = pWC->pWInfo; in whereLoopAddOr()
4171 tempWC.pOuter = pWC; in whereLoopAddOr()
4176 sSubBuild.pWC = &tempWC; in whereLoopAddOr()
4183 (int)(pOrTerm-pOrWC->a), pTerm, sSubBuild.pWC->nTerm)); in whereLoopAddOr()
4185 sqlite3WhereClausePrint(sSubBuild.pWC); in whereLoopAddOr()
4318 if( rc==SQLITE_OK && pBuilder->pWC->hasOr ){ in whereLoopAddAll()
5181 WhereClause *pWC; in whereShortCut() local
5202 pWC = &pWInfo->sWC; in whereShortCut()
5206 pTerm = whereScanInit(&scan, pWC, iCur, -1, WO_EQ|WO_IS, 0); in whereShortCut()
5226 pTerm = whereScanInit(&scan, pWC, iCur, j, opMask, pIdx); in whereShortCut()
5301 static void showAllWhereLoops(WhereInfo *pWInfo, WhereClause *pWC){ in showAllWhereLoops() argument
5309 sqlite3WhereLoopPrint(p, pWC); in showAllWhereLoops()
5717 sWLB.pWC = &pWInfo->sWC; in sqlite3WhereBegin()
5791 for(ii=0; ii<sWLB.pWC->nBase; ii++){ in sqlite3WhereBegin()
5792 WhereTerm *pT = &sWLB.pWC->a[ii]; in sqlite3WhereBegin()
5837 sqlite3WhereClausePrint(sWLB.pWC); in sqlite3WhereBegin()
5852 WHERETRACE_ALL_LOOPS(pWInfo, sWLB.pWC); in sqlite3WhereBegin()
5865 WHERETRACE_ALL_LOOPS(pWInfo, sWLB.pWC); in sqlite3WhereBegin()
5903 sqlite3WhereLoopPrint(pWInfo->a[ii].pWLoop, sWLB.pWC); in sqlite3WhereBegin()
5941 sqlite3WhereClausePrint(sWLB.pWC); in sqlite3WhereBegin()