Lines Matching defs:pIdxInfo

10555 ** The pIdxInfo field is used to help pick the best index on a
10556 ** virtual table. The pIdxInfo pointer contains indexing
10558 ** All the pIdxInfo pointers are freed by whereInfoFree() in where.c.
10590 sqlite3_index_info *pIdxInfo; /* Index info for n-th source table */
102485 sqlite3_index_info *pIdxInfo;
102518 pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo)
102521 if( pIdxInfo==0 ){
102532 pIdxCons = (struct sqlite3_index_constraint*)&pIdxInfo[1];
102535 *(int*)&pIdxInfo->nConstraint = nTerm;
102536 *(int*)&pIdxInfo->nOrderBy = nOrderBy;
102537 *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint = pIdxCons;
102538 *(struct sqlite3_index_orderby**)&pIdxInfo->aOrderBy = pIdxOrderBy;
102539 *(struct sqlite3_index_constraint_usage**)&pIdxInfo->aConstraintUsage =
102570 return pIdxInfo;
102647 sqlite3_index_info *pIdxInfo;
102665 pIdxInfo = *ppIdxInfo;
102666 if( pIdxInfo==0 ){
102667 *ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy);
102669 if( pIdxInfo==0 ){
102673 /* At this point, the sqlite3_index_info structure that pIdxInfo points
102676 ** details of pIdxInfo for the current invocation and pass it to
102707 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
102708 pUsage = pIdxInfo->aConstraintUsage;
102709 for(i=0; i<pIdxInfo->nConstraint; i++, pIdxCons++){
102714 memset(pUsage, 0, sizeof(pUsage[0])*pIdxInfo->nConstraint);
102715 if( pIdxInfo->needToFreeIdxStr ){
102716 sqlite3_free(pIdxInfo->idxStr);
102718 pIdxInfo->idxStr = 0;
102719 pIdxInfo->idxNum = 0;
102720 pIdxInfo->needToFreeIdxStr = 0;
102721 pIdxInfo->orderByConsumed = 0;
102723 pIdxInfo->estimatedCost = SQLITE_BIG_DBL / ((double)2);
102724 nOrderBy = pIdxInfo->nOrderBy;
102726 pIdxInfo->nOrderBy = 0;
102729 if( vtabBestIndex(pParse, pTab, pIdxInfo) ){
102733 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
102734 for(i=0; i<pIdxInfo->nConstraint; i++){
102744 rCost = pIdxInfo->estimatedCost;
102745 if( pOrderBy && pIdxInfo->orderByConsumed==0 ){
102761 pCost->plan.u.pVtabIdx = pIdxInfo;
102762 if( pIdxInfo->orderByConsumed ){
102766 pIdxInfo->nOrderBy = nOrderBy;
104787 sqlite3_index_info *pInfo = pWInfo->a[i].pIdxInfo;
105145 sqlite3_index_info **pp = &pWInfo->a[j].pIdxInfo;
128383 static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
128392 assert( pIdxInfo->idxStr==0 );
128393 for(ii=0; ii<pIdxInfo->nConstraint && iIdx<(int)(sizeof(zIdxStr)-1); ii++){
128394 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];
128400 pIdxInfo->aConstraintUsage[jj].argvIndex = 0;
128401 pIdxInfo->aConstraintUsage[jj].omit = 0;
128403 pIdxInfo->idxNum = 1;
128404 pIdxInfo->aConstraintUsage[ii].argvIndex = 1;
128405 pIdxInfo->aConstraintUsage[jj].omit = 1;
128412 pIdxInfo->estimatedCost = 10.0;
128431 pIdxInfo->aConstraintUsage[ii].argvIndex = (iIdx/2);
128432 pIdxInfo->aConstraintUsage[ii].omit = 1;
128436 pIdxInfo->idxNum = 2;
128437 pIdxInfo->needToFreeIdxStr = 1;
128438 if( iIdx>0 && 0==(pIdxInfo->idxStr = sqlite3_mprintf("%s", zIdxStr)) ){
128442 pIdxInfo->estimatedCost = (2000000.0 / (double)(iIdx + 1));