Lines Matching refs:u32

322   u32 iVersion;                   /* Wal-index version */
323 u32 unused; /* Unused (padding) field */
324 u32 iChange; /* Counter incremented each transaction */
328 u32 mxFrame; /* Index of last valid frame in the WAL */
329 u32 nPage; /* Size of database in pages */
330 u32 aFrameCksum[2]; /* Checksum of last frame in log */
331 u32 aSalt[2]; /* Two salt values copied from WAL header */
332 u32 aCksum[2]; /* Checksum over all prior fields */
395 u32 nBackfill; /* Number of WAL frames backfilled into DB */
396 u32 aReadMark[WAL_NREADER]; /* Reader marks */
398 u32 nBackfillAttempted; /* WAL frames perhaps written, or maybe not */
399 u32 notUsed0; /* Available for future enhancements */
510 u32 iCallback; /* Value to pass to log callback (or 0) */
514 volatile u32 **apWiData; /* Pointer to wal-index content in memory */
515 u32 szPage; /* Database page size */
527 u32 minFrame; /* Ignore wal frames before this one */
528 u32 iReCksum; /* On commit, recalculate checksums from here */
530 u32 nCkpt; /* Checkpoint sequence counter in the wal-header */
578 u32 iPrior; /* Last result returned from the iterator */
583 u32 *aPgno; /* Array of page numbers. */
606 #define HASHTABLE_NPAGE_ONE (HASHTABLE_NPAGE - (WALINDEX_HDR_SIZE/sizeof(u32)))
610 sizeof(ht_slot)*HASHTABLE_NSLOT + HASHTABLE_NPAGE*sizeof(u32) \
634 volatile u32 **ppPage /* Write the page pointer here */ in walIndexPageRealloc()
640 sqlite3_int64 nByte = sizeof(u32*)*(iPage+1); in walIndexPageRealloc()
641 volatile u32 **apNew; in walIndexPageRealloc()
642 apNew = (volatile u32 **)sqlite3Realloc((void *)pWal->apWiData, nByte); in walIndexPageRealloc()
648 sizeof(u32*)*(iPage+1-pWal->nWiData)); in walIndexPageRealloc()
656 pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ); in walIndexPageRealloc()
683 volatile u32 **ppPage /* Write the page pointer here */ in walIndexPage()
732 const u32 *aIn, /* Initial checksum value input */ in walChecksumBytes()
733 u32 *aOut /* OUT: Final checksum value output */ in walChecksumBytes()
735 u32 s1, s2; in walChecksumBytes()
736 u32 *aData = (u32 *)a; in walChecksumBytes()
737 u32 *aEnd = (u32 *)&a[nByte]; in walChecksumBytes()
824 u32 iPage, /* Database page number for frame */ in walEncodeFrame()
825 u32 nTruncate, /* New db size (or 0 for non-commit frames) */ in walEncodeFrame()
830 u32 *aCksum = pWal->hdr.aFrameCksum; in walEncodeFrame()
855 u32 *piPage, /* OUT: Database page number for frame */ in walDecodeFrame()
856 u32 *pnTruncate, /* OUT: New db size (or 0 if not commit) */ in walDecodeFrame()
861 u32 *aCksum = pWal->hdr.aFrameCksum; in walDecodeFrame()
862 u32 pgno; /* Page number of the frame */ in walDecodeFrame()
971 static int walHash(u32 iPage){ in walHash()
988 volatile u32 *aPgno; /* aPgno[1] is the page of first frame indexed */
989 u32 iZero; /* One less than the frame number of first indexed*/
1019 pLoc->aPgno = &pLoc->aPgno[WALINDEX_HDR_SIZE/sizeof(u32)]; in walHashGet()
1036 static int walFramePage(u32 iFrame){ in walFramePage()
1051 static u32 walFramePgno(Wal *pWal, u32 iFrame){ in walFramePgno()
1054 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1]; in walFramePgno()
1133 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){ in walIndexAppend()
1225 u32 aFrameCksum[2] = {0, 0}; in walIndexRecover()
1255 u32 *aPrivate = 0; /* Heap copy of *-shm hash being populated */ in walIndexRecover()
1260 u32 magic; /* Magic value read from WAL header */ in walIndexRecover()
1261 u32 version; /* Magic value read from WAL header */ in walIndexRecover()
1263 u32 iPg; /* Current 32KB wal-index page */ in walIndexRecover()
1264 u32 iLastFrame; /* Last frame in wal, based on nSize alone */ in walIndexRecover()
1317 aPrivate = (u32*)&aData[szPage]; in walIndexRecover()
1321 for(iPg=0; iPg<=(u32)walFramePage(iLastFrame); iPg++){ in walIndexRecover()
1322 u32 *aShare; in walIndexRecover()
1323 u32 iFrame; /* Index of last frame read */ in walIndexRecover()
1324 u32 iLast = MIN(iLastFrame, HASHTABLE_NPAGE_ONE+iPg*HASHTABLE_NPAGE); in walIndexRecover()
1325 u32 iFirst = 1 + (iPg==0?0:HASHTABLE_NPAGE_ONE+(iPg-1)*HASHTABLE_NPAGE); in walIndexRecover()
1326 u32 nHdr, nHdr32; in walIndexRecover()
1327 rc = walIndexPage(pWal, iPg, (volatile u32**)&aShare); in walIndexRecover()
1334 u32 pgno; /* Database page number for frame */ in walIndexRecover()
1335 u32 nTruncate; /* dbsize field from frame header */ in walIndexRecover()
1358 nHdr32 = nHdr / sizeof(u32); in walIndexRecover()
1377 for(i=nHdr32; i<WALINDEX_PGSZ/sizeof(u32); i++){ in walIndexRecover()
1592 u32 *piPage, /* OUT: The page number of the next page */ in walIteratorNext()
1593 u32 *piFrame /* OUT: Wal frame index of next page */ in walIteratorNext()
1595 u32 iMin; /* Result pgno must be greater than iMin */ in walIteratorNext()
1596 u32 iRet = 0xFFFFFFFF; /* 0xffffffff is never a valid page number */ in walIteratorNext()
1604 u32 iPg = pSegment->aPgno[pSegment->aIndex[pSegment->iNext]]; in walIteratorNext()
1644 const u32 *aContent, /* Pages in wal - keys for the sort */ in walMerge()
1701 const u32 *aContent, /* Pages in wal */ in walMergesort()
1715 u32 iSub = 0; /* Index into aSub array */ in walMergesort()
1780 static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){ in walIteratorInit()
1783 u32 iLast; /* Last frame in log */ in walIteratorInit()
1829 nEntry = (int)((u32*)sLoc.aHash - (u32*)sLoc.aPgno); in walIteratorInit()
1837 walMergesort((u32 *)sLoc.aPgno, aTmp, aIndex, &nEntry); in walIteratorInit()
1841 p->aSegment[i].aPgno = (u32 *)sLoc.aPgno; in walIteratorInit()
1988 static void walRestartHdr(Wal *pWal, u32 salt1){ in walRestartHdr()
1991 u32 *aSalt = pWal->hdr.aSalt; /* Big-endian salt values */ in walRestartHdr()
2047 u32 iDbpage = 0; /* Next database page to write */ in walCheckpoint()
2048 u32 iFrame = 0; /* Wal frame containing data for iDbpage */ in walCheckpoint()
2049 u32 mxSafeFrame; /* Max frame that can be backfilled */ in walCheckpoint()
2050 u32 mxPage; /* Max database page to write */ in walCheckpoint()
2072 u32 y = AtomicLoad(pInfo->aReadMark+i); in walCheckpoint()
2077 u32 iMark = (i==1 ? mxSafeFrame : READMARK_NOT_USED); in walCheckpoint()
2098 u32 nBackfill = pInfo->nBackfill; in walCheckpoint()
2185 u32 salt1; in walCheckpoint()
2320 u32 aCksum[2]; /* Checksum on the header content */ in walIndexTryHdr()
2392 volatile u32 *page0; /* Chunk of wal-index containing header */ in walIndexReadHdr()
2522 u32 aSaveCksum[2]; /* Saved copy of pWal->hdr.aFrameCksum */ in walBeginShmUnreliable()
2626 u32 pgno; /* Database page number for frame */ in walBeginShmUnreliable()
2627 u32 nTruncate; /* dbsize field from frame header */ in walBeginShmUnreliable()
2712 u32 mxReadMark; /* Largest aReadMark[] value */ in walTryBeginRead()
2716 u32 mxFrame; /* Wal frame to lock to */ in walTryBeginRead()
2840 u32 thisMark = AtomicLoad(pInfo->aReadMark+i); in walTryBeginRead()
2957 u32 i = pInfo->nBackfillAttempted; in sqlite3WalSnapshotRecover()
2960 u32 pgno; /* Page number in db file */ in sqlite3WalSnapshotRecover()
3138 u32 *piRead /* OUT: Frame number (or zero) */ in sqlite3WalFindFrame()
3140 u32 iRead = 0; /* If !=0, WAL frame to return data from */ in sqlite3WalFindFrame()
3141 u32 iLast = pWal->hdr.mxFrame; /* Last page in WAL for this reader */ in sqlite3WalFindFrame()
3190 u32 iH; in sqlite3WalFindFrame()
3199 u32 iFrame = iH + sLoc.iZero; in sqlite3WalFindFrame()
3217 u32 iRead2 = 0; in sqlite3WalFindFrame()
3218 u32 iTest; in sqlite3WalFindFrame()
3241 u32 iRead, /* Frame to read */ in sqlite3WalReadFrame()
3390 void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData){ in sqlite3WalSavepoint()
3404 int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){ in sqlite3WalSavepointUndo()
3449 u32 salt1; in walRestartLog()
3555 static int walRewriteChecksums(Wal *pWal, u32 iLast){ in walRewriteChecksums()
3560 u32 iRead; /* Next frame to read from wal file */ in walRewriteChecksums()
3577 rc = sqlite3OsRead(pWal->pWalFd, aBuf, sizeof(u32)*2, iCksumOff); in walRewriteChecksums()
3579 pWal->hdr.aFrameCksum[1] = sqlite3Get4byte(&aBuf[sizeof(u32)]); in walRewriteChecksums()
3587 u32 iPgno, nDbSize; in walRewriteChecksums()
3613 u32 iFrame; /* Next frame address */ in sqlite3WalFrames()
3620 u32 iFirst = 0; /* First frame that may be overwritten */ in sqlite3WalFrames()
3656 u32 aCksum[2]; /* Checksum for wal-header */ in sqlite3WalFrames()
3712 u32 iWrite = 0; in sqlite3WalFrames()
3968 u32 ret = 0; in sqlite3WalCallback()
4054 static const u32 aZero[4] = { 0, 0, 0, 0 }; in sqlite3WalSnapshotGet()