Lines Matching refs:aData
45084 ** Parameter aData must point to a buffer of pPager->pageSize bytes
45102 static u32 pager_cksum(Pager *pPager, const u8 *aData){
45106 cksum += aData[i];
45189 char *aData; /* Temporary storage for the page */
45198 aData = pPager->pTmpSpace;
45199 assert( aData ); /* Temp storage must have already been allocated */
45219 rc = sqlite3OsRead(jfd, (u8*)aData, pPager->pageSize, (*pOffset)+4);
45238 if( !isSavepnt && pager_cksum(pPager, (u8*)aData)!=cksum ){
45252 if( pgno==1 && pPager->nReserve!=((u8*)aData)[20] ){
45253 pPager->nReserve = ((u8*)aData)[20];
45300 PAGERID(pPager), pgno, pager_datahash(pPager->pageSize, (u8*)aData),
45315 rc = sqlite3OsWrite(pPager->fd, (u8 *)aData, pPager->pageSize, ofst);
45320 CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM);
45321 sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)aData);
45322 CODEC2(pPager, aData, pgno, 7, rc=SQLITE_NOMEM, aData);
45360 memcpy(pData, (u8*)aData, pPager->pageSize);
49716 void *aData = 0;
49717 CODEC2(pPg->pPager, pPg->pData, pPg->pgno, 6, return 0, aData);
49718 return aData;
50903 u32 *aData = (u32 *)a;
50918 s1 += *aData++ + s2;
50919 s2 += *aData++ + s1;
50920 }while( aData<aEnd );
50923 s1 += BYTESWAP32(aData[0]) + s2;
50924 s2 += BYTESWAP32(aData[1]) + s1;
50925 aData += 2;
50926 }while( aData<aEnd );
50974 u8 *aData, /* Pointer to page data */
50986 walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
50994 ** in aData[] is valid. If it is a valid frame, fill *piPage and
51001 u8 *aData, /* Pointer to page data (for checksum) */
51030 walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
51398 u8 *aData; /* Pointer to data part of aFrame buffer */
51456 aData = &aFrame[WAL_FRAME_HDRSIZE];
51468 isValid = walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame);
53790 aData of first cell pointer */
53798 u8 *aData; /* Pointer to disk image of the page data */
53801 u8 *aDataOfst; /* Same as aData for leaves. aData+4 for interior */
55498 ((P)->aData + ((P)->maskPage & get2byteAligned(&(P)->aCellIdx[2*(I)])))
55836 src = data = pPage->aData;
55906 u8 * const aData = pPg->aData;
55908 int pc = get2byte(&aData[iAddr]);
55924 size = get2byte(&aData[pc+2]);
55934 if( aData[hdr+7]>57 ) return 0;
55938 memcpy(&aData[iAddr], &aData[pc], 2);
55939 aData[hdr+7] += (u8)x;
55943 put2byte(&aData[pc+2], x);
55945 return &aData[pc + x];
55948 pc = get2byte(&aData[pc]);
55956 ** as the first argument. Write into *pIdx the index into pPage->aData[]
55969 u8 * const data = pPage->aData; /* Local cache of pPage->aData */
56045 ** Return a section of the pPage->aData to the freelist.
56046 ** The first byte of the new free block is pPage->aData[iStart]
56065 unsigned char *data = pPage->aData; /* Page content */
56224 assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
56227 u16 pc; /* Address of a freeblock within pPage->aData[] */
56229 u8 *data; /* Equal to pPage->aData */
56241 data = pPage->aData;
56349 unsigned char *data = pPage->aData;
56387 pPage->aData = sqlite3PagerGetData(pDbPage);
56397 ** MemPage.aData elements if needed. See also: btreeGetUnusedPage().
56426 ** MemPage.aData elements if needed.
56518 assert( pPage->aData );
56522 aData );
57313 nPage = nPageHeader = get4byte(28+(u8*)pPage1->aData);
57315 if( nPage==0 || memcmp(24+(u8*)pPage1->aData, 92+(u8*)pPage1->aData,4)!=0 ){
57321 u8 *page1 = pPage1->aData;
57499 aData );
57522 data = pP1->aData;
57713 if( pBt->nPage!=get4byte(&pPage1->aData[28]) ){
57716 put4byte(&pPage1->aData[28], pBt->nPage);
57771 Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
57799 if( get4byte(pPage->aData)!=iFrom ){
57802 put4byte(pPage->aData, iTo);
57819 && pCell+info.iOverflow+3<=pPage->aData+pPage->maskPage
57835 get4byte(&pPage->aData[pPage->hdrOffset+8])!=iFrom ){
57838 put4byte(&pPage->aData[pPage->hdrOffset+8], iTo);
57897 Pgno nextOvfl = get4byte(pDbPage->aData);
57960 nFreeList = get4byte(&pBt->pPage1->aData[36]);
58081 Pgno nFree = get4byte(&pBt->pPage1->aData[36]);
58094 put4byte(&pBt->pPage1->aData[28], pBt->nPage);
58136 nFree = get4byte(&pBt->pPage1->aData[36]);
58147 put4byte(&pBt->pPage1->aData[32], 0);
58148 put4byte(&pBt->pPage1->aData[36], 0);
58149 put4byte(&pBt->pPage1->aData[28], nFin);
58423 /* The rollback may have destroyed the pPage1->aData value. So
58425 ** sure pPage1->aData is set correctly. */
58427 int nPage = get4byte(28+(u8*)pPage1->aData);
58506 pBt->nPage = get4byte(28 + pBt->pPage1->aData);
58573 assert( pBt->pPage1 && pBt->pPage1->aData );
58831 next = get4byte(pPage->aData);
58936 if( &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] ){
59060 && pBt->pPage1->aData[19]==0x01 /* (5) */
59177 assert( pCur->info.pPayload>pCur->apPage[pCur->iPage]->aData || CORRUPT_DB );
59248 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
59364 subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);
59413 pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
59722 chldPg = get4byte(&pPage->aData[pPage->hdrOffset+8]);
59815 rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
60003 n = get4byte(&pPage1->aData[36]);
60040 put4byte(&pPage1->aData[36], n-1);
60053 iTrunk = get4byte(&pPrevTrunk->aData[0]);
60058 iTrunk = get4byte(&pPage1->aData[32]);
60071 assert( pTrunk->aData!=0 );
60074 k = get4byte(&pTrunk->aData[4]);
60085 memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
60109 memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
60115 memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
60123 Pgno iNewTrunk = get4byte(&pTrunk->aData[8]);
60138 memcpy(&pNewTrunk->aData[0], &pTrunk->aData[0], 4);
60139 put4byte(&pNewTrunk->aData[4], k-1);
60140 memcpy(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4);
60144 put4byte(&pPage1->aData[32], iNewTrunk);
60150 put4byte(&pPrevTrunk->aData[0], iNewTrunk);
60160 unsigned char *aData = pTrunk->aData;
60166 iPage = get4byte(&aData[8+i*4]);
60174 dist = sqlite3AbsInt32(get4byte(&aData[8]) - nearby);
60176 int d2 = sqlite3AbsInt32(get4byte(&aData[8+i*4]) - nearby);
60187 iPage = get4byte(&aData[8+closest*4]);
60205 memcpy(&aData[8+closest*4], &aData[4+k*4], 4);
60207 put4byte(&aData[4], k-1);
60268 put4byte(28 + (u8*)pBt->pPage1->aData, pBt->nPage);
60327 nFree = get4byte(&pPage1->aData[36]);
60328 put4byte(&pPage1->aData[36], nFree+1);
60339 memset(pPage->aData, 0, pPage->pBt->pageSize);
60360 iTrunk = get4byte(&pPage1->aData[32]);
60366 nLeaf = get4byte(&pTrunk->aData[4]);
60394 put4byte(&pTrunk->aData[4], nLeaf+1);
60395 put4byte(&pTrunk->aData[8+nLeaf*4], iPage);
60419 put4byte(pPage->aData, iTrunk);
60420 put4byte(&pPage->aData[4], 0);
60421 put4byte(&pPage1->aData[32], iPage);
60461 if( pCell+info.iOverflow+3 > pPage->aData+pPage->maskPage ){
60519 ** Note that pCell does not necessary need to point to the pPage->aData
60521 ** be constructed in this temporary area then copied into pPage->aData
60548 assert( pCell<pPage->aData || pCell>=&pPage->aData[pBt->pageSize]
60661 assert( pPrior<pPage->aData || pPrior>=&pPage->aData[pBt->pageSize]
60667 pPrior = pOvfl->aData;
60669 pPayload = &pOvfl->aData[4];
60681 assert( pPayload<pPage->aData || pPayload>=&pPage->aData[pBt->pageSize]
60715 u8 *data; /* pPage->aData */
60726 data = pPage->aData;
60822 data = pPage->aData;
60920 u8 * const aData = pPg->aData; /* Pointer to data for pPg */
60922 u8 * const pEnd = &aData[usableSize];
60928 i = get2byte(&aData[hdr+5]);
60929 memcpy(&pTmp[i], &aData[i], usableSize - i);
60934 if( pCell>aData && pCell<pEnd ){
60935 pCell = &pTmp[pCell - aData];
60938 put2byte(pCellptr, (pData - aData));
60950 put2byte(&aData[hdr+1], 0);
60951 put2byte(&aData[hdr+3], pPg->nCell);
60952 put2byte(&aData[hdr+5], pData - aData);
60953 aData[hdr+7] = 0x00;
60992 u8 *aData = pPg->aData;
61000 if( (aData[1]==0 && aData[2]==0) || (pSlot = pageFindSlot(pPg,sz,&rc))==0 ){
61012 put2byte(pCellptr, (pSlot - aData));
61034 u8 * const aData = pPg->aData;
61035 u8 * const pEnd = &aData[pPg->pBt->usableSize];
61036 u8 * const pStart = &aData[pPg->hdrOffset + 8 + pPg->childPtrSize];
61053 assert( pFree>aData && (pFree - aData)<65536 );
61054 freeSpace(pPg, (u16)(pFree - aData), szFree);
61067 assert( pFree>aData && (pFree - aData)<65536 );
61068 freeSpace(pPg, (u16)(pFree - aData), szFree);
61092 u8 * const aData = pPg->aData;
61104 memcpy(pTmp, aData, pPg->pBt->usableSize);
61117 pData = &aData[get2byteNotZero(&aData[hdr+5])];
61157 put2byte(&aData[hdr+3], pPg->nCell);
61158 put2byte(&aData[hdr+5], pData - aData);
61164 if( pCell>=aData && pCell<&aData[pPg->pBt->usableSize] ){
61165 pCell = &pTmp[pCell - aData];
61167 assert( 0==memcmp(pCell, &aData[iOff],
61246 assert( pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) );
61292 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
61335 Pgno child = get4byte(&pPage->aData[pPage->hdrOffset+8]);
61364 u8 * const aFrom = pFrom->aData;
61365 u8 * const aTo = pTo->aData;
61416 ** might not actually be stored in MemPage.aData[]. This can happen
61418 ** to the page and its siblings fit into MemPage.aData[] before returning.
61462 int pageFlags; /* Value of pPage->aData[0] */
61531 pRight = &pParent->aData[pParent->hdrOffset+8];
61570 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
61577 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
61630 u8 *aData = pOld->aData;
61632 u8 *piCell = aData + pOld->cellOffset;
61638 if( pOld->aData[0]!=apOld[0]->aData[0] ){
61665 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
61675 piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
61678 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
61702 memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
61847 pageFlags = apOld[0]->aData[0];
61941 memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
61962 u8 *aOld = pNew->aData;
61973 aOld = pOld->aData;
62016 memcpy(&pNew->aData[8], pCell, 4);
62140 (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
62150 u32 key = get4byte(&apNew[i]->aData[8]);
62254 zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);
62255 put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);
62661 if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_BKPT;
62918 rc = clearDatabasePage(pBt, get4byte(&pPage->aData[hdr+8]), 1, pnChange);
62928 zeroPage(pPage, pPage->aData[hdr] | PTF_LEAF);
63142 *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
63168 pP1 = pBt->pPage1->aData;
63248 rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
63564 data = pPage->aData;
63822 checkList(&sCheck, 1, get4byte(&pBt->pPage1->aData[32]),
63823 get4byte(&pBt->pPage1->aData[36]));
64111 u8 *aData = pBt->pPage1->aData;
64112 if( aData[18]!=(u8)iVersion || aData[19]!=(u8)iVersion ){
64117 aData[18] = (u8)iVersion;
64118 aData[19] = (u8)iVersion;
64850 const u8 *aData
64863 rc = backupOnePage(p, iPage, aData, 1);
64872 SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
64873 if( pBackup ) backupUpdate(pBackup, iPage, aData);
145989 char *aData;
146080 int nSize; /* Size of allocation at aData */
146081 int nData; /* Bytes of data in aData */
146082 char *aData; /* Pointer to block from malloc() */
146114 char *aData; /* Node data */
146539 p->aData = (char *)&p[1];
146551 p->aData = (char *)&p[1];
146555 p->nData += sqlite3Fts3PutVarint(&p->aData[p->nData], i);
146556 p->aData[p->nData] = '\0';
146586 assert( p->aData[p->nData]==0 );
147222 memcpy(aCopy, pList->aData, nCopy);
147914 assert( pTree->aData==(char *)&pTree[1] );
147915 pTree->aData = (char *)sqlite3_malloc(nReq);
147916 if( !pTree->aData ){
147923 nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nPrefix);
147926 nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nSuffix);
147927 memcpy(&pTree->aData[nData], &zTerm[nPrefix], nSuffix);
147965 pNew->aData = (char *)&pNew[1];
147999 pTree->aData[nStart] = (char)iHeight;
148000 sqlite3Fts3PutVarint(&pTree->aData[nStart+1], iLeftChild);
148034 *paRoot = &pTree->aData[nStart];
148043 rc = fts3WriteSegment(p, iNextFree, &pIter->aData[nStart], nWrite);
148067 if( p->aData!=(char *)&p[1] ){
148068 sqlite3_free(p->aData);
148112 pWriter->aData = (char *)sqlite3_malloc(p->nNodeSize);
148113 if( !pWriter->aData ) return SQLITE_NOMEM;
148142 rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, nData);
148181 char *aNew = sqlite3_realloc(pWriter->aData, nReq);
148183 pWriter->aData = aNew;
148189 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nPrefix);
148190 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nSuffix);
148191 memcpy(&pWriter->aData[nData], &zTerm[nPrefix], nSuffix);
148193 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nDoclist);
148194 memcpy(&pWriter->aData[nData], aDoclist, nDoclist);
148242 rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, pWriter->nData);
148254 0, 0, 0, pWriter->nLeafData, pWriter->aData, pWriter->nData);
148266 sqlite3_free(pWriter->aData);
151312 nSkip = sqlite3Fts3GetVarint(p->pList->aData, &dummy);
151316 memcpy(pRet, &p->pList->aData[nSkip], *pnData);
163171 u8 *aData = sqlite3PagerGetData(p->pPg);
163172 u8 *aHdr = &aData[p->iPgno==1 ? 100 : 0];
163185 nUnused += get2byte(&aData[iOff+2]);
163186 iOff = get2byte(&aData[iOff]);
163206 iOff = get2byte(&aData[nHdr+i*2]);
163208 pCell->iChildPg = sqlite3Get4byte(&aData[iOff]);
163216 iOff += getVarint32(&aData[iOff], nPayload);
163219 iOff += sqlite3GetVarint(&aData[iOff], &dummy);
163234 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
175748 const u8 *aData,
175752 const u8 *a = aData;