Lines Matching refs:pIdxInfo
1183 sqlite3_index_info *pIdxInfo; in allocateIndexInfo() local
1279 pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo) in allocateIndexInfo()
1283 if( pIdxInfo==0 ){ in allocateIndexInfo()
1287 pHidden = (struct HiddenIndexInfo*)&pIdxInfo[1]; in allocateIndexInfo()
1291 pIdxInfo->aConstraint = pIdxCons; in allocateIndexInfo()
1292 pIdxInfo->aOrderBy = pIdxOrderBy; in allocateIndexInfo()
1293 pIdxInfo->aConstraintUsage = pUsage; in allocateIndexInfo()
1343 pIdxInfo->nConstraint = j; in allocateIndexInfo()
1354 pIdxInfo->nOrderBy = j; in allocateIndexInfo()
1357 return pIdxInfo; in allocateIndexInfo()
1364 static void freeIndexInfo(sqlite3 *db, sqlite3_index_info *pIdxInfo){ in freeIndexInfo() argument
1367 assert( pIdxInfo!=0 ); in freeIndexInfo()
1368 pHidden = (HiddenIndexInfo*)&pIdxInfo[1]; in freeIndexInfo()
1371 for(i=0; i<pIdxInfo->nConstraint; i++){ in freeIndexInfo()
1375 sqlite3DbFree(db, pIdxInfo); in freeIndexInfo()
3676 sqlite3_index_info *pIdxInfo, /* Populated object for xBestIndex */ in whereLoopAddVirtualOne() argument
3682 HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1]; in whereLoopAddVirtualOne()
3684 struct sqlite3_index_constraint_usage *pUsage = pIdxInfo->aConstraintUsage; in whereLoopAddVirtualOne()
3691 int nConstraint = pIdxInfo->nConstraint; in whereLoopAddVirtualOne()
3699 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint; in whereLoopAddVirtualOne()
3713 assert( pIdxInfo->needToFreeIdxStr==0 ); in whereLoopAddVirtualOne()
3714 pIdxInfo->idxStr = 0; in whereLoopAddVirtualOne()
3715 pIdxInfo->idxNum = 0; in whereLoopAddVirtualOne()
3716 pIdxInfo->orderByConsumed = 0; in whereLoopAddVirtualOne()
3717 pIdxInfo->estimatedCost = SQLITE_BIG_DBL / (double)2; in whereLoopAddVirtualOne()
3718 pIdxInfo->estimatedRows = 25; in whereLoopAddVirtualOne()
3719 pIdxInfo->idxFlags = 0; in whereLoopAddVirtualOne()
3720 pIdxInfo->colUsed = (sqlite3_int64)pSrc->colUsed; in whereLoopAddVirtualOne()
3724 rc = vtabBestIndex(pParse, pSrc->pTab, pIdxInfo); in whereLoopAddVirtualOne()
3741 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint; in whereLoopAddVirtualOne()
3754 testcase( pIdxInfo->needToFreeIdxStr ); in whereLoopAddVirtualOne()
3786 pIdxInfo->orderByConsumed = 0; in whereLoopAddVirtualOne()
3787 pIdxInfo->idxFlags &= ~SQLITE_INDEX_SCAN_UNIQUE; in whereLoopAddVirtualOne()
3798 if( pIdxInfo->needToFreeIdxStr ){ in whereLoopAddVirtualOne()
3799 sqlite3_free(pIdxInfo->idxStr); in whereLoopAddVirtualOne()
3800 pIdxInfo->idxStr = 0; in whereLoopAddVirtualOne()
3801 pIdxInfo->needToFreeIdxStr = 0; in whereLoopAddVirtualOne()
3815 testcase( pIdxInfo->needToFreeIdxStr ); in whereLoopAddVirtualOne()
3820 pNew->u.vtab.idxNum = pIdxInfo->idxNum; in whereLoopAddVirtualOne()
3821 pNew->u.vtab.needFree = pIdxInfo->needToFreeIdxStr; in whereLoopAddVirtualOne()
3822 pIdxInfo->needToFreeIdxStr = 0; in whereLoopAddVirtualOne()
3823 pNew->u.vtab.idxStr = pIdxInfo->idxStr; in whereLoopAddVirtualOne()
3824 pNew->u.vtab.isOrdered = (i8)(pIdxInfo->orderByConsumed ? in whereLoopAddVirtualOne()
3825 pIdxInfo->nOrderBy : 0); in whereLoopAddVirtualOne()
3827 pNew->rRun = sqlite3LogEstFromDouble(pIdxInfo->estimatedCost); in whereLoopAddVirtualOne()
3828 pNew->nOut = sqlite3LogEst(pIdxInfo->estimatedRows); in whereLoopAddVirtualOne()
3832 if( pIdxInfo->idxFlags & SQLITE_INDEX_SCAN_UNIQUE ){ in whereLoopAddVirtualOne()
3864 const char *sqlite3_vtab_collation(sqlite3_index_info *pIdxInfo, int iCons){ in sqlite3_vtab_collation() argument
3865 HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1]; in sqlite3_vtab_collation()
3867 if( iCons>=0 && iCons<pIdxInfo->nConstraint ){ in sqlite3_vtab_collation()
3869 int iTerm = pIdxInfo->aConstraint[iCons].iTermOffset; in sqlite3_vtab_collation()
3884 int sqlite3_vtab_in(sqlite3_index_info *pIdxInfo, int iCons, int bHandle){ in sqlite3_vtab_in() argument
3885 HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1]; in sqlite3_vtab_in()
3905 sqlite3_index_info *pIdxInfo, /* Copy of first argument to xBestIndex */ in sqlite3_vtab_rhs_value() argument
3909 HiddenIndexInfo *pH = (HiddenIndexInfo*)&pIdxInfo[1]; in sqlite3_vtab_rhs_value()
3912 if( iCons<0 || iCons>=pIdxInfo->nConstraint ){ in sqlite3_vtab_rhs_value()
3916 WhereTerm *pTerm = &pH->pWC->a[pIdxInfo->aConstraint[iCons].iTermOffset]; in sqlite3_vtab_rhs_value()
3937 int sqlite3_vtab_distinct(sqlite3_index_info *pIdxInfo){ in sqlite3_vtab_distinct() argument
3938 HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1]; in sqlite3_vtab_distinct()
3954 void sqlite3VtabUsesAllSchemas(sqlite3_index_info *pIdxInfo){ in sqlite3VtabUsesAllSchemas() argument
3955 HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1]; in sqlite3VtabUsesAllSchemas()