Lines Matching refs:aData
47805 unsigned char *aData; /* content of the file */
47899 if( p->mFlags & SQLITE_DESERIALIZE_FREEONCLOSE ) sqlite3_free(p->aData);
47915 if( iOfst<p->sz ) memcpy(zBuf, p->aData+iOfst, p->sz - iOfst);
47918 memcpy(zBuf, p->aData+iOfst, iAmt);
47935 pNew = sqlite3Realloc(p->aData, newSz);
47937 p->aData = pNew;
47960 if( iOfst>p->sz ) memset(p->aData+p->sz, 0, iOfst-p->sz);
47963 memcpy(p->aData+iOfst, z, iAmt);
48028 *(char**)pArg = sqlite3_mprintf("memdb(%p,%lld)", p->aData, p->sz);
48078 *pp = (void*)(p->aData + iOfst);
48264 pOut = p->aData;
48267 if( pOut ) memcpy(pOut, p->aData, p->sz);
48357 p->aData = pData;
53827 static u32 pager_cksum(Pager *pPager, const u8 *aData){
53831 cksum += aData[i];
53885 char *aData; /* Temporary storage for the page */
53894 aData = pPager->pTmpSpace;
53895 assert( aData ); /* Temp storage must have already been allocated */
53915 rc = sqlite3OsRead(jfd, (u8*)aData, pPager->pageSize, (*pOffset)+4);
53934 if( !isSavepnt && pager_cksum(pPager, (u8*)aData)!=cksum ){
53948 if( pgno==1 && pPager->nReserve!=((u8*)aData)[20] ){
53949 pPager->nReserve = ((u8*)aData)[20];
53995 PAGERID(pPager), pgno, pager_datahash(pPager->pageSize, (u8*)aData),
54017 rc = sqlite3OsWrite(pPager->fd, (u8 *)aData, pPager->pageSize, ofst);
54023 sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)aData);
54060 memcpy(pData, (u8*)aData, pPager->pageSize);
59996 u32 *aData = (u32 *)a;
60012 s1 += *aData++ + s2;
60013 s2 += *aData++ + s1;
60014 }while( aData<aEnd );
60017 s1 += BYTESWAP32(aData[0]) + s2;
60018 s2 += BYTESWAP32(aData[1]) + s1;
60019 aData += 2;
60020 }while( aData<aEnd );
60086 u8 *aData, /* Pointer to page data */
60099 walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
60117 u8 *aData, /* Pointer to page data (for checksum) */
60146 walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
60522 u8 *aData; /* Pointer to data part of aFrame buffer */
60580 aData = &aFrame[WAL_FRAME_HDRSIZE];
60592 isValid = walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame);
61692 u8 *aData; /* Pointer to data part of aFrame buffer */
61785 aData = &aFrame[WAL_FRAME_HDRSIZE];
61803 if( !walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame) ) break;
63643 u8 *aData; /* Pointer to disk image of the page data */
65445 ((P)->aData + ((P)->maskPage & get2byteAligned(&(P)->aCellIdx[2*(I)])))
65781 src = data = pPage->aData;
65898 u8 * const aData = pPg->aData; /* Page data */
65900 int pc = get2byte(&aData[iAddr]); /* Address of a free slot */
65910 size = get2byte(&aData[pc+2]);
65917 if( aData[hdr+7]>57 ) return 0;
65921 memcpy(&aData[iAddr], &aData[pc], 2);
65922 aData[hdr+7] += (u8)x;
65930 put2byte(&aData[pc+2], x);
65932 return &aData[pc + x];
65935 pc = get2byte(&aData[pc]);
65966 u8 * const data = pPage->aData; /* Local cache of pPage->aData */
66068 unsigned char *data = pPage->aData; /* Page content */
66235 assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
66241 data = pPage->aData;
66315 data = pPage->aData;
66352 assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
66356 data = pPage->aData + pPage->hdrOffset;
66367 pPage->aDataEnd = pPage->aData + pBt->usableSize;
66368 pPage->aDataOfst = pPage->aData + pPage->childPtrSize;
66397 unsigned char *data = pPage->aData;
66436 pPage->aData = sqlite3PagerGetData(pDbPage);
66442 assert( pPage->aData==sqlite3PagerGetData(pDbPage) );
66546 assert( (*ppPage)->aData==sqlite3PagerGetData(pDbPage) );
66575 assert( pPage->aData );
66579 assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
66588 assert( pPage->aData );
66592 assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
67431 nPage = nPageHeader = get4byte(28+(u8*)pPage1->aData);
67433 if( nPage==0 || memcmp(24+(u8*)pPage1->aData, 92+(u8*)pPage1->aData,4)!=0 ){
67442 u8 *page1 = pPage1->aData;
67626 assert( pPage1->aData );
67649 data = pP1->aData;
67871 if( pBt->nPage!=get4byte(&pPage1->aData[28]) ){
67874 put4byte(&pPage1->aData[28], pBt->nPage);
67883 *pSchemaVersion = get4byte(&pBt->pPage1->aData[40]);
67930 Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
67956 if( get4byte(pPage->aData)!=iFrom ){
67959 put4byte(pPage->aData, iTo);
67975 if( pCell+info.nSize > pPage->aData+pPage->pBt->usableSize ){
67993 get4byte(&pPage->aData[pPage->hdrOffset+8])!=iFrom ){
67996 put4byte(&pPage->aData[pPage->hdrOffset+8], iTo);
68054 Pgno nextOvfl = get4byte(pDbPage->aData);
68117 nFreeList = get4byte(&pBt->pPage1->aData[36]);
68238 Pgno nFree = get4byte(&pBt->pPage1->aData[36]);
68251 put4byte(&pBt->pPage1->aData[28], pBt->nPage);
68293 nFree = get4byte(&pBt->pPage1->aData[36]);
68304 put4byte(&pBt->pPage1->aData[32], 0);
68305 put4byte(&pBt->pPage1->aData[36], 0);
68306 put4byte(&pBt->pPage1->aData[28], nFin);
68540 int nPage = get4byte(&pPage1->aData[28]);
68752 assert( pBt->pPage1 && pBt->pPage1->aData );
68959 (i64)(pCur->info.pPayload - pCur->pPage->aData);
69061 next = get4byte(pPage->aData);
69161 assert( aPayload > pPage->aData );
69162 if( (uptr)(aPayload - pPage->aData) > (pBt->usableSize - pCur->info.nLocal) ){
69404 assert( pCur->info.pPayload>pCur->pPage->aData || CORRUPT_DB );
69478 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
69606 subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);
69656 pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
69992 chldPg = get4byte(&pPage->aData[pPage->hdrOffset+8]);
70113 rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
70285 n = get4byte(&pPage1->aData[36]);
70322 put4byte(&pPage1->aData[36], n-1);
70335 iTrunk = get4byte(&pPrevTrunk->aData[0]);
70340 iTrunk = get4byte(&pPage1->aData[32]);
70353 assert( pTrunk->aData!=0 );
70356 k = get4byte(&pTrunk->aData[4]);
70367 memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
70391 memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
70397 memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
70405 Pgno iNewTrunk = get4byte(&pTrunk->aData[8]);
70420 memcpy(&pNewTrunk->aData[0], &pTrunk->aData[0], 4);
70421 put4byte(&pNewTrunk->aData[4], k-1);
70422 memcpy(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4);
70426 put4byte(&pPage1->aData[32], iNewTrunk);
70432 put4byte(&pPrevTrunk->aData[0], iNewTrunk);
70442 unsigned char *aData = pTrunk->aData;
70448 iPage = get4byte(&aData[8+i*4]);
70456 dist = sqlite3AbsInt32(get4byte(&aData[8]) - nearby);
70458 int d2 = sqlite3AbsInt32(get4byte(&aData[8+i*4]) - nearby);
70469 iPage = get4byte(&aData[8+closest*4]);
70487 memcpy(&aData[8+closest*4], &aData[4+k*4], 4);
70489 put4byte(&aData[4], k-1);
70550 put4byte(28 + (u8*)pBt->pPage1->aData, pBt->nPage);
70611 nFree = get4byte(&pPage1->aData[36]);
70612 put4byte(&pPage1->aData[36], nFree+1);
70623 memset(pPage->aData, 0, pPage->pBt->pageSize);
70644 iTrunk = get4byte(&pPage1->aData[32]);
70650 nLeaf = get4byte(&pTrunk->aData[4]);
70678 put4byte(&pTrunk->aData[4], nLeaf+1);
70679 put4byte(&pTrunk->aData[8+nLeaf*4], iPage);
70703 put4byte(pPage->aData, iTrunk);
70704 put4byte(&pPage->aData[4], 0);
70705 put4byte(&pPage1->aData[32], iPage);
70830 assert( pCell<pPage->aData || pCell>=&pPage->aData[pPage->pBt->pageSize]
70915 assert( pPayload<pPage->aData || pPayload>=&pPage->aData[pBt->pageSize]
70975 assert( pPrior<pPage->aData || pPrior>=&pPage->aData[pBt->pageSize]
70981 pPrior = pOvfl->aData;
70983 pPayload = &pOvfl->aData[4];
71012 data = pPage->aData;
71108 data = pPage->aData;
71294 u8 * const aData = pPg->aData; /* Pointer to data for pPg */
71296 u8 * const pEnd = &aData[usableSize];
71307 j = get2byte(&aData[hdr+5]);
71309 memcpy(&pTmp[j], &aData[j], usableSize - j);
71319 if( SQLITE_WITHIN(pCell,aData,pEnd) ){
71321 pCell = &pTmp[pCell - aData];
71329 put2byte(pCellptr, (pData - aData));
71347 put2byte(&aData[hdr+1], 0);
71348 put2byte(&aData[hdr+3], pPg->nCell);
71349 put2byte(&aData[hdr+5], pData - aData);
71350 aData[hdr+7] = 0x00;
71388 u8 *aData = pPg->aData; /* Complete page */
71402 if( (aData[1]==0 && aData[2]==0) || (pSlot = pageFindSlot(pPg,sz,&rc))==0 ){
71421 put2byte(pCellptr, (pSlot - aData));
71449 u8 * const aData = pPg->aData;
71450 u8 * const pEnd = &aData[pPg->pBt->usableSize];
71451 u8 * const pStart = &aData[pPg->hdrOffset + 8 + pPg->childPtrSize];
71468 assert( pFree>aData && (pFree - aData)<65536 );
71469 freeSpace(pPg, (u16)(pFree - aData), szFree);
71482 assert( pFree>aData && (pFree - aData)<65536 );
71483 freeSpace(pPg, (u16)(pFree - aData), szFree);
71507 u8 * const aData = pPg->aData;
71519 memcpy(pTmp, aData, pPg->pBt->usableSize);
71536 pData = &aData[get2byteNotZero(&aData[hdr+5])];
71581 put2byte(&aData[hdr+3], pPg->nCell);
71582 put2byte(&aData[hdr+5], pData - aData);
71588 if( SQLITE_WITHIN(pCell, aData, &aData[pPg->pBt->usableSize]) ){
71589 pCell = &pTmp[pCell - aData];
71591 assert( 0==memcmp(pCell, &aData[iOff],
71657 assert( CORRUPT_DB || pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) );
71714 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
71757 Pgno child = get4byte(&pPage->aData[pPage->hdrOffset+8]);
71786 u8 * const aFrom = pFrom->aData;
71787 u8 * const aTo = pTo->aData;
71948 pRight = &pParent->aData[pParent->hdrOffset+8];
71993 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
72000 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
72052 u8 *aData = pOld->aData;
72054 u8 *piCell = aData + pOld->cellOffset;
72061 if( pOld->aData[0]!=apOld[0]->aData[0] ){
72091 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
72101 piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
72104 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
72129 memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
72284 pageFlags = apOld[0]->aData[0];
72380 memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
72428 || !SQLITE_WITHIN(pCell,pOld->aData,pOld->aDataEnd)
72455 memcpy(&pNew->aData[8], pCell, 4);
72579 (get2byteNotZero(&apNew[0]->aData[5]) - apNew[0]->cellOffset
72590 u32 key = get4byte(&apNew[i]->aData[8]);
72691 zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);
72692 put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);
72911 || pCur->info.pPayload < pPage->aData + pPage->cellOffset
72935 ovflPgno = get4byte(pPage->aData);
72939 rc = btreeOverwriteContent(pPage, pPage->aData+4, pX,
73169 if( oldCell < pPage->aData+pPage->hdrOffset+10 ){
73371 if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_BKPT;
73635 rc = clearDatabasePage(pBt, get4byte(&pPage->aData[hdr+8]), 1, pnChange);
73645 zeroPage(pPage, pPage->aData[hdr] | PTF_LEAF);
73841 *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
73867 pP1 = pBt->pPage1->aData;
73946 rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
74263 data = pPage->aData;
74526 checkList(&sCheck, 1, get4byte(&pBt->pPage1->aData[32]),
74527 get4byte(&pBt->pPage1->aData[36]));
74537 mxInHdr = get4byte(&pBt->pPage1->aData[52]);
74544 }else if( get4byte(&pBt->pPage1->aData[64])!=0 ){
74833 u8 *aData = pBt->pPage1->aData;
74834 if( aData[18]!=(u8)iVersion || aData[19]!=(u8)iVersion ){
74839 aData[18] = (u8)iVersion;
74840 aData[19] = (u8)iVersion;
75558 const u8 *aData
75571 rc = backupOnePage(p, iPage, aData, 1);
75580 SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
75581 if( pBackup ) backupUpdate(pBackup, iPage, aData);
176498 char *aData;
176591 char *aData; /* Pointer to block from malloc() */
176623 char *aData; /* Node data */
177051 p->aData = (char *)&p[1];
177063 p->aData = (char *)&p[1];
177067 p->nData += sqlite3Fts3PutVarint(&p->aData[p->nData], i);
177068 p->aData[p->nData] = '\0';
177098 assert( p->aData[p->nData]==0 );
177736 memcpy(aCopy, pList->aData, nCopy);
178448 assert( pTree->aData==(char *)&pTree[1] );
178449 pTree->aData = (char *)sqlite3_malloc(nReq);
178450 if( !pTree->aData ){
178457 nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nPrefix);
178460 nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nSuffix);
178461 memcpy(&pTree->aData[nData], &zTerm[nPrefix], nSuffix);
178499 pNew->aData = (char *)&pNew[1];
178533 pTree->aData[nStart] = (char)iHeight;
178534 sqlite3Fts3PutVarint(&pTree->aData[nStart+1], iLeftChild);
178568 *paRoot = &pTree->aData[nStart];
178577 rc = fts3WriteSegment(p, iNextFree, &pIter->aData[nStart], nWrite);
178601 if( p->aData!=(char *)&p[1] ){
178602 sqlite3_free(p->aData);
178646 pWriter->aData = (char *)sqlite3_malloc(p->nNodeSize);
178647 if( !pWriter->aData ) return SQLITE_NOMEM;
178682 rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, nData);
178721 char *aNew = sqlite3_realloc(pWriter->aData, nReq);
178723 pWriter->aData = aNew;
178729 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nPrefix);
178730 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nSuffix);
178732 memcpy(&pWriter->aData[nData], &zTerm[nPrefix], nSuffix);
178734 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nDoclist);
178736 memcpy(&pWriter->aData[nData], aDoclist, nDoclist);
178785 rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, pWriter->nData);
178797 0, 0, 0, pWriter->nLeafData, pWriter->aData, pWriter->nData);
178809 sqlite3_free(pWriter->aData);
181929 nSkip = sqlite3Fts3GetVarint(p->pList->aData, &dummy);
181933 memcpy(pRet, &p->pList->aData[nSkip], *pnData);
190516 sqlite3_value **aData,
190563 cell.aCoord[ii].f = rtreeValueDown(aData[ii+3]);
190564 cell.aCoord[ii+1].f = rtreeValueUp(aData[ii+4]);
190574 cell.aCoord[ii].i = sqlite3_value_int(aData[ii+3]);
190575 cell.aCoord[ii+1].i = sqlite3_value_int(aData[ii+4]);
190585 if( sqlite3_value_type(aData[2])!=SQLITE_NULL ){
190586 cell.iRowid = sqlite3_value_int64(aData[2]);
190587 if( sqlite3_value_type(aData[0])==SQLITE_NULL
190588 || sqlite3_value_int64(aData[0])!=cell.iRowid
190611 if( sqlite3_value_type(aData[0])!=SQLITE_NULL ){
190612 rc = rtreeDeleteRowid(pRtree, sqlite3_value_int64(aData[0]));
190646 sqlite3_bind_value(pUp, jj+2, aData[pRtree->nDim2+3+jj]);
193276 sqlite3_value **aData,
193297 oldRowidValid = sqlite3_value_type(aData[0])!=SQLITE_NULL;;
193298 oldRowid = oldRowidValid ? sqlite3_value_int64(aData[0]) : 0;
193299 newRowidValid = nData>1 && sqlite3_value_type(aData[1])!=SQLITE_NULL;
193300 newRowid = newRowidValid ? sqlite3_value_int64(aData[1]) : 0;
193305 || !sqlite3_value_nochange(aData[2]) /* UPDATE _shape */
193308 geopolyBBox(0, aData[2], cell.aCoord, &rc);
193375 if( sqlite3_value_nochange(aData[2]) ){
193379 if( sqlite3_value_type(aData[2])==SQLITE_TEXT
193380 && (p = geopolyFuncParam(0, aData[2], &rc))!=0
193385 sqlite3_bind_value(pUp, 2, aData[2]);
193392 sqlite3_bind_value(pUp, jj+2, aData[jj+2]);
200811 u8 *aData = sqlite3PagerGetData(p->pPg);
200812 u8 *aHdr = &aData[p->iPgno==1 ? 100 : 0];
200835 nUnused += get2byte(&aData[iOff+2]);
200836 iNext = get2byte(&aData[iOff]);
200857 iOff = get2byte(&aData[nHdr+i*2]);
200860 pCell->iChildPg = sqlite3Get4byte(&aData[iOff]);
200868 iOff += getVarint32(&aData[iOff], nPayload);
200871 iOff += sqlite3GetVarint(&aData[iOff], &dummy);
200889 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
201777 u8 *aData; /* Pointer to buffer containing changeset */
204301 pRet->in.aData = (u8 *)pChangeset;
204393 pIn->aData = pIn->buf.aBuf;
204433 u8 *aData, /* Buffer containing string or blob data */
204443 memcpy(aCopy, aData, nData);
204489 eType = pIn->aData[pIn->iNext++];
204499 u8 *aVal = &pIn->aData[pIn->iNext];
204509 rc = sessionValueSetStr(apOut[i],&pIn->aData[pIn->iNext],nByte,enc);
204551 nRead += sessionVarintGet(&pIn->aData[pIn->iNext + nRead], &nCol);
204568 while( (pIn->iNext + nRead)<pIn->nData && pIn->aData[pIn->iNext + nRead] ){
204599 eType = pIn->aData[pIn->iNext + nByte++];
204602 nByte += sessionVarintGet(&pIn->aData[pIn->iNext+nByte], &n);
204640 nVarint = sessionVarintGet(&p->in.aData[p->in.iNext], &p->nCol);
204655 memcpy(&p->tblhdr.aBuf[iPK], &p->in.aData[p->in.iNext], nCopy);
204718 op = p->in.aData[p->in.iNext++];
204726 op = p->in.aData[p->in.iNext++];
204737 p->bIndirect = p->in.aData[p->in.iNext++];
204754 *paRec = &p->in.aData[p->in.iNext];
205003 eType = pInput->aData[pInput->iNext];
205020 nVar = sessionVarintGet(&pInput->aData[pInput->iNext], &nCol);
205022 sessionAppendBlob(&sPK, &pInput->aData[pInput->iNext+nVar], nCol, &rc);
205024 sessionAppendBlob(&sOut, &pInput->aData[pInput->iNext], nByte, &rc);
205037 int bIndirect = pInput->aData[pInput->iNext+1];
205044 sessionAppendBlob(&sOut, &pInput->aData[pInput->iNext], nByte, &rc);
205064 sessionAppendByte(&sOut, pInput->aData[pInput->iNext+1], &rc);
205144 sInput.aData = (u8*)pChangeset;
205688 u8 *aBlob = &pIter->in.aData[pIter->in.iCurrent];
219637 const u8 *aData,
219641 const u8 *a = aData;