Home
last modified time | relevance | path

Searched refs:pIdx (Results 1 – 9 of 9) sorted by relevance

/illumos-gate/usr/src/lib/libsqlite/src/
H A Dupdate.c39 Index *pIdx; /* For looping over indices */ in sqliteUpdate() local
105 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ in sqliteUpdate()
161 for(nIdx=nIdxTotal=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdxTotal++){ in sqliteUpdate()
165 for(i=0; i<pIdx->nColumn; i++){ in sqliteUpdate()
166 if( aXRef[pIdx->aiColumn[i]]>=0 ) break; in sqliteUpdate()
169 if( i<pIdx->nColumn ) nIdx++; in sqliteUpdate()
176 for(nIdx=j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){ in sqliteUpdate()
180 for(i=0; i<pIdx->nColumn; i++){ in sqliteUpdate()
181 if( aXRef[pIdx->aiColumn[i]]>=0 ) break; in sqliteUpdate()
184 if( i<pIdx->nColumn ){ in sqliteUpdate()
[all …]
H A Ddelete.c67 Index *pIdx; /* For looping over indices of the table */ in sqliteDeleteFrom() local
185 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ in sqliteDeleteFrom()
186 sqliteVdbeAddOp(v, OP_Clear, pIdx->tnum, pIdx->iDb); in sqliteDeleteFrom()
273 for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){ in sqliteDeleteFrom()
274 sqliteVdbeAddOp(v, OP_Close, iCur + i, pIdx->tnum); in sqliteDeleteFrom()
290 for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){ in sqliteDeleteFrom()
291 sqliteVdbeAddOp(v, OP_Close, iCur + i, pIdx->tnum); in sqliteDeleteFrom()
375 Index *pIdx; in sqliteGenerateRowIndexDelete() local
377 for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){ in sqliteGenerateRowIndexDelete()
381 for(j=0; j<pIdx->nColumn; j++){ in sqliteGenerateRowIndexDelete()
[all …]
H A Dpragma.c396 Index *pIdx; in sqlitePragma() local
398 pIdx = sqliteFindIndex(db, zRight, 0); in sqlitePragma()
399 if( pIdx ){ in sqlitePragma()
406 pTab = pIdx->pTable; in sqlitePragma()
408 for(i=0; i<pIdx->nColumn; i++){ in sqlitePragma()
409 int cnum = pIdx->aiColumn[i]; in sqlitePragma()
420 Index *pIdx; in sqlitePragma() local
425 pIdx = pTab->pIndex; in sqlitePragma()
427 if( pTab && pIdx ){ in sqlitePragma()
436 while(pIdx){ in sqlitePragma()
[all …]
H A Dwhere.c222 Index *pIdx; in findSortingIndex() local
252 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ in findSortingIndex()
254 if( pIdx->nColumn < nEqCol || pIdx->nColumn < nExpr ) continue; in findSortingIndex()
256 if( pPreferredIdx->aiColumn[i]!=pIdx->aiColumn[i] ) break; in findSortingIndex()
257 if( j<nExpr && pOrderBy->a[j].pExpr->iColumn==pIdx->aiColumn[i] ){ j++; } in findSortingIndex()
261 if( pOrderBy->a[i+j].pExpr->iColumn!=pIdx->aiColumn[i+nEqCol] ) break; in findSortingIndex()
264 pMatch = pIdx; in findSortingIndex()
265 if( pIdx==pPreferredIdx ) break; in findSortingIndex()
487 Index *pIdx; in sqliteWhereBegin() local
528 pWInfo->a[i].pIdx = 0; in sqliteWhereBegin()
[all …]
H A Dinsert.c99 Index *pIdx; /* For looping over indices of the table */ in sqliteInsert() local
489 for(idx=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, idx++){ in sqliteInsert()
517 for(idx=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, idx++){ in sqliteInsert()
637 Index *pIdx; in sqliteGenerateConstraintChecks() local
761 for(iCur=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, iCur++){ in sqliteGenerateConstraintChecks()
767 for(i=0; i<pIdx->nColumn; i++){ in sqliteGenerateConstraintChecks()
768 int idx = pIdx->aiColumn[i]; in sqliteGenerateConstraintChecks()
775 jumpInst1 = sqliteVdbeAddOp(v, OP_MakeIdxKey, pIdx->nColumn, 0); in sqliteGenerateConstraintChecks()
776 if( pParse->db->file_format>=4 ) sqliteAddIdxKeyType(v, pIdx); in sqliteGenerateConstraintChecks()
779 onError = pIdx->onError; in sqliteGenerateConstraintChecks()
[all …]
H A Dbuild.c431 Index *pIdx; in sqliteStartTable() local
506 if( (pIdx = sqliteFindIndex(db, zName, 0))!=0 && in sqliteStartTable()
507 (pIdx->iDb==0 || !db->init.busy) ){ in sqliteStartTable()
805 static void identPut(char *z, int *pIdx, char *zIdent){ in identPut() argument
807 i = *pIdx; in identPut()
820 *pIdx = i; in identPut()
1245 Index *pIdx; in sqliteDropTable() local
1279 for(pIdx=pTable->pIndex; pIdx; pIdx=pIdx->pNext){ in sqliteDropTable()
1280 sqliteVdbeAddOp(v, OP_Destroy, pIdx->tnum, pIdx->iDb); in sqliteDropTable()
1308 void sqliteAddIdxKeyType(Vdbe *v, Index *pIdx){ in sqliteAddIdxKeyType() argument
[all …]
H A Dbtree.c477 u16 *pIdx; in allocateSpace() local
488 pIdx = &pPage->u.hdr.firstFree; in allocateSpace()
489 p = (FreeBlk*)&pPage->u.aDisk[SWAB16(pBt, *pIdx)]; in allocateSpace()
494 pIdx = &pPage->u.hdr.firstFree; in allocateSpace()
496 pIdx = &p->iNext; in allocateSpace()
498 p = (FreeBlk*)&pPage->u.aDisk[SWAB16(pBt, *pIdx)]; in allocateSpace()
501 start = SWAB16(pBt, *pIdx); in allocateSpace()
502 *pIdx = p->iNext; in allocateSpace()
505 start = SWAB16(pBt, *pIdx); in allocateSpace()
509 *pIdx = SWAB16(pBt, start + nByte); in allocateSpace()
[all …]
H A Dselect.c1849 Index *pIdx; in simpleMinMaxQuery() local
1891 pIdx = 0; in simpleMinMaxQuery()
1893 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ in simpleMinMaxQuery()
1894 assert( pIdx->nColumn>=1 ); in simpleMinMaxQuery()
1895 if( pIdx->aiColumn[0]==iCol ) break; in simpleMinMaxQuery()
1897 if( pIdx==0 ) return 0; in simpleMinMaxQuery()
1929 if( pIdx==0 ){ in simpleMinMaxQuery()
1932 sqliteVdbeAddOp(v, OP_Integer, pIdx->iDb, 0); in simpleMinMaxQuery()
1933 sqliteVdbeOp3(v, OP_OpenRead, base+1, pIdx->tnum, pIdx->zName, P3_STATIC); in simpleMinMaxQuery()
H A DsqliteInt.h802 Index *pIdx; /* Index used */ member