• 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
36871 i64 iOff, /* File offset to begin writing at */
36885 do{ rc = (int)osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );
36887 do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
36890 i64 iSeek = lseek(fd, iOff, SEEK_SET);
36901 OSTRACE(("WRITE %-3d %5d %7lld %llu\n", fd, rc, iOff, TIMER_ELAPSED));
38645 static int unixFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
38657 if( pFd->mmapSize >= iOff+nAmt ){
38658 *pp = &((u8 *)pFd->pMapRegion)[iOff];
38676 static int unixUnfetch(sqlite3_file *fd, i64 iOff, void *p){
38679 UNUSED_PARAMETER(iOff);
38687 assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );
38699 UNUSED_PARAMETER(iOff);
39787 int iOff = 0;
39792 iOff = sqlite3Strlen30(zOut);
39793 zOut[iOff++] = '/';
39795 if( (iOff+nPath+1)>nOut ){
39798 zOut[iOff] = '\0';
39801 sqlite3_snprintf(nOut-iOff, &zOut[iOff], "%s", zPath);
46115 static int winFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
46122 osGetCurrentProcessId(), fd, iOff, nAmt, pp));
46134 if( pFd->mmapSize >= iOff+nAmt ){
46136 *pp = &((u8 *)pFd->pMapRegion)[iOff];
46157 static int winUnfetch(sqlite3_file *fd, i64 iOff, void *p){
46167 assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );
46170 osGetCurrentProcessId(), pFd, iOff, p));
57533 i64 iOff = pPager->journalOff;
57553 rc = write32bits(pPager->jfd, iOff, pPg->pgno);
57555 rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize, iOff+4);
57557 rc = write32bits(pPager->jfd, iOff+pPager->pageSize+4, cksum);
62754 i64 iOff = walFrameOffset(iRead, szPage);
62755 rc = sqlite3OsRead(pWal->pWalFd, aBuf, szPage+WAL_FRAME_HDRSIZE, iOff);
62762 rc = sqlite3OsWrite(pWal->pWalFd, aFrame, sizeof(aFrame), iOff);
62886 i64 iOff = walFrameOffset(iWrite, szPage) + WAL_FRAME_HDRSIZE;
62892 rc = sqlite3OsWrite(pWal->pWalFd, pData, szPage, iOff);
71587 int iOff = get2byteAligned(&pPg->aCellIdx[i*2]);
71591 assert( 0==memcmp(pCell, &aData[iOff],
71991 int iOff;
71993 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
71994 if( (iOff+szNew[i])>(int)pBt->usableSize ){
71999 memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]);
75129 i64 iOff;
75148 for(iOff=iEnd-(i64)nSrcPgsz; rc==SQLITE_OK && iOff<iEnd; iOff+=nDestPgsz){
75150 Pgno iDest = (Pgno)(iOff/nDestPgsz)+1;
75155 const u8 *zIn = &zSrcData[iOff%nSrcPgsz];
75157 u8 *zOut = &zDestData[iOff%nDestPgsz];
75168 if( iOff==0 && bUpdate==0 ){
75368 i64 iOff;
75402 iOff=PENDING_BYTE+pgszSrc;
75403 rc==SQLITE_OK && iOff<iEnd;
75404 iOff+=pgszSrc
75407 const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1);
75411 rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);
94319 i64 iOff /* Offset in pFile */
94330 pReadr->iReadOff = iOff;
95994 i64 iOff = *piOffset;
96004 rc = vdbePmaReaderInit(pTask, &pTask->file, iOff, pReadr, &nDummy);
96005 iOff = pReadr->iEof;
96012 *piOffset = iOff;
96979 sqlite3_int64 iOff = 0;
96981 ALWAYS(pChunk) && (iOff+p->nChunkSize)<=iOfst;
96984 iOff += p->nChunkSize;
97031 i64 iOff = 0;
97034 if( iOff + nChunk > copy.endpoint.iOffset ){
97035 nChunk = copy.endpoint.iOffset - iOff;
97037 rc = sqlite3OsWrite(pReal, (u8*)pIter->zChunk, nChunk, iOff);
97039 iOff += nChunk;
106701 int iOff; /* Offset of token to replace in zOut */
106714 iOff = pBest->t.z - zSql;
106716 memmove(&zOut[iOff + nReplace], &zOut[iOff + pBest->t.n],
106717 nOut - (iOff + pBest->t.n)
106722 memcpy(&zOut[iOff], zReplace, nReplace);
180108 int iOff; /* Current offset within aNode[] */
180157 if( p->iOff>=p->nNode ){
180162 p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nPrefix);
180164 p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);
180166 if( nPrefix>p->term.n || nSuffix>p->nNode-p->iOff || nSuffix==0 ){
180171 memcpy(&p->term.a[nPrefix], &p->aNode[p->iOff], nSuffix);
180173 p->iOff += nSuffix;
180175 p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &p->nDoclist);
180176 if( (p->nNode-p->iOff)<p->nDoclist ){
180179 p->aDoclist = &p->aNode[p->iOff];
180180 p->iOff += p->nDoclist;
180185 assert_fts3_nc( p->iOff<=p->nNode );
180211 p->iOff = 1 + sqlite3Fts3GetVarint(&p->aNode[1], &p->iChild);
180213 p->iOff = 1;
183724 int iOff; /* Offset of this term from read positions */
183756 pT->iOff = nTerm-iTerm-1;
183851 if( pT->pList && (pT->iPos-pT->iOff)<iMinPos ){
183852 iMinPos = pT->iPos-pT->iOff;
184026 int iOff; /* Current offset within aInput[] */
184258 const unsigned char *z = &pCsr->aInput[pCsr->iOff];
184301 pCsr->iOff = (int)(z - pCsr->aInput);
198188 static int rbuCaptureWalRead(sqlite3rbu *pRbu, i64 iOff, int iAmt){
198207 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
198220 static int rbuCaptureDbWrite(sqlite3rbu *pRbu, i64 iOff){
198221 pRbu->aFrame[pRbu->nFrame-1].iDbPage = (u32)(iOff / pRbu->pgsz) + 1;
198233 i64 iOff;
198236 iOff = (i64)(pFrame->iWalFrame-1) * (p->pgsz + 24) + 32 + 24;
198237 p->rc = pWal->pMethods->xRead(pWal, p->aBuf, p->pgsz, iOff);
198240 iOff = (i64)(pFrame->iDbPage-1) * p->pgsz;
198241 p->rc = pDb->pMethods->xWrite(pDb, p->aBuf, p->pgsz, iOff);
200806 int iOff;
200831 iOff = get2byte(&aHdr[1]);
200832 while( iOff ){
200834 if( iOff>=szPage ) goto statPageIsCorrupt;
200835 nUnused += get2byte(&aData[iOff+2]);
200836 iNext = get2byte(&aData[iOff]);
200837 if( iNext<iOff+4 && iNext>0 ) goto statPageIsCorrupt;
200838 iOff = iNext;
200857 iOff = get2byte(&aData[nHdr+i*2]);
200858 if( iOff<nHdr || iOff>=szPage ) goto statPageIsCorrupt;
200860 pCell->iChildPg = sqlite3Get4byte(&aData[iOff]);
200861 iOff += 4;
200868 iOff += getVarint32(&aData[iOff], nPayload);
200871 iOff += sqlite3GetVarint(&aData[iOff], &dummy);
200882 if( iOff+nLocal>nUsable || nPayload>0x7fffffff ){
200889 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
208286 #define fts5FastGetVarint32(a, iOff, nVal) { \
208287 nVal = (a)[iOff++]; \
208289 iOff--; \
208290 iOff += fts5GetVarint32(&(a)[iOff], nVal); \
210195 int iOff; /* Current offset within zIn[] */
210242 if( p->iRangeStart && iPos==p->iRangeStart ) p->iOff = iStartOff;
210246 fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iStartOff - p->iOff);
210248 p->iOff = iStartOff;
210255 fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);
210257 p->iOff = iEndOff;
210264 fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);
210265 p->iOff = iEndOff;
210308 fts5HighlightAppend(&rc, &ctx, &ctx.zIn[ctx.iOff], ctx.nIn - ctx.iOff);
210407 int iOff = 0;
210416 rc = pApi->xInst(pFts, i, &ip, &ic, &iOff);
210417 if( rc==SQLITE_OK && ic==iCol && iOff>=iPos && iOff<iEnd ){
210420 if( iFirst<0 ) iFirst = iOff;
210421 iLast = iOff + pApi->xPhraseSize(pFts, ip);
210586 fts5HighlightAppend(&rc, &ctx, &ctx.zIn[ctx.iOff], ctx.nIn - ctx.iOff);
210969 i64 iOff = *piOff;
210978 iOff = ((i64)iVal) << 32;
210986 *piOff = iOff + ((iVal-2) & 0x7FFFFFFF);
214874 i64 iOff;
214904 if( (tflags & FTS5_TOKEN_COLOCATED)==0 ) p->iOff++;
214914 &pExpr->apExprPhrase[i]->poslist, &p->aPopulator[i].writer, p->iOff
214935 sCtx.iOff = (((i64)iCol) << 32) - 1;
216152 int iOff; /* Current offset into pData */
216889 if( pLvl->iOff==0 ){
216891 pLvl->iOff = 1;
216892 pLvl->iOff += fts5GetVarint32(&pData->p[1], pLvl->iLeafPgno);
216893 pLvl->iOff += fts5GetVarint(&pData->p[pLvl->iOff], (u64*)&pLvl->iRowid);
216894 pLvl->iFirstOff = pLvl->iOff;
216896 int iOff;
216897 for(iOff=pLvl->iOff; iOff<pData->nn; iOff++){
216898 if( pData->p[iOff] ) break;
216901 if( iOff<pData->nn ){
216903 pLvl->iLeafPgno += (iOff - pLvl->iOff) + 1;
216904 iOff += fts5GetVarint(&pData->p[iOff], (u64*)&iVal);
216906 pLvl->iOff = iOff;
216990 int iOff = pLvl->iOff;
216993 if( iOff<=pLvl->iFirstOff ){
217006 iLimit = (iOff>9 ? iOff-9 : 0);
217007 for(iOff--; iOff>iLimit; iOff--){
217008 if( (a[iOff-1] & 0x80)==0 ) break;
217011 fts5GetVarint(&a[iOff], (u64*)&iVal);
217016 for(ii=iOff-1; ii>=pLvl->iFirstOff && a[ii]==0x00; ii--){
217032 pLvl->iOff = iOff - nZero;
217196 int iOff = pIter->iLeafOffset; /* Offset to read at */
217202 if( iOff<iEod && pIter->pLeaf->p[iOff]==0 ){
217204 iOff++;
217205 if( iOff<iEod && pIter->pLeaf->p[iOff]==0 ){
217207 iOff++;
217214 fts5FastGetVarint32(pIter->pLeaf->p, iOff, nSz);
217219 pIter->iLeafOffset = iOff;
217225 int iOff = pIter->iLeafOffset;
217228 if( iOff>=pIter->pLeaf->szLeaf ){
217234 iOff = 4;
217237 iOff += sqlite3Fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid);
217238 pIter->iLeafOffset = iOff;
217258 int iOff = pIter->iLeafOffset; /* Offset to read at */
217261 iOff += fts5GetVarint32(&a[iOff], nNew);
217262 if( iOff+nNew>pIter->pLeaf->szLeaf || nKeep>pIter->term.n || nNew==0 ){
217267 fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
217269 iOff += nNew;
217270 pIter->iTermLeafOffset = iOff;
217272 pIter->iLeafOffset = iOff;
217481 int iOff;
217487 iOff = pIter->iLeafOffset;
217489 iOff += pIter->nPos;
217491 fts5GetVarint(&a[iOff], (u64*)&iDelta);
217509 int iOff;
217516 iOff = pIter->iLeafOffset;
217519 if( pIter->pSeg && iOff>=pIter->pLeaf->szLeaf ){
217523 iOff = 4;
217526 if( iOff<pIter->iEndofDoclist ){
217529 iOff += sqlite3Fts5GetVarint(&pIter->pLeaf->p[iOff], (u64*)&iDelta);
217530 pIter->iLeafOffset = iOff;
217535 if( iOff!=fts5LeafFirstTermOff(pIter->pLeaf) ){
217536 iOff += fts5GetVarint32(&pIter->pLeaf->p[iOff], nKeep);
217538 pIter->iLeafOffset = iOff;
217582 int iOff;
217596 iOff = pIter->iLeafOffset + pIter->nPos;
217598 if( iOff<n ){
217600 assert_nc( iOff<=pIter->iEndofDoclist );
217601 if( iOff>=pIter->iEndofDoclist ){
217603 if( iOff!=fts5LeafFirstTermOff(pLeaf) ){
217604 iOff += fts5GetVarint32(&a[iOff], nKeep);
217608 iOff += sqlite3Fts5GetVarint(&a[iOff], &iDelta);
217612 pIter->iLeafOffset = iOff;
217637 iOff = 0;
217639 while( iOff==0 ){
217644 if( (iOff = fts5LeafFirstRowidOff(pLeaf)) && iOff<pLeaf->szLeaf ){
217645 iOff += sqlite3Fts5GetVarint(&pLeaf->p[iOff], (u64*)&pIter->iRowid);
217646 pIter->iLeafOffset = iOff;
217656 &pLeaf->p[pLeaf->szLeaf], iOff
217658 pIter->iLeafOffset = iOff;
217659 pIter->iEndofDoclist = iOff;
217662 assert_nc( iOff<pLeaf->szLeaf );
217663 if( iOff>pLeaf->szLeaf ){
217702 #define fts5IndexSkipVarint(a, iOff) { \
217703 int iEnd = iOff+9; \
217704 while( (a[iOff++] & 0x80) && iOff<iEnd ); \
217773 int iOff;
217777 iOff = fts5LeafFirstRowidOff(pLast);
217778 iOff += fts5GetVarint(&pLast->p[iOff], (u64*)&pIter->iRowid);
217779 pIter->iLeafOffset = iOff;
217838 int iOff;
217854 iOff = iTermOff;
217855 if( iOff>n ){
217863 fts5FastGetVarint32(a, iOff, nNew);
217874 if( a[iOff+i]!=pTerm[nMatch+i] ) break;
217884 }else if( i<nNew && a[iOff+i]>pTerm[nMatch] ){
217896 iOff = iTermOff;
217898 if( iOff>=n ){
217904 fts5FastGetVarint32(a, iOff, nKeep);
217919 iPgidx += fts5GetVarint32(&pIter->pLeaf->p[iPgidx], iOff);
217920 if( iOff<4 || iOff>=pIter->pLeaf->szLeaf ){
217925 iTermOff = iOff;
217927 iOff += fts5GetVarint32(&a[iOff], nNew);
217935 pIter->iLeafOffset = iOff + nNew;
217944 fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
218295 int iOff;
218299 iOff = fts5LeafFirstRowidOff(pIter->pLeaf);
218300 if( iOff<4 || iOff>=n ){
218303 iOff += fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid);
218304 pIter->iLeafOffset = iOff;
219402 int iOff;
219404 iOff = 1 + fts5GetVarint(&pBuf->p[1], (u64*)&iRowid);
219405 fts5GetVarint(&pBuf->p[iOff], (u64*)&iRowid);
219758 int iOff = pSeg->iTermLeafOffset; /* Offset on new first leaf page */
219767 if( iOff>pData->szLeaf ){
219779 fts5BufferAppendBlob(&p->rc, &buf, pData->szLeaf-iOff,&pData->p[iOff]);
220158 int iOff = 0;
220163 while( p->rc==SQLITE_OK && iOff<nDoclist ){
220164 iOff += fts5GetVarint(&pDoclist[iOff], (u64*)&iDelta);
220179 if( iOff<nDoclist && pDoclist[iOff]==0 ){
220181 iOff++;
220182 if( iOff<nDoclist && pDoclist[iOff]==0 ){
220184 iOff++;
220193 int nCopy = fts5GetPoslistSize(&pDoclist[iOff], &nPos, &bDummy);
220198 fts5BufferSafeAppendBlob(pBuf, &pDoclist[iOff], nCopy);
220203 const u8 *pPoslist = &pDoclist[iOff];
220222 iOff += nCopy;
221326 int iOff = FTS5_POS2OFFSET(sReader.iPos);
221327 cksum ^= sqlite3Fts5IndexEntryCksum(rowid, iCol, iOff, iIdx, z, n);
221488 int iOff;
221493 iOff = iTermOff;
221495 if( iOff>=pLeaf->szLeaf ){
221499 iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);
221500 if( (iOff+nByte)>pLeaf->szLeaf ){
221503 fts5BufferSet(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);
221507 iOff += fts5GetVarint32(&pLeaf->p[iOff], nKeep);
221508 iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);
221509 if( nKeep>buf1.n || (iOff+nByte)>pLeaf->szLeaf ){
221513 fts5BufferAppendBlob(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);
221570 int iOff; /* Offset of first term on leaf */
221575 iOff = fts5LeafFirstTermOff(pLeaf);
221577 if( iRowidOff>=iOff || iOff>=pLeaf->szLeaf ){
221580 iOff += fts5GetVarint32(&pLeaf->p[iOff], nTerm);
221581 res = fts5Memcmp(&pLeaf->p[iOff], zIdxTerm, MIN(nTerm, nIdxTerm));
221720 int iOff = 0; /* Offset within poslist */
221734 while( 0==sqlite3Fts5PoslistNext64(poslist.p, poslist.n, &iOff, &iPos) ){
221879 int iOff = 0;
221880 while( iOff<n ){
221882 iOff += fts5GetVarint32(&a[iOff], iVal);
221885 return iOff;
221898 int iOff = 0;
221901 iOff = sqlite3Fts5GetVarint(a, (u64*)&iDocid);
221904 while( iOff<n ){
221907 iOff += fts5GetPoslistSize(&a[iOff], &nPos, &bDel);
221909 iOff += fts5DecodePoslist(pRc, pBuf, &a[iOff], MIN(n-iOff, nPos));
221910 if( iOff<n ){
221912 iOff += sqlite3Fts5GetVarint(&a[iOff], (u64*)&iDelta);
221918 return iOff;
222025 int iOff;
222037 iOff = iTermOff;
222038 while( iOff<szLeaf ){
222042 iOff += fts5GetVarint32(&a[iOff], nAppend);
222044 fts5BufferAppendBlob(&rc, &term, nAppend, &a[iOff]);
222048 iOff += nAppend;
222059 fts5DecodeRowidList(&rc, &s, &a[iOff], iTermOff-iOff);
222060 iOff = iTermOff;
222061 if( iOff<szLeaf ){
222062 iOff += fts5GetVarint32(&a[iOff], nKeep);
222074 int iOff;
222095 iOff = iRowidOff;
222097 iOff = iTermOff;
222099 iOff = szLeaf;
222101 if( iOff>n ){
222105 fts5DecodePoslist(&rc, &s, &a[4], iOff-4);
222109 nDoclist = (iTermOff ? iTermOff : szLeaf) - iOff;
222110 if( nDoclist+iOff>n ){
222114 fts5DecodeDoclist(&rc, &s, &a[iOff], nDoclist);
222123 iOff = iPgidxPrev;
222137 iOff += fts5GetVarint32(&a[iOff], nByte);
222144 iOff += fts5GetVarint32(&a[iOff], nByte);
222145 if( iOff+nByte>n ){
222149 fts5BufferAppendBlob(&rc, &term, nByte, &a[iOff]);
222150 iOff += nByte;
222155 iOff += fts5DecodeDoclist(&rc, &s, &a[iOff], iEnd-iOff);
223029 int iOff = 0;
223041 iOff += iVal;
223042 pSorter->aIdx[i] = iOff;
225424 int iOff;
225426 iOff = (int)strlen(zDefn);
225428 sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], ", c%d", i);
225429 iOff += (int)strlen(&zDefn[iOff]);
226142 int iOff = 0;
226144 if( iOff>=nBlob ) return 1;
226145 iOff += fts5GetVarint32(&aBlob[iOff], aCol[i]);
226147 return (iOff!=nBlob);
229192 int iOff = 0; /* Current offset within position list */
229200 while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){
229210 while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){
229223 while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff,&iPos) ){