• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/Heimdal-323.92.1/lib/sqlite/

Lines Matching refs:pIdx

10533 ** Within the union, pIdx is only used when wsFlags&WHERE_INDEXED is true.
10543 Index *pIdx; /* Index when WHERE_INDEXED is true */
10566 int iIdxCur; /* The VDBE cursor used to access pIdx */
48416 Index *pIdx = (Index *)sqliteHashData(p);
48417 if( pIdx->tnum==(int)iRoot ){
48418 iTab = pIdx->pTable->tnum;
49404 ** as the first argument. Write into *pIdx the index into pPage->aData[]
49415 static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
49475 *pIdx = pc + x;
49502 *pIdx = top;
70025 Index *pIdx;
70043 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
70045 for(j=0; j<pIdx->nColumn; j++){
70046 if( pIdx->aiColumn[j]==iCol ){
74492 Index *pIdx; /* Iterator variable */
74506 for(pIdx=pTab->pIndex; pIdx && eType==0 && affinity_ok; pIdx=pIdx->pNext){
74507 if( (pIdx->aiColumn[0]==iCol)
74508 && sqlite3FindCollSeq(db, ENC(db), pIdx->azColl[0], 0)==pReq
74509 && (!mustBeUnique || (pIdx->nColumn==1 && pIdx->onError!=OE_None))
74515 pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx);
74518 sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb,
74520 VdbeComment((v, "%s", pIdx->zName));
77717 Index *pIdx; /* An index to being analyzed */
77770 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
77774 if( pOnlyIdx && pOnlyIdx!=pIdx ) continue;
77775 nCol = pIdx->nColumn;
77776 pKey = sqlite3IndexKeyinfo(pParse, pIdx);
77782 assert( iDb==sqlite3SchemaToIndex(db, pIdx->pSchema) );
77783 sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIdx->tnum, iDb,
77785 VdbeComment((v, "%s", pIdx->zName));
77788 sqlite3VdbeAddOp4(v, OP_String8, 0, regIdxname, 0, pIdx->zName, 0);
77795 if( pTab->pIndex==pIdx ){
77884 assert( pIdx->azColl!=0 );
77885 assert( pIdx->azColl[i]!=0 );
77886 pColl = sqlite3LocateCollSeq(pParse, pIdx->azColl[i]);
78049 Index *pIdx;
78074 if( (pIdx = sqlite3FindIndex(db, z, 0))!=0 ){
78075 analyzeTable(pParse, pIdx->pTable, pIdx);
78089 if( (pIdx = sqlite3FindIndex(db, z, zDb))!=0 ){
78090 analyzeTable(pParse, pIdx->pTable, pIdx);
78168 SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){
78170 if( pIdx->aSample ){
78173 IndexSample *p = &pIdx->aSample[j];
78178 sqlite3DbFree(db, pIdx->aSample);
78182 UNUSED_PARAMETER(pIdx);
78218 Index *pIdx = sqliteHashData(i);
78219 sqlite3DefaultRowEst(pIdx);
78220 sqlite3DeleteIndexSamples(db, pIdx);
78221 pIdx->aSample = 0;
78262 Index *pIdx; /* Pointer to the index object */
78265 pIdx = zIndex ? sqlite3FindIndex(db, zIndex, sInfo.zDatabase) : 0;
78266 if( pIdx ){
78271 if( pIdx->aSample==0 ){
78273 pIdx->aSample = (IndexSample *)sqlite3DbMallocRaw(0, sz);
78274 if( pIdx->aSample==0 ){
78278 memset(pIdx->aSample, 0, sz);
78281 assert( pIdx->aSample );
78283 IndexSample *pSample = &pIdx->aSample[iSample];
80368 Index *pIdx;
80375 for(pIdx=p->pIndex; pIdx; pIdx=pIdx->pNext){
80376 assert( pIdx->nColumn==1 );
80377 if( pIdx->aiColumn[0]==i ){
80378 pIdx->azColl[0] = p->aCol[i].zColl;
80471 ** to the specified offset in the buffer and updates *pIdx to refer
80479 static void identPut(char *z, int *pIdx, char *zSignedIdent){
80482 i = *pIdx;
80499 *pIdx = i;
81024 Index *pIdx = sqliteHashData(pElem);
81025 if( pIdx->tnum==iFrom ){
81026 pIdx->tnum = iTo;
81068 Index *pIdx;
81071 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
81072 destroyRootPage(pParse, pIdx->tnum, iDb);
81095 Index *pIdx;
81101 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
81102 int iIdx = pIdx->tnum;
81103 assert( pIdx->pSchema==pTab->pSchema );
81449 ** Generate code that will erase and refill index *pIdx. This is
81887 Index *pIdx;
81888 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
81890 assert( pIdx->onError!=OE_None );
81891 assert( pIdx->autoIndex );
81894 if( pIdx->nColumn!=pIndex->nColumn ) continue;
81895 for(k=0; k<pIdx->nColumn; k++){
81898 if( pIdx->aiColumn[k]!=pIndex->aiColumn[k] ) break;
81899 z1 = pIdx->azColl[k];
81903 if( k==pIdx->nColumn ){
81904 if( pIdx->onError!=pIndex->onError ){
81912 if( !(pIdx->onError==OE_Default || pIndex->onError==OE_Default) ){
81916 if( pIdx->onError==OE_Default ){
81917 pIdx->onError = pIndex->onError;
82067 SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){
82068 unsigned *a = pIdx->aiRowEst;
82072 a[0] = pIdx->pTable->nRowEst;
82075 for(i=1; i<=pIdx->nColumn; i++){
82079 if( pIdx->onError!=OE_None ){
82080 a[pIdx->nColumn] = 1;
82161 ** The index of the new entry is returned in *pIdx.
82174 int *pIdx /* Write the index of a new slot here */
82183 *pIdx = -1;
82191 *pIdx = *pnEntry;
82904 ** with OP_OpenRead or OP_OpenWrite to access database index pIdx.
82912 SQLITE_PRIVATE KeyInfo *sqlite3IndexKeyinfo(Parse *pParse, Index *pIdx){
82914 int nCol = pIdx->nColumn;
82924 char *zColl = pIdx->azColl[i];
82927 pKey->aSortOrder[i] = pIdx->aSortOrder[i];
83632 Index *pIdx; /* For looping over indices of the table */
83699 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
83755 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
83756 assert( pIdx->pSchema==pTab->pSchema );
83757 sqlite3VdbeAddOp2(v, OP_Clear, pIdx->tnum, iDb);
83819 for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
83820 sqlite3VdbeAddOp2(v, OP_Close, iCur + i, pIdx->tnum);
83992 Index *pIdx;
83995 for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
83997 r1 = sqlite3GenerateIndexKey(pParse, pIdx, iCur, 0, 0);
83998 sqlite3VdbeAddOp3(pParse->pVdbe, OP_IdxDelete, iCur+i, r1,pIdx->nColumn+1);
84004 ** regOut. The key with be for index pIdx which is an index on pTab.
84015 Index *pIdx, /* The index for which to generate a key */
84016 int iCur, /* Cursor number for the pIdx->pTable table */
84022 Table *pTab = pIdx->pTable;
84026 nCol = pIdx->nColumn;
84030 int idx = pIdx->aiColumn[j];
84043 zAff = sqlite3IndexAffinityStr(v, pIdx);
85848 Index *pIdx = 0; /* Value to return via *ppIdx */
85885 for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
85886 if( pIdx->nColumn==nCol && pIdx->onError!=OE_None ){
85887 /* pIdx is a UNIQUE index (or a PRIMARY KEY) and has the right number
85895 if( pIdx->autoIndex==2 ){
85909 int iCol = pIdx->aiColumn[i]; /* Index of column in parent tbl */
85920 if( sqlite3StrICmp(pIdx->azColl[i], zDfltColl) ) break;
85931 if( i==nCol ) break; /* pIdx is usable */
85936 if( !pIdx ){
85944 *ppIdx = pIdx;
85978 Index *pIdx, /* Unique index on parent key columns in pTab */
86006 if( pIdx==0 ){
86007 /* If pIdx is NULL, then the parent key is the INTEGER PRIMARY KEY
86038 KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
86040 sqlite3VdbeAddOp3(v, OP_OpenRead, iCur, pIdx->tnum, iDb);
86060 int iParent = pIdx->aiColumn[i]+1+regData;
86062 if( pIdx->aiColumn[i]==pTab->iPKey ){
86073 sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v,pIdx), P4_TRANSIENT);
86133 Index *pIdx, /* Foreign key index */
86135 int *aiCol, /* Map from pIdx cols to child table cols */
86147 assert( !pIdx || pIdx->pTable==pTab );
86172 if( pIdx ){
86174 iCol = pIdx->aiColumn[i];
86380 Index *pIdx = 0; /* Index on key columns in pTo */
86396 if( !pTo || locateFkeyIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
86417 assert( pFKey->nCol==1 || (aiFree && pIdx) );
86435 char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
86452 fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1,isIgnore);
86457 fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regNew, +1,isIgnore);
86465 Index *pIdx = 0; /* Foreign key index for pFKey */
86476 if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){
86494 fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regNew, -1);
86503 fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regOld, 1);
86530 Index *pIdx = 0;
86531 locateFkeyIndex(pParse, pTab, p, &pIdx, 0);
86532 if( pIdx ){
86533 for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
86647 Index *pIdx = 0; /* Parent key index for this FK */
86656 if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;
86669 tToCol.z = pIdx ? pTab->aCol[pIdx->aiColumn[i]].zName : "oid";
86919 ** pIdx. A column affinity string has one character for each column in
86937 SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
86938 if( !pIdx->zColAff ){
86948 Table *pTab = pIdx->pTable;
86950 pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+2);
86951 if( !pIdx->zColAff ){
86955 for(n=0; n<pIdx->nColumn; n++){
86956 pIdx->zColAff[n] = pTab->aCol[pIdx->aiColumn[n]].affinity;
86958 pIdx->zColAff[n++] = SQLITE_AFF_NONE;
86959 pIdx->zColAff[n] = 0;
86962 return pIdx->zColAff;
87327 Index *pIdx; /* For looping over indices of the table */
87896 for(idx=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, idx++){
88038 Index *pIdx; /* Pointer to one of the indices */
88194 for(iCur=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, iCur++){
88201 regIdx = sqlite3GetTempRange(pParse, pIdx->nColumn+1);
88202 for(i=0; i<pIdx->nColumn; i++){
88203 int idx = pIdx->aiColumn[i];
88211 sqlite3VdbeAddOp3(v, OP_MakeRecord, regIdx, pIdx->nColumn+1, aRegIdx[iCur]);
88212 sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), P4_TRANSIENT);
88213 sqlite3ExprCacheAffinityChange(pParse, regIdx, pIdx->nColumn+1);
88216 onError = pIdx->onError;
88218 sqlite3ReleaseTempRange(pParse, regIdx, pIdx->nColumn+1);
88219 continue; /* pIdx is not a UNIQUE index */
88237 sqlite3ReleaseTempRange(pParse, regIdx, pIdx->nColumn+1);
88253 zSep = pIdx->nColumn>1 ? "columns " : "column ";
88254 for(j=0; j<pIdx->nColumn; j++){
88255 char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
88261 pIdx->nColumn>1 ? " are not unique" : " is not unique", -1);
88317 Index *pIdx;
88325 for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){}
88372 Index *pIdx;
88380 for(i=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
88381 KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
88382 assert( pIdx->pSchema==pTab->pSchema );
88383 sqlite3VdbeAddOp4(v, op, i+baseCur, pIdx->tnum, iDb,
88385 VdbeComment((v, "%s", pIdx->zName));
90863 Index *pIdx;
90866 pIdx = sqlite3FindIndex(db, zRight, zDb);
90867 if( pIdx ){
90869 pTab = pIdx->pTable;
90875 for(i=0; i<pIdx->nColumn; i++){
90876 int cnum = pIdx->aiColumn[i];
90887 Index *pIdx;
90893 pIdx = pTab->pIndex;
90894 if( pIdx ){
90901 while(pIdx){
90903 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
90904 sqlite3VdbeAddOp2(v, OP_Integer, pIdx->onError!=OE_None, 3);
90907 pIdx = pIdx->pNext;
91080 Index *pIdx;
91083 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
91084 sqlite3VdbeAddOp2(v, OP_Integer, pIdx->tnum, 2+cnt);
91110 Index *pIdx;
91121 for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
91137 r1 = sqlite3GenerateIndexKey(pParse, pIdx, 1, 3, 0);
91138 jmp2 = sqlite3VdbeAddOp4Int(v, OP_Found, j+2, 0, r1, pIdx->nColumn+1);
91142 sqlite3VdbeChangeP4(v, addr+4, pIdx->zName, P4_TRANSIENT);
91148 for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
91172 sqlite3VdbeChangeP4(v, addr+7, pIdx->zName, P4_TRANSIENT);
95490 Index *pIdx;
95491 for(pIdx=pTab->pIndex;
95492 pIdx && sqlite3StrICmp(pIdx->zName, zIndex);
95493 pIdx=pIdx->pNext
95495 if( !pIdx ){
95500 pFrom->pIndex = pIdx;
96003 Index *pIdx /* Index used to optimize scan, or NULL */
96008 pIdx ? "USING COVERING INDEX " : "",
96009 pIdx ? pIdx->zName : "",
96692 Index *pIdx; /* Iterator variable */
96713 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
96714 if( pIdx->bUnordered==0 && (!pBest || pIdx->nColumn<pBest->nColumn) ){
96715 pBest = pIdx;
98360 Index *pIdx; /* For looping over indices */
98438 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
98499 for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){}
98504 for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
98510 for(i=0; i<pIdx->nColumn; i++){
98511 if( aXRef[pIdx->aiColumn[i]]>=0 ){
98610 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
98611 if( pIdx->onError==OE_Replace ){
98617 for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
98619 KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
98620 sqlite3VdbeAddOp4(v, OP_OpenWrite, iCur+i+1, pIdx->tnum, iDb,
98790 for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
100926 Index *pIdx /* Must be compatible with this index, if not NULL */
100938 if( pIdx && pTerm->eOperator!=WO_ISNULL ){
100945 idxaff = pIdx->pTable->aCol[iColumn].affinity;
100956 for(j=0; pIdx->aiColumn[j]!=iColumn; j++){
100957 if( NEVER(j>=pIdx->nColumn) ) return 0;
100959 if( pColl && sqlite3StrICmp(pColl->zName, pIdx->azColl[j]) ) continue;
101757 ** uses the same collation sequence as the iCol'th column of index pIdx.
101758 ** Argument iBase is the cursor number used for the table that pIdx refers
101767 int iBase, /* Cursor for table associated with pIdx */
101768 Index *pIdx, /* Index to match column of */
101772 const char *zColl = pIdx->azColl[iCol];
101777 && p->iColumn==pIdx->aiColumn[iCol]
101791 ** This routine determines if pIdx can be used to assist in processing a
101805 Index *pIdx, /* The index being considered */
101806 int base, /* Cursor number for the table pIdx is on */
101813 if( pIdx->zName==0 || pDistinct==0 || pDistinct->nExpr>=BMS ) return 0;
101820 ** same table as index pIdx, return early. Finally, if there is no
101821 ** matching "col=X" expression and the column is on the same table as pIdx,
101839 for(i=nEqCol; mask && i<pIdx->nColumn; i++){
101840 int iExpr = findIndexCol(pParse, pDistinct, base, pIdx, i);
101862 Index *pIdx;
101892 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
101893 if( pIdx->onError==OE_None ) continue;
101894 for(i=0; i<pIdx->nColumn; i++){
101895 int iCol = pIdx->aiColumn[i];
101896 if( 0==findTerm(pWC, iBase, iCol, ~(Bitmask)0, WO_EQ, pIdx)
101897 && 0>findIndexCol(pParse, pDistinct, iBase, pIdx, i)
101902 if( i==pIdx->nColumn ){
101912 ** This routine decides if pIdx can be used to satisfy the ORDER BY
101913 ** clause. If it can, it returns 1. If pIdx cannot satisfy the
101918 ** the table has a cursor number of "base". pIdx is an index on pTab.
101920 ** nEqCol is the number of columns of pIdx that are used as equality
101933 Index *pIdx, /* The index we are testing */
101948 if( pIdx->bUnordered ) return 0;
101953 /* Argument pIdx must either point to a 'real' named index structure,
101956 assert( pIdx->zName || (pIdx->nColumn==1 && pIdx->aiColumn[0]==-1) );
101961 ** Note that indices have pIdx->nColumn regular columns plus
101966 for(i=j=0, pTerm=pOrderBy->a; j<nTerm && i<=pIdx->nColumn; i++){
101984 if( pIdx->zName && i<pIdx->nColumn ){
101985 iColumn = pIdx->aiColumn[i];
101986 if( iColumn==pIdx->pTable->iPKey ){
101989 iSortOrder = pIdx->aSortOrder[i];
101990 zColl = pIdx->azColl[i];
102003 }else if( i==pIdx->nColumn ){
102013 assert( pIdx->aSortOrder!=0 || iColumn==-1 );
102045 if( pIdx->onError!=OE_None && i==pIdx->nColumn
102329 int nByte; /* Byte of memory needed for pIdx */
102330 Index *pIdx; /* Object describing the transient index */
102398 pIdx = sqlite3DbMallocZero(pParse->db, nByte);
102399 if( pIdx==0 ) return;
102400 pLevel->plan.u.pIdx = pIdx;
102401 pIdx->azColl = (char**)&pIdx[1];
102402 pIdx->aiColumn = (int*)&pIdx->azColl[nColumn];
102403 pIdx->aSortOrder = (u8*)&pIdx->aiColumn[nColumn];
102404 pIdx->zName = "auto-index";
102405 pIdx->nColumn = nColumn;
102406 pIdx->pTable = pTable;
102416 pIdx->aiColumn[n] = pTerm->u.leftColumn;
102418 pIdx->azColl[n] = ALWAYS(pColl) ? pColl->zName : "BINARY";
102429 pIdx->aiColumn[n] = i;
102430 pIdx->azColl[n] = "BINARY";
102436 pIdx->aiColumn[n] = i;
102437 pIdx->azColl[n] = "BINARY";
102444 pKeyinfo = sqlite3IndexKeyinfo(pParse, pIdx);
102453 sqlite3GenerateIndexKey(pParse, pIdx, pLevel->iTabCur, regRecord, 1);
102776 ** Argument pIdx is a pointer to an index structure that has an array of
102800 Index *pIdx, /* Index to consider domain of */
102807 IndexSample *aSample = pIdx->aSample;
102841 pColl = sqlite3GetCollSeq(db, SQLITE_UTF8, 0, *pIdx->azColl);
102844 *pIdx->azColl);
103219 Index *pIdx; /* Copy of pProbe, or zero for IPK index */
103244 pIdx = pProbe = pSrc->pIndex;
103272 pIdx = 0;
103277 for(; pProbe; pIdx=pProbe=pProbe->pNext){
103366 pTerm = findTerm(pWC, iCur, j, notReady, eqTermMask, pIdx);
103392 if( findTerm(pWC, iCur, j, notReady, WO_LT|WO_LE|WO_GT|WO_GE, pIdx) ){
103393 WhereTerm *pTop = findTerm(pWC, iCur, j, notReady, WO_LT|WO_LE, pIdx);
103394 WhereTerm *pBtm = findTerm(pWC, iCur, j, notReady, WO_GT|WO_GE, pIdx);
103441 if( pIdx && wsFlags ){
103444 for(j=0; j<pIdx->nColumn; j++){
103445 int x = pIdx->aiColumn[j];
103518 if( pIdx ){
103619 pSrc->pTab->zName, (pIdx ? pIdx->zName : "ipk"),
103627 if( (!pIdx || wsFlags)
103635 pCost->plan.u.pIdx = pIdx;
103657 assert( pCost->plan.u.pIdx==0 || (pCost->plan.wsFlags&WHERE_ROWID_EQ)==0 );
103659 || pCost->plan.u.pIdx==0
103660 || pCost->plan.u.pIdx==pSrc->pIndex
103665 pCost->plan.u.pIdx ? pCost->plan.u.pIdx->zName : "ipk")
103898 Index *pIdx; /* The index being used for this loop */
103908 pIdx = pLevel->plan.u.pIdx;
103916 zAff = sqlite3DbStrDup(pParse->db, sqlite3IndexAffinityStr(v, pIdx));
103923 assert( pIdx->nColumn>=nEq );
103926 int k = pIdx->aiColumn[j];
103927 pTerm = findTerm(pWC, iCur, k, notReady, pLevel->plan.wsFlags, pIdx);
104003 Index *pIndex = pPlan->u.pIdx;
104077 ((flags & WHERE_TEMP_INDEX)?"": pLevel->plan.u.pIdx->zName),
104373 Index *pIdx; /* The index we will be using */
104380 pIdx = pLevel->plan.u.pIdx;
104382 k = pIdx->aiColumn[nEq]; /* Column for inequality constraints */
104394 && (pIdx->nColumn>nEq)
104397 /* assert( pOrderBy->a[0].pExpr->iColumn==pIdx->aiColumn[nEq] ); */
104406 pRangeEnd = findTerm(pWC, iCur, k, notReady, (WO_LT|WO_LE), pIdx);
104410 pRangeStart = findTerm(pWC, iCur, k, notReady, (WO_GT|WO_GE), pIdx);
104428 if( nEq<pIdx->nColumn && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC) ){
104796 Index *pIdx = pWInfo->a[i].plan.u.pIdx;
104797 if( pIdx ){
104798 sqlite3DbFree(db, pIdx->zColAff);
104799 sqlite3DbFree(db, pIdx);
105047 ** pWInfo->a[].pIdx The index to use for this level of the loop.
105048 ** pWInfo->a[].wsFlags WHERE_xxx flags associated with pIdx
105063 Index *pIdx; /* Index for FROM table at pTabItem */
105160 || sCost.plan.u.pIdx==pTabItem->pIndex );
105237 pIdx = pTabList->a[bestJ].pIndex;
105238 if( pIdx ){
105240 sqlite3ErrorMsg(pParse, "cannot use index: %s", pIdx->zName);
105246 assert( bestPlan.plan.u.pIdx==pIdx );
105321 Index *pIx = pLevel->plan.u.pIdx;
105379 n = sqlite3Strlen30(pLevel->plan.u.pIdx->zName);
105381 memcpy(&sqlite3_query_plan[nQPlan], pLevel->plan.u.pIdx->zName, n);
105506 Index *pIdx = pLevel->plan.u.pIdx;
105508 assert( pIdx!=0 );
105514 for(j=0; j<pIdx->nColumn; j++){
105515 if( pOp->p2==pIdx->aiColumn[j] ){
105522 || j<pIdx->nColumn );