• Home
  • Raw
  • Download

Lines Matching refs:iOff

23104 SQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64 iOff, int iAmt, void **pp){  in sqlite3OsFetch()  argument
23106 return id->pMethods->xFetch(id, iOff, iAmt, pp); in sqlite3OsFetch()
23108 SQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){ in sqlite3OsUnfetch() argument
23109 return id->pMethods->xUnfetch(id, iOff, p); in sqlite3OsUnfetch()
23113 SQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64 iOff, int iAmt, void **pp){ in sqlite3OsFetch() argument
23117 SQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){ in sqlite3OsUnfetch() argument
36855 i64 iOff, /* File offset to begin writing at */
36869 do{ rc = (int)osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );
36871 do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
36874 i64 iSeek = lseek(fd, iOff, SEEK_SET);
36885 OSTRACE(("WRITE %-3d %5d %7lld %llu\n", fd, rc, iOff, TIMER_ELAPSED));
38629 static int unixFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
38641 if( pFd->mmapSize >= iOff+nAmt ){
38642 *pp = &((u8 *)pFd->pMapRegion)[iOff];
38660 static int unixUnfetch(sqlite3_file *fd, i64 iOff, void *p){
38663 UNUSED_PARAMETER(iOff);
38671 assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );
38683 UNUSED_PARAMETER(iOff);
39771 int iOff = 0;
39776 iOff = sqlite3Strlen30(zOut);
39777 zOut[iOff++] = '/';
39779 if( (iOff+nPath+1)>nOut ){
39782 zOut[iOff] = '\0';
39785 sqlite3_snprintf(nOut-iOff, &zOut[iOff], "%s", zPath);
46099 static int winFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
46106 osGetCurrentProcessId(), fd, iOff, nAmt, pp));
46118 if( pFd->mmapSize >= iOff+nAmt ){
46120 *pp = &((u8 *)pFd->pMapRegion)[iOff];
46141 static int winUnfetch(sqlite3_file *fd, i64 iOff, void *p){
46151 assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );
46154 osGetCurrentProcessId(), pFd, iOff, p));
57517 i64 iOff = pPager->journalOff;
57537 rc = write32bits(pPager->jfd, iOff, pPg->pgno);
57539 rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize, iOff+4);
57541 rc = write32bits(pPager->jfd, iOff+pPager->pageSize+4, cksum);
62738 i64 iOff = walFrameOffset(iRead, szPage);
62739 rc = sqlite3OsRead(pWal->pWalFd, aBuf, szPage+WAL_FRAME_HDRSIZE, iOff);
62746 rc = sqlite3OsWrite(pWal->pWalFd, aFrame, sizeof(aFrame), iOff);
62870 i64 iOff = walFrameOffset(iWrite, szPage) + WAL_FRAME_HDRSIZE;
62876 rc = sqlite3OsWrite(pWal->pWalFd, pData, szPage, iOff);
71571 int iOff = get2byteAligned(&pPg->aCellIdx[i*2]);
71575 assert( 0==memcmp(pCell, &aData[iOff],
71975 int iOff;
71977 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
71978 if( (iOff+szNew[i])>(int)pBt->usableSize ){
71983 memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]);
75113 i64 iOff;
75132 for(iOff=iEnd-(i64)nSrcPgsz; rc==SQLITE_OK && iOff<iEnd; iOff+=nDestPgsz){
75134 Pgno iDest = (Pgno)(iOff/nDestPgsz)+1;
75139 const u8 *zIn = &zSrcData[iOff%nSrcPgsz];
75141 u8 *zOut = &zDestData[iOff%nDestPgsz];
75152 if( iOff==0 && bUpdate==0 ){
75352 i64 iOff;
75386 iOff=PENDING_BYTE+pgszSrc;
75387 rc==SQLITE_OK && iOff<iEnd;
75388 iOff+=pgszSrc
75391 const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1);
75395 rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);
94303 i64 iOff /* Offset in pFile */
94314 pReadr->iReadOff = iOff;
95978 i64 iOff = *piOffset;
95988 rc = vdbePmaReaderInit(pTask, &pTask->file, iOff, pReadr, &nDummy);
95989 iOff = pReadr->iEof;
95996 *piOffset = iOff;
96963 sqlite3_int64 iOff = 0;
96965 ALWAYS(pChunk) && (iOff+p->nChunkSize)<=iOfst;
96968 iOff += p->nChunkSize;
97015 i64 iOff = 0;
97018 if( iOff + nChunk > copy.endpoint.iOffset ){
97019 nChunk = copy.endpoint.iOffset - iOff;
97021 rc = sqlite3OsWrite(pReal, (u8*)pIter->zChunk, nChunk, iOff);
97023 iOff += nChunk;
106685 int iOff; /* Offset of token to replace in zOut */
106698 iOff = pBest->t.z - zSql;
106700 memmove(&zOut[iOff + nReplace], &zOut[iOff + pBest->t.n],
106701 nOut - (iOff + pBest->t.n)
106706 memcpy(&zOut[iOff], zReplace, nReplace);
180080 int iOff; /* Current offset within aNode[] */
180129 if( p->iOff>=p->nNode ){
180134 p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nPrefix);
180136 p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);
180138 if( nPrefix>p->term.n || nSuffix>p->nNode-p->iOff || nSuffix==0 ){
180143 memcpy(&p->term.a[nPrefix], &p->aNode[p->iOff], nSuffix);
180145 p->iOff += nSuffix;
180147 p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &p->nDoclist);
180148 if( (p->nNode-p->iOff)<p->nDoclist ){
180151 p->aDoclist = &p->aNode[p->iOff];
180152 p->iOff += p->nDoclist;
180157 assert_fts3_nc( p->iOff<=p->nNode );
180183 p->iOff = 1 + sqlite3Fts3GetVarint(&p->aNode[1], &p->iChild);
180185 p->iOff = 1;
183696 int iOff; /* Offset of this term from read positions */
183728 pT->iOff = nTerm-iTerm-1;
183823 if( pT->pList && (pT->iPos-pT->iOff)<iMinPos ){
183824 iMinPos = pT->iPos-pT->iOff;
183998 int iOff; /* Current offset within aInput[] */
184230 const unsigned char *z = &pCsr->aInput[pCsr->iOff];
184273 pCsr->iOff = (int)(z - pCsr->aInput);
198160 static int rbuCaptureWalRead(sqlite3rbu *pRbu, i64 iOff, int iAmt){
198179 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
198192 static int rbuCaptureDbWrite(sqlite3rbu *pRbu, i64 iOff){
198193 pRbu->aFrame[pRbu->nFrame-1].iDbPage = (u32)(iOff / pRbu->pgsz) + 1;
198205 i64 iOff;
198208 iOff = (i64)(pFrame->iWalFrame-1) * (p->pgsz + 24) + 32 + 24;
198209 p->rc = pWal->pMethods->xRead(pWal, p->aBuf, p->pgsz, iOff);
198212 iOff = (i64)(pFrame->iDbPage-1) * p->pgsz;
198213 p->rc = pDb->pMethods->xWrite(pDb, p->aBuf, p->pgsz, iOff);
200778 int iOff;
200803 iOff = get2byte(&aHdr[1]);
200804 while( iOff ){
200806 if( iOff>=szPage ) goto statPageIsCorrupt;
200807 nUnused += get2byte(&aData[iOff+2]);
200808 iNext = get2byte(&aData[iOff]);
200809 if( iNext<iOff+4 && iNext>0 ) goto statPageIsCorrupt;
200810 iOff = iNext;
200829 iOff = get2byte(&aData[nHdr+i*2]);
200830 if( iOff<nHdr || iOff>=szPage ) goto statPageIsCorrupt;
200832 pCell->iChildPg = sqlite3Get4byte(&aData[iOff]);
200833 iOff += 4;
200840 iOff += getVarint32(&aData[iOff], nPayload);
200843 iOff += sqlite3GetVarint(&aData[iOff], &dummy);
200854 if( iOff+nLocal>nUsable || nPayload>0x7fffffff ){
200861 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
208258 #define fts5FastGetVarint32(a, iOff, nVal) { \
208259 nVal = (a)[iOff++]; \
208261 iOff--; \
208262 iOff += fts5GetVarint32(&(a)[iOff], nVal); \
210167 int iOff; /* Current offset within zIn[] */
210214 if( p->iRangeStart && iPos==p->iRangeStart ) p->iOff = iStartOff;
210218 fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iStartOff - p->iOff);
210220 p->iOff = iStartOff;
210227 fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);
210229 p->iOff = iEndOff;
210236 fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);
210237 p->iOff = iEndOff;
210280 fts5HighlightAppend(&rc, &ctx, &ctx.zIn[ctx.iOff], ctx.nIn - ctx.iOff);
210379 int iOff = 0;
210388 rc = pApi->xInst(pFts, i, &ip, &ic, &iOff);
210389 if( rc==SQLITE_OK && ic==iCol && iOff>=iPos && iOff<iEnd ){
210392 if( iFirst<0 ) iFirst = iOff;
210393 iLast = iOff + pApi->xPhraseSize(pFts, ip);
210558 fts5HighlightAppend(&rc, &ctx, &ctx.zIn[ctx.iOff], ctx.nIn - ctx.iOff);
210941 i64 iOff = *piOff;
210950 iOff = ((i64)iVal) << 32;
210958 *piOff = iOff + ((iVal-2) & 0x7FFFFFFF);
214846 i64 iOff;
214876 if( (tflags & FTS5_TOKEN_COLOCATED)==0 ) p->iOff++;
214886 &pExpr->apExprPhrase[i]->poslist, &p->aPopulator[i].writer, p->iOff
214907 sCtx.iOff = (((i64)iCol) << 32) - 1;
216124 int iOff; /* Current offset into pData */
216861 if( pLvl->iOff==0 ){
216863 pLvl->iOff = 1;
216864 pLvl->iOff += fts5GetVarint32(&pData->p[1], pLvl->iLeafPgno);
216865 pLvl->iOff += fts5GetVarint(&pData->p[pLvl->iOff], (u64*)&pLvl->iRowid);
216866 pLvl->iFirstOff = pLvl->iOff;
216868 int iOff;
216869 for(iOff=pLvl->iOff; iOff<pData->nn; iOff++){
216870 if( pData->p[iOff] ) break;
216873 if( iOff<pData->nn ){
216875 pLvl->iLeafPgno += (iOff - pLvl->iOff) + 1;
216876 iOff += fts5GetVarint(&pData->p[iOff], (u64*)&iVal);
216878 pLvl->iOff = iOff;
216962 int iOff = pLvl->iOff;
216965 if( iOff<=pLvl->iFirstOff ){
216978 iLimit = (iOff>9 ? iOff-9 : 0);
216979 for(iOff--; iOff>iLimit; iOff--){
216980 if( (a[iOff-1] & 0x80)==0 ) break;
216983 fts5GetVarint(&a[iOff], (u64*)&iVal);
216988 for(ii=iOff-1; ii>=pLvl->iFirstOff && a[ii]==0x00; ii--){
217004 pLvl->iOff = iOff - nZero;
217168 int iOff = pIter->iLeafOffset; /* Offset to read at */
217174 if( iOff<iEod && pIter->pLeaf->p[iOff]==0 ){
217176 iOff++;
217177 if( iOff<iEod && pIter->pLeaf->p[iOff]==0 ){
217179 iOff++;
217186 fts5FastGetVarint32(pIter->pLeaf->p, iOff, nSz);
217191 pIter->iLeafOffset = iOff;
217197 int iOff = pIter->iLeafOffset;
217200 if( iOff>=pIter->pLeaf->szLeaf ){
217206 iOff = 4;
217209 iOff += sqlite3Fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid);
217210 pIter->iLeafOffset = iOff;
217230 int iOff = pIter->iLeafOffset; /* Offset to read at */
217233 iOff += fts5GetVarint32(&a[iOff], nNew);
217234 if( iOff+nNew>pIter->pLeaf->szLeaf || nKeep>pIter->term.n || nNew==0 ){
217239 fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
217241 iOff += nNew;
217242 pIter->iTermLeafOffset = iOff;
217244 pIter->iLeafOffset = iOff;
217453 int iOff;
217459 iOff = pIter->iLeafOffset;
217461 iOff += pIter->nPos;
217463 fts5GetVarint(&a[iOff], (u64*)&iDelta);
217481 int iOff;
217488 iOff = pIter->iLeafOffset;
217491 if( pIter->pSeg && iOff>=pIter->pLeaf->szLeaf ){
217495 iOff = 4;
217498 if( iOff<pIter->iEndofDoclist ){
217501 iOff += sqlite3Fts5GetVarint(&pIter->pLeaf->p[iOff], (u64*)&iDelta);
217502 pIter->iLeafOffset = iOff;
217507 if( iOff!=fts5LeafFirstTermOff(pIter->pLeaf) ){
217508 iOff += fts5GetVarint32(&pIter->pLeaf->p[iOff], nKeep);
217510 pIter->iLeafOffset = iOff;
217554 int iOff;
217568 iOff = pIter->iLeafOffset + pIter->nPos;
217570 if( iOff<n ){
217572 assert_nc( iOff<=pIter->iEndofDoclist );
217573 if( iOff>=pIter->iEndofDoclist ){
217575 if( iOff!=fts5LeafFirstTermOff(pLeaf) ){
217576 iOff += fts5GetVarint32(&a[iOff], nKeep);
217580 iOff += sqlite3Fts5GetVarint(&a[iOff], &iDelta);
217584 pIter->iLeafOffset = iOff;
217609 iOff = 0;
217611 while( iOff==0 ){
217616 if( (iOff = fts5LeafFirstRowidOff(pLeaf)) && iOff<pLeaf->szLeaf ){
217617 iOff += sqlite3Fts5GetVarint(&pLeaf->p[iOff], (u64*)&pIter->iRowid);
217618 pIter->iLeafOffset = iOff;
217628 &pLeaf->p[pLeaf->szLeaf], iOff
217630 pIter->iLeafOffset = iOff;
217631 pIter->iEndofDoclist = iOff;
217634 assert_nc( iOff<pLeaf->szLeaf );
217635 if( iOff>pLeaf->szLeaf ){
217674 #define fts5IndexSkipVarint(a, iOff) { \
217675 int iEnd = iOff+9; \
217676 while( (a[iOff++] & 0x80) && iOff<iEnd ); \
217745 int iOff;
217749 iOff = fts5LeafFirstRowidOff(pLast);
217750 iOff += fts5GetVarint(&pLast->p[iOff], (u64*)&pIter->iRowid);
217751 pIter->iLeafOffset = iOff;
217810 int iOff;
217826 iOff = iTermOff;
217827 if( iOff>n ){
217835 fts5FastGetVarint32(a, iOff, nNew);
217846 if( a[iOff+i]!=pTerm[nMatch+i] ) break;
217856 }else if( i<nNew && a[iOff+i]>pTerm[nMatch] ){
217868 iOff = iTermOff;
217870 if( iOff>=n ){
217876 fts5FastGetVarint32(a, iOff, nKeep);
217891 iPgidx += fts5GetVarint32(&pIter->pLeaf->p[iPgidx], iOff);
217892 if( iOff<4 || iOff>=pIter->pLeaf->szLeaf ){
217897 iTermOff = iOff;
217899 iOff += fts5GetVarint32(&a[iOff], nNew);
217907 pIter->iLeafOffset = iOff + nNew;
217916 fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
218267 int iOff;
218271 iOff = fts5LeafFirstRowidOff(pIter->pLeaf);
218272 if( iOff<4 || iOff>=n ){
218275 iOff += fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid);
218276 pIter->iLeafOffset = iOff;
219374 int iOff;
219376 iOff = 1 + fts5GetVarint(&pBuf->p[1], (u64*)&iRowid);
219377 fts5GetVarint(&pBuf->p[iOff], (u64*)&iRowid);
219730 int iOff = pSeg->iTermLeafOffset; /* Offset on new first leaf page */
219739 if( iOff>pData->szLeaf ){
219751 fts5BufferAppendBlob(&p->rc, &buf, pData->szLeaf-iOff,&pData->p[iOff]);
220130 int iOff = 0;
220135 while( p->rc==SQLITE_OK && iOff<nDoclist ){
220136 iOff += fts5GetVarint(&pDoclist[iOff], (u64*)&iDelta);
220151 if( iOff<nDoclist && pDoclist[iOff]==0 ){
220153 iOff++;
220154 if( iOff<nDoclist && pDoclist[iOff]==0 ){
220156 iOff++;
220165 int nCopy = fts5GetPoslistSize(&pDoclist[iOff], &nPos, &bDummy);
220170 fts5BufferSafeAppendBlob(pBuf, &pDoclist[iOff], nCopy);
220175 const u8 *pPoslist = &pDoclist[iOff];
220194 iOff += nCopy;
221298 int iOff = FTS5_POS2OFFSET(sReader.iPos);
221299 cksum ^= sqlite3Fts5IndexEntryCksum(rowid, iCol, iOff, iIdx, z, n);
221460 int iOff;
221465 iOff = iTermOff;
221467 if( iOff>=pLeaf->szLeaf ){
221471 iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);
221472 if( (iOff+nByte)>pLeaf->szLeaf ){
221475 fts5BufferSet(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);
221479 iOff += fts5GetVarint32(&pLeaf->p[iOff], nKeep);
221480 iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);
221481 if( nKeep>buf1.n || (iOff+nByte)>pLeaf->szLeaf ){
221485 fts5BufferAppendBlob(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);
221542 int iOff; /* Offset of first term on leaf */
221547 iOff = fts5LeafFirstTermOff(pLeaf);
221549 if( iRowidOff>=iOff || iOff>=pLeaf->szLeaf ){
221552 iOff += fts5GetVarint32(&pLeaf->p[iOff], nTerm);
221553 res = fts5Memcmp(&pLeaf->p[iOff], zIdxTerm, MIN(nTerm, nIdxTerm));
221692 int iOff = 0; /* Offset within poslist */
221706 while( 0==sqlite3Fts5PoslistNext64(poslist.p, poslist.n, &iOff, &iPos) ){
221851 int iOff = 0;
221852 while( iOff<n ){
221854 iOff += fts5GetVarint32(&a[iOff], iVal);
221857 return iOff;
221870 int iOff = 0;
221873 iOff = sqlite3Fts5GetVarint(a, (u64*)&iDocid);
221876 while( iOff<n ){
221879 iOff += fts5GetPoslistSize(&a[iOff], &nPos, &bDel);
221881 iOff += fts5DecodePoslist(pRc, pBuf, &a[iOff], MIN(n-iOff, nPos));
221882 if( iOff<n ){
221884 iOff += sqlite3Fts5GetVarint(&a[iOff], (u64*)&iDelta);
221890 return iOff;
221997 int iOff;
222009 iOff = iTermOff;
222010 while( iOff<szLeaf ){
222014 iOff += fts5GetVarint32(&a[iOff], nAppend);
222016 fts5BufferAppendBlob(&rc, &term, nAppend, &a[iOff]);
222020 iOff += nAppend;
222031 fts5DecodeRowidList(&rc, &s, &a[iOff], iTermOff-iOff);
222032 iOff = iTermOff;
222033 if( iOff<szLeaf ){
222034 iOff += fts5GetVarint32(&a[iOff], nKeep);
222046 int iOff;
222067 iOff = iRowidOff;
222069 iOff = iTermOff;
222071 iOff = szLeaf;
222073 if( iOff>n ){
222077 fts5DecodePoslist(&rc, &s, &a[4], iOff-4);
222081 nDoclist = (iTermOff ? iTermOff : szLeaf) - iOff;
222082 if( nDoclist+iOff>n ){
222086 fts5DecodeDoclist(&rc, &s, &a[iOff], nDoclist);
222095 iOff = iPgidxPrev;
222109 iOff += fts5GetVarint32(&a[iOff], nByte);
222116 iOff += fts5GetVarint32(&a[iOff], nByte);
222117 if( iOff+nByte>n ){
222121 fts5BufferAppendBlob(&rc, &term, nByte, &a[iOff]);
222122 iOff += nByte;
222127 iOff += fts5DecodeDoclist(&rc, &s, &a[iOff], iEnd-iOff);
223001 int iOff = 0;
223013 iOff += iVal;
223014 pSorter->aIdx[i] = iOff;
225396 int iOff;
225398 iOff = (int)strlen(zDefn);
225400 sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], ", c%d", i);
225401 iOff += (int)strlen(&zDefn[iOff]);
226114 int iOff = 0;
226116 if( iOff>=nBlob ) return 1;
226117 iOff += fts5GetVarint32(&aBlob[iOff], aCol[i]);
226119 return (iOff!=nBlob);
229164 int iOff = 0; /* Current offset within position list */
229172 while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){
229182 while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){
229195 while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff,&iPos) ){