Lines Matching refs:pTo
2251 static int whereLoopXfer(sqlite3 *db, WhereLoop *pTo, WhereLoop *pFrom){ in whereLoopXfer() argument
2252 whereLoopClearUnion(db, pTo); in whereLoopXfer()
2253 if( pFrom->nLTerm > pTo->nLSlot in whereLoopXfer()
2254 && whereLoopResize(db, pTo, pFrom->nLTerm) in whereLoopXfer()
2256 memset(pTo, 0, WHERE_LOOP_XFER_SZ); 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()
4793 WherePath *pTo; /* An element of aTo[] that we are working on */ in wherePathSolver() local
4942 for(jj=0, pTo=aTo; jj<nTo; jj++, pTo++){ in wherePathSolver()
4943 if( pTo->maskLoop==maskNew in wherePathSolver()
4944 && ((pTo->isOrdered^isOrdered)&0x80)==0 in wherePathSolver()
4976 pTo = &aTo[jj]; in wherePathSolver()
4993 if( pTo->rCost<rCost in wherePathSolver()
4994 || (pTo->rCost==rCost in wherePathSolver()
4995 && (pTo->nRow<nOut in wherePathSolver()
4996 || (pTo->nRow==nOut && pTo->rUnsorted<=rUnsorted) in wherePathSolver()
5007 wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow, in wherePathSolver()
5008 pTo->rUnsorted, pTo->isOrdered>=0 ? pTo->isOrdered+'0' : '?'); in wherePathSolver()
5012 testcase( pTo->rCost==rCost ); in wherePathSolver()
5015 testcase( pTo->rCost==rCost+1 ); in wherePathSolver()
5025 wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow, in wherePathSolver()
5026 pTo->rUnsorted, pTo->isOrdered>=0 ? pTo->isOrdered+'0' : '?'); in wherePathSolver()
5031 pTo->maskLoop = pFrom->maskLoop | pWLoop->maskSelf; in wherePathSolver()
5032 pTo->revLoop = revMask; in wherePathSolver()
5033 pTo->nRow = nOut; in wherePathSolver()
5034 pTo->rCost = rCost; in wherePathSolver()
5035 pTo->rUnsorted = rUnsorted; in wherePathSolver()
5036 pTo->isOrdered = isOrdered; in wherePathSolver()
5037 memcpy(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop); in wherePathSolver()
5038 pTo->aLoop[iLoop] = pWLoop; in wherePathSolver()
5043 for(jj=1, pTo=&aTo[1]; jj<mxChoice; jj++, pTo++){ in wherePathSolver()
5044 if( pTo->rCost>mxCost in wherePathSolver()
5045 || (pTo->rCost==mxCost && pTo->rUnsorted>mxUnsorted) in wherePathSolver()
5047 mxCost = pTo->rCost; in wherePathSolver()
5048 mxUnsorted = pTo->rUnsorted; in wherePathSolver()
5059 for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){ in wherePathSolver()
5061 wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow, in wherePathSolver()
5062 pTo->isOrdered>=0 ? (pTo->isOrdered+'0') : '?'); in wherePathSolver()
5063 if( pTo->isOrdered>0 ){ in wherePathSolver()
5064 sqlite3DebugPrintf(" rev=0x%llx\n", pTo->revLoop); in wherePathSolver()