Home | History | Annotate | Download | only in amalgamation

Lines Matching defs:pIdxInfo

10245 ** The pIdxInfo field is used to help pick the best index on a
10246 ** virtual table. The pIdxInfo pointer contains indexing
10248 ** All the pIdxInfo pointers are freed by whereInfoFree() in where.c.
10280 sqlite3_index_info *pIdxInfo; /* Index info for n-th source table */
99619 sqlite3_index_info *pIdxInfo;
99651 pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo)
99654 if( pIdxInfo==0 ){
99665 pIdxCons = (struct sqlite3_index_constraint*)&pIdxInfo[1];
99668 *(int*)&pIdxInfo->nConstraint = nTerm;
99669 *(int*)&pIdxInfo->nOrderBy = nOrderBy;
99670 *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint = pIdxCons;
99671 *(struct sqlite3_index_orderby**)&pIdxInfo->aOrderBy = pIdxOrderBy;
99672 *(struct sqlite3_index_constraint_usage**)&pIdxInfo->aConstraintUsage =
99702 return pIdxInfo;
99779 sqlite3_index_info *pIdxInfo;
99797 pIdxInfo = *ppIdxInfo;
99798 if( pIdxInfo==0 ){
99799 *ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy);
99801 if( pIdxInfo==0 ){
99805 /* At this point, the sqlite3_index_info structure that pIdxInfo points
99808 ** details of pIdxInfo for the current invocation and pass it to
99839 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
99840 pUsage = pIdxInfo->aConstraintUsage;
99841 for(i=0; i<pIdxInfo->nConstraint; i++, pIdxCons++){
99846 memset(pUsage, 0, sizeof(pUsage[0])*pIdxInfo->nConstraint);
99847 if( pIdxInfo->needToFreeIdxStr ){
99848 sqlite3_free(pIdxInfo->idxStr);
99850 pIdxInfo->idxStr = 0;
99851 pIdxInfo->idxNum = 0;
99852 pIdxInfo->needToFreeIdxStr = 0;
99853 pIdxInfo->orderByConsumed = 0;
99855 pIdxInfo->estimatedCost = SQLITE_BIG_DBL / ((double)2);
99856 nOrderBy = pIdxInfo->nOrderBy;
99858 pIdxInfo->nOrderBy = 0;
99861 if( vtabBestIndex(pParse, pTab, pIdxInfo) ){
99865 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
99866 for(i=0; i<pIdxInfo->nConstraint; i++){
99876 rCost = pIdxInfo->estimatedCost;
99877 if( pOrderBy && pIdxInfo->orderByConsumed==0 ){
99893 pCost->plan.u.pVtabIdx = pIdxInfo;
99894 if( pIdxInfo->orderByConsumed ){
99898 pIdxInfo->nOrderBy = nOrderBy;
101910 sqlite3_index_info *pInfo = pWInfo->a[i].pIdxInfo;
102252 sqlite3_index_info **pp = &pWInfo->a[j].pIdxInfo;
111821 static int recoverBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
125622 static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
125631 assert( pIdxInfo->idxStr==0 );
125632 for(ii=0; ii<pIdxInfo->nConstraint && iIdx<(int)(sizeof(zIdxStr)-1); ii++){
125633 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];
125639 pIdxInfo->aConstraintUsage[jj].argvIndex = 0;
125640 pIdxInfo->aConstraintUsage[jj].omit = 0;
125642 pIdxInfo->idxNum = 1;
125643 pIdxInfo->aConstraintUsage[ii].argvIndex = 1;
125644 pIdxInfo->aConstraintUsage[jj].omit = 1;
125651 pIdxInfo->estimatedCost = 10.0;
125670 pIdxInfo->aConstraintUsage[ii].argvIndex = (iIdx/2);
125671 pIdxInfo->aConstraintUsage[ii].omit = 1;
125675 pIdxInfo->idxNum = 2;
125676 pIdxInfo->needToFreeIdxStr = 1;
125677 if( iIdx>0 && 0==(pIdxInfo->idxStr = sqlite3_mprintf("%s", zIdxStr)) ){
125681 pIdxInfo->estimatedCost = (2000000.0 / (double)(iIdx + 1));