Lines Matching refs:pFrom

2251 static int whereLoopXfer(sqlite3 *db, WhereLoop *pTo, WhereLoop *pFrom){  in whereLoopXfer()  argument
2253 if( pFrom->nLTerm > pTo->nLSlot in whereLoopXfer()
2254 && whereLoopResize(db, pTo, pFrom->nLTerm) in whereLoopXfer()
2259 memcpy(pTo, pFrom, WHERE_LOOP_XFER_SZ); in whereLoopXfer()
2260 memcpy(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0])); in whereLoopXfer()
2261 if( pFrom->wsFlags & WHERE_VIRTUALTABLE ){ in whereLoopXfer()
2262 pFrom->u.vtab.needFree = 0; in whereLoopXfer()
2263 }else if( (pFrom->wsFlags & WHERE_AUTO_INDEX)!=0 ){ in whereLoopXfer()
2264 pFrom->u.btree.pIndex = 0; in whereLoopXfer()
4792 WherePath *pFrom; /* An element of aFrom[] that we are working on */ in wherePathSolver() local
4829 for(ii=mxChoice*2, pFrom=aTo; ii>0; ii--, pFrom++, pX += nLoop){ in wherePathSolver()
4830 pFrom->aLoop = pX; in wherePathSolver()
4868 for(ii=0, pFrom=aFrom; ii<nFrom; ii++, pFrom++){ in wherePathSolver()
4877 if( (pWLoop->prereq & ~pFrom->maskLoop)!=0 ) continue; in wherePathSolver()
4878 if( (pWLoop->maskSelf & pFrom->maskLoop)!=0 ) continue; in wherePathSolver()
4879 if( (pWLoop->wsFlags & WHERE_AUTO_INDEX)!=0 && pFrom->nRow<3 ){ in wherePathSolver()
4890 rUnsorted = sqlite3LogEstAdd(pWLoop->rSetup,pWLoop->rRun + pFrom->nRow); in wherePathSolver()
4891 rUnsorted = sqlite3LogEstAdd(rUnsorted, pFrom->rUnsorted); in wherePathSolver()
4892 nOut = pFrom->nRow + pWLoop->nOut; in wherePathSolver()
4893 maskNew = pFrom->maskLoop | pWLoop->maskSelf; in wherePathSolver()
4894 isOrdered = pFrom->isOrdered; in wherePathSolver()
4898 pWInfo->pOrderBy, pFrom, pWInfo->wctrlFlags, in wherePathSolver()
4901 revMask = pFrom->revLoop; in wherePathSolver()
4961 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut, rUnsorted, in wherePathSolver()
4980 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut, rUnsorted, in wherePathSolver()
5004 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut, rUnsorted, in wherePathSolver()
5022 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut, rUnsorted, in wherePathSolver()
5031 pTo->maskLoop = pFrom->maskLoop | pWLoop->maskSelf; in wherePathSolver()
5037 memcpy(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop); in wherePathSolver()
5073 pFrom = aTo; in wherePathSolver()
5075 aFrom = pFrom; in wherePathSolver()
5086 pFrom = aFrom; in wherePathSolver()
5088 if( pFrom->rCost>aFrom[ii].rCost ) pFrom = &aFrom[ii]; in wherePathSolver()
5094 pLevel->pWLoop = pWLoop = pFrom->aLoop[iLoop]; in wherePathSolver()
5104 int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pResultSet, pFrom, in wherePathSolver()
5105 WHERE_DISTINCTBY, nLoop-1, pFrom->aLoop[nLoop-1], &notUsed); in wherePathSolver()
5112 pWInfo->nOBSat = pFrom->isOrdered; in wherePathSolver()
5114 if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){ in wherePathSolver()
5118 pWInfo->revMask = pFrom->revLoop; in wherePathSolver()
5122 u32 wsFlags = pFrom->aLoop[nLoop-1]->wsFlags; in wherePathSolver()
5127 int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom, in wherePathSolver()
5128 WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m); in wherePathSolver()
5149 pFrom, 0, nLoop-1, pFrom->aLoop[nLoop-1], &revMask in wherePathSolver()
5160 pWInfo->nRowOut = pFrom->nRow; in wherePathSolver()