Lines Matching refs:idx
10332 ** Parameter "idx" identifies the specific loop to retrieve statistics for.
10333 ** Loops are numbered starting from zero. ^If idx is out of range - less than
10347 int idx, /* Index of loop to report on */
11168 ** CREATE TABLE sqlite_stat1(tbl,idx,stat)
11172 ** recorded for it as if the PRIMARY KEY is (tbl,idx). Additionally, changes
11173 ** are recorded for rows for which (idx IS NULL) is true. However, for such
15552 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
15553 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);
15563 ** offset = 36 + (idx * 4)
18541 ** CREATE INDEX idx ON t(a,b,c);
18544 ** The IdList.a.idx field is used when the IdList represents the list of
18549 ** If "a" is the k-th column of table "t", then IdList.a[0].idx==k.
18557 int idx; /* Index in some Table.aCol[] of a column named zName */
18568 #define EU4_IDX 1 /* Uses IdList.a.u4.idx */
24170 int idx /* Parameter index of the modifier */
24183 if( idx>1 ) return 1; /* IMP: R-33611-57934 */
24210 if( idx>1 ) return 1; /* IMP: R-31176-64601 */
24239 if( idx>1 ) return 1; /* IMP: R-49255-55373 */
27121 ** structures, return a pointer to the idx-th such link.
27123 #define MEM5LINK(idx) ((Mem5Link *)(&mem5.zPool[(idx)*mem5.szAtom]))
30161 int idx; /* A general purpose loop counter */
30324 for(idx=0; idx<ArraySize(fmtinfo); idx++){
30325 if( c==fmtinfo[idx].fmttype ){
30326 infop = &fmtinfo[idx];
30440 for(idx=0; nn>0; idx++){
30441 bufpt[idx] = bufpt[idx+nn];
30444 bufpt[++idx] = cThousand;
30484 idx = precision & 0xfff;
30485 rounder = arRound[idx%10];
30486 while( idx>=10 ){ rounder *= 1.0e-10; idx -= 10; }
32277 fprintf(stdout, "%s (%d)\n", zName, pList->a[i].u4.idx);
64505 int idx; /* Value to write to hash-table slot */
64508 idx = iFrame - sLoc.iZero;
64509 assert( idx <= HASHTABLE_NSLOT/2 + 1 );
64514 if( idx==1 ){
64526 if( sLoc.aPgno[idx-1] ){
64528 assert( !sLoc.aPgno[idx-1] );
64532 nCollide = idx;
64536 sLoc.aPgno[idx-1] = iPage;
64537 AtomicStore(&sLoc.aHash[iKey], (ht_slot)idx);
64547 assert( nEntry==idx );
64555 if( (idx&0x3ff)==0 ){
64557 for(i=0; i<idx; i++){
73936 ** pCur->idx is set to the cell index that contains the pointer
73938 ** right-most child page then pCur->idx is set to one more than
74269 int lwr, upr, idx, c;
74285 idx = upr>>(1-biasRight); /* idx = biasRight ? upr : (lwr+upr)/2; */
74288 pCell = findCellPastPtr(pPage, idx);
74298 lwr = idx+1;
74301 upr = idx-1;
74305 pCur->ix = (u16)idx;
74307 lwr = idx;
74318 idx = (lwr+upr)>>1; /* idx = (lwr+upr)/2; */
74324 pCur->ix = (u16)idx;
74346 ** Compare the "idx"-th cell on the page the cursor pCur is currently
74351 ** Return value negative: Cell at pCur[idx] less than pIdxKey
74353 ** Return value is zero: Cell at pCur[idx] equals pIdxKey
74356 ** of the cell at pCur[idx] and pIdxKey.
74363 int idx,
74370 u8 *pCell = findCellPastPtr(pPage, idx);
74513 int lwr, upr, idx, c;
74528 idx = upr>>1; /* idx = (lwr+upr)/2; */
74531 pCell = findCellPastPtr(pPage, idx);
74583 pCur->ix = (u16)idx;
74599 lwr = idx+1;
74601 upr = idx-1;
74606 pCur->ix = (u16)idx;
74612 idx = (lwr+upr)>>1; /* idx = (lwr+upr)/2 */
74618 pCur->ix = (u16)idx;
74701 int idx;
74721 idx = ++pCur->ix;
74726 if( idx>=pPage->nCell ){
74816 int idx = pCur->ix;
74817 rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));
75629 static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
75637 assert( idx>=0 );
75638 assert( idx<pPage->nCell );
75639 assert( CORRUPT_DB || sz==cellSize(pPage, idx) );
75644 ptr = &pPage->aCellIdx[2*idx];
75667 memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
75696 int idx = 0; /* Where to write new cell content in data[] */
75742 rc = allocateSpace(pPage, sz, &idx);
75746 assert( idx >= 0 );
75747 assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );
75748 assert( idx+sz <= (int)pPage->pBt->usableSize );
75756 memcpy(&data[idx+4], pCell+4, sz-4);
75757 put4byte(&data[idx], iChild);
75759 memcpy(&data[idx], pCell, sz);
75763 put2byte(pIns, idx);
75873 ** Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been
75876 static void populateCellCache(CellArray *p, int idx, int N){
75877 assert( idx>=0 && idx+N<=p->nCell );
75879 assert( p->apCell[idx]!=0 );
75880 if( p->szCell[idx]==0 ){
75881 p->szCell[idx] = p->pRef->xCellSize(p->pRef, p->apCell[idx]);
75884 p->szCell[idx]==p->pRef->xCellSize(p->pRef, p->apCell[idx]) );
75886 idx++;
77637 int idx;
77821 idx = pCur->ix;
77824 assert( idx>=0 );
77825 if( idx>=pPage->nCell ){
77832 oldCell = findCell(pPage, idx);
77861 dropCell(pPage, idx, info.nSize, &rc);
77865 idx = ++pCur->ix;
77870 insertCell(pPage, idx, newCell, szNew, 0, 0, &rc);
78654 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
78661 assert( idx>=0 && idx<=15 );
78663 if( idx==BTREE_DATA_VERSION ){
78666 *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
78672 if( idx==BTREE_LARGEST_ROOT_PAGE && *pMeta>0 ){
78684 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
78688 assert( idx>=1 && idx<=15 );
78695 put4byte(&pP1[36 + idx*4], iMeta);
78697 if( idx==BTREE_INCR_VACUUM ){
85258 ** Set the name of the idx'th column to be returned by the SQL statement.
85269 int idx, /* Index of column zName applies to */
85276 assert( idx<p->nResColumn );
85283 pColName = &(p->aColName[idx+var*p->nResColumn]);
86604 u32 idx; /* Offset in aKey[] to read from */
86611 idx = getVarint32(aKey, szHdr);
86614 while( idx<szHdr && d<=(u32)nKey ){
86617 idx += getVarint32(&aKey[idx], serial_type);
86769 u32 idx;
86774 idx = getVarint32(aKey, szHdr);
86777 while( idx<szHdr ){
86778 idx += getVarint32(aKey+idx, notUsed);
90011 int idx, /* Index of loop to report on */
90017 if( idx<0 || idx>=p->nScan ) return 1;
90018 pScan = &p->aScan[idx];
90152 int idx = 0; /* Index of a host parameter */
90186 sqlite3GetInt32(&zRawSql[1], &idx);
90188 idx = nextIndex;
90197 idx = sqlite3VdbeParameterIndex(p, zRawSql, nToken);
90198 assert( idx>0 );
90201 nextIndex = MAX(idx + 1, nextIndex);
90202 assert( idx>0 && idx<=p->nVar );
90203 pVar = &p->aVar[idx-1];
92695 u32 idx;
92727 idx = aPermute ? aPermute[i] : (u32)i;
92728 assert( memIsValid(&aMem[p1+idx]) );
92729 assert( memIsValid(&aMem[p2+idx]) );
92730 REGISTER_TRACE(p1+idx, &aMem[p1+idx]);
92731 REGISTER_TRACE(p2+idx, &aMem[p2+idx]);
92735 iCompare = sqlite3MemCompare(&aMem[p1+idx], &aMem[p2+idx], pColl);
92738 && ((aMem[p1+idx].flags & MEM_Null) || (aMem[p2+idx].flags & MEM_Null))
108593 int iDb; /* Database idx for pTab */
114626 ** CREATE TABLE sqlite_stat1(tbl, idx, stat);
114627 ** CREATE TABLE sqlite_stat2(tbl, idx, sampleno, sample);
114628 ** CREATE TABLE sqlite_stat3(tbl, idx, nEq, nLt, nDLt, sample);
114629 ** CREATE TABLE sqlite_stat4(tbl, idx, nEq, nLt, nDLt, sample);
114650 ** name in the idx column. The tbl column is the name of the table to
114669 ** If the sqlite_stat1.idx column is NULL, then the sqlite_stat1.stat
114679 ** the "idx" column and the "tbl" column is the name of the table to which
114713 ** The idx column names the index and the tbl column is the table of the
114714 ** index. If the idx and tbl columns are the same, then the sample is
114777 const char *zWhereType /* Either "tbl" or "idx" */
114783 { "sqlite_stat1", "tbl,idx,stat" },
114785 { "sqlite_stat4", "tbl,idx,neq,nlt,ndlt,sample" },
115687 ** if( idx(0) != regPrev(0) ) goto chng_addr_0
115689 ** if( idx(1) != regPrev(1) ) goto chng_addr_1
115695 ** regPrev(0) = idx(0)
115697 ** regPrev(1) = idx(1)
115701 ** regRowid = idx(rowid)
115768 ** if( idx(0) != regPrev(0) ) goto chng_addr_0
115770 ** if( idx(1) != regPrev(1) ) goto chng_addr_1
115800 ** regPrev(0) = idx(0)
115802 ** regPrev(1) = idx(1)
115817 ** regRowid = idx(rowid) // STAT4 only
115986 openStatTable(pParse, iDb, iStatCur, pOnlyIdx->zName, "idx");
116309 ** zSql1: SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx
116310 ** zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4
116444 "SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx",
116445 "SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4",
116506 "SELECT tbl,idx,stat FROM %Q.sqlite_stat1", sInfo.zDatabase);
120655 ** Clear the column names from every VIEW in database idx.
120657 static void sqliteViewResetAll(sqlite3 *db, int idx){
120659 assert( sqlite3SchemaMutexHeld(db, idx, 0) );
120660 if( !DbHasProperty(db, idx, DB_UnresetViews) ) return;
120661 for(i=sqliteHashFirst(&db->aDb[idx].pSchema->tblHash); i;i=sqliteHashNext(i)){
120667 DbClearProperty(db, idx, DB_UnresetViews);
120803 const char *zType, /* "idx" or "tbl" */
122085 sqlite3ClearStatTables(pParse, iDb, "idx", pIndex->zName);
129471 pColumn->a[i].u4.idx = -1;
129476 pColumn->a[i].u4.idx = j;
129779 for(j=0; j<pColumn->nId && pColumn->a[j].u4.idx!=i; j++){}
133671 /* 34 */ "idx",
140359 || (ExprUseYTab(p) && p->y.pTab!=0) ); /* Covering idx not yet coded */
151531 ** WhereTerm.pWC->a[WhereTerm.idx] == WhereTerm
154759 int idx;
154775 pTerm = &pWC->a[idx = pWC->nTerm++];
154788 return idx;
156274 int idx;
156275 idx = whereClauseInsert(pWC, pNew, TERM_DYNAMIC|TERM_VIRTUAL);
156276 pTerm = &pWC->a[idx];
168469 int idx;
168473 idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
168482 p->yytos = &p->yystack[idx];
178921 ** idx - index within level
178922 ** - (level,idx uniquely identify a segment)
178939 ** incrementing idx. When idx reaches MERGE_COUNT (default 16), all
180365 "idx INTEGER,"
180370 "PRIMARY KEY(level, idx)"
190189 /* 8 */ "SELECT (SELECT max(idx) FROM %Q.'%q_segdir' WHERE level = ?) + 1",
190195 /* 12 */ "SELECT idx, start_block, leaves_end_block, end_block, root "
190196 "FROM %Q.'%q_segdir' WHERE level = ? ORDER BY idx ASC",
190197 /* 13 */ "SELECT idx, start_block, leaves_end_block, end_block, root "
190199 "ORDER BY level DESC, idx ASC",
190232 " WHERE level = ? ORDER BY idx ASC LIMIT ?"
190237 /* 30 */ "DELETE FROM %Q.'%q_segdir' WHERE level = ? AND idx = ?",
190240 ** Modify the idx value for the segment with idx=:3 on absolute level :2
190242 /* 31 */ "UPDATE %Q.'%q_segdir' SET idx = ? WHERE level=? AND idx=?",
190247 /* 32 */ "SELECT idx, start_block, leaves_end_block, end_block, root "
190248 "FROM %Q.'%q_segdir' WHERE level = ? AND idx = ?",
190254 "WHERE level = ? AND idx = ?",
190263 /* 35 */ "SELECT idx FROM %Q.'%q_segdir' WHERE level=? ORDER BY 1 ASC",
190270 /* 37 */ "SELECT level, idx, end_block "
190272 "ORDER BY level DESC, idx ASC",
190275 /* 38 */ "UPDATE OR FAIL %Q.'%q_segdir' SET level=-1,idx=? "
190276 "WHERE level=? AND idx=?",
190478 ** 0: idx
191004 ** SELECT max(idx) FROM %_segdir WHERE level = :iLevel
191021 sqlite3_stmt *pNextIdx; /* Query for next idx at level iLevel */
191856 int iIdx, /* Value for "idx" field */
192276 int iIdx /* Value for 'idx' column of %_segdir */
193058 ** updated it to set (level = -1) and (idx = N), where N is 0 for the
193062 ** setting the "idx" fields as appropriate to keep them in the same
193140 ** index. The idx of the new segment is always 0. */
193520 ** the oldest nSeg segments (idx=0 through idx=(nSeg-1)) in absolute
194051 pWriter->iIdx, /* idx */
194306 ** with idx value iIdx.
194388 ** DELETE FROM %_segdir WHERE level = :iAbsLevel AND idx = :iIdx
194389 ** UPDATE %_segdir SET idx = idx - 1 WHERE level = :iAbsLevel AND idx > :iIdx
194393 ** idx values.
194416 ** Update the 'idx' values of the remaining segments in the level so that
194417 ** the idx values are a contiguous sequence starting from 0.
194424 int *aIdx = 0; /* Array of remaining idx values */
194428 sqlite3_stmt *pSelect = 0; /* Select statement to read idx values */
194429 sqlite3_stmt *pUpdate = 0; /* Update statement to modify idx values */
194796 ** values for the _segdir.idx field) in the highest level that contains
194823 int iIdx = 0; /* Largest idx in level (iAbsLevel+1) */
202477 static void tracePoint(RtreeSearchPoint *p, int idx, RtreeCursor *pCur){
202478 if( idx<0 ){ printf(" s"); }else{ printf("%2d", idx); }
202482 idx++;
202483 if( idx<RTREE_CACHE_SZ ){
202484 printf(" %p\n", pCur->aNode[idx]);
206234 unsigned int idx; /* Which segment within the side */
206254 unsigned int idx
206273 pSeg->idx = idx;
206456 GEODEBUG(("Segment %d.%d %g->%g\n", pSeg->side, pSeg->idx, pSeg->y, y));
206462 pPrev->side, pPrev->idx,
206463 pSeg->side, pSeg->idx));
206476 pThisEvent->pSeg->side, pThisEvent->pSeg->idx,
209199 RbuObjIter objiter; /* Iterator for skipping through tbl/idx */
216534 /* For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. */
216537 "SELECT 1, 'idx', '', 0, '', 2 UNION ALL "
216672 ** blob each time a NULL value is read from the "idx" column of the
217920 "idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)", zDb
219408 assert( sqlite3_stricmp(p->azCol[ii], "idx")==0 );
219410 "idx IS CASE "
219616 "DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS "
223269 int idx;
223273 idx = p->fts5yytos ? (int)(p->fts5yytos - p->fts5yystack) : 0;
223282 p->fts5yytos = &p->fts5yystack[idx];
235428 rc = sqlite3Fts5CreateTable(pConfig, "idx",
239633 "config", "content", "data", "docsize", "idx"
239983 fts5StorageRenameOne(pConfig, &rc, "idx", zName);