Lines Matching refs:aData
50166 static u32 pager_cksum(Pager *pPager, const u8 *aData){
50170 cksum += aData[i];
50253 char *aData; /* Temporary storage for the page */
50267 aData = pPager->pTmpSpace;
50268 assert( aData ); /* Temp storage must have already been allocated */
50288 rc = sqlite3OsRead(jfd, (u8*)aData, pPager->pageSize, (*pOffset)+4);
50307 if( !isSavepnt && pager_cksum(pPager, (u8*)aData)!=cksum ){
50321 if( pgno==1 && pPager->nReserve!=((u8*)aData)[20] ){
50322 pPager->nReserve = ((u8*)aData)[20];
50369 PAGERID(pPager), pgno, pager_datahash(pPager->pageSize, (u8*)aData),
50393 CODEC2(pPager, aData, pgno, 7, rc=SQLITE_NOMEM_BKPT, aData);
50394 rc = sqlite3OsWrite(pPager->fd, (u8 *)aData, pPager->pageSize, ofst);
50395 CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM_BKPT);
50398 rc = sqlite3OsWrite(pPager->fd, (u8 *)aData, pPager->pageSize, ofst);
50406 CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM_BKPT);
50407 sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)aData);
50408 CODEC2(pPager, aData, pgno, 7, rc=SQLITE_NOMEM_BKPT,aData);
50411 sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)aData);
50448 memcpy(pData, (u8*)aData, pPager->pageSize);
54966 void *aData = 0;
54967 CODEC2(pPg->pPager, pPg->pData, pPg->pgno, 6, return 0, aData);
54968 return aData;
56246 u32 *aData = (u32 *)a;
56261 s1 += *aData++ + s2;
56262 s2 += *aData++ + s1;
56263 }while( aData<aEnd );
56266 s1 += BYTESWAP32(aData[0]) + s2;
56267 s2 += BYTESWAP32(aData[1]) + s1;
56268 aData += 2;
56269 }while( aData<aEnd );
56317 u8 *aData, /* Pointer to page data */
56330 walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
56348 u8 *aData, /* Pointer to page data (for checksum) */
56377 walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
56749 u8 *aData; /* Pointer to data part of aFrame buffer */
56807 aData = &aFrame[WAL_FRAME_HDRSIZE];
56819 isValid = walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame);
57826 u8 *aData; /* Pointer to data part of aFrame buffer */
57919 aData = &aFrame[WAL_FRAME_HDRSIZE];
57937 if( !walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame) ) break;
59699 u8 *aData; /* Pointer to disk image of the page data */
61470 ((P)->aData + ((P)->maskPage & get2byteAligned(&(P)->aCellIdx[2*(I)])))
61799 src = data = pPage->aData;
61921 u8 * const aData = pPg->aData;
61923 int pc = get2byte(&aData[iAddr]);
61933 size = get2byte(&aData[pc+2]);
61943 if( aData[hdr+7]>57 ) return 0;
61947 memcpy(&aData[iAddr], &aData[pc], 2);
61948 aData[hdr+7] += (u8)x;
61952 put2byte(&aData[pc+2], x);
61954 return &aData[pc + x];
61957 pc = get2byte(&aData[pc]);
61982 u8 * const data = pPage->aData; /* Local cache of pPage->aData */
62078 unsigned char *data = pPage->aData; /* Page content */
62251 assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
62256 data = pPage->aData;
62373 unsigned char *data = pPage->aData;
62412 pPage->aData = sqlite3PagerGetData(pDbPage);
62418 assert( pPage->aData==sqlite3PagerGetData(pDbPage) );
62523 assert( (*ppPage)->aData==sqlite3PagerGetData(pDbPage) );
62551 assert( pPage->aData );
62555 assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
62564 assert( pPage->aData );
62568 assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
63403 nPage = nPageHeader = get4byte(28+(u8*)pPage1->aData);
63405 if( nPage==0 || memcmp(24+(u8*)pPage1->aData, 92+(u8*)pPage1->aData,4)!=0 ){
63411 u8 *page1 = pPage1->aData;
63594 assert( pPage1->aData );
63617 data = pP1->aData;
63810 if( pBt->nPage!=get4byte(&pPage1->aData[28]) ){
63813 put4byte(&pPage1->aData[28], pBt->nPage);
63865 Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
63891 if( get4byte(pPage->aData)!=iFrom ){
63894 put4byte(pPage->aData, iTo);
63910 if( pCell+info.nSize > pPage->aData+pPage->pBt->usableSize ){
63928 get4byte(&pPage->aData[pPage->hdrOffset+8])!=iFrom ){
63931 put4byte(&pPage->aData[pPage->hdrOffset+8], iTo);
63988 Pgno nextOvfl = get4byte(pDbPage->aData);
64051 nFreeList = get4byte(&pBt->pPage1->aData[36]);
64172 Pgno nFree = get4byte(&pBt->pPage1->aData[36]);
64185 put4byte(&pBt->pPage1->aData[28], pBt->nPage);
64227 nFree = get4byte(&pBt->pPage1->aData[36]);
64238 put4byte(&pBt->pPage1->aData[32], 0);
64239 put4byte(&pBt->pPage1->aData[36], 0);
64240 put4byte(&pBt->pPage1->aData[28], nFin);
64514 int nPage = get4byte(28+(u8*)pPage1->aData);
64598 pBt->nPage = get4byte(28 + pBt->pPage1->aData);
64678 assert( pBt->pPage1 && pBt->pPage1->aData );
64851 (i64)(pCur->info.pPayload - pCur->pPage->aData);
64934 next = get4byte(pPage->aData);
65034 assert( aPayload > pPage->aData );
65035 if( (uptr)(aPayload - pPage->aData) > (pBt->usableSize - pCur->info.nLocal) ){
65279 assert( pCur->info.pPayload>pCur->pPage->aData || CORRUPT_DB );
65353 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
65481 subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);
65531 pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
65864 chldPg = get4byte(&pPage->aData[pPage->hdrOffset+8]);
65979 rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
66159 n = get4byte(&pPage1->aData[36]);
66196 put4byte(&pPage1->aData[36], n-1);
66209 iTrunk = get4byte(&pPrevTrunk->aData[0]);
66214 iTrunk = get4byte(&pPage1->aData[32]);
66227 assert( pTrunk->aData!=0 );
66230 k = get4byte(&pTrunk->aData[4]);
66241 memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
66265 memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
66271 memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
66279 Pgno iNewTrunk = get4byte(&pTrunk->aData[8]);
66294 memcpy(&pNewTrunk->aData[0], &pTrunk->aData[0], 4);
66295 put4byte(&pNewTrunk->aData[4], k-1);
66296 memcpy(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4);
66300 put4byte(&pPage1->aData[32], iNewTrunk);
66306 put4byte(&pPrevTrunk->aData[0], iNewTrunk);
66316 unsigned char *aData = pTrunk->aData;
66322 iPage = get4byte(&aData[8+i*4]);
66330 dist = sqlite3AbsInt32(get4byte(&aData[8]) - nearby);
66332 int d2 = sqlite3AbsInt32(get4byte(&aData[8+i*4]) - nearby);
66343 iPage = get4byte(&aData[8+closest*4]);
66361 memcpy(&aData[8+closest*4], &aData[4+k*4], 4);
66363 put4byte(&aData[4], k-1);
66424 put4byte(28 + (u8*)pBt->pPage1->aData, pBt->nPage);
66483 nFree = get4byte(&pPage1->aData[36]);
66484 put4byte(&pPage1->aData[36], nFree+1);
66495 memset(pPage->aData, 0, pPage->pBt->pageSize);
66516 iTrunk = get4byte(&pPage1->aData[32]);
66522 nLeaf = get4byte(&pTrunk->aData[4]);
66550 put4byte(&pTrunk->aData[4], nLeaf+1);
66551 put4byte(&pTrunk->aData[8+nLeaf*4], iPage);
66575 put4byte(pPage->aData, iTrunk);
66576 put4byte(&pPage->aData[4], 0);
66577 put4byte(&pPage1->aData[32], iPage);
66615 if( pCell+pInfo->nSize-1 > pPage->aData+pPage->maskPage ){
66701 assert( pCell<pPage->aData || pCell>=&pPage->aData[pPage->pBt->pageSize]
66786 assert( pPayload<pPage->aData || pPayload>=&pPage->aData[pBt->pageSize]
66846 assert( pPrior<pPage->aData || pPrior>=&pPage->aData[pBt->pageSize]
66852 pPrior = pOvfl->aData;
66854 pPayload = &pOvfl->aData[4];
66882 data = pPage->aData;
66982 data = pPage->aData;
67080 u8 * const aData = pPg->aData; /* Pointer to data for pPg */
67082 u8 * const pEnd = &aData[usableSize];
67088 i = get2byte(&aData[hdr+5]);
67089 memcpy(&pTmp[i], &aData[i], usableSize - i);
67094 if( SQLITE_WITHIN(pCell,aData,pEnd) ){
67095 pCell = &pTmp[pCell - aData];
67098 put2byte(pCellptr, (pData - aData));
67110 put2byte(&aData[hdr+1], 0);
67111 put2byte(&aData[hdr+3], pPg->nCell);
67112 put2byte(&aData[hdr+5], pData - aData);
67113 aData[hdr+7] = 0x00;
67152 u8 *aData = pPg->aData;
67160 if( (aData[1]==0 && aData[2]==0) || (pSlot = pageFindSlot(pPg,sz,&rc))==0 ){
67172 put2byte(pCellptr, (pSlot - aData));
67194 u8 * const aData = pPg->aData;
67195 u8 * const pEnd = &aData[pPg->pBt->usableSize];
67196 u8 * const pStart = &aData[pPg->hdrOffset + 8 + pPg->childPtrSize];
67213 assert( pFree>aData && (pFree - aData)<65536 );
67214 freeSpace(pPg, (u16)(pFree - aData), szFree);
67227 assert( pFree>aData && (pFree - aData)<65536 );
67228 freeSpace(pPg, (u16)(pFree - aData), szFree);
67252 u8 * const aData = pPg->aData;
67264 memcpy(pTmp, aData, pPg->pBt->usableSize);
67277 pData = &aData[get2byteNotZero(&aData[hdr+5])];
67317 put2byte(&aData[hdr+3], pPg->nCell);
67318 put2byte(&aData[hdr+5], pData - aData);
67324 if( SQLITE_WITHIN(pCell, aData, &aData[pPg->pBt->usableSize]) ){
67325 pCell = &pTmp[pCell - aData];
67327 assert( 0==memcmp(pCell, &aData[iOff],
67406 assert( pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) );
67454 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
67497 Pgno child = get4byte(&pPage->aData[pPage->hdrOffset+8]);
67526 u8 * const aFrom = pFrom->aData;
67527 u8 * const aTo = pTo->aData;
67690 pRight = &pParent->aData[pParent->hdrOffset+8];
67729 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
67736 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
67787 u8 *aData = pOld->aData;
67789 u8 *piCell = aData + pOld->cellOffset;
67795 if( pOld->aData[0]!=apOld[0]->aData[0] ){
67821 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
67831 piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
67834 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
67858 memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
68002 pageFlags = apOld[0]->aData[0];
68096 memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
68117 u8 *aOld = pNew->aData;
68128 aOld = pOld->aData;
68170 memcpy(&pNew->aData[8], pCell, 4);
68294 (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
68304 u32 key = get4byte(&apNew[i]->aData[8]);
68405 zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);
68406 put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);
68891 if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_BKPT;
69155 rc = clearDatabasePage(pBt, get4byte(&pPage->aData[hdr+8]), 1, pnChange);
69165 zeroPage(pPage, pPage->aData[hdr] | PTF_LEAF);
69358 *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
69384 pP1 = pBt->pPage1->aData;
69464 rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
69780 data = pPage->aData;
70041 checkList(&sCheck, 1, get4byte(&pBt->pPage1->aData[32]),
70042 get4byte(&pBt->pPage1->aData[36]));
70330 u8 *aData = pBt->pPage1->aData;
70331 if( aData[18]!=(u8)iVersion || aData[19]!=(u8)iVersion ){
70336 aData[18] = (u8)iVersion;
70337 aData[19] = (u8)iVersion;
71080 const u8 *aData
71093 rc = backupOnePage(p, iPage, aData, 1);
71102 SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
71103 if( pBackup ) backupUpdate(pBackup, iPage, aData);
158991 char *aData;
159084 char *aData; /* Pointer to block from malloc() */
159116 char *aData; /* Node data */
159543 p->aData = (char *)&p[1];
159555 p->aData = (char *)&p[1];
159559 p->nData += sqlite3Fts3PutVarint(&p->aData[p->nData], i);
159560 p->aData[p->nData] = '\0';
159590 assert( p->aData[p->nData]==0 );
160226 memcpy(aCopy, pList->aData, nCopy);
160922 assert( pTree->aData==(char *)&pTree[1] );
160923 pTree->aData = (char *)sqlite3_malloc(nReq);
160924 if( !pTree->aData ){
160931 nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nPrefix);
160934 nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nSuffix);
160935 memcpy(&pTree->aData[nData], &zTerm[nPrefix], nSuffix);
160973 pNew->aData = (char *)&pNew[1];
161007 pTree->aData[nStart] = (char)iHeight;
161008 sqlite3Fts3PutVarint(&pTree->aData[nStart+1], iLeftChild);
161042 *paRoot = &pTree->aData[nStart];
161051 rc = fts3WriteSegment(p, iNextFree, &pIter->aData[nStart], nWrite);
161075 if( p->aData!=(char *)&p[1] ){
161076 sqlite3_free(p->aData);
161120 pWriter->aData = (char *)sqlite3_malloc(p->nNodeSize);
161121 if( !pWriter->aData ) return SQLITE_NOMEM;
161150 rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, nData);
161189 char *aNew = sqlite3_realloc(pWriter->aData, nReq);
161191 pWriter->aData = aNew;
161197 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nPrefix);
161198 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nSuffix);
161199 memcpy(&pWriter->aData[nData], &zTerm[nPrefix], nSuffix);
161201 nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nDoclist);
161202 memcpy(&pWriter->aData[nData], aDoclist, nDoclist);
161250 rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, pWriter->nData);
161262 0, 0, 0, pWriter->nLeafData, pWriter->aData, pWriter->nData);
161274 sqlite3_free(pWriter->aData);
164329 nSkip = sqlite3Fts3GetVarint(p->pList->aData, &dummy);
164333 memcpy(pRet, &p->pList->aData[nSkip], *pnData);
177973 u8 *aData = sqlite3PagerGetData(p->pPg);
177974 u8 *aHdr = &aData[p->iPgno==1 ? 100 : 0];
177987 nUnused += get2byte(&aData[iOff+2]);
177988 iOff = get2byte(&aData[iOff]);
178008 iOff = get2byte(&aData[nHdr+i*2]);
178010 pCell->iChildPg = sqlite3Get4byte(&aData[iOff]);
178018 iOff += getVarint32(&aData[iOff], nPayload);
178021 iOff += sqlite3GetVarint(&aData[iOff], &dummy);
178036 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
178846 u8 *aData; /* Pointer to buffer containing changeset */
181329 pRet->in.aData = (u8 *)pChangeset;
181402 pIn->aData = pIn->buf.aBuf;
181442 u8 *aData, /* Buffer containing string or blob data */
181452 memcpy(aCopy, aData, nData);
181495 eType = pIn->aData[pIn->iNext++];
181505 u8 *aVal = &pIn->aData[pIn->iNext];
181512 rc = sessionValueSetStr(apOut[i],&pIn->aData[pIn->iNext],nByte,enc);
181553 nRead += sessionVarintGet(&pIn->aData[pIn->iNext + nRead], &nCol);
181559 while( (pIn->iNext + nRead)<pIn->nData && pIn->aData[pIn->iNext + nRead] ){
181590 eType = pIn->aData[pIn->iNext + nByte++];
181593 nByte += sessionVarintGet(&pIn->aData[pIn->iNext+nByte], &n);
181631 nVarint = sessionVarintGet(&p->in.aData[p->in.iNext], &p->nCol);
181642 memcpy(&p->tblhdr.aBuf[iPK], &p->in.aData[p->in.iNext], nCopy);
181704 op = p->in.aData[p->in.iNext++];
181711 op = p->in.aData[p->in.iNext++];
181715 p->bIndirect = p->in.aData[p->in.iNext++];
181732 *paRec = &p->in.aData[p->in.iNext];
181975 eType = pInput->aData[pInput->iNext];
181992 nVar = sessionVarintGet(&pInput->aData[pInput->iNext], &nCol);
181994 sessionAppendBlob(&sPK, &pInput->aData[pInput->iNext+nVar], nCol, &rc);
181996 sessionAppendBlob(&sOut, &pInput->aData[pInput->iNext], nByte, &rc);
182009 int bIndirect = pInput->aData[pInput->iNext+1];
182016 sessionAppendBlob(&sOut, &pInput->aData[pInput->iNext], nByte, &rc);
182036 sessionAppendByte(&sOut, pInput->aData[pInput->iNext+1], &rc);
182116 sInput.aData = (u8*)pChangeset;
182603 u8 *aBlob = &pIter->in.aData[pIter->in.iCurrent];
198270 const u8 *aData,
198274 const u8 *a = aData;