Lines Matching defs:u32
14381 typedef UINT32_TYPE u32; /* 4-byte unsigned integer */
14389 ** that can be stored in a u32 without loss of data. The value
14404 typedef u32 tRowcnt; /* 32-bit is the default */
14453 typedef u32 uptr;
14601 SQLITE_PRIVATE u32 sqlite3TreeTrace;
14619 SQLITE_PRIVATE u32 sqlite3WhereTrace;
15200 typedef u32 Pgno;
15298 SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int);
15377 SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager*);
15552 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
15553 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);
15749 SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor*, u32 offset, u32 amt, void*);
15750 SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor*, u32 *pAmt);
15751 SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor*);
15759 SQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor*, u32 offset, u32 amt, void*);
15760 SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);
15901 u32 *ai; /* Used when p4type is P4_INTARRAY */
15912 u32 cnt; /* Number of times this instruction was executed */
15916 u32 iSrcLine; /* Source-code line that generated this opcode
16315 SQLITE_PRIVATE void sqlite3VdbeReleaseRegisters(Parse*,int addr, int n, u32 mask, int);
16513 u32 pageHash; /* Hash of page content */
16902 u32 bDisable; /* Only operate the lookaside when zero */
16906 u32 nSlot; /* Number of lookaside slots allocated */
16907 u32 anStat[3]; /* 0: hits. 1: size misses. 2: full misses */
17017 u32 mDbFlags; /* flags recording internal state */
17021 u32 nSchemaLock; /* Do not reset the schema when non-zero */
17027 u32 dbOptFlags; /* Flags to enable/disable optimizations */
17065 int (*xV2)(u32,void*,void*,void*); /* All other mTrace values */
17080 unsigned int (*xAutovacPages)(void*,const char*,u32,u32,u32);
17309 u32 funcFlags; /* Some combination of SQLITE_FUNC_* */
17759 u32 nTabRef; /* Number of pointers to this Table */
17760 u32 tabFlags; /* Mask of TF_* values */
17972 u32 nRef; /* Number of references to this KeyInfo object */
18222 u32 selId; /* Select to which this AggInfo belongs */
18314 u32 flags; /* Various flags. EP_* See below */
18651 u32 nAlloc; /* Number of entries allocated in a[] below */
18826 u32 selFlags; /* Various SF_* values */
18828 u32 selId; /* Unique identifier number for this SELECT */
19035 u32 aColmask[2]; /* Masks of old.*, new.* columns accessed */
19158 u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */
19159 u32 oldmask; /* Mask of old.* columns referenced */
19160 u32 newmask; /* Mask of new.* columns referenced */
19414 u32 nAlloc; /* Amount of space allocated in zText */
19415 u32 mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
19416 u32 nChar; /* Length of the string so far */
19436 u32 mInitFlags; /* Flags controlling error messages */
19437 u32 nInitRow; /* Number of rows processed */
19496 u32 szPma; /* Maximum Sorter PMA size */
19528 u32 szSorterRef; /* Min size in bytes to use sorter-refs */
20066 SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*, u32);
20077 SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList*);
20081 SQLITE_PRIVATE int sqlite3InitOne(sqlite3*, int, char**, u32);
20122 SQLITE_PRIVATE void sqlite3EndTable(Parse*,Token*,Token*,u32,Select*);
20139 SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32);
20140 SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec*, u32);
20141 SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec*, u32);
20142 SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec*, u32);
20143 SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec*, u32, void*);
20145 SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec*);
20205 Expr*,ExprList*,u32,Expr*);
20257 SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,u32 flags,const char*, const char*);
20259 SQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,u32 flags,SrcItem *);
20289 SQLITE_PRIVATE u32 sqlite3IsTrueOrFalse(const char*);
20375 SQLITE_PRIVATE u32 sqlite3TriggerColmask(Parse*,Trigger*,ExprList*,int,int,Table*,int);
20396 SQLITE_PRIVATE void sqlite3SetJoinExpr(Expr*,int,u32);
20424 SQLITE_PRIVATE int sqlite3GetUInt32(const char*, u32*);
20430 SQLITE_PRIVATE u32 sqlite3Utf8Read(const u8**);
20446 SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *, u32 *);
20455 (u8)((*(A)<(u8)0x80)?((B)=(u32)*(A)),1:sqlite3GetVarint32((A),(u32 *)&(B)))
20457 B=(u32)*(A);if(B>=0x80)sqlite3GetVarint32((A),(u32*)&(B))
20459 (u8)(((u32)(B)<(u32)0x80)?(*(A)=(unsigned char)(B)),1:\
20806 SQLITE_PRIVATE u32 sqlite3FkOldmask(Parse*, Table*);
20860 SQLITE_PRIVATE int sqlite3FindInIndex(Parse *, Expr *, u32, int*, int*, int*);
20881 SQLITE_PRIVATE u32 sqlite3Get4byte(const u8*);
20882 SQLITE_PRIVATE void sqlite3Put4byte(u8*, u32);
22342 SQLITE_PRIVATE u32 sqlite3TreeTrace = 0;
22343 SQLITE_PRIVATE u32 sqlite3WhereTrace = 0;
22501 u32 *aAltMap; /* Mapping from table to index column numbers */
22509 u32 cacheStatus; /* Cache is valid if this matches Vdbe.cacheCtr */
22526 u32 iHdrOffset; /* Offset to next unparsed byte of the header */
22531 u32 *aOffset; /* Pointer to aType[nField] */
22533 u32 payloadSize; /* Total number of bytes in the record */
22534 u32 szRow; /* Byte available in aRow */
22542 u32 aType[1]; /* Type values record decode. MUST BE LAST */
22590 u32 iFrameMagic; /* magic number for sanity checking */
22632 u32 uTemp; /* Transient storage for serial_type in OP_MakeRecord */
22836 u32 cacheCtr; /* VdbeCursor row cache generation counter */
22865 u32 nWrite; /* Number of write operations that have occurred */
22880 u32 aCounter[9]; /* Counters used by sqlite3_stmt_status() */
22890 u32 expmask; /* Binding to these vars invalidates VM */
22971 SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32);
22979 SQLITE_PRIVATE void sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
23033 SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,u32,u32,Mem*);
23034 SQLITE_PRIVATE int sqlite3VdbeMemFromBtreeZeroOffset(BtCursor*,u32,Mem*);
23127 typedef u32 sqlite3StatValueType;
23278 static u32 countLookasideSlots(LookasideSlot *p){
23279 u32 cnt = 0;
23291 u32 nInit = countLookasideSlots(db->lookaside.pInit);
23292 u32 nFree = countLookasideSlots(db->lookaside.pFree);
26374 u32 prevSize; /* Size of previous chunk in Mem3Block elements */
26375 u32 size4x; /* 4x the size of current chunk in Mem3Block elements */
26378 u32 next; /* Index in mem3.aPool[] of next free chunk */
26379 u32 prev; /* Index in mem3.aPool[] of previous free chunk */
26395 u32 nPool;
26411 u32 mnKeyBlk;
26419 u32 iKeyBlk;
26420 u32 szKeyBlk;
26427 u32 aiSmall[MX_SMALL-1]; /* For sizes 2 through MX_SMALL, inclusive */
26428 u32 aiHash[N_HASH]; /* For sizes MX_SMALL+1 and larger */
26437 static void memsys3UnlinkFromList(u32 i, u32 *pRoot){
26438 u32 next = mem3.aPool[i].u.list.next;
26439 u32 prev = mem3.aPool[i].u.list.prev;
26457 static void memsys3Unlink(u32 i){
26458 u32 size, hash;
26477 static void memsys3LinkIntoList(u32 i, u32 *pRoot){
26491 static void memsys3Link(u32 i){
26492 u32 size, hash;
26542 static void *memsys3Checkout(u32 i, u32 nBlock){
26543 u32 x;
26560 static void *memsys3FromKeyBlk(u32 nBlock){
26572 u32 newi, x;
26605 static void memsys3Merge(u32 *pRoot){
26606 u32 iNext, prev, size, i, x;
26645 u32 i;
26646 u32 nBlock;
26647 u32 toFree;
26729 u32 size, x;
26882 u32 i, j;
26883 u32 size;
27092 u32 currentOut; /* Current checkout, including internal fragmentation */
27093 u32 currentCount; /* Current number of distinct checkouts */
27094 u32 maxOut; /* Maximum instantaneous currentOut */
27095 u32 maxCount; /* Maximum instantaneous currentCount */
27096 u32 maxRequest; /* Largest allocation (exclusive of internal frag) */
27215 if( (u32)nByte>mem5.maxRequest ){
27271 u32 size, iLogsize;
27286 assert( iBlock+size-1<(u32)mem5.nBlock );
32649 u32 s[16]; /* 64 bytes of chacha20 state */
32663 static void chacha_block(u32 *out, const u32 *in){
32665 u32 x[16];
32723 static const u32 chacha20_init[] = {
32750 chacha_block((u32*)wsdPrng.out, wsdPrng.s);
33207 SQLITE_PRIVATE u32 sqlite3Utf8Read(
33509 u32 c;
34452 u32 u = 0;
34508 SQLITE_PRIVATE int sqlite3GetUInt32(const char *z, u32 *pI){
34516 *pI = (u32)v;
34604 u32 a,b,s;
34611 *v = ((u32)(p[0]&0x7f)<<7) | p[1];
34619 a = ((u32)p[0])<<14;
34764 SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
34765 u32 a,b;
34827 *v = (u32)v64;
34876 *v = (u32)v64;
34896 SQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){
34898 u32 x;
34902 u32 x;
34906 u32 x;
34914 SQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){
34918 u32 x = __builtin_bswap32(v);
34921 u32 x = _byteswap_ulong(v);
37127 #define F2FS_IOC_GET_FEATURES _IOR(F2FS_IOCTL_MAGIC, 12, u32)
40991 u32 f = 0;
41530 (u32)sStat.st_ino, (u32)sStat.st_dev);
45495 u32 magic1; /* Magic number to detect structure corruption. */
45500 u32 magic2; /* Magic number to detect structure corruption. */
52240 (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))
52254 /* Number of u32 values in hash table. */
52255 #define BITVEC_NINT (BITVEC_USIZE/sizeof(u32))
52290 u32 iSize; /* Maximum bit index. Max iSize is 4,294,967,296. */
52291 u32 nSet; /* Number of bits that are set - only valid for aHash
52294 u32 iDivisor; /* Number of bits handled by each apSub[] entry. */
52296 /* Max iDivisor is max(u32) / BITVEC_NPTR + 1. */
52300 u32 aHash[BITVEC_NINT]; /* Hash table representation */
52310 SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32 iSize){
52325 SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){
52330 u32 bin = i/p->iDivisor;
52340 u32 h = BITVEC_HASH(i++);
52348 SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){
52364 SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){
52365 u32 h;
52371 u32 bin = i/p->iDivisor;
52408 u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
52435 SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
52440 u32 bin = i/p->iDivisor;
52451 u32 *aiValues = pBuf;
52457 u32 h = BITVEC_HASH(aiValues[j]-1);
52487 SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec *p){
54350 u32 n;
54355 n = (u32)nMax;
55421 SQLITE_PRIVATE int sqlite3WalFindFrame(Wal *, Pgno, u32 *);
55422 SQLITE_PRIVATE int sqlite3WalReadFrame(Wal *, u32, int, u8 *);
55436 SQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData);
55440 SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData);
55935 u32 aWalData[WAL_SAVEPOINT_NDATA]; /* WAL savepoint context */
56153 u32 cksumInit; /* Quasi-random value added to every checksum */
56154 u32 nSubRec; /* Number of records written to sub-journal */
56164 u32 iDataVersion; /* Changes whenever database content changes */
56176 u32 vfsFlags; /* Flags for sqlite3_vfs.xOpen() */
56177 u32 sectorSize; /* Assumed sector size during rollback */
56324 u32 iRead = 0;
56609 static int read32bits(sqlite3_file *fd, i64 offset, u32 *pRes){
56628 static int write32bits(sqlite3_file *fd, i64 offset, u32 val){
56750 static u32 pager_datahash(int nByte, unsigned char *pData){
56751 u32 hash = 0;
56758 static u32 pager_pagehash(PgHdr *pPage){
56809 static int readSuperJournal(sqlite3_file *pJrnl, char *zSuper, u32 nSuper){
56811 u32 len; /* Length in bytes of super-journal name */
56813 u32 cksum; /* MJ checksum value read from journal */
56814 u32 u; /* Unsigned loop counter */
56951 u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */
56952 u32 nWrite; /* Bytes of header sector written */
57070 u32 *pNRec, /* OUT: Value read from the nRec field */
57071 u32 *pDbSize /* OUT: Value of original database size field */
57116 u32 iPageSize; /* Page-size field of journal header */
57117 u32 iSectorSize; /* Sector-size field of journal header */
57196 u32 cksum = 0; /* Checksum of string zSuper */
57268 SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager *pPager){
57700 static u32 pager_cksum(Pager *pPager, const u8 *aData){
57701 u32 cksum = pPager->cksumInit; /* Checksum value to return */
57786 u32 cksum; /* Checksum used for sanity checking */
58312 u32 nRec; /* Number of Records in the journal */
58313 u32 u; /* Unsigned loop counter */
58320 u32 savedPageSize = pPager->pageSize;
58534 u32 iFrame = 0; /* Frame of WAL containing pgno */
58595 u32 change_counter;
58975 u32 ii; /* Loop counter */
58976 u32 nJRec = 0; /* Number of Journal Records */
58977 u32 dummy;
58989 nJRec = (u32)((szJ - pPager->journalOff)/JOURNAL_PG_SZ(pPager));
59003 u32 ii; /* Loop counter */
59266 SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nReserve){
59279 u32 pageSize = *pPageSize;
59283 && pageSize && pageSize!=(u32)pPager->pageSize
60268 u32 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE; /* Default page size */
60484 szPageDflt = (u32)pPager->sectorSize;
61167 u32 iFrame = 0; /* Frame to read from WAL file */
61501 u32 cksum;
61751 }else if( pPager->sectorSize > (u32)pPager->pageSize ){
63683 u32 iVersion; /* Wal-index version */
63684 u32 unused; /* Unused (padding) field */
63685 u32 iChange; /* Counter incremented each transaction */
63689 u32 mxFrame; /* Index of last valid frame in the WAL */
63690 u32 nPage; /* Size of database in pages */
63691 u32 aFrameCksum[2]; /* Checksum of last frame in log */
63692 u32 aSalt[2]; /* Two salt values copied from WAL header */
63693 u32 aCksum[2]; /* Checksum over all prior fields */
63756 u32 nBackfill; /* Number of WAL frames backfilled into DB */
63757 u32 aReadMark[WAL_NREADER]; /* Reader marks */
63759 u32 nBackfillAttempted; /* WAL frames perhaps written, or maybe not */
63760 u32 notUsed0; /* Available for future enhancements */
63871 u32 iCallback; /* Value to pass to log callback (or 0) */
63875 volatile u32 **apWiData; /* Pointer to wal-index content in memory */
63876 u32 szPage; /* Database page size */
63888 u32 minFrame; /* Ignore wal frames before this one */
63889 u32 iReCksum; /* On commit, recalculate checksums from here */
63891 u32 nCkpt; /* Checkpoint sequence counter in the wal-header */
63939 u32 iPrior; /* Last result returned from the iterator */
63944 u32 *aPgno; /* Array of page numbers. */
63967 #define HASHTABLE_NPAGE_ONE (HASHTABLE_NPAGE - (WALINDEX_HDR_SIZE/sizeof(u32)))
63971 sizeof(ht_slot)*HASHTABLE_NSLOT + HASHTABLE_NPAGE*sizeof(u32) \
63995 volatile u32 **ppPage /* Write the page pointer here */
64001 sqlite3_int64 nByte = sizeof(u32*)*(iPage+1);
64002 volatile u32 **apNew;
64003 apNew = (volatile u32 **)sqlite3Realloc((void *)pWal->apWiData, nByte);
64009 sizeof(u32*)*(iPage+1-pWal->nWiData));
64017 pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ);
64044 volatile u32 **ppPage /* Write the page pointer here */
64069 ** The argument to this macro must be of type u32. On a little-endian
64070 ** architecture, it returns the u32 value that results from interpreting
64093 const u32 *aIn, /* Initial checksum value input */
64094 u32 *aOut /* OUT: Final checksum value output */
64096 u32 s1, s2;
64097 u32 *aData = (u32 *)a;
64098 u32 *aEnd = (u32 *)&a[nByte];
64185 u32 iPage, /* Database page number for frame */
64186 u32 nTruncate, /* New db size (or 0 for non-commit frames) */
64191 u32 *aCksum = pWal->hdr.aFrameCksum;
64216 u32 *piPage, /* OUT: Database page number for frame */
64217 u32 *pnTruncate, /* OUT: New db size (or 0 if not commit) */
64222 u32 *aCksum = pWal->hdr.aFrameCksum;
64223 u32 pgno; /* Page number of the frame */
64332 static int walHash(u32 iPage){
64349 volatile u32 *aPgno; /* aPgno[1] is the page of first frame indexed */
64350 u32 iZero; /* One less than the frame number of first indexed*/
64380 pLoc->aPgno = &pLoc->aPgno[WALINDEX_HDR_SIZE/sizeof(u32)];
64397 static int walFramePage(u32 iFrame){
64412 static u32 walFramePgno(Wal *pWal, u32 iFrame){
64415 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
64494 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
64586 u32 aFrameCksum[2] = {0, 0};
64616 u32 *aPrivate = 0; /* Heap copy of *-shm hash being populated */
64621 u32 magic; /* Magic value read from WAL header */
64622 u32 version; /* Magic value read from WAL header */
64624 u32 iPg; /* Current 32KB wal-index page */
64625 u32 iLastFrame; /* Last frame in wal, based on nSize alone */
64678 aPrivate = (u32*)&aData[szPage];
64682 for(iPg=0; iPg<=(u32)walFramePage(iLastFrame); iPg++){
64683 u32 *aShare;
64684 u32 iFrame; /* Index of last frame read */
64685 u32 iLast = MIN(iLastFrame, HASHTABLE_NPAGE_ONE+iPg*HASHTABLE_NPAGE);
64686 u32 iFirst = 1 + (iPg==0?0:HASHTABLE_NPAGE_ONE+(iPg-1)*HASHTABLE_NPAGE);
64687 u32 nHdr, nHdr32;
64688 rc = walIndexPage(pWal, iPg, (volatile u32**)&aShare);
64695 u32 pgno; /* Database page number for frame */
64696 u32 nTruncate; /* dbsize field from frame header */
64719 nHdr32 = nHdr / sizeof(u32);
64738 for(i=nHdr32; i<WALINDEX_PGSZ/sizeof(u32); i++){
64953 u32 *piPage, /* OUT: The page number of the next page */
64954 u32 *piFrame /* OUT: Wal frame index of next page */
64956 u32 iMin; /* Result pgno must be greater than iMin */
64957 u32 iRet = 0xFFFFFFFF; /* 0xffffffff is never a valid page number */
64965 u32 iPg = pSegment->aPgno[pSegment->aIndex[pSegment->iNext]];
65005 const u32 *aContent, /* Pages in wal - keys for the sort */
65062 const u32 *aContent, /* Pages in wal */
65076 u32 iSub = 0; /* Index into aSub array */
65141 static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){
65144 u32 iLast; /* Last frame in log */
65190 nEntry = (int)((u32*)sLoc.aHash - (u32*)sLoc.aPgno);
65198 walMergesort((u32 *)sLoc.aPgno, aTmp, aIndex, &nEntry);
65202 p->aSegment[i].aPgno = (u32 *)sLoc.aPgno;
65349 static void walRestartHdr(Wal *pWal, u32 salt1){
65352 u32 *aSalt = pWal->hdr.aSalt; /* Big-endian salt values */
65410 u32 iDbpage = 0; /* Next database page to write */
65411 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
65412 u32 mxSafeFrame; /* Max frame that can be backfilled */
65413 u32 mxPage; /* Max database page to write */
65435 u32 y = AtomicLoad(pInfo->aReadMark+i);
65440 u32 iMark = (i==1 ? mxSafeFrame : READMARK_NOT_USED);
65461 u32 nBackfill = pInfo->nBackfill;
65550 u32 salt1;
65685 u32 aCksum[2]; /* Checksum on the header content */
65757 volatile u32 *page0; /* Chunk of wal-index containing header */
65887 u32 aSaveCksum[2]; /* Saved copy of pWal->hdr.aFrameCksum */
65991 u32 pgno; /* Database page number for frame */
65992 u32 nTruncate; /* dbsize field from frame header */
66078 u32 mxReadMark; /* Largest aReadMark[] value */
66082 u32 mxFrame; /* Wal frame to lock to */
66209 u32 thisMark = AtomicLoad(pInfo->aReadMark+i);
66326 u32 i = pInfo->nBackfillAttempted;
66329 u32 pgno; /* Page number in db file */
66507 u32 *piRead /* OUT: Frame number (or zero) */
66509 u32 iRead = 0; /* If !=0, WAL frame to return data from */
66510 u32 iLast = pWal->hdr.mxFrame; /* Last page in WAL for this reader */
66559 u32 iH;
66568 u32 iFrame = iH + sLoc.iZero;
66586 u32 iRead2 = 0;
66587 u32 iTest;
66610 u32 iRead, /* Frame to read */
66754 ** Argument aWalData must point to an array of WAL_SAVEPOINT_NDATA u32
66759 SQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData){
66770 ** of WAL_SAVEPOINT_NDATA u32 values that has been previously populated
66773 SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){
66818 u32 salt1;
66932 static int walRewriteChecksums(Wal *pWal, u32 iLast){
66937 u32 iRead; /* Next frame to read from wal file */
66954 rc = sqlite3OsRead(pWal->pWalFd, aBuf, sizeof(u32)*2, iCksumOff);
66956 pWal->hdr.aFrameCksum[1] = sqlite3Get4byte(&aBuf[sizeof(u32)]);
66964 u32 iPgno, nDbSize;
66990 u32 iFrame; /* Next frame address */
66997 u32 iFirst = 0; /* First frame that may be overwritten */
67033 u32 aCksum[2]; /* Checksum for wal-header */
67089 u32 iWrite = 0;
67357 u32 ret = 0;
67443 static const u32 aZero[4] = { 0, 0, 0, 0 };
67920 u32 iBDataVersion; /* Combines with pBt->pPager->iDataVersion */
68010 u32 pageSize; /* Total number of bytes on a page */
68011 u32 usableSize; /* Number of usable bytes on each page */
68013 u32 nPage; /* Number of pages in the database */
68049 u32 nPayload; /* Bytes of payload */
68272 u32 *heap; /* Min-heap used for analyzing cell coverage */
69817 u32 nPayload; /* Number of bytes of cell payload */
69881 testcase( nPayload==(u32)pPage->maxLocal+1 );
69899 u32 nPayload; /* Number of bytes of cell payload */
69918 testcase( nPayload==(u32)pPage->maxLocal+1 );
69954 u32 nSize; /* Size value to return */
69975 testcase( nSize==(u32)pPage->maxLocal+1 );
69977 nSize += (u32)(pIter - pCell);
69983 testcase( nSize==(u32)pPage->maxLocal+1 );
70016 u32 nSize; /* Size value to return */
70048 testcase( nSize==(u32)pPage->maxLocal+1 );
70050 nSize += (u32)(pIter - pCell);
70056 testcase( nSize==(u32)pPage->maxLocal+1 );
70424 u32 iEnd = iStart + iSize; /* First byte past the iStart buffer */
70638 u32 next, size;
71208 assert( sizeof(u32)==4 );
71626 pBt->pageSize = (u32)pageSize;
71815 u32 nPage; /* Number of pages in the database */
71816 u32 nPageFile = 0; /* Number of pages in the database file */
71837 u32 pageSize;
71838 u32 usableSize;
71920 if( (u32)pageSize!=pBt->pageSize ){
72979 testcase( pBt->nPage!=(u32)nPage );
73417 SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor *pCur){
73582 u32 offset, /* Begin reading this far into payload */
73583 u32 amt, /* Read this many bytes */
73634 const u32 ovflSize = pBt->usableSize - 4; /* Bytes content per ovfl page */
73784 SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
73799 u32 offset,
73800 u32 amt,
73811 SQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
73842 u32 *pAmt /* Write the number of available bytes here */
73860 *pAmt = (u32)amt;
73879 SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor *pCur, u32 *pAmt){
73893 static int moveToChild(BtCursor *pCur, u32 newPgno){
74888 u32 n; /* Number of pages on the freelist */
74889 u32 k; /* Number of leaves on the trunk of the freelist */
74909 u32 nSearch = 0; /* Count of the number of search attempts */
74986 }else if( k>(u32)(pBt->usableSize/4 - 2) ){
75055 u32 closest;
75059 u32 i;
75207 u32 nFree; /* Initial number of pages on free-list */
75257 u32 nLeaf; /* Initial number of leaf cells on trunk page */
75271 if( nLeaf > (u32)pBt->usableSize/4 - 2 ){
75275 if( nLeaf < (u32)pBt->usableSize/4 - 8 ){
75353 u32 ovflPageSize;
75630 u32 pc; /* Offset to cell content of cell being deleted */
75645 assert( pPage->pBt->usableSize > (u32)(ptr-data) );
75648 testcase( pc==(u32)get2byte(&data[hdr+5]) );
75930 u32 j; /* Start of cell content area */
75940 if( j>(u32)usableSize ){ j = 0; }
77230 u32 key = get4byte(&apNew[i]->aData[8]);
77556 u32 ovflPageSize; /* Size to write on overflow page */
77582 if( iOffset+ovflPageSize<(u32)nTotal ){
77722 && pCur->info.nPayload==(u32)pX->nData+pX->nZero
77947 u32 nIn; /* Size of input buffer aIn[] */
77948 u32 nRem; /* Bytes of data still to copy */
77972 u32 nOut; /* Size of output buffer aOut[] */
78654 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
78684 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
78898 u32 N /* Expected number of pages in the list */
78901 u32 expected = N;
78914 u32 n = (u32)get4byte(&pOvflData[4]);
78978 ** This heap is used for cell overlap and coverage testing. Each u32
78983 static void btreeHeapInsert(u32 *aHeap, u32 x){
78984 u32 j, i = ++aHeap[0];
78993 static int btreeHeapPull(u32 *aHeap, u32 *pOut){
78994 u32 j, i, x;
79049 u32 pc; /* Address of a cell */
79050 u32 usableSize; /* Usable size of the page */
79051 u32 contentOffset; /* Offset to the start of the cell content area */
79052 u32 *heap = 0; /* Min-heap used for checking cell coverage */
79053 u32 x, prev = 0; /* Next and previous entry on the min-heap */
79160 u32 nPage; /* Number of pages on the overflow chain */
79205 u32 size;
79220 assert( (u32)i<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
79222 assert( (u32)(i+size)<=usableSize ); /* due to btreeComputeFreeSpace() */
79223 btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
79232 assert( (u32)j<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
79358 sCheck.heap = (u32*)sqlite3PageMalloc( pBt->pageSize );
79605 SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
79770 u32 iDestSchema; /* Original schema cookie in destination */
80019 u32 newPgsz = nSrcPgsz;
80021 if( rc==SQLITE_OK && newPgsz!=(u32)nSrcPgsz ) rc = SQLITE_READONLY;
81797 u32 offset, /* Offset from the start of data to return bytes from. */
81798 u32 amt, /* Number of bytes to return. */
81820 u32 amt, /* Number of bytes to return. */
81823 u32 available = 0; /* Number of bytes available on the local btree page */
82430 u32 t = 0; /* a column type code */
83882 u32 mask, /* Mask of registers to NOT release */
84366 u32 i;
84367 u32 *ai = pOp->p4.ai;
84368 u32 n = ai[0]; /* The first element of an INTARRAY is always the
85421 u32 iRandom;
86268 SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format, u32 *pLen){
86270 u32 n;
86292 return 8+(u32)u;
86320 n = (u32)pMem->n;
86352 SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32 serial_type){
86404 u32 i[2];
86406 u32 t;
86423 #define FOUR_BYTE_UINT(x) (((u32)(x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])
86437 u32 serial_type, /* Serial type to deserialize */
86441 u32 y = FOUR_BYTE_UINT(buf+4);
86472 u32 serial_type, /* Serial type to deserialize */
86603 u32 d;
86604 u32 idx; /* Offset in aKey[] to read from */
86606 u32 szHdr;
86614 while( idx<szHdr && d<=(u32)nKey ){
86615 u32 serial_type;
86628 if( d>(u32)nKey && u ){
86656 u32 d1; /* Offset into aKey[] of next data element */
86657 u32 idx1; /* Offset into aKey[] of next header element */
86658 u32 szHdr1; /* Number of bytes in header */
86689 u32 serial_type1;
86768 u32 szHdr;
86769 u32 idx;
86770 u32 notUsed;
86776 assert( szHdr<=(u32)nKey );
87008 static i64 vdbeRecordDecodeInt(u32 serial_type, const u8 *aKey){
87009 u32 y;
87068 u32 d1; /* Offset into aKey[] of next data element */
87070 u32 szHdr1; /* Size of record header in bytes */
87071 u32 idx1; /* Offset of first type in header */
87082 u32 s1 = aKey1[1];
87113 u32 serial_type;
87297 u32 y;
87402 sqlite3GetVarint32(&aKey1[1], (u32*)&serial_type);
87512 u32 szHdr; /* Size of the header */
87513 u32 typeRowid; /* Serial type of the rowid */
87514 u32 lenRowid; /* Size of the rowid */
87528 rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);
87536 testcase( szHdr==(u32)m.n );
87558 testcase( (u32)m.n==szHdr+lenRowid );
87559 if( unlikely((u32)m.n<szHdr+lenRowid) ){
87610 rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);
87712 v->expmask |= ((u32)1 << (iVar-1));
88807 u32 sz; /* Size of current row in bytes */
88814 u32 iSerial;
89047 /* .uTemp = */ (u32)0,
89372 if( p->expmask!=0 && (p->expmask & (i>=31 ? 0x80000000 : (u32)1<<i))!=0 ){
89393 rc = vdbeUnbind(p, (u32)(i-1));
89442 rc = vdbeUnbind(p, (u32)(i-1));
89455 rc = vdbeUnbind(p, (u32)(i-1));
89465 rc = vdbeUnbind(p, (u32)(i-1));
89480 rc = vdbeUnbind(p, (u32)(i-1));
89558 rc = vdbeUnbind(p, (u32)(i-1));
89729 u32 v;
89851 u32 nRec;
90451 static void vdbeTakeBranch(u32 iSrcLine, u8 I, u8 M){
90539 ROUND8P(sizeof(VdbeCursor)) + 2*sizeof(u32)*nField +
90574 &pMem->z[ROUND8P(sizeof(VdbeCursor))+2*sizeof(u32)*nField];
91073 u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
92695 u32 idx;
92698 u32 *aPermute; /* The permutation */
92718 for(k=0; k<n; k++) if( aPermute[k]>(u32)mx ) mx = aPermute[k];
92727 idx = aPermute ? aPermute[i] : (u32)i;
92908 u32 iAddr; /* Address of this instruction */
92998 u32 serialType;
93171 u32 p2; /* column number to retrieve */
93174 u32 *aOffset; /* aOffset[i] is offset to start of data for i-th column */
93183 u32 t; /* A type code from the record header */
93189 p2 = (u32)pOp->p2;
93193 assert( p2<(u32)pC->nField
93220 u32 iMap;
93329 aOffset[++i] = (u32)(offset64 & 0xffffffff);
93330 }while( (u32)i<=p2 && zHdr<zEndHdr );
93350 pC->iHdrOffset = (u32)(zHdr - zData);
93643 u32 serial_type; /* Type field */
93648 u32 len; /* Length of a field */
93778 pRec->uTemp = 8+(u32)uu;
93816 len = (u32)pRec->n;
93901 u32 i;
94385 sqlite3BtreeGetMeta(db->aDb[iDb].pBt, iCookie, (u32 *)&iMeta);
94421 *(u32*)&pDb->pSchema->schema_cookie = *(u32*)&pOp->p3 - pOp->p5;
94525 u32 p2;
94535 if( pCur && pCur->pgnoRoot==(u32)pOp->p2 ){
94558 p2 = (u32)pOp->p2;
94577 assert( p2<=(u32)(p->nMem+1 - p->nCursor) );
96245 u32 n;
96270 if( n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
96970 rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);
97075 rc = sqlite3BtreeClearTable(db->aDb[pOp->p2].pBt, (u32)pOp->p1, &nChange);
99092 u32 constMask;
99335 u32 type;
99640 int (*xCall)(BtCursor*, u32, u32, void*)
100771 u32 szPma = sqlite3GlobalConfig.szPma;
104195 pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
104199 pParse->newmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
106960 SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr, u32 n){
106970 assert( n==(u32)sqlite3Strlen30(z) );
107231 u32 staticFlag; /* EP_Static if space not obtained from malloc */
107267 u32 nSize = (u32)exprStructSize(p);
107867 SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList *pList){
107869 u32 m = 0;
107900 SQLITE_PRIVATE u32 sqlite3IsTrueOrFalse(const char *zIn){
107913 u32 v;
108556 u32 inFlags, /* IN_INDEX_LOOP, _MEMBERSHIP, and/or _NOOP_OK */
108744 u32 savedNQueryLoop = pParse->nQueryLoop;
110266 u32 constMask = 0; /* Mask of function arguments that are constant */
111405 u32 combinedFlags;
113555 u32 nReplace;
114795 u32 aRoot[ArraySize(aTable)];
114824 aRoot[i] = (u32)pParse->regRoot;
114881 u32 nRowid; /* Sizeof aRowid[] */
114884 u32 iHash; /* Tiebreaker hash */
114899 u32 iPrn; /* Pseudo-random number used for sampling */
115067 p->iPrn = 0x689e962d*(u32)nCol ^ 0xd0944565*(u32)sqlite3_value_int(argv[2]);
117763 u32 savedDbFlags = db->mDbFlags;
117892 u32 flags, /* LOCATE_VIEW or LOCATE_NOERR */
117955 u32 flags,
119128 u32 h = 0;
120092 u32 tabOpts, /* Extra table options. Usually 0. */
120208 u32 colFlags = p->aCol[ii].colFlags;
122240 if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){
124467 u32 mask; /* Mask of OLD.* columns in use */
125412 u32 matchOther /* The escape char (LIKE) or '[' (GLOB) */
125414 u32 c, c2; /* Next pattern and input string chars */
125415 u32 matchOne = pInfo->matchOne; /* "?" or "_" */
125416 u32 matchAll = pInfo->matchAll; /* "*" or "%" */
125493 u32 prior_c = 0;
125593 u32 escape;
128208 #define COLUMN_MASK(x) (((x)>31) ? 0xffffffff : ((u32)1<<(x)))
128214 SQLITE_PRIVATE u32 sqlite3FkOldmask(
128218 u32 mask = 0;
129741 u32 colFlags;
133373 u32 nExt; /* Number of entries in aExt[] */
133408 u32 i;
133492 u32 i;
134548 u32 mask =
136589 u32 opMask; /* Mask of operations to perform */
136592 opMask = (u32)sqlite3Atoi(zRight);
137217 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
137341 SQLITE_PRIVATE int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFlags){
137430 sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);
137663 sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);
137824 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
137969 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
138113 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
138340 u32 selFlags, /* Flag parameters, such as SF_Distinct */
138617 SQLITE_PRIVATE void sqlite3SetJoinExpr(Expr *p, int iTable, u32 joinFlag){
138707 u32 joinType;
140422 u32 cnt; /* Index added to make the name unique */
141686 u32 *aPermute; /* Mapping from ORDER BY terms to result set columns */
141735 aPermute = sqlite3DbMallocRawNN(db, sizeof(u32)*(nOrderBy + 1));
142928 u32 mExcludeOn; /* Which ON expressions to exclude from considertion.
143982 u32 elistFlags = 0;
146191 u32 nAlloc; /* Slots allocated for azResult[] */
146192 u32 nRow; /* Number of rows in the result */
146193 u32 nColumn; /* Number of columns in the result */
146194 u32 nData; /* Slots used in azResult[]. (nRow+1)*nColumn */
147803 SQLITE_PRIVATE u32 sqlite3TriggerColmask(
147813 u32 mask = 0;
148733 u32 oldmask = (hasFK ? sqlite3FkOldmask(pParse, pTab) : 0);
148738 u32 colFlags = pTab->aCol[i].colFlags;
149662 u32 saved_mDbFlags; /* Saved value of db->mDbFlags */
149666 u32 saved_openFlags; /* Saved value of db->openFlags */
149674 u32 pgflags = PAGER_SYNCHRONOUS_OFF; /* sync flags for output db */
149853 u32 meta;
151392 u32 iLikeRepCntr; /* LIKE range processing counter register (times 2) */
151455 u32 needFree : 1; /* True if sqlite3_free(idxStr) is needed */
151456 u32 bOmitOffset : 1; /* True to let virtual table handle offset */
151460 u32 mHandleIn; /* Terms to handle as IN(...) instead of == */
151463 u32 wsFlags; /* WHERE_* flags describing the plan */
151629 u32 opMask; /* Acceptable operators */
151818 u32 op, /* Mask of WO_xx values describing operator */
152063 u32 flags; /* Flags that describe this loop */
153093 u32 *ai = (u32*)sqlite3DbMallocZero(pParse->db, sizeof(u32)*(pTab->nCol+1));
153686 pLevel->iLikeRepCntr = (u32)++pParse->nMem;
154434 u32 x = pLevel->iLikeRepCntr;
156522 u32 joinType;
156586 u32 mIn; /* Mask of terms that are <col> IN (...) */
156587 u32 mHandleIn; /* Terms that vtab will handle as <col> IN (...) */
156991 u32 opMask, /* Operator(s) to scan for */
157055 u32 op, /* Mask of WO_xx values describing operator */
157500 assert( (u32)n==pLoop->u.btree.nEq );
158474 (u32)iLower, (u32)iUpper, nOut));
159353 u32 saved_wsFlags; /* Original value of pNew->wsFlags */
159855 static SQLITE_NOINLINE u32 whereIsCoveringIndex(
160436 u32 m = SMASKBIT32(iCons);
161672 u32 wsFlags = pFrom->aLoop[nLoop-1]->wsFlags;
164105 u32 selFlags = p->selFlags;
166719 u32 yy285;
170572 u32 n = yymsp[0].minor.yy0.n;
172913 u32 j; /* Bytes of normalized SQL generated so far */
172957 assert( pStr->nChar>=(u32)iStartIN );
174122 sqlite3GlobalConfig.szSorterRef = (u32)iVal;
174368 u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
175329 if( p && (p->funcFlags & SQLITE_FUNC_ENCMASK)==(u32)enc && p->nArg==nArg ){
175746 unsigned int (*xCallback)(void*,const char*,u32,u32,u32),
177685 db->dbOptFlags = va_arg(ap, u32);
177880 ** "ptr" is a pointer to a u32.
177889 u32 *ptr = va_arg(ap, u32*);
179448 typedef unsigned int u32; /* 4-byte unsigned integer */
179522 u32 nLeafAdd; /* Number of leaf blocks added this trans */
179748 u32 *aMI; /* See above */
179868 SQLITE_PRIVATE int sqlite3Fts3EvalPhraseStats(Fts3Cursor *, Fts3Expr *, u32 *);
180000 u32 a;
180060 u32 a;
180073 *pi = (int)(a | ((u32)(*ptr & 0x07) << 28));
183180 const u32 nMinMerge = 64; /* Minimum amount of incr-merge work to do */
185449 pE->aMI = (u32 *)sqlite3_malloc64(pTab->nColumn * 3 * sizeof(u32));
185451 memset(pE->aMI, 0, pTab->nColumn * 3 * sizeof(u32));
185535 u32 *aiOut /* Array to write results into (see above) */
185544 aiOut[iCol*3 + 1] = (u32)pCsr->nDoc;
185545 aiOut[iCol*3 + 2] = (u32)pCsr->nDoc;
190680 u32 *pnWord /* IN/OUT: Incr. by number tokens inserted */
190811 u32 *aSz
190955 u32 *aSz, /* Sizes of deleted document written here */
193243 u32 *a, /* The integer values */
193259 u32 *a, /* Write the integer values */
193269 a[i] = (u32)(x & 0xffffffff);
193283 u32 *aSz /* Sizes of each column, in tokens */
193327 u32 *aSzIns, /* Size increases */
193328 u32 *aSzDel, /* Size decreases */
193333 u32 *a; /* Array of integers that becomes the BLOB */
193341 a = sqlite3_malloc64( (sizeof(u32)+10)*(sqlite3_int64)nStat );
193359 memset(a, 0, sizeof(u32)*(nStat) );
193367 if( nChng<0 && a[0]<(u32)(-nChng) ){
193373 u32 x = a[i+1];
193448 u32 *aSz = 0;
193449 u32 *aSzIns = 0;
193450 u32 *aSzDel = 0;
193464 sqlite3_int64 nByte = sizeof(u32) * ((sqlite3_int64)p->nColumn+1)*3;
193465 aSz = (u32 *)sqlite3_malloc64(nByte);
195495 u32 *aSzDel
195511 memset(aSzDel, 0, sizeof(u32) * (p->nColumn+1) * 2);
195548 u32 *aSzIns = 0; /* Sizes of inserted documents */
195549 u32 *aSzDel = 0; /* Sizes of deleted documents */
195802 u32 *aMatchinfo; /* Pre-allocated buffer */
195807 ** (nElem * sizeof(u32)) bytes in size. See the MatchinfoBuffer code below
195815 u32 aMatchinfo[1];
195841 sqlite3_int64 nByte = sizeof(u32) * (2*(sqlite3_int64)nElem + 1)
195849 + sizeof(u32)*((int)nElem+1);
195860 MatchinfoBuffer *pBuf = (MatchinfoBuffer*)((u8*)p - ((u32*)p)[-1]);
195862 assert( (u32*)p==&pBuf->aMatchinfo[1]
195863 || (u32*)p==&pBuf->aMatchinfo[pBuf->nElem+2]
195865 if( (u32*)p==&pBuf->aMatchinfo[1] ){
195876 static void (*fts3MIBufferAlloc(MatchinfoBuffer *p, u32 **paOut))(void*){
195878 u32 *aOut = 0;
195890 aOut = (u32*)sqlite3_malloc64(p->nElem * sizeof(u32));
195893 if( p->bGlobal ) memcpy(aOut, &p->aMatchinfo[1], p->nElem*sizeof(u32));
195903 memcpy(&p->aMatchinfo[2+p->nElem], &p->aMatchinfo[1], p->nElem*sizeof(u32));
196589 p->aMatchinfo[iStart + iCol] = (u32)nHit;
196960 pInfo->aMatchinfo[0] = (u32)nDoc;
196974 u32 iVal;
196981 iVal = (u32)(((u32)(nToken&0xffffffff)+nDoc/2)/nDoc);
197002 pInfo->aMatchinfo[iCol] = (u32)nToken;
197018 size_t nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);
197054 ** 'matchinfo' data is an array of 32-bit unsigned integers (C type u32).
197066 u32 *aOut = 0;
197087 size_t nMatchinfo = 0; /* Number of u32 elements in match-info */
197133 int n = pCsr->pMIBuffer->nElem * sizeof(u32);
198359 u32 n; /* Bytes of content, or number of sub-nodes */
198362 u32 iAppend; /* 2: More terms for ARRAY and OBJECT */
198363 u32 iKey; /* 3: Key for ARRAY objects in json_tree() */
198364 u32 iReplace; /* 4: Replacement content for JNODE_REPLACE */
198372 u32 nNode; /* Number of slots of aNode[] used */
198373 u32 nAlloc; /* Number of slots of aNode[] allocated */
198376 u32 *aUp; /* Index of parent of each node */
198381 u32 iHold; /* Replace cache line with the lowest iHold value */
198435 static int jsonGrow(JsonString *p, u32 N){
198462 static void jsonAppendRaw(JsonString *p, const char *zIn, u32 N){
198502 static void jsonAppendString(JsonString *p, const char *zIn, u32 N){
198503 u32 i;
198557 u32 n = (u32)sqlite3_value_bytes(pValue);
198563 u32 n = (u32)sqlite3_value_bytes(pValue);
198608 static u32 jsonNodeSize(JsonNode *pNode){
198682 u32 j = 1;
198701 u32 j = 1;
198757 static u32 jsonHexToInt4(const char *z){
198758 u32 v;
198853 u32 i;
198854 u32 n = pNode->n;
198857 u32 j;
198872 u32 v = jsonHexToInt4(z+i+1);
198881 u32 vlo;
198931 static int jsonParseAddNode(JsonParse*,u32,u32,const char*);
198948 u32 eType, /* Node type */
198949 u32 n, /* Content size or sub-node count */
198952 u32 nNew;
198975 u32 eType, /* Node type */
198976 u32 n, /* Content size or sub-node count */
199009 static int jsonParseValue(JsonParse *pParse, u32 i){
199011 u32 j;
199027 if( x==(-2) && pParse->nNode==(u32)iThis+1 ) return j+1;
199048 pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1;
199061 if( x==(-3) && pParse->nNode==(u32)iThis+1 ) return j+1;
199071 pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1;
199203 static void jsonParseFillInParentage(JsonParse *pParse, u32 i, u32 iParent){
199205 u32 j;
199231 u32 *aUp;
199233 aUp = pParse->aUp = sqlite3_malloc64( sizeof(u32)*pParse->nNode );
199267 u32 iMinHold = 0xffffffff;
199268 u32 iMaxHold = 0;
199318 static int jsonLabelCompare(JsonNode *pNode, const char *zKey, u32 nKey){
199343 u32 iRoot, /* Begin the search at this node */
199348 u32 i, j, nKey;
199392 u32 iStart, iLabel;
199470 u32 iStart;
199618 u32 i;
199726 u32 i;
199864 u32 iTarget, /* Node of the TARGET in pParse */
199867 u32 i, j;
199868 u32 iRoot;
199882 u32 nKey;
199984 u32 n;
200001 n = (u32)sqlite3_value_bytes(argv[i]);
200026 u32 i;
200031 for(i=1; i<(u32)argc; i++){
200059 u32 i;
200068 for(i=1; i<(u32)argc; i+=2){
200111 u32 i;
200122 for(i=1; i<(u32)argc; i+=2){
200314 u32 n;
200326 n = (u32)sqlite3_value_bytes(argv[0]);
200369 u32 iRowid; /* The rowid */
200370 u32 iBegin; /* The first node of the scan */
200371 u32 i; /* Index in sParse.aNode[] of current row */
200372 u32 iEnd; /* EOF when i equals or exceeds this value */
200487 u32 iUp = p->sParse.aUp[p->i];
200554 u32 i /* Path to this element */
200557 u32 iUp;
200591 u32 iKey;
201023 typedef unsigned int u32;
201110 u32 nBusy; /* Current number of users of this structure */
201112 u32 nCursor; /* Number of open cursors */
201113 u32 nNodeRef; /* Number RtreeNodes with positive nRef */
201240 u32 anQueue[RTREE_MAX_DEPTH+1]; /* Number of queued entries by iLevel */
201253 u32 u; /* Unsigned for byte-order conversions */
201354 u32 iSize; /* Size of this object */
201452 pCoord->u = _byteswap_ulong(*(u32*)p);
201454 pCoord->u = __builtin_bswap32(*(u32*)p);
201456 pCoord->u = *(u32*)p;
201459 (((u32)p[0]) << 24) +
201460 (((u32)p[1]) << 16) +
201461 (((u32)p[2]) << 8) +
201462 (((u32)p[3]) << 0)
201503 u32 i;
201506 assert( sizeof(u32)==4 );
202104 c.u = _byteswap_ulong(*(u32*)a); \
202110 c.u = __builtin_bswap32(*(u32*)a); \
202130 c.u = ((u32)a[0]<<24) + ((u32)a[1]<<16) \
202131 +((u32)a[2]<<8) + a[3]; \
202835 memset(pCsr->anQueue, 0, sizeof(u32)*(pRtree->iDepth + 1));
206748 memset(pCsr->anQueue, 0, sizeof(u32)*(pRtree->iDepth + 1));
209007 typedef unsigned int u32;
209035 u32 iCookie;
209143 u32 iDbPage;
209144 u32 iWalFrame;
209211 u32 iMaxFrame; /* Largest iWalFrame value in aFrame[] */
209212 u32 mLock;
209259 u32 iCookie; /* Cookie value for main db files */
211546 pRet->iCookie = (u32)sqlite3_column_int64(pStmt, 1);
211788 u32 volatile *ptr;
211898 const u32 mReq = (1<<WAL_LOCK_WRITE)|(1<<WAL_LOCK_CKPT)|(1<<WAL_LOCK_READ0);
211899 u32 iFrame;
211916 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
211930 pRbu->aFrame[pRbu->nFrame-1].iDbPage = (u32)(iOff / pRbu->pgsz) + 1;
212541 ((u32 volatile*)ptr)[24] = p->iMaxFrame;
212560 u32 iSector;
213418 static u32 rbuGetU32(u8 *aBuf){
213419 return ((u32)aBuf[0] << 24)
213420 + ((u32)aBuf[1] << 16)
213421 + ((u32)aBuf[2] << 8)
213422 + ((u32)aBuf[3]);
213429 static void rbuPutU32(u8 *aBuf, u32 iVal){
213480 u32 iRoot = rbuGetU32(&aBuf[52]) ? 1 : 0;
214278 u32 iChildPg; /* Child node (or 0 if this is a leaf) */
214280 u32 *aOvfl; /* Array of overflow page numbers */
214287 u32 iPgno; /* Page number */
214297 u32 iRightChildPg; /* Right-child page number (or 0) */
214313 u32 iPageno; /* Value of 'pageno' column */
214639 u32 nPayload; /* Bytes of payload total (local+overflow) */
214646 if( nPayload>(u32)p->nMxPayload ) p->nMxPayload = nPayload;
214650 assert( nPayload>=(u32)nLocal );
214652 if( nPayload>(u32)nLocal ){
214660 pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
214665 u32 iPrev = pCell->aOvfl[j-1];
214721 u32 iPg, /* Page number to load */
214770 u32 iRoot = (u32)sqlite3_column_int64(pCsr->pStmt, 1);
215843 #define SESSION_UINT32(x) (((u32)(x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])
215851 u32 y = SESSION_UINT32(aRec+4);
219280 u32 *aMask;
219293 u32 *aUpdateMask; /* Used by sessionUpdateFind */
219326 p->aUpdateMask = sqlite3_malloc(nU32*sizeof(u32));
219333 memset(p->aUpdateMask, 0, nU32*sizeof(u32));
219351 if( 0==memcmp(p->aUpdateMask, (*pp)->aMask, nU32*sizeof(u32)) ){
219373 int nByte = sizeof(SessionUpdate) * nU32*sizeof(u32);
219383 pUp->aMask = (u32*)&pUp[1];
219384 memcpy(pUp->aMask, p->aUpdateMask, nU32*sizeof(u32));
221956 typedef unsigned int u32;
222206 static int sqlite3Fts5BufferSize(int*, Fts5Buffer*, u32);
222208 static void sqlite3Fts5BufferAppendBlob(int*, Fts5Buffer*, u32, const u8*);
222224 (u32)((pBuf)->n) + (u32)(nn) <= (u32)((pBuf)->nSpace) ? 0 : \
222464 static int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v);
222465 static int sqlite3Fts5GetVarintLen(u32 iVal);
222469 #define fts5GetVarint32(a,b) sqlite3Fts5GetVarint32(a,(u32*)&b)
222780 static int sqlite3Fts5UnicodeCategory(u32 iCode);
225015 static int sqlite3Fts5BufferSize(int *pRc, Fts5Buffer *pBuf, u32 nByte){
225016 if( (u32)pBuf->nSpace<nByte ){
225052 return (int)((((u32)aBuf[0])<<24) + (aBuf[1]<<16) + (aBuf[2]<<8) + aBuf[3]);
225063 u32 nData,
225175 u32 iVal;
225353 u32 hash = 13;
225394 u32 i;
229135 sqlite3_result_int(pCtx, aArr[sqlite3Fts5UnicodeCategory((u32)iCode)]);
229659 int nByte = sqlite3Fts5GetVarintLen((u32)nPos);
232293 u32 iOff;
232295 u32 n = (u32)pIter->pLeaf->nn;
232297 u32 nMatch = 0;
232298 u32 nKeep = 0;
232299 u32 nNew = 0;
232300 u32 iTermOff;
232301 u32 iPgidx; /* Current offset in pgidx */
232306 iPgidx = (u32)pIter->pLeaf->szLeaf;
232324 u32 nCmp;
232325 u32 i;
232326 nCmp = (u32)MIN(nNew, nTerm-nMatch);
232332 if( (u32)nTerm==nMatch ){
232372 iPgidx = (u32)pIter->pLeaf->szLeaf;
232380 n = (u32)pIter->pLeaf->nn;
233661 u32 aUsed[(FTS5_MAX_SEGMENT+31) / 32];
233664 u32 mask;
233670 aUsed[(iId-1) / 32] |= (u32)1 << ((iId-1) % 32);
233677 for(iSegid=0; mask & ((u32)1 << iSegid); iSegid++);
234559 u32 dummy;
241190 u32 iCode;
241202 if( (u32)aNew[i]>iCode ) break;
241357 p->aCategory[sqlite3Fts5UnicodeCategory((u32)iCode)]
241386 u32 iCode; /* non-ASCII codepoint read from input */
242253 u32 iCode;
243074 static int sqlite3Fts5UnicodeCategory(u32 iCode) {
243143 static int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v){
243144 u32 a,b;
243198 *v = ((u32)v64) & 0x7FFFFFFF;
243222 u32 a,b,s;
243454 static int sqlite3Fts5GetVarintLen(u32 iVal){
246110 u32 mDbFlagsBackup = db->mDbFlags;
246113 int (*xTraceBackup)(u32,void*,void*,void*) = db->trace.xV2;