• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/Heimdal-398.1.2/lib/sqlite/

Lines Matching defs:pWC

10625   struct WhereClause *pWC;       /* Decomposition of the WHERE clause */
100396 ** WhereTerm.pWC->a[WhereTerm.idx] == WhereTerm
100441 int iParent; /* Disable pWC->a[iParent] when this term disabled */
100451 WhereClause *pWC; /* The clause this term is part of */
100607 WhereClause *pWC, /* The WhereClause to be initialized */
100611 pWC->pParse = pParse;
100612 pWC->pMaskSet = pMaskSet;
100613 pWC->nTerm = 0;
100614 pWC->nSlot = ArraySize(pWC->aStatic);
100615 pWC->a = pWC->aStatic;
100616 pWC->vmask = 0;
100642 static void whereClauseClear(WhereClause *pWC){
100645 sqlite3 *db = pWC->pParse->db;
100646 for(i=pWC->nTerm-1, a=pWC->a; i>=0; i--, a++){
100656 if( pWC->a!=pWC->aStatic ){
100657 sqlite3DbFree(db, pWC->a);
100662 ** Add a single new WhereTerm entry to the WhereClause object pWC.
100664 ** The index in pWC->a[] of the new WhereTerm is returned on success.
100669 ** This routine will increase the size of the pWC->a[] array as necessary.
100672 ** for freeing the expression p is assumed by the WhereClause object pWC.
100678 ** the pWC->a[] array.
100680 static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
100684 if( pWC->nTerm>=pWC->nSlot ){
100685 WhereTerm *pOld = pWC->a;
100686 sqlite3 *db = pWC->pParse->db;
100687 pWC->a = sqlite3DbMallocRaw(db, sizeof(pWC->a[0])*pWC->nSlot*2 );
100688 if( pWC->a==0 ){
100692 pWC->a = pOld;
100695 memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);
100696 if( pOld!=pWC->aStatic ){
100699 pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
100701 pTerm = &pWC->a[idx = pWC->nTerm++];
100704 pTerm->pWC = pWC;
100726 static void whereSplit(WhereClause *pWC, Expr *pExpr, int op){
100727 pWC->op = (u8)op;
100730 whereClauseInsert(pWC, pExpr, 0);
100732 whereSplit(pWC, pExpr->pLeft, op);
100733 whereSplit(pWC, pExpr->pRight, op);
100921 WhereClause *pWC, /* The WHERE clause to be searched */
100932 for(pTerm=pWC->a, k=pWC->nTerm; k; k--, pTerm++){
100943 Parse *pParse = pWC->pParse;
100977 WhereClause *pWC /* the WHERE clause to be analyzed */
100980 for(i=pWC->nTerm-1; i>=0; i--){
100981 exprAnalyze(pTabList, pWC, i);
101199 WhereClause *pWC, /* the complete WHERE clause */
101202 Parse *pParse = pWC->pParse; /* Parser context */
101204 WhereTerm *pTerm = &pWC->a[idxTerm]; /* The term to be analyzed */
101206 WhereMaskSet *pMaskSet = pWC->pMaskSet; /* Table use masks */
101225 whereClauseInit(pOrWc, pWC->pParse, pMaskSet);
101235 chngToIN = ~(pWC->vmask);
101252 whereClauseInit(pAndWC, pWC->pParse, pMaskSet);
101404 pList = sqlite3ExprListAppend(pWC->pParse, pList, pDup);
101415 idxNew = whereClauseInsert(pWC, pNew, TERM_VIRTUAL|TERM_DYNAMIC);
101417 exprAnalyze(pSrc, pWC, idxNew);
101418 pTerm = &pWC->a[idxTerm];
101419 pWC->a[idxNew].iParent = idxTerm;
101451 WhereClause *pWC, /* the WHERE clause */
101464 Parse *pParse = pWC->pParse; /* Parsing context */
101470 pTerm = &pWC->a[idxTerm];
101471 pMaskSet = pWC->pMaskSet;
101516 idxNew = whereClauseInsert(pWC, pDup, TERM_VIRTUAL|TERM_DYNAMIC);
101518 pNew = &pWC->a[idxNew];
101520 pTerm = &pWC->a[idxTerm];
101554 else if( pExpr->op==TK_BETWEEN && pWC->op==TK_AND ){
101566 idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);
101568 exprAnalyze(pSrc, pWC, idxNew);
101569 pTerm = &pWC->a[idxTerm];
101570 pWC->a[idxNew].iParent = idxTerm;
101581 assert( pWC->op==TK_AND );
101582 exprAnalyzeOrTerm(pSrc, pWC, idxTerm);
101583 pTerm = &pWC->a[idxTerm];
101598 if( pWC->op==TK_AND
101633 idxNew1 = whereClauseInsert(pWC, pNewExpr1, TERM_VIRTUAL|TERM_DYNAMIC);
101635 exprAnalyze(pSrc, pWC, idxNew1);
101639 idxNew2 = whereClauseInsert(pWC, pNewExpr2, TERM_VIRTUAL|TERM_DYNAMIC);
101641 exprAnalyze(pSrc, pWC, idxNew2);
101642 pTerm = &pWC->a[idxTerm];
101644 pWC->a[idxNew1].iParent = idxTerm;
101645 pWC->a[idxNew2].iParent = idxTerm;
101672 idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);
101674 pNewTerm = &pWC->a[idxNew];
101680 pTerm = &pWC->a[idxTerm];
101712 idxNew = whereClauseInsert(pWC, pNewExpr,
101715 pNewTerm = &pWC->a[idxNew];
101721 pTerm = &pWC->a[idxTerm];
101804 WhereClause *pWC, /* The WHERE clause */
101828 pTerm = findTerm(pWC, p->iTable, p->iColumn, ~(Bitmask)0, WO_EQ, 0);
101858 WhereClause *pWC,
101896 if( 0==findTerm(pWC, iBase, iCol, ~(Bitmask)0, WO_EQ, pIdx)
102136 WhereClause *pWC, /* The WHERE clause */
102145 const Bitmask maskSrc = getMask(pWC->pMaskSet, iCur); /* Bitmask for pSrc */
102146 WhereTerm * const pWCEnd = &pWC->a[pWC->nTerm]; /* End of pWC->a[] */
102156 for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
102172 (pOrTerm - pOrWC->a), (pTerm - pWC->a)
102179 tempWC.pParse = pWC->pParse;
102180 tempWC.pMaskSet = pWC->pMaskSet;
102250 WhereClause *pWC, /* The WHERE clause */
102259 WhereTerm *pWCEnd; /* End of pWC->a[] */
102295 pWCEnd = &pWC->a[pWC->nTerm];
102296 for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
102321 WhereClause *pWC, /* The WHERE clause */
102328 WhereTerm *pWCEnd; /* End of pWC->a[] */
102356 pWCEnd = &pWC->a[pWC->nTerm];
102358 for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
102409 for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
102474 WhereClause *pWC,
102491 for(i=nTerm=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
102542 for(i=j=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
102638 WhereClause *pWC, /* The WHERE clause */
102667 *ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy);
102711 pTerm = &pWC->a[j];
102736 pCost->used |= pWC->a[pIdxCons[i].iTermOffset].prereqRight;
102771 bestOrClauseIndex(pParse, pWC, pSrc, notReady, notValid, pOrderBy, pCost);
103209 WhereClause *pWC, /* The WHERE clause */
103366 pTerm = findTerm(pWC, iCur, j, notReady, eqTermMask, pIdx);
103392 if( findTerm(pWC, iCur, j, notReady, WO_LT|WO_LE|WO_GT|WO_GE, pIdx) ){
103393 WhereTerm *pTop = findTerm(pWC, iCur, j, notReady, WO_LT|WO_LE, pIdx);
103394 WhereTerm *pBtm = findTerm(pWC, iCur, j, notReady, WO_GT|WO_GE, pIdx);
103421 pParse, pWC->pMaskSet, pProbe, iCur, pOrderBy, nEq, wsFlags, &rev)
103431 if( isDistinctIndex(pParse, pWC, pProbe, iCur, pDistinct, nEq) ){
103579 thisTab = getMask(pWC->pMaskSet, iCur);
103580 for(pTerm=pWC->a, k=pWC->nTerm; nRow>2 && k; k--, pTerm++){
103668 bestOrClauseIndex(pParse, pWC, pSrc, notReady, notValid, pOrderBy, pCost);
103669 bestAutomaticIndex(pParse, pWC, pSrc, notReady, pCost);
103681 WhereClause *pWC, /* The WHERE clause */
103691 bestVirtualIndex(pParse, pWC, pSrc, notReady, notValid, pOrderBy, pCost,&p);
103699 bestBtreeIndex(pParse, pWC, pSrc, notReady, notValid, pOrderBy, 0, pCost);
103736 WhereTerm *pOther = &pTerm->pWC->a[pTerm->iParent];
103891 WhereClause *pWC, /* The WHERE clause */
103927 pTerm = findTerm(pWC, iCur, k, notReady, pLevel->plan.wsFlags, pIdx);
104132 WhereClause *pWC; /* Decomposition of the entire WHERE clause */
104144 pWC = pWInfo->pWC;
104194 sqlite3ExprCode(pParse, pWC->a[iTerm].pExpr->pRight, iReg+j+1);
104208 disableTerm(pLevel, &pWC->a[iTerm]);
104226 pTerm = findTerm(pWC, iCur, -1, notReady, WO_EQ|WO_IN, 0);
104248 pStart = findTerm(pWC, iCur, -1, notReady, WO_GT|WO_GE, 0);
104249 pEnd = findTerm(pWC, iCur, -1, notReady, WO_LT|WO_LE, 0);
104406 pRangeEnd = findTerm(pWC, iCur, k, notReady, (WO_LT|WO_LE), pIdx);
104410 pRangeStart = findTerm(pWC, iCur, k, notReady, (WO_GT|WO_GE), pIdx);
104419 pParse, pLevel, pWC, notReady, nExtraReg, &zStartAff
104712 notReady &= ~getMask(pWC->pMaskSet, iCur);
104721 for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
104749 for(pTerm=pWC->a, j=0; j<pWC->nTerm; j++, pTerm++){
104803 whereClauseClear(pWInfo->pWC);
104912 WhereClause *pWC; /* Decomposition of the WHERE clause */
104916 int andFlags; /* AND-ed combination of all pWC->a[].wtFlags */
104958 pWInfo->pWC = pWC = (WhereClause *)&((u8 *)pWInfo)[nByteWInfo];
104961 pMaskSet = (WhereMaskSet*)&pWC[1];
104971 whereClauseInit(pWC, pParse, pMaskSet);
104973 whereSplit(pWC, pWhere, TK_AND); /* IMP: R-15842-53296 */
105004 assert( pWC->vmask==0 && pMaskSet->n==0 );
105009 pWC->vmask |= ((Bitmask)1 << i);
105029 exprAnalyzeAll(pTabList, pWC);
105038 if( pDistinct && isDistinctRedundant(pParse, pTabList, pWC, pDistinct) ){
105146 bestVirtualIndex(pParse, pWC, pTabItem, mask, notReady, pOrderBy,
105151 bestBtreeIndex(pParse, pWC, pTabItem, mask, notReady, pOrderBy,
105317 constructAutomaticIndex(pParse, pWC, pTabItem, notReady, pLevel);
105331 notReady &= ~getMask(pWC->pMaskSet, pTabItem->iCursor);