Lines Matching defs:pIdxInfo
10809 ** The pIdxInfo field is used to help pick the best index on a
10810 ** virtual table. The pIdxInfo pointer contains indexing
10812 ** All the pIdxInfo pointers are freed by whereInfoFree() in where.c.
10844 sqlite3_index_info *pIdxInfo; /* Index info for n-th source table */
104691 sqlite3_index_info *pIdxInfo;
104724 pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo)
104727 if( pIdxInfo==0 ){
104738 pIdxCons = (struct sqlite3_index_constraint*)&pIdxInfo[1];
104741 *(int*)&pIdxInfo->nConstraint = nTerm;
104742 *(int*)&pIdxInfo->nOrderBy = nOrderBy;
104743 *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint = pIdxCons;
104744 *(struct sqlite3_index_orderby**)&pIdxInfo->aOrderBy = pIdxOrderBy;
104745 *(struct sqlite3_index_constraint_usage**)&pIdxInfo->aConstraintUsage =
104776 return pIdxInfo;
104853 sqlite3_index_info *pIdxInfo;
104871 pIdxInfo = *ppIdxInfo;
104872 if( pIdxInfo==0 ){
104873 *ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy);
104875 if( pIdxInfo==0 ){
104879 /* At this point, the sqlite3_index_info structure that pIdxInfo points
104882 ** details of pIdxInfo for the current invocation and pass it to
104913 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
104914 pUsage = pIdxInfo->aConstraintUsage;
104915 for(i=0; i<pIdxInfo->nConstraint; i++, pIdxCons++){
104920 memset(pUsage, 0, sizeof(pUsage[0])*pIdxInfo->nConstraint);
104921 if( pIdxInfo->needToFreeIdxStr ){
104922 sqlite3_free(pIdxInfo->idxStr);
104924 pIdxInfo->idxStr = 0;
104925 pIdxInfo->idxNum = 0;
104926 pIdxInfo->needToFreeIdxStr = 0;
104927 pIdxInfo->orderByConsumed = 0;
104929 pIdxInfo->estimatedCost = SQLITE_BIG_DBL / ((double)2);
104930 nOrderBy = pIdxInfo->nOrderBy;
104932 pIdxInfo->nOrderBy = 0;
104935 if( vtabBestIndex(pParse, pTab, pIdxInfo) ){
104939 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
104940 for(i=0; i<pIdxInfo->nConstraint; i++){
104950 rCost = pIdxInfo->estimatedCost;
104951 if( pOrderBy && pIdxInfo->orderByConsumed==0 ){
104967 pCost->plan.u.pVtabIdx = pIdxInfo;
104968 if( pIdxInfo->orderByConsumed ){
104972 pIdxInfo->nOrderBy = nOrderBy;
107037 sqlite3_index_info *pInfo = pWInfo->a[i].pIdxInfo;
107395 sqlite3_index_info **pp = &pWInfo->a[j].pIdxInfo;
131468 static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
131477 assert( pIdxInfo->idxStr==0 );
131478 for(ii=0; ii<pIdxInfo->nConstraint && iIdx<(int)(sizeof(zIdxStr)-1); ii++){
131479 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];
131485 pIdxInfo->aConstraintUsage[jj].argvIndex = 0;
131486 pIdxInfo->aConstraintUsage[jj].omit = 0;
131488 pIdxInfo->idxNum = 1;
131489 pIdxInfo->aConstraintUsage[ii].argvIndex = 1;
131490 pIdxInfo->aConstraintUsage[jj].omit = 1;
131497 pIdxInfo->estimatedCost = 10.0;
131516 pIdxInfo->aConstraintUsage[ii].argvIndex = (iIdx/2);
131517 pIdxInfo->aConstraintUsage[ii].omit = 1;
131521 pIdxInfo->idxNum = 2;
131522 pIdxInfo->needToFreeIdxStr = 1;
131523 if( iIdx>0 && 0==(pIdxInfo->idxStr = sqlite3_mprintf("%s", zIdxStr)) ){
131527 pIdxInfo->estimatedCost = (2000000.0 / (double)(iIdx + 1));