Lines Matching refs:u32

13858 typedef UINT32_TYPE u32;           /* 4-byte unsigned integer */  typedef
13881 typedef u32 tRowcnt; /* 32-bit is the default */
13929 typedef u32 uptr;
14352 SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree*);
14399 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
14400 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);
14589 SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor*, u32 offset, u32 amt, void*);
14590 SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor*, u32 *pAmt);
14591 SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor*);
14599 SQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor*, u32 offset, u32 amt, void*);
14600 SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);
14745 u32 cnt; /* Number of times this instruction was executed */
14749 u32 iSrcLine; /* Source-code line that generated this opcode
15119 SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe*, u32 addr, u8);
15120 SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1);
15121 SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
15122 SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3);
15318 typedef u32 Pgno;
15415 SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int);
15486 SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager*);
15570 u32 pageHash; /* Hash of page content */
16212 u32 bDisable; /* Only operate the lookaside when zero */
16215 u32 nSlot; /* Number of lookaside slots allocated */
16216 u32 anStat[3]; /* 0: hits. 1: size misses. 2: full misses */
16301 u32 mDbFlags; /* flags recording internal state */
16305 u32 nSchemaLock; /* Do not reset the schema when non-zero */
16325 u32 magic; /* Magic number for detect library misuse */
16345 int (*xTrace)(u32,void*,void*,void*); /* Trace function */
16554 u32 funcFlags; /* Some combination of SQLITE_FUNC_* */
16892 u32 nTabRef; /* Number of pointers to this Table */
16893 u32 tabFlags; /* Mask of TF_* values */
17064 u32 nRef; /* Number of references to this KeyInfo object */
17370 u32 flags; /* Various flags. EP_* See below */
17578 u32 nAlloc; /* Number of entries allocated in a[] below */
17766 u32 selFlags; /* Various SF_* values */
17768 u32 selId; /* Unique identifier number for this SELECT */
17949 u32 aColmask[2]; /* Masks of old.*, new.* columns accessed */
18030 u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */
18031 u32 oldmask; /* Mask of old.* columns referenced */
18032 u32 newmask; /* Mask of new.* columns referenced */
18279 u32 nAlloc; /* Amount of space allocated in zText */
18280 u32 mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
18281 u32 nChar; /* Length of the string so far */
18301 u32 mInitFlags; /* Flags controlling error messages */
18302 u32 nInitRow; /* Number of rows processed */
18340 u32 szPma; /* Maximum Sorter PMA size */
18372 u32 szSorterRef; /* Min size in bytes to use sorter-refs */
18782 SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*, u32);
18790 SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList*);
18794 SQLITE_PRIVATE int sqlite3InitOne(sqlite3*, int, char**, u32);
18838 SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32);
18839 SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec*, u32);
18840 SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec*, u32);
18841 SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec*, u32);
18842 SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec*, u32, void*);
18844 SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec*);
18899 Expr*,ExprList*,u32,Expr*);
18945 SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,u32 flags,const char*, const char*);
18946 SQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,u32 flags,struct SrcList_item *);
19053 SQLITE_PRIVATE u32 sqlite3TriggerColmask(Parse*,Trigger*,ExprList*,int,int,Table*,int);
19099 SQLITE_PRIVATE u32 sqlite3Utf8Read(const u8**);
19121 SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *, u32 *);
19130 (u8)((*(A)<(u8)0x80)?((B)=(u32)*(A)),1:sqlite3GetVarint32((A),(u32 *)&(B)))
19132 (u8)(((u32)(B)<(u32)0x80)?(*(A)=(unsigned char)(B)),1:\
19423 SQLITE_PRIVATE u32 sqlite3FkOldmask(Parse*, Table*);
19475 SQLITE_PRIVATE int sqlite3FindInIndex(Parse *, Expr *, u32, int*, int*, int*);
19496 SQLITE_PRIVATE u32 sqlite3Get4byte(const u8*);
19497 SQLITE_PRIVATE void sqlite3Put4byte(u8*, u32);
20032 u32 cacheStatus; /* Cache is valid if this matches Vdbe.cacheCtr */
20049 u32 iHdrOffset; /* Offset to next unparsed byte of the header */
20054 u32 *aOffset; /* Pointer to aType[nField] */
20056 u32 payloadSize; /* Total number of bytes in the record */
20057 u32 szRow; /* Byte available in aRow */
20065 u32 aType[1]; /* Type values record decode. MUST BE LAST */
20108 u32 iFrameMagic; /* magic number for sanity checking */
20150 u32 uTemp; /* Transient storage for serial_type in OP_MakeRecord */
20317 u32 magic; /* Magic number for sanity checking */
20320 u32 cacheCtr; /* VdbeCursor row cache generation counter */
20349 u32 nWrite; /* Number of write operations that have occurred */
20365 u32 aCounter[7]; /* Counters used by sqlite3_stmt_status() */
20375 u32 expmask; /* Binding to these vars invalidates VM */
20422 SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32);
20424 SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem*, int, u32*);
20425 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(unsigned char*, Mem*, u32);
20426 SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
20468 SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,u32,u32,Mem*);
20559 typedef u32 sqlite3StatValueType;
20710 static u32 countLookasideSlots(LookasideSlot *p){ in countLookasideSlots()
20711 u32 cnt = 0; in countLookasideSlots()
20723 u32 nInit = countLookasideSlots(db->lookaside.pInit); in sqlite3LookasideUsed()
20724 u32 nFree = countLookasideSlots(db->lookaside.pFree); in sqlite3LookasideUsed()
23656 u32 prevSize; /* Size of previous chunk in Mem3Block elements */
23657 u32 size4x; /* 4x the size of current chunk in Mem3Block elements */
23660 u32 next; /* Index in mem3.aPool[] of next free chunk */
23661 u32 prev; /* Index in mem3.aPool[] of previous free chunk */
23677 u32 nPool;
23693 u32 mnMaster;
23701 u32 iMaster;
23702 u32 szMaster;
23709 u32 aiSmall[MX_SMALL-1]; /* For sizes 2 through MX_SMALL, inclusive */
23710 u32 aiHash[N_HASH]; /* For sizes MX_SMALL+1 and larger */
23719 static void memsys3UnlinkFromList(u32 i, u32 *pRoot){ in memsys3UnlinkFromList()
23720 u32 next = mem3.aPool[i].u.list.next; in memsys3UnlinkFromList()
23721 u32 prev = mem3.aPool[i].u.list.prev; in memsys3UnlinkFromList()
23739 static void memsys3Unlink(u32 i){ in memsys3Unlink()
23740 u32 size, hash; in memsys3Unlink()
23759 static void memsys3LinkIntoList(u32 i, u32 *pRoot){ in memsys3LinkIntoList()
23773 static void memsys3Link(u32 i){ in memsys3Link()
23774 u32 size, hash; in memsys3Link()
23824 static void *memsys3Checkout(u32 i, u32 nBlock){ in memsys3Checkout()
23825 u32 x; in memsys3Checkout()
23842 static void *memsys3FromMaster(u32 nBlock){ in memsys3FromMaster()
23854 u32 newi, x; in memsys3FromMaster()
23887 static void memsys3Merge(u32 *pRoot){ in memsys3Merge()
23888 u32 iNext, prev, size, i, x; in memsys3Merge()
23927 u32 i; in memsys3MallocUnsafe()
23928 u32 nBlock; in memsys3MallocUnsafe()
23929 u32 toFree; in memsys3MallocUnsafe()
24011 u32 size, x; in memsys3FreeUnsafe()
24164 u32 i, j; in sqlite3Memsys3Dump()
24165 u32 size; in sqlite3Memsys3Dump()
24374 u32 currentOut; /* Current checkout, including internal fragmentation */
24375 u32 currentCount; /* Current number of distinct checkouts */
24376 u32 maxOut; /* Maximum instantaneous currentOut */
24377 u32 maxCount; /* Maximum instantaneous currentCount */
24378 u32 maxRequest; /* Largest allocation (exclusive of internal frag) */
24497 if( (u32)nByte>mem5.maxRequest ){ in memsys5MallocUnsafe()
24553 u32 size, iLogsize; in memsys5FreeUnsafe()
24568 assert( iBlock+size-1<(u32)mem5.nBlock ); in memsys5FreeUnsafe()
29826 SQLITE_PRIVATE u32 sqlite3Utf8Read(
30078 u32 c;
30974 u32 u = 0;
31108 u32 a,b,s;
31278 SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
31279 u32 a,b;
31342 *v = (u32)v64;
31391 *v = (u32)v64;
31411 SQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){
31413 u32 x;
31417 u32 x;
31421 u32 x;
31429 SQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){
31433 u32 x = __builtin_bswap32(v);
31436 u32 x = _byteswap_ulong(v);
31514 u32 magic;
31531 u32 magic;
32850 #define F2FS_IOC_GET_FEATURES _IOR(F2FS_IOCTL_MAGIC, 12, u32)
36557 u32 f = 0;
37054 (u32)sStat.st_ino, (u32)sStat.st_dev);
41005 u32 magic1; /* Magic number to detect structure corruption. */
41010 u32 magic2; /* Magic number to detect structure corruption. */
47390 (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))
47405 #define BITVEC_NINT (BITVEC_USIZE/sizeof(u32))
47440 u32 iSize; /* Maximum bit index. Max iSize is 4,294,967,296. */
47441 u32 nSet; /* Number of bits that are set - only valid for aHash
47444 u32 iDivisor; /* Number of bits handled by each apSub[] entry. */
47450 u32 aHash[BITVEC_NINT]; /* Hash table representation */
47460 SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32 iSize){
47475 SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){
47480 u32 bin = i/p->iDivisor;
47490 u32 h = BITVEC_HASH(i++);
47498 SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){
47514 SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){
47515 u32 h;
47521 u32 bin = i/p->iDivisor;
47558 u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
47585 SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
47590 u32 bin = i/p->iDivisor;
47601 u32 *aiValues = pBuf;
47607 u32 h = BITVEC_HASH(aiValues[j]-1);
47637 SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec *p){
50523 SQLITE_PRIVATE int sqlite3WalFindFrame(Wal *, Pgno, u32 *);
50524 SQLITE_PRIVATE int sqlite3WalReadFrame(Wal *, u32, int, u8 *);
50538 SQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData);
50542 SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData);
51031 u32 aWalData[WAL_SAVEPOINT_NDATA]; /* WAL savepoint context */
51248 u32 cksumInit; /* Quasi-random value added to every checksum */
51249 u32 nSubRec; /* Number of records written to sub-journal */
51259 u32 iDataVersion; /* Changes whenever database content changes */
51271 u32 vfsFlags; /* Flags for sqlite3_vfs.xOpen() */
51272 u32 sectorSize; /* Assumed sector size during rollback */
51423 u32 iRead = 0;
51705 static int read32bits(sqlite3_file *fd, i64 offset, u32 *pRes){
51724 static int write32bits(sqlite3_file *fd, i64 offset, u32 val){
51845 static u32 pager_datahash(int nByte, unsigned char *pData){
51846 u32 hash = 0;
51853 static u32 pager_pagehash(PgHdr *pPage){
51904 static int readMasterJournal(sqlite3_file *pJrnl, char *zMaster, u32 nMaster){
51906 u32 len; /* Length in bytes of master journal name */
51908 u32 cksum; /* MJ checksum value read from journal */
51909 u32 u; /* Unsigned loop counter */
52045 u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */
52046 u32 nWrite; /* Bytes of header sector written */
52164 u32 *pNRec, /* OUT: Value read from the nRec field */
52165 u32 *pDbSize /* OUT: Value of original database size field */
52210 u32 iPageSize; /* Page-size field of journal header */
52211 u32 iSectorSize; /* Sector-size field of journal header */
52290 u32 cksum = 0; /* Checksum of string zMaster */
52362 SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager *pPager){
52796 static u32 pager_cksum(Pager *pPager, const u8 *aData){
52797 u32 cksum = pPager->cksumInit; /* Checksum value to return */
52882 u32 cksum; /* Checksum used for sanity checking */
53400 u32 nRec; /* Number of Records in the journal */
53401 u32 u; /* Unsigned loop counter */
53408 u32 savedPageSize = pPager->pageSize;
53613 u32 iFrame = 0; /* Frame of WAL containing pgno */
53674 u32 change_counter;
54053 u32 ii; /* Loop counter */
54054 u32 nJRec = 0; /* Number of Journal Records */
54055 u32 dummy;
54067 nJRec = (u32)((szJ - pPager->journalOff)/JOURNAL_PG_SZ(pPager));
54081 u32 ii; /* Loop counter */
54344 SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nReserve){
54357 u32 pageSize = *pPageSize;
54361 && pageSize && pageSize!=(u32)pPager->pageSize
55339 u32 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE; /* Default page size */
55482 szPageDflt = (u32)pPager->sectorSize;
56152 u32 iFrame = 0; /* Frame to read from WAL file */
56484 u32 cksum;
56734 }else if( pPager->sectorSize > (u32)pPager->pageSize ){
58645 u32 iVersion; /* Wal-index version */
58646 u32 unused; /* Unused (padding) field */
58647 u32 iChange; /* Counter incremented each transaction */
58651 u32 mxFrame; /* Index of last valid frame in the WAL */
58652 u32 nPage; /* Size of database in pages */
58653 u32 aFrameCksum[2]; /* Checksum of last frame in log */
58654 u32 aSalt[2]; /* Two salt values copied from WAL header */
58655 u32 aCksum[2]; /* Checksum over all prior fields */
58718 u32 nBackfill; /* Number of WAL frames backfilled into DB */
58719 u32 aReadMark[WAL_NREADER]; /* Reader marks */
58721 u32 nBackfillAttempted; /* WAL frames perhaps written, or maybe not */
58722 u32 notUsed0; /* Available for future enhancements */
58769 u32 iCallback; /* Value to pass to log callback (or 0) */
58773 volatile u32 **apWiData; /* Pointer to wal-index content in memory */
58774 u32 szPage; /* Database page size */
58786 u32 minFrame; /* Ignore wal frames before this one */
58787 u32 iReCksum; /* On commit, recalculate checksums from here */
58789 u32 nCkpt; /* Checkpoint sequence counter in the wal-header */
58839 u32 *aPgno; /* Array of page numbers. */
58862 #define HASHTABLE_NPAGE_ONE (HASHTABLE_NPAGE - (WALINDEX_HDR_SIZE/sizeof(u32)))
58866 sizeof(ht_slot)*HASHTABLE_NSLOT + HASHTABLE_NPAGE*sizeof(u32) \
58886 volatile u32 **ppPage /* Write the page pointer here */
58892 sqlite3_int64 nByte = sizeof(u32*)*(iPage+1);
58893 volatile u32 **apNew;
58894 apNew = (volatile u32 **)sqlite3_realloc64((void *)pWal->apWiData, nByte);
58900 sizeof(u32*)*(iPage+1-pWal->nWiData));
58908 pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ);
58931 volatile u32 **ppPage /* Write the page pointer here */
58980 const u32 *aIn, /* Initial checksum value input */
58981 u32 *aOut /* OUT: Final checksum value output */
58983 u32 s1, s2;
58984 u32 *aData = (u32 *)a;
58985 u32 *aEnd = (u32 *)&a[nByte];
59054 u32 iPage, /* Database page number for frame */
59055 u32 nTruncate, /* New db size (or 0 for non-commit frames) */
59060 u32 *aCksum = pWal->hdr.aFrameCksum;
59085 u32 *piPage, /* OUT: Database page number for frame */
59086 u32 *pnTruncate, /* OUT: New db size (or 0 if not commit) */
59091 u32 *aCksum = pWal->hdr.aFrameCksum;
59092 u32 pgno; /* Page number of the frame */
59201 static int walHash(u32 iPage){
59218 volatile u32 *aPgno; /* aPgno[1] is the page of first frame indexed */
59219 u32 iZero; /* One less than the frame number of first indexed*/
59249 pLoc->aPgno = &pLoc->aPgno[WALINDEX_HDR_SIZE/sizeof(u32)];
59265 static int walFramePage(u32 iFrame){
59279 static u32 walFramePgno(Wal *pWal, u32 iFrame){
59282 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
59361 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
59454 u32 aFrameCksum[2] = {0, 0};
59496 u32 magic; /* Magic value read from WAL header */
59497 u32 version; /* Magic value read from WAL header */
59555 u32 pgno; /* Database page number for frame */
59556 u32 nTruncate; /* dbsize field from frame header */
59742 u32 *piPage, /* OUT: The page number of the next page */
59743 u32 *piFrame /* OUT: Wal frame index of next page */
59745 u32 iMin; /* Result pgno must be greater than iMin */
59746 u32 iRet = 0xFFFFFFFF; /* 0xffffffff is never a valid page number */
59754 u32 iPg = pSegment->aPgno[pSegment->aIndex[pSegment->iNext]];
59794 const u32 *aContent, /* Pages in wal - keys for the sort */
59851 const u32 *aContent, /* Pages in wal */
59865 u32 iSub = 0; /* Index into aSub array */
59930 static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){
59933 u32 iLast; /* Last frame in log */
59980 nEntry = (int)((u32*)sLoc.aHash - (u32*)sLoc.aPgno);
59988 walMergesort((u32 *)sLoc.aPgno, aTmp, aIndex, &nEntry);
59992 p->aSegment[i].aPgno = (u32 *)sLoc.aPgno;
60050 static void walRestartHdr(Wal *pWal, u32 salt1){
60053 u32 *aSalt = pWal->hdr.aSalt; /* Big-endian salt values */
60109 u32 iDbpage = 0; /* Next database page to write */
60110 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
60111 u32 mxSafeFrame; /* Max frame that can be backfilled */
60112 u32 mxPage; /* Max database page to write */
60142 u32 y = pInfo->aReadMark[i];
60167 u32 nBackfill = pInfo->nBackfill;
60244 u32 salt1;
60379 u32 aCksum[2]; /* Checksum on the header content */
60445 volatile u32 *page0; /* Chunk of wal-index containing header */
60571 u32 aSaveCksum[2]; /* Saved copy of pWal->hdr.aFrameCksum */
60673 u32 pgno; /* Database page number for frame */
60674 u32 nTruncate; /* dbsize field from frame header */
60759 u32 mxReadMark; /* Largest aReadMark[] value */
60763 u32 mxFrame; /* Wal frame to lock to */
60887 u32 thisMark = AtomicLoad(pInfo->aReadMark+i);
61003 u32 i = pInfo->nBackfillAttempted;
61006 u32 pgno; /* Page number in db file */
61166 u32 *piRead /* OUT: Frame number (or zero) */
61168 u32 iRead = 0; /* If !=0, WAL frame to return data from */
61169 u32 iLast = pWal->hdr.mxFrame; /* Last page in WAL for this reader */
61225 u32 iFrame = sLoc.aHash[iKey] + sLoc.iZero;
61243 u32 iRead2 = 0;
61244 u32 iTest;
61267 u32 iRead, /* Frame to read */
61406 SQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData){
61420 SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){
61465 u32 salt1;
61575 static int walRewriteChecksums(Wal *pWal, u32 iLast){
61580 u32 iRead; /* Next frame to read from wal file */
61597 rc = sqlite3OsRead(pWal->pWalFd, aBuf, sizeof(u32)*2, iCksumOff);
61599 pWal->hdr.aFrameCksum[1] = sqlite3Get4byte(&aBuf[sizeof(u32)]);
61607 u32 iPgno, nDbSize;
61633 u32 iFrame; /* Next frame address */
61640 u32 iFirst = 0; /* First frame that may be overwritten */
61676 u32 aCksum[2]; /* Checksum for wal-header */
61732 u32 iWrite = 0;
61975 u32 ret = 0;
62061 static const u32 aZero[4] = { 0, 0, 0, 0 };
62534 u32 iDataVersion; /* Combines with pBt->pPager->iDataVersion */
62609 u32 pageSize; /* Total number of bytes on a page */
62610 u32 usableSize; /* Number of usable bytes on each page */
62612 u32 nPage; /* Number of pages in the database */
62647 u32 nPayload; /* Bytes of payload */
62868 u32 *heap; /* Min-heap used for analyzing cell coverage */
64355 u32 nPayload; /* Number of bytes of cell payload */
64423 u32 nPayload; /* Number of bytes of cell payload */
64477 u32 nSize; /* Size value to return */
64507 nSize += (u32)(pIter - pCell);
64893 u32 iEnd = iStart + iSize; /* First byte past the iStart buffer */
65081 u32 next, size;
65321 SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree *p){
65645 assert( sizeof(u32)==4 );
66052 pBt->pageSize = (u32)pageSize;
66243 u32 nPage; /* Number of pages in the database */
66244 u32 nPageFile = 0; /* Number of pages in the database file */
66245 u32 nPageHeader; /* Number of pages in the database according to hdr */
66266 u32 pageSize;
66267 u32 usableSize;
66349 if( (u32)pageSize!=pBt->pageSize ){
67748 SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor *pCur){
67913 u32 offset, /* Begin reading this far into payload */
67914 u32 amt, /* Read this many bytes */
67963 const u32 ovflSize = pBt->usableSize - 4; /* Bytes content per ovfl page */
68111 SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
68127 u32 offset,
68128 u32 amt,
68139 SQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
68170 u32 *pAmt /* Write the number of available bytes here */
68188 *pAmt = (u32)amt;
68207 SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor *pCur, u32 *pAmt){
68221 static int moveToChild(BtCursor *pCur, u32 newPgno){
69042 u32 n; /* Number of pages on the freelist */
69043 u32 k; /* Number of leaves on the trunk of the freelist */
69063 u32 nSearch = 0; /* Count of the number of search attempts */
69140 }else if( k>(u32)(pBt->usableSize/4 - 2) ){
69209 u32 closest;
69213 u32 i;
69361 u32 nFree; /* Initial number of pages on free-list */
69411 u32 nLeaf; /* Initial number of leaf cells on trunk page */
69421 if( nLeaf > (u32)pBt->usableSize/4 - 2 ){
69425 if( nLeaf < (u32)pBt->usableSize/4 - 8 ){
69504 u32 ovflPageSize;
69769 u32 pc; /* Offset to cell content of cell being deleted */
70072 u32 j; /* Start of cell content area */
70082 if( NEVER(j>(u32)usableSize) ){ j = 0; }
71353 u32 key = get4byte(&apNew[i]->aData[8]);
71647 u32 ovflPageSize; /* Size to write on overflow page */
71671 if( iOffset+ovflPageSize<(u32)nTotal ){
71796 && pCur->info.nPayload==(u32)pX->nData+pX->nZero
72558 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
72588 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
72803 u32 N /* Expected number of pages in the list */
72806 u32 expected = N;
72819 u32 n = (u32)get4byte(&pOvflData[4]);
72888 static void btreeHeapInsert(u32 *aHeap, u32 x){
72889 u32 j, i = ++aHeap[0];
72898 static int btreeHeapPull(u32 *aHeap, u32 *pOut){
72899 u32 j, i, x;
72954 u32 pc; /* Address of a cell */
72955 u32 usableSize; /* Usable size of the page */
72956 u32 contentOffset; /* Offset to the start of the cell content area */
72957 u32 *heap = 0; /* Min-heap used for checking cell coverage */
72958 u32 x, prev = 0; /* Next and previous entry on the min-heap */
73065 u32 nPage; /* Number of pages on the overflow chain */
73110 u32 size;
73125 assert( (u32)i<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
73127 assert( (u32)(i+size)<=usableSize ); /* due to btreeComputeFreeSpace() */
73128 btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
73137 assert( (u32)j<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
73242 sCheck.heap = (u32*)sqlite3PageMalloc( pBt->pageSize );
73488 SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
73642 u32 iDestSchema; /* Original schema cookie in destination */
73893 u32 newPgsz = nSrcPgsz;
75482 u32 nAlloc = nByte;
75542 u32 offset, /* Offset from the start of data to return bytes from. */
75543 u32 amt, /* Number of bytes to return. */
75565 u32 offset, /* Offset from the start of data to return bytes from. */
75566 u32 amt, /* Number of bytes to return. */
75570 u32 available = 0; /* Number of bytes available on the local btree page */
76017 u32 iSerial; /* Serial type */
76019 u32 nVal; /* Bytes of space required for argv[0] */
76214 u32 t = 0; /* a column type code */
77285 SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe *p, u32 addr, u8 iNewOpcode){
77288 SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe *p, u32 addr, int val){
77291 SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe *p, u32 addr, int val){
77294 SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe *p, u32 addr, int val){
78880 u32 iRandom;
79741 SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format, u32 *pLen){
79743 u32 n;
79763 return 8+(u32)u;
79782 n = (u32)pMem->n;
79813 SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32 serial_type){
79865 u32 i[2];
79867 u32 t;
79893 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(u8 *buf, Mem *pMem, u32 serial_type){
79894 u32 len;
79899 u32 i;
79935 #define FOUR_BYTE_UINT(x) (((u32)(x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])
79947 static u32 SQLITE_NOINLINE serialGet(
79949 u32 serial_type, /* Serial type to deserialize */
79953 u32 y = FOUR_BYTE_UINT(buf+4);
79983 SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(
79985 u32 serial_type, /* Serial type to deserialize */
80115 u32 d;
80116 u32 idx; /* Offset in aKey[] to read from */
80118 u32 szHdr;
80126 while( idx<szHdr && d<=(u32)nKey ){
80127 u32 serial_type;
80139 if( d>(u32)nKey && u ){
80167 u32 d1; /* Offset into aKey[] of next data element */
80168 u32 idx1; /* Offset into aKey[] of next header element */
80169 u32 szHdr1; /* Number of bytes in header */
80200 u32 serial_type1;
80273 u32 szHdr;
80274 u32 idx;
80275 u32 notUsed;
80281 assert( szHdr<=(u32)nKey );
80497 static i64 vdbeRecordDecodeInt(u32 serial_type, const u8 *aKey){
80498 u32 y;
80557 u32 d1; /* Offset into aKey[] of next data element */
80559 u32 szHdr1; /* Size of record header in bytes */
80560 u32 idx1; /* Offset of first type in header */
80571 u32 s1;
80594 u32 serial_type;
80765 u32 y;
80962 u32 szHdr; /* Size of the header */
80963 u32 typeRowid; /* Serial type of the rowid */
80964 u32 lenRowid; /* Size of the rowid */
80978 rc = sqlite3VdbeMemFromBtree(pCur, 0, (u32)nCellKey, &m);
81008 testcase( (u32)m.n==szHdr+lenRowid );
81009 if( unlikely((u32)m.n<szHdr+lenRowid) ){
81060 rc = sqlite3VdbeMemFromBtree(pCur, 0, (u32)nCellKey, &m);
81162 v->expmask |= ((u32)1 << (iVar-1));
82272 /* .uTemp = */ (u32)0,
82598 if( p->expmask!=0 && (p->expmask & (i>=31 ? 0x80000000 : (u32)1<<i))!=0 ){
82956 u32 v;
83076 u32 nRec;
83644 static void vdbeTakeBranch(u32 iSrcLine, u8 I, u8 M){
83741 ROUND8(sizeof(VdbeCursor)) + 2*sizeof(u32)*nField +
83763 &pMem->z[ROUND8(sizeof(VdbeCursor))+2*sizeof(u32)*nField];
84219 u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
85908 u32 iAddr; /* Address of this instruction */
86061 u32 *aOffset; /* aOffset[i] is offset to start of data for i-th column */
86070 u32 t; /* A type code from the record header */
86117 if( pC->payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
86201 aOffset[++i] = (u32)(offset64 & 0xffffffff);
86222 pC->iHdrOffset = (u32)(zHdr - zData);
86373 u32 serial_type; /* Type field */
86381 u32 len; /* Length of a field */
86945 sqlite3BtreeGetMeta(db->aDb[iDb].pBt, iCookie, (u32 *)&iMeta);
87089 if( pCur && pCur->pgnoRoot==(u32)pOp->p2 ){
88482 u32 n;
88511 if( n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
91289 u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;
91588 int (*xCall)(BtCursor*, u32, u32, void*)
92710 u32 szPma = sqlite3GlobalConfig.szPma;
95484 pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
95488 pParse->newmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
97872 SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr, u32 n){
97882 assert( n==(u32)sqlite3Strlen30(z) );
98109 u32 staticFlag; /* EP_Static if space not obtained from malloc */
98144 u32 nSize = (u32)exprStructSize(p);
98676 SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList *pList){
98678 u32 m = 0;
99255 u32 inFlags, /* IN_INDEX_LOOP, _MEMBERSHIP, and/or _NOOP_OK */
99439 u32 savedNQueryLoop = pParse->nQueryLoop;
100599 u32 constMask = 0; /* Mask of function arguments that are constant */
101685 u32 combinedFlags;
102454 u32 savedDbFlags; /* Saved value of db->mDbFlags */
102702 u32 savedDbFlags = db->mDbFlags;
103388 u32 nReplace;
104272 u32 nRowid; /* Sizeof aRowid[] */
104275 u32 iHash; /* Tiebreaker hash */
104285 u32 iPrn; /* Pseudo-random number used for sampling */
104448 p->iPrn = 0x689e962d*(u32)nCol ^ 0xd0944565*(u32)sqlite3_value_int(argv[2]);
107186 u32 flags, /* LOCATE_VIEW or LOCATE_NOERR */
107246 u32 flags,
108048 u32 h = 0;
110732 if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){
112743 u32 mask; /* Mask of OLD.* columns in use */
113652 u32 matchOther /* The escape char (LIKE) or '[' (GLOB) */
113654 u32 c, c2; /* Next pattern and input string chars */
113655 u32 matchOne = pInfo->matchOne; /* "?" or "_" */
113656 u32 matchAll = pInfo->matchAll; /* "*" or "%" */
113732 u32 prior_c = 0;
113820 u32 escape;
116078 #define COLUMN_MASK(x) (((x)>31) ? 0xffffffff : ((u32)1<<(x)))
116084 SQLITE_PRIVATE u32 sqlite3FkOldmask(
116088 u32 mask = 0;
120359 u32 nExt; /* Number of entries in aExt[] */
120394 u32 i;
120478 u32 i;
123170 u32 opMask; /* Mask of operations to perform */
123173 opMask = (u32)sqlite3Atoi(zRight);
123843 SQLITE_PRIVATE int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFlags){
123927 sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);
124157 sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);
124225 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
124382 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
124524 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
124756 u32 selFlags, /* Flag parameters, such as SF_Distinct */
126558 u32 cnt; /* Index added to make the name unique */
129457 u32 elistFlags = 0;
131273 u32 nAlloc; /* Slots allocated for azResult[] */
131274 u32 nRow; /* Number of rows in the result */
131275 u32 nColumn; /* Number of columns in the result */
131276 u32 nData; /* Slots used in azResult[]. (nRow+1)*nColumn */
132601 SQLITE_PRIVATE u32 sqlite3TriggerColmask(
132611 u32 mask = 0;
133244 u32 oldmask = (hasFK ? sqlite3FkOldmask(pParse, pTab) : 0);
134031 u32 saved_mDbFlags; /* Saved value of db->mDbFlags */
134035 u32 saved_openFlags; /* Saved value of db->openFlags */
134215 u32 meta;
135647 u32 iLikeRepCntr; /* LIKE range processing counter register (times 2) */
135714 u32 wsFlags; /* WHERE_* flags describing the plan */
135877 u32 opMask; /* Acceptable operators */
136058 u32 op, /* Mask of WO_xx values describing operator */
136279 u32 flags; /* Flags that describe this loop */
137737 pLevel->iLikeRepCntr = (u32)++pParse->nMem;
138344 u32 x = pLevel->iLikeRepCntr;
140383 u32 opMask, /* Operator(s) to scan for */
140447 u32 op, /* Mask of WO_xx values describing operator */
140846 assert( (u32)n==pLoop->u.btree.nEq );
141620 (u32)iLower, (u32)iUpper, nOut));
142450 u32 saved_wsFlags; /* Original value of pNew->wsFlags */
144367 u32 wsFlags = pFrom->aLoop[nLoop-1]->wsFlags;
152012 u32 n = yymsp[0].minor.yy0.n;
155266 sqlite3GlobalConfig.szSorterRef = (u32)iVal;
155450 u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
156378 if( p && (p->funcFlags & SQLITE_FUNC_ENCMASK)==(u32)enc && p->nArg==nArg ){
156623 db->xTrace = (int(*)(u32,void*,void*,void*))xTrace;
160082 typedef unsigned int u32; /* 4-byte unsigned integer */
160151 u32 nLeafAdd; /* Number of leaf blocks added this trans */
160366 u32 *aMI; /* See above */
160484 SQLITE_PRIVATE int sqlite3Fts3EvalPhraseStats(Fts3Cursor *, Fts3Expr *, u32 *);
160618 u32 a;
160643 u32 a;
160656 *pi = (int)(a | ((u32)(*ptr & 0x07) << 28));
163713 const u32 nMinMerge = 64; /* Minimum amount of incr-merge work to do */
165956 pE->aMI = (u32 *)sqlite3_malloc64(pTab->nColumn * 3 * sizeof(u32));
165958 memset(pE->aMI, 0, pTab->nColumn * 3 * sizeof(u32));
166041 u32 *aiOut /* Array to write results into (see above) */
166050 aiOut[iCol*3 + 1] = (u32)pCsr->nDoc;
166051 aiOut[iCol*3 + 2] = (u32)pCsr->nDoc;
171169 u32 *pnWord /* IN/OUT: Incr. by number tokens inserted */
171300 u32 *aSz
171444 u32 *aSz, /* Sizes of deleted document written here */
173701 u32 *a, /* The integer values */
173717 u32 *a, /* Write the integer values */
173727 a[i] = (u32)(x & 0xffffffff);
173741 u32 *aSz /* Sizes of each column, in tokens */
173785 u32 *aSzIns, /* Size increases */
173786 u32 *aSzDel, /* Size decreases */
173791 u32 *a; /* Array of integers that becomes the BLOB */
173799 a = sqlite3_malloc64( (sizeof(u32)+10)*(sqlite3_int64)nStat );
173817 memset(a, 0, sizeof(u32)*(nStat) );
173825 if( nChng<0 && a[0]<(u32)(-nChng) ){
173831 u32 x = a[i+1];
173904 u32 *aSz = 0;
173905 u32 *aSzIns = 0;
173906 u32 *aSzDel = 0;
173920 sqlite3_int64 nByte = sizeof(u32) * ((sqlite3_int64)p->nColumn+1)*3;
173921 aSz = (u32 *)sqlite3_malloc64(nByte);
175886 u32 *aSzDel
175902 memset(aSzDel, 0, sizeof(u32) * (p->nColumn+1) * 2);
175939 u32 *aSzIns = 0; /* Sizes of inserted documents */
175940 u32 *aSzDel = 0; /* Sizes of deleted documents */
176189 u32 *aMatchinfo; /* Pre-allocated buffer */
176202 u32 aMatchinfo[1];
176228 sqlite3_int64 nByte = sizeof(u32) * (2*(sqlite3_int64)nElem + 1)
176237 + sizeof(u32)*((int)nElem+1);
176248 MatchinfoBuffer *pBuf = (MatchinfoBuffer*)((u8*)p - ((u32*)p)[-1]);
176250 assert( (u32*)p==&pBuf->aMatchinfo[1]
176251 || (u32*)p==&pBuf->aMatchinfo[pBuf->nElem+2]
176253 if( (u32*)p==&pBuf->aMatchinfo[1] ){
176264 static void (*fts3MIBufferAlloc(MatchinfoBuffer *p, u32 **paOut))(void*){
176266 u32 *aOut = 0;
176278 aOut = (u32*)sqlite3_malloc64(p->nElem * sizeof(u32));
176281 if( p->bGlobal ) memcpy(aOut, &p->aMatchinfo[1], p->nElem*sizeof(u32));
176291 memcpy(&p->aMatchinfo[2+p->nElem], &p->aMatchinfo[1], p->nElem*sizeof(u32));
176978 p->aMatchinfo[iStart + iCol] = (u32)nHit;
177152 *pnDoc = (u32)nDoc;
177336 pInfo->aMatchinfo[0] = (u32)nDoc;
177349 u32 iVal;
177352 iVal = (u32)(((u32)(nToken&0xffffffff)+nDoc/2)/nDoc);
177368 pInfo->aMatchinfo[iCol] = (u32)nToken;
177384 size_t nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);
177432 u32 *aOut = 0;
177499 int n = pCsr->pMIBuffer->nElem * sizeof(u32);
178701 typedef unsigned int u32;
178762 u32 n; /* Bytes of content, or number of sub-nodes */
178765 u32 iAppend; /* More terms for ARRAY and OBJECT */
178766 u32 iKey; /* Key for ARRAY objects in json_tree() */
178767 u32 iReplace; /* Replacement content for JNODE_REPLACE */
178775 u32 nNode; /* Number of slots of aNode[] used */
178776 u32 nAlloc; /* Number of slots of aNode[] allocated */
178779 u32 *aUp; /* Index of parent of each node */
178784 u32 iHold; /* Replace cache line with the lowest iHold value */
178838 static int jsonGrow(JsonString *p, u32 N){
178865 static void jsonAppendRaw(JsonString *p, const char *zIn, u32 N){
178904 static void jsonAppendString(JsonString *p, const char *zIn, u32 N){
178905 u32 i;
178959 u32 n = (u32)sqlite3_value_bytes(pValue);
178965 u32 n = (u32)sqlite3_value_bytes(pValue);
179010 static u32 jsonNodeSize(JsonNode *pNode){
179079 u32 j = 1;
179097 u32 j = 1;
179210 u32 i;
179211 u32 n = pNode->n;
179214 u32 j;
179227 u32 v = 0, k;
179277 static int jsonParseAddNode(JsonParse*,u32,u32,const char*);
179294 u32 eType, /* Node type */
179295 u32 n, /* Content size or sub-node count */
179298 u32 nNew;
179321 u32 eType, /* Node type */
179322 u32 n, /* Content size or sub-node count */
179354 static int jsonParseValue(JsonParse *pParse, u32 i){
179356 u32 j;
179372 if( x==(-2) && pParse->nNode==(u32)iThis+1 ) return j+1;
179393 pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1;
179405 if( x==(-3) && pParse->nNode==(u32)iThis+1 ) return j+1;
179415 pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1;
179547 static void jsonParseFillInParentage(JsonParse *pParse, u32 i, u32 iParent){
179549 u32 j;
179575 u32 *aUp;
179577 aUp = pParse->aUp = sqlite3_malloc64( sizeof(u32)*pParse->nNode );
179611 u32 iMinHold = 0xffffffff;
179612 u32 iMaxHold = 0;
179662 static int jsonLabelCompare(JsonNode *pNode, const char *zKey, u32 nKey){
179686 u32 iRoot, /* Begin the search at this node */
179691 u32 i, j, nKey;
179732 u32 iStart, iLabel;
179775 u32 iStart;
179921 u32 i;
180025 u32 i;
180100 u32 iTarget, /* Node of the TARGET in pParse */
180103 u32 i, j;
180104 u32 iRoot;
180118 u32 nKey;
180208 u32 n;
180225 n = (u32)sqlite3_value_bytes(argv[i]);
180250 u32 i;
180255 for(i=1; i<(u32)argc; i++){
180283 u32 i;
180292 for(i=1; i<(u32)argc; i+=2){
180330 u32 i;
180341 for(i=1; i<(u32)argc; i+=2){
180520 u32 n;
180532 n = (u32)sqlite3_value_bytes(argv[0]);
180575 u32 iRowid; /* The rowid */
180576 u32 iBegin; /* The first node of the scan */
180577 u32 i; /* Index in sParse.aNode[] of current row */
180578 u32 iEnd; /* EOF when i equals or exceeds this value */
180692 u32 iUp = p->sParse.aUp[p->i];
180729 u32 i /* Path to this element */
180732 u32 iUp;
180766 u32 iKey;
181229 typedef unsigned int u32;
181290 u32 nBusy; /* Current number of users of this structure */
181292 u32 nCursor; /* Number of open cursors */
181293 u32 nNodeRef; /* Number RtreeNodes with positive nRef */
181420 u32 anQueue[RTREE_MAX_DEPTH+1]; /* Number of queued entries by iLevel */
181433 u32 u; /* Unsigned for byte-order conversions */
181528 u32 iSize; /* Size of this object */
181604 pCoord->u = _byteswap_ulong(*(u32*)p);
181606 pCoord->u = __builtin_bswap32(*(u32*)p);
181608 pCoord->u = *(u32*)p;
181611 (((u32)p[0]) << 24) +
181612 (((u32)p[1]) << 16) +
181613 (((u32)p[2]) << 8) +
181614 (((u32)p[3]) << 0)
181655 u32 i;
181658 assert( sizeof(u32)==4 );
182266 c.u = _byteswap_ulong(*(u32*)a); \
182272 c.u = __builtin_bswap32(*(u32*)a); \
182292 c.u = ((u32)a[0]<<24) + ((u32)a[1]<<16) \
182293 +((u32)a[2]<<8) + a[3]; \
182967 memset(pCsr->anQueue, 0, sizeof(u32)*(pRtree->iDepth + 1));
186841 memset(pCsr->anQueue, 0, sizeof(u32)*(pRtree->iDepth + 1));
189052 typedef unsigned int u32;
189080 u32 iCookie;
189180 u32 iDbPage;
189181 u32 iWalFrame;
189246 u32 iMaxFrame; /* Largest iWalFrame value in aFrame[] */
189247 u32 mLock;
189294 u32 iCookie; /* Cookie value for main db files */
191272 pRet->iCookie = (u32)sqlite3_column_int64(pStmt, 1);
191276 pRet->iOalSz = (u32)sqlite3_column_int64(pStmt, 1);
191508 u32 volatile *ptr;
191618 const u32 mReq = (1<<WAL_LOCK_WRITE)|(1<<WAL_LOCK_CKPT)|(1<<WAL_LOCK_READ0);
191619 u32 iFrame;
191636 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
191650 pRbu->aFrame[pRbu->nFrame-1].iDbPage = (u32)(iOff / pRbu->pgsz) + 1;
192256 ((u32 volatile*)ptr)[24] = p->iMaxFrame;
192275 u32 iSector;
193076 static u32 rbuGetU32(u8 *aBuf){
193077 return ((u32)aBuf[0] << 24)
193078 + ((u32)aBuf[1] << 16)
193079 + ((u32)aBuf[2] << 8)
193080 + ((u32)aBuf[3]);
193087 static void rbuPutU32(u8 *aBuf, u32 iVal){
193138 u32 iRoot = rbuGetU32(&aBuf[52]) ? 1 : 0;
193963 u32 iChildPg; /* Child node (or 0 if this is a leaf) */
193965 u32 *aOvfl; /* Array of overflow page numbers */
193971 u32 iPgno;
193982 u32 iRightChildPg; /* Right-child page number (or 0) */
193998 u32 iPageno; /* Value of 'pageno' column */
194263 u32 nPayload; /* Bytes of payload total (local+overflow) */
194270 if( nPayload>(u32)p->nMxPayload ) p->nMxPayload = nPayload;
194274 assert( nPayload>=(u32)nLocal );
194276 if( nPayload>(u32)nLocal ){
194282 pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
194287 u32 iPrev = pCell->aOvfl[j-1];
194356 u32 iRoot = (u32)sqlite3_column_int64(pCsr->pStmt, 1);
195355 #define SESSION_UINT32(x) (((u32)(x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])
195363 u32 y = SESSION_UINT32(aRec+4);
201117 typedef unsigned int u32;
201346 static int sqlite3Fts5BufferSize(int*, Fts5Buffer*, u32);
201348 static void sqlite3Fts5BufferAppendBlob(int*, Fts5Buffer*, u32, const u8*);
201364 (u32)((pBuf)->n) + (u32)(nn) <= (u32)((pBuf)->nSpace) ? 0 : \
201596 static int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v);
201597 static int sqlite3Fts5GetVarintLen(u32 iVal);
201601 #define fts5GetVarint32(a,b) sqlite3Fts5GetVarint32(a,(u32*)&b)
201900 static int sqlite3Fts5UnicodeCategory(u32 iCode);
204127 static int sqlite3Fts5BufferSize(int *pRc, Fts5Buffer *pBuf, u32 nByte){
204128 if( (u32)pBuf->nSpace<nByte ){
204164 return (int)((((u32)aBuf[0])<<24) + (aBuf[1]<<16) + (aBuf[2]<<8) + aBuf[3]);
204175 u32 nData,
204451 u32 hash = 13;
204492 u32 i;
208026 sqlite3_result_int(pCtx, aArr[sqlite3Fts5UnicodeCategory((u32)iCode)]);
208535 int nByte = sqlite3Fts5GetVarintLen((u32)nPos);
211117 u32 nMatch = 0;
211118 u32 nKeep = 0;
211119 u32 nNew = 0;
211120 u32 iTermOff;
211144 u32 nCmp;
211145 u32 i;
211146 nCmp = (u32)MIN(nNew, nTerm-nMatch);
211152 if( (u32)nTerm==nMatch ){
212466 u32 aUsed[(FTS5_MAX_SEGMENT+31) / 32];
212469 u32 mask;
212475 aUsed[(iId-1) / 32] |= (u32)1 << ((iId-1) % 32);
212482 for(iSegid=0; mask & ((u32)1 << iSegid); iSegid++);
213361 u32 dummy;
219645 u32 iCode;
219657 if( (u32)aNew[i]>iCode ) break;
219812 p->aCategory[sqlite3Fts5UnicodeCategory((u32)iCode)]
219841 u32 iCode; /* non-ASCII codepoint read from input */
221401 static int sqlite3Fts5UnicodeCategory(u32 iCode) {
221468 static int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v){
221469 u32 a,b;
221523 *v = ((u32)v64) & 0x7FFFFFFF;
221547 u32 a,b,s;
221779 static int sqlite3Fts5GetVarintLen(u32 iVal){