Lines Matching defs:u32

14435 typedef UINT32_TYPE u32;           /* 4-byte unsigned integer */
14443 ** that can be stored in a u32 without loss of data. The value
14458 typedef u32 tRowcnt; /* 32-bit is the default */
14506 typedef u32 uptr;
14643 SQLITE_PRIVATE u32 sqlite3SelectTrace;
14660 SQLITE_PRIVATE u32 sqlite3WhereTrace;
14905 typedef u32 Pgno;
15002 SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int);
15078 SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager*);
15249 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
15250 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);
15442 SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor*, u32 offset, u32 amt, void*);
15443 SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor*, u32 *pAmt);
15444 SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor*);
15452 SQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor*, u32 offset, u32 amt, void*);
15453 SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);
15592 u32 *ai; /* Used when p4type is P4_INTARRAY */
15604 u32 cnt; /* Number of times this instruction was executed */
15608 u32 iSrcLine; /* Source-code line that generated this opcode
15997 SQLITE_PRIVATE void sqlite3VdbeReleaseRegisters(Parse*,int addr, int n, u32 mask, int);
16195 u32 pageHash; /* Hash of page content */
16862 u32 bDisable; /* Only operate the lookaside when zero */
16866 u32 nSlot; /* Number of lookaside slots allocated */
16867 u32 anStat[3]; /* 0: hits. 1: size misses. 2: full misses */
16974 u32 mDbFlags; /* flags recording internal state */
16978 u32 nSchemaLock; /* Do not reset the schema when non-zero */
16983 u32 dbOptFlags; /* Flags to enable/disable optimizations */
16998 u32 magic; /* Magic number for detect library misuse */
17024 int (*xV2)(u32,void*,void*,void*); /* V2 Trace function */
17250 u32 funcFlags; /* Some combination of SQLITE_FUNC_* */
17663 u32 nTabRef; /* Number of pointers to this Table */
17664 u32 tabFlags; /* Mask of TF_* values */
17855 u32 nRef; /* Number of references to this KeyInfo object */
18085 u32 selId; /* Select to which this AggInfo belongs */
18177 u32 flags; /* Various flags. EP_* See below */
18464 u32 nAlloc; /* Number of entries allocated in a[] below */
18635 u32 selFlags; /* Various SF_* values */
18637 u32 selId; /* Unique identifier number for this SELECT */
18838 u32 aColmask[2]; /* Masks of old.*, new.* columns accessed */
18936 u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */
18937 u32 oldmask; /* Mask of old.* columns referenced */
18938 u32 newmask; /* Mask of new.* columns referenced */
19185 u32 nAlloc; /* Amount of space allocated in zText */
19186 u32 mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
19187 u32 nChar; /* Length of the string so far */
19207 u32 mInitFlags; /* Flags controlling error messages */
19208 u32 nInitRow; /* Number of rows processed */
19249 u32 szPma; /* Maximum Sorter PMA size */
19280 u32 szSorterRef; /* Min size in bytes to use sorter-refs */
19765 SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*, u32);
19775 SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList*);
19779 SQLITE_PRIVATE int sqlite3InitOne(sqlite3*, int, char**, u32);
19828 SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32);
19829 SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec*, u32);
19830 SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec*, u32);
19831 SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec*, u32);
19832 SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec*, u32, void*);
19834 SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec*);
19893 Expr*,ExprList*,u32,Expr*);
19943 SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,u32 flags,const char*, const char*);
19944 SQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,u32 flags,SrcItem *);
19974 SQLITE_PRIVATE u32 sqlite3IsTrueOrFalse(const char*);
20053 SQLITE_PRIVATE u32 sqlite3TriggerColmask(Parse*,Trigger*,ExprList*,int,int,Table*,int);
20100 SQLITE_PRIVATE int sqlite3GetUInt32(const char*, u32*);
20106 SQLITE_PRIVATE u32 sqlite3Utf8Read(const u8**);
20128 SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *, u32 *);
20137 (u8)((*(A)<(u8)0x80)?((B)=(u32)*(A)),1:sqlite3GetVarint32((A),(u32 *)&(B)))
20139 B=(u32)*(A);if(B>=0x80)sqlite3GetVarint32((A),(u32*)&(B))
20141 (u8)(((u32)(B)<(u32)0x80)?(*(A)=(unsigned char)(B)),1:\
20468 SQLITE_PRIVATE u32 sqlite3FkOldmask(Parse*, Table*);
20520 SQLITE_PRIVATE int sqlite3FindInIndex(Parse *, Expr *, u32, int*, int*, int*);
20541 SQLITE_PRIVATE u32 sqlite3Get4byte(const u8*);
20542 SQLITE_PRIVATE void sqlite3Put4byte(u8*, u32);
20950 SQLITE_PRIVATE u32 sqlite3SelectTrace = 0;
20951 SQLITE_PRIVATE u32 sqlite3WhereTrace = 0;
21079 u32 *aAltMap; /* Mapping from table to index column numbers */
21085 u32 cacheStatus; /* Cache is valid if this matches Vdbe.cacheCtr */
21102 u32 iHdrOffset; /* Offset to next unparsed byte of the header */
21107 u32 *aOffset; /* Pointer to aType[nField] */
21109 u32 payloadSize; /* Total number of bytes in the record */
21110 u32 szRow; /* Byte available in aRow */
21118 u32 aType[1]; /* Type values record decode. MUST BE LAST */
21161 u32 iFrameMagic; /* magic number for sanity checking */
21203 u32 uTemp; /* Transient storage for serial_type in OP_MakeRecord */
21371 u32 iVdbeMagic; /* Magic number defining state of the SQL statement */
21374 u32 cacheCtr; /* VdbeCursor row cache generation counter */
21403 u32 nWrite; /* Number of write operations that have occurred */
21419 u32 aCounter[7]; /* Counters used by sqlite3_stmt_status() */
21429 u32 expmask; /* Binding to these vars invalidates VM */
21475 SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor**, u32*);
21477 SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32);
21479 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(unsigned char*, Mem*, u32);
21480 SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
21529 SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,u32,u32,Mem*);
21530 SQLITE_PRIVATE int sqlite3VdbeMemFromBtreeZeroOffset(BtCursor*,u32,Mem*);
21621 typedef u32 sqlite3StatValueType;
21772 static u32 countLookasideSlots(LookasideSlot *p){
21773 u32 cnt = 0;
21785 u32 nInit = countLookasideSlots(db->lookaside.pInit);
21786 u32 nFree = countLookasideSlots(db->lookaside.pFree);
24747 u32 prevSize; /* Size of previous chunk in Mem3Block elements */
24748 u32 size4x; /* 4x the size of current chunk in Mem3Block elements */
24751 u32 next; /* Index in mem3.aPool[] of next free chunk */
24752 u32 prev; /* Index in mem3.aPool[] of previous free chunk */
24768 u32 nPool;
24784 u32 mnKeyBlk;
24792 u32 iKeyBlk;
24793 u32 szKeyBlk;
24800 u32 aiSmall[MX_SMALL-1]; /* For sizes 2 through MX_SMALL, inclusive */
24801 u32 aiHash[N_HASH]; /* For sizes MX_SMALL+1 and larger */
24810 static void memsys3UnlinkFromList(u32 i, u32 *pRoot){
24811 u32 next = mem3.aPool[i].u.list.next;
24812 u32 prev = mem3.aPool[i].u.list.prev;
24830 static void memsys3Unlink(u32 i){
24831 u32 size, hash;
24850 static void memsys3LinkIntoList(u32 i, u32 *pRoot){
24864 static void memsys3Link(u32 i){
24865 u32 size, hash;
24915 static void *memsys3Checkout(u32 i, u32 nBlock){
24916 u32 x;
24933 static void *memsys3FromKeyBlk(u32 nBlock){
24945 u32 newi, x;
24978 static void memsys3Merge(u32 *pRoot){
24979 u32 iNext, prev, size, i, x;
25018 u32 i;
25019 u32 nBlock;
25020 u32 toFree;
25102 u32 size, x;
25255 u32 i, j;
25256 u32 size;
25465 u32 currentOut; /* Current checkout, including internal fragmentation */
25466 u32 currentCount; /* Current number of distinct checkouts */
25467 u32 maxOut; /* Maximum instantaneous currentOut */
25468 u32 maxCount; /* Maximum instantaneous currentCount */
25469 u32 maxRequest; /* Largest allocation (exclusive of internal frag) */
25588 if( (u32)nByte>mem5.maxRequest ){
25644 u32 size, iLogsize;
25659 assert( iBlock+size-1<(u32)mem5.nBlock );
31093 SQLITE_PRIVATE u32 sqlite3Utf8Read(
31395 u32 c;
32312 u32 u = 0;
32368 SQLITE_PRIVATE int sqlite3GetUInt32(const char *z, u32 *pI){
32376 *pI = (u32)v;
32464 u32 a,b,s;
32471 *v = ((u32)(p[0]&0x7f)<<7) | p[1];
32479 a = ((u32)p[0])<<14;
32624 SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
32625 u32 a,b;
32687 *v = (u32)v64;
32736 *v = (u32)v64;
32756 SQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){
32758 u32 x;
32762 u32 x;
32766 u32 x;
32774 SQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){
32778 u32 x = __builtin_bswap32(v);
32781 u32 x = _byteswap_ulong(v);
32859 u32 magic;
32876 u32 magic;
34218 #define F2FS_IOC_GET_FEATURES _IOR(F2FS_IOCTL_MAGIC, 12, u32)
37950 u32 f = 0;
38455 (u32)sStat.st_ino, (u32)sStat.st_dev);
42530 u32 magic1; /* Magic number to detect structure corruption. */
42535 u32 magic2; /* Magic number to detect structure corruption. */
48948 (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))
48962 /* Number of u32 values in hash table. */
48963 #define BITVEC_NINT (BITVEC_USIZE/sizeof(u32))
48998 u32 iSize; /* Maximum bit index. Max iSize is 4,294,967,296. */
48999 u32 nSet; /* Number of bits that are set - only valid for aHash
49002 u32 iDivisor; /* Number of bits handled by each apSub[] entry. */
49004 /* Max iDivisor is max(u32) / BITVEC_NPTR + 1. */
49008 u32 aHash[BITVEC_NINT]; /* Hash table representation */
49018 SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32 iSize){
49033 SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){
49038 u32 bin = i/p->iDivisor;
49048 u32 h = BITVEC_HASH(i++);
49056 SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){
49072 SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){
49073 u32 h;
49079 u32 bin = i/p->iDivisor;
49116 u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
49143 SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
49148 u32 bin = i/p->iDivisor;
49159 u32 *aiValues = pBuf;
49165 u32 h = BITVEC_HASH(aiValues[j]-1);
49195 SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec *p){
52087 SQLITE_PRIVATE int sqlite3WalFindFrame(Wal *, Pgno, u32 *);
52088 SQLITE_PRIVATE int sqlite3WalReadFrame(Wal *, u32, int, u8 *);
52102 SQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData);
52106 SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData);
52587 u32 aWalData[WAL_SAVEPOINT_NDATA]; /* WAL savepoint context */
52804 u32 cksumInit; /* Quasi-random value added to every checksum */
52805 u32 nSubRec; /* Number of records written to sub-journal */
52815 u32 iDataVersion; /* Changes whenever database content changes */
52827 u32 vfsFlags; /* Flags for sqlite3_vfs.xOpen() */
52828 u32 sectorSize; /* Assumed sector size during rollback */
52965 u32 iRead = 0;
53246 static int read32bits(sqlite3_file *fd, i64 offset, u32 *pRes){
53265 static int write32bits(sqlite3_file *fd, i64 offset, u32 val){
53387 static u32 pager_datahash(int nByte, unsigned char *pData){
53388 u32 hash = 0;
53395 static u32 pager_pagehash(PgHdr *pPage){
53446 static int readSuperJournal(sqlite3_file *pJrnl, char *zSuper, u32 nSuper){
53448 u32 len; /* Length in bytes of super-journal name */
53450 u32 cksum; /* MJ checksum value read from journal */
53451 u32 u; /* Unsigned loop counter */
53588 u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */
53589 u32 nWrite; /* Bytes of header sector written */
53707 u32 *pNRec, /* OUT: Value read from the nRec field */
53708 u32 *pDbSize /* OUT: Value of original database size field */
53753 u32 iPageSize; /* Page-size field of journal header */
53754 u32 iSectorSize; /* Sector-size field of journal header */
53833 u32 cksum = 0; /* Checksum of string zSuper */
53905 SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager *pPager){
54337 static u32 pager_cksum(Pager *pPager, const u8 *aData){
54338 u32 cksum = pPager->cksumInit; /* Checksum value to return */
54394 u32 cksum; /* Checksum used for sanity checking */
54895 u32 nRec; /* Number of Records in the journal */
54896 u32 u; /* Unsigned loop counter */
54903 u32 savedPageSize = pPager->pageSize;
55114 u32 iFrame = 0; /* Frame of WAL containing pgno */
55173 u32 change_counter;
55552 u32 ii; /* Loop counter */
55553 u32 nJRec = 0; /* Number of Journal Records */
55554 u32 dummy;
55566 nJRec = (u32)((szJ - pPager->journalOff)/JOURNAL_PG_SZ(pPager));
55580 u32 ii; /* Loop counter */
55843 SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nReserve){
55856 u32 pageSize = *pPageSize;
55860 && pageSize && pageSize!=(u32)pPager->pageSize
56825 u32 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE; /* Default page size */
57040 szPageDflt = (u32)pPager->sectorSize;
57723 u32 iFrame = 0; /* Frame to read from WAL file */
58051 u32 cksum;
58301 }else if( pPager->sectorSize > (u32)pPager->pageSize ){
60177 u32 iVersion; /* Wal-index version */
60178 u32 unused; /* Unused (padding) field */
60179 u32 iChange; /* Counter incremented each transaction */
60183 u32 mxFrame; /* Index of last valid frame in the WAL */
60184 u32 nPage; /* Size of database in pages */
60185 u32 aFrameCksum[2]; /* Checksum of last frame in log */
60186 u32 aSalt[2]; /* Two salt values copied from WAL header */
60187 u32 aCksum[2]; /* Checksum over all prior fields */
60250 u32 nBackfill; /* Number of WAL frames backfilled into DB */
60251 u32 aReadMark[WAL_NREADER]; /* Reader marks */
60253 u32 nBackfillAttempted; /* WAL frames perhaps written, or maybe not */
60254 u32 notUsed0; /* Available for future enhancements */
60301 u32 iCallback; /* Value to pass to log callback (or 0) */
60305 volatile u32 **apWiData; /* Pointer to wal-index content in memory */
60306 u32 szPage; /* Database page size */
60318 u32 minFrame; /* Ignore wal frames before this one */
60319 u32 iReCksum; /* On commit, recalculate checksums from here */
60321 u32 nCkpt; /* Checkpoint sequence counter in the wal-header */
60369 u32 iPrior; /* Last result returned from the iterator */
60374 u32 *aPgno; /* Array of page numbers. */
60397 #define HASHTABLE_NPAGE_ONE (HASHTABLE_NPAGE - (WALINDEX_HDR_SIZE/sizeof(u32)))
60401 sizeof(ht_slot)*HASHTABLE_NSLOT + HASHTABLE_NPAGE*sizeof(u32) \
60421 volatile u32 **ppPage /* Write the page pointer here */
60427 sqlite3_int64 nByte = sizeof(u32*)*(iPage+1);
60428 volatile u32 **apNew;
60429 apNew = (volatile u32 **)sqlite3Realloc((void *)pWal->apWiData, nByte);
60435 sizeof(u32*)*(iPage+1-pWal->nWiData));
60443 pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ);
60468 volatile u32 **ppPage /* Write the page pointer here */
60493 ** The argument to this macro must be of type u32. On a little-endian
60494 ** architecture, it returns the u32 value that results from interpreting
60517 const u32 *aIn, /* Initial checksum value input */
60518 u32 *aOut /* OUT: Final checksum value output */
60520 u32 s1, s2;
60521 u32 *aData = (u32 *)a;
60522 u32 *aEnd = (u32 *)&a[nByte];
60609 u32 iPage, /* Database page number for frame */
60610 u32 nTruncate, /* New db size (or 0 for non-commit frames) */
60615 u32 *aCksum = pWal->hdr.aFrameCksum;
60640 u32 *piPage, /* OUT: Database page number for frame */
60641 u32 *pnTruncate, /* OUT: New db size (or 0 if not commit) */
60646 u32 *aCksum = pWal->hdr.aFrameCksum;
60647 u32 pgno; /* Page number of the frame */
60756 static int walHash(u32 iPage){
60773 volatile u32 *aPgno; /* aPgno[1] is the page of first frame indexed */
60774 u32 iZero; /* One less than the frame number of first indexed*/
60804 pLoc->aPgno = &pLoc->aPgno[WALINDEX_HDR_SIZE/sizeof(u32)];
60820 static int walFramePage(u32 iFrame){
60835 static u32 walFramePgno(Wal *pWal, u32 iFrame){
60838 return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
60917 static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
61010 u32 aFrameCksum[2] = {0, 0};
61040 u32 *aPrivate = 0; /* Heap copy of *-shm hash being populated */
61045 u32 magic; /* Magic value read from WAL header */
61046 u32 version; /* Magic value read from WAL header */
61048 u32 iPg; /* Current 32KB wal-index page */
61049 u32 iLastFrame; /* Last frame in wal, based on nSize alone */
61102 aPrivate = (u32*)&aData[szPage];
61106 for(iPg=0; iPg<=(u32)walFramePage(iLastFrame); iPg++){
61107 u32 *aShare;
61108 u32 iFrame; /* Index of last frame read */
61109 u32 iLast = MIN(iLastFrame, HASHTABLE_NPAGE_ONE+iPg*HASHTABLE_NPAGE);
61110 u32 iFirst = 1 + (iPg==0?0:HASHTABLE_NPAGE_ONE+(iPg-1)*HASHTABLE_NPAGE);
61111 u32 nHdr, nHdr32;
61112 rc = walIndexPage(pWal, iPg, (volatile u32**)&aShare);
61118 u32 pgno; /* Database page number for frame */
61119 u32 nTruncate; /* dbsize field from frame header */
61142 nHdr32 = nHdr / sizeof(u32);
61161 for(i=nHdr32; i<WALINDEX_PGSZ/sizeof(u32); i++){
61347 u32 *piPage, /* OUT: The page number of the next page */
61348 u32 *piFrame /* OUT: Wal frame index of next page */
61350 u32 iMin; /* Result pgno must be greater than iMin */
61351 u32 iRet = 0xFFFFFFFF; /* 0xffffffff is never a valid page number */
61359 u32 iPg = pSegment->aPgno[pSegment->aIndex[pSegment->iNext]];
61399 const u32 *aContent, /* Pages in wal - keys for the sort */
61456 const u32 *aContent, /* Pages in wal */
61470 u32 iSub = 0; /* Index into aSub array */
61535 static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){
61538 u32 iLast; /* Last frame in log */
61585 nEntry = (int)((u32*)sLoc.aHash - (u32*)sLoc.aPgno);
61593 walMergesort((u32 *)sLoc.aPgno, aTmp, aIndex, &nEntry);
61597 p->aSegment[i].aPgno = (u32 *)sLoc.aPgno;
61744 static void walRestartHdr(Wal *pWal, u32 salt1){
61747 u32 *aSalt = pWal->hdr.aSalt; /* Big-endian salt values */
61803 u32 iDbpage = 0; /* Next database page to write */
61804 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
61805 u32 mxSafeFrame; /* Max frame that can be backfilled */
61806 u32 mxPage; /* Max database page to write */
61828 u32 y = AtomicLoad(pInfo->aReadMark+i);
61833 u32 iMark = (i==1 ? mxSafeFrame : READMARK_NOT_USED);
61854 u32 nBackfill = pInfo->nBackfill;
61941 u32 salt1;
62076 u32 aCksum[2]; /* Checksum on the header content */
62148 volatile u32 *page0; /* Chunk of wal-index containing header */
62278 u32 aSaveCksum[2]; /* Saved copy of pWal->hdr.aFrameCksum */
62380 u32 pgno; /* Database page number for frame */
62381 u32 nTruncate; /* dbsize field from frame header */
62466 u32 mxReadMark; /* Largest aReadMark[] value */
62470 u32 mxFrame; /* Wal frame to lock to */
62594 u32 thisMark = AtomicLoad(pInfo->aReadMark+i);
62711 u32 i = pInfo->nBackfillAttempted;
62714 u32 pgno; /* Page number in db file */
62891 u32 *piRead /* OUT: Frame number (or zero) */
62893 u32 iRead = 0; /* If !=0, WAL frame to return data from */
62894 u32 iLast = pWal->hdr.mxFrame; /* Last page in WAL for this reader */
62943 u32 iH;
62952 u32 iFrame = iH + sLoc.iZero;
62970 u32 iRead2 = 0;
62971 u32 iTest;
62994 u32 iRead, /* Frame to read */
63138 ** Argument aWalData must point to an array of WAL_SAVEPOINT_NDATA u32
63143 SQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData){
63154 ** of WAL_SAVEPOINT_NDATA u32 values that has been previously populated
63157 SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){
63202 u32 salt1;
63308 static int walRewriteChecksums(Wal *pWal, u32 iLast){
63313 u32 iRead; /* Next frame to read from wal file */
63330 rc = sqlite3OsRead(pWal->pWalFd, aBuf, sizeof(u32)*2, iCksumOff);
63332 pWal->hdr.aFrameCksum[1] = sqlite3Get4byte(&aBuf[sizeof(u32)]);
63340 u32 iPgno, nDbSize;
63366 u32 iFrame; /* Next frame address */
63373 u32 iFirst = 0; /* First frame that may be overwritten */
63409 u32 aCksum[2]; /* Checksum for wal-header */
63465 u32 iWrite = 0;
63721 u32 ret = 0;
63807 static const u32 aZero[4] = { 0, 0, 0, 0 };
64283 u32 iBDataVersion; /* Combines with pBt->pPager->iDataVersion */
64373 u32 pageSize; /* Total number of bytes on a page */
64374 u32 usableSize; /* Number of usable bytes on each page */
64376 u32 nPage; /* Number of pages in the database */
64412 u32 nPayload; /* Bytes of payload */
64635 u32 *heap; /* Min-heap used for analyzing cell coverage */
66157 u32 nPayload; /* Number of bytes of cell payload */
66225 u32 nPayload; /* Number of bytes of cell payload */
66279 u32 nSize; /* Size value to return */
66309 nSize += (u32)(pIter - pCell);
66700 u32 iEnd = iStart + iSize; /* First byte past the iStart buffer */
66889 u32 next, size;
67455 assert( sizeof(u32)==4 );
67865 pBt->pageSize = (u32)pageSize;
68054 u32 nPage; /* Number of pages in the database */
68055 u32 nPageFile = 0; /* Number of pages in the database file */
68056 u32 nPageHeader; /* Number of pages in the database according to hdr */
68077 u32 pageSize;
68078 u32 usableSize;
68160 if( (u32)pageSize!=pBt->pageSize ){
69616 SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor *pCur){
69781 u32 offset, /* Begin reading this far into payload */
69782 u32 amt, /* Read this many bytes */
69831 const u32 ovflSize = pBt->usableSize - 4; /* Bytes content per ovfl page */
69981 SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
69997 u32 offset,
69998 u32 amt,
70009 SQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
70040 u32 *pAmt /* Write the number of available bytes here */
70058 *pAmt = (u32)amt;
70077 SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor *pCur, u32 *pAmt){
70091 static int moveToChild(BtCursor *pCur, u32 newPgno){
70922 u32 n; /* Number of pages on the freelist */
70923 u32 k; /* Number of leaves on the trunk of the freelist */
70943 u32 nSearch = 0; /* Count of the number of search attempts */
71020 }else if( k>(u32)(pBt->usableSize/4 - 2) ){
71089 u32 closest;
71093 u32 i;
71241 u32 nFree; /* Initial number of pages on free-list */
71291 u32 nLeaf; /* Initial number of leaf cells on trunk page */
71305 if( nLeaf > (u32)pBt->usableSize/4 - 2 ){
71309 if( nLeaf < (u32)pBt->usableSize/4 - 8 ){
71388 u32 ovflPageSize;
71653 u32 pc; /* Offset to cell content of cell being deleted */
71951 u32 j; /* Start of cell content area */
71961 if( NEVER(j>(u32)usableSize) ){ j = 0; }
73246 u32 key = get4byte(&apNew[i]->aData[8]);
73564 u32 ovflPageSize; /* Size to write on overflow page */
73590 if( iOffset+ovflPageSize<(u32)nTotal ){
73715 && pCur->info.nPayload==(u32)pX->nData+pX->nZero
73939 u32 nIn; /* Size of input buffer aIn[] */
73940 u32 nRem; /* Bytes of data still to copy */
73960 u32 nOut; /* Size of output buffer aOut[] */
74614 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
74644 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
74858 u32 N /* Expected number of pages in the list */
74861 u32 expected = N;
74874 u32 n = (u32)get4byte(&pOvflData[4]);
74938 ** This heap is used for cell overlap and coverage testing. Each u32
74943 static void btreeHeapInsert(u32 *aHeap, u32 x){
74944 u32 j, i = ++aHeap[0];
74953 static int btreeHeapPull(u32 *aHeap, u32 *pOut){
74954 u32 j, i, x;
75009 u32 pc; /* Address of a cell */
75010 u32 usableSize; /* Usable size of the page */
75011 u32 contentOffset; /* Offset to the start of the cell content area */
75012 u32 *heap = 0; /* Min-heap used for checking cell coverage */
75013 u32 x, prev = 0; /* Next and previous entry on the min-heap */
75120 u32 nPage; /* Number of pages on the overflow chain */
75165 u32 size;
75180 assert( (u32)i<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
75182 assert( (u32)(i+size)<=usableSize ); /* due to btreeComputeFreeSpace() */
75183 btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
75192 assert( (u32)j<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
75318 sCheck.heap = (u32*)sqlite3PageMalloc( pBt->pageSize );
75565 SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
75719 u32 iDestSchema; /* Original schema cookie in destination */
77578 u32 nAlloc = nByte;
77647 u32 offset, /* Offset from the start of data to return bytes from. */
77648 u32 amt, /* Number of bytes to return. */
77670 u32 amt, /* Number of bytes to return. */
77673 u32 available = 0; /* Number of bytes available on the local btree page */
78276 u32 t = 0; /* a column type code */
79613 u32 mask, /* Mask of registers to NOT release */
80095 u32 i;
80096 u32 *ai = pOp->p4.ai;
80097 u32 n = ai[0]; /* The first element of an INTARRAY is always the
81135 u32 iRandom;
81939 SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor **pp, u32 *piCol){
81943 u32 iMap;
82012 SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format, u32 *pLen){
82014 u32 n;
82036 return 8+(u32)u;
82064 n = (u32)pMem->n;
82096 SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32 serial_type){
82148 u32 i[2];
82150 u32 t;
82176 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(u8 *buf, Mem *pMem, u32 serial_type){
82177 u32 len;
82182 u32 i;
82218 #define FOUR_BYTE_UINT(x) (((u32)(x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])
82230 static u32 serialGet(
82232 u32 serial_type, /* Serial type to deserialize */
82236 u32 y = FOUR_BYTE_UINT(buf+4);
82266 SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(
82268 u32 serial_type, /* Serial type to deserialize */
82398 u32 d;
82399 u32 idx; /* Offset in aKey[] to read from */
82401 u32 szHdr;
82409 while( idx<szHdr && d<=(u32)nKey ){
82410 u32 serial_type;
82422 if( d>(u32)nKey && u ){
82450 u32 d1; /* Offset into aKey[] of next data element */
82451 u32 idx1; /* Offset into aKey[] of next header element */
82452 u32 szHdr1; /* Number of bytes in header */
82483 u32 serial_type1;
82561 u32 szHdr;
82562 u32 idx;
82563 u32 notUsed;
82569 assert( szHdr<=(u32)nKey );
82801 static i64 vdbeRecordDecodeInt(u32 serial_type, const u8 *aKey){
82802 u32 y;
82861 u32 d1; /* Offset into aKey[] of next data element */
82863 u32 szHdr1; /* Size of record header in bytes */
82864 u32 idx1; /* Offset of first type in header */
82875 u32 s1;
82898 u32 serial_type;
83077 u32 y;
83176 sqlite3GetVarint32(&aKey1[1], (u32*)&serial_type);
83282 u32 szHdr; /* Size of the header */
83283 u32 typeRowid; /* Serial type of the rowid */
83284 u32 lenRowid; /* Size of the rowid */
83298 rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);
83328 testcase( (u32)m.n==szHdr+lenRowid );
83329 if( unlikely((u32)m.n<szHdr+lenRowid) ){
83380 rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);
83482 v->expmask |= ((u32)1 << (iVar-1));
84665 /* .uTemp = */ (u32)0,
84991 if( p->expmask!=0 && (p->expmask & (i>=31 ? 0x80000000 : (u32)1<<i))!=0 ){
85349 u32 v;
85469 u32 nRec;
86059 static void vdbeTakeBranch(u32 iSrcLine, u8 I, u8 M){
86148 ROUND8(sizeof(VdbeCursor)) + 2*sizeof(u32)*nField +
86165 &pMem->z[ROUND8(sizeof(VdbeCursor))+2*sizeof(u32)*nField];
86654 u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
88209 u32 idx;
88212 u32 *aPermute; /* The permutation */
88232 for(k=0; k<n; k++) if( aPermute[k]>(u32)mx ) mx = aPermute[k];
88241 idx = aPermute ? aPermute[i] : (u32)i;
88407 u32 iAddr; /* Address of this instruction */
88552 u32 p2; /* column number to retrieve */
88555 u32 *aOffset; /* aOffset[i] is offset to start of data for i-th column */
88564 u32 t; /* A type code from the record header */
88570 p2 = (u32)pOp->p2;
88582 assert( p2<(u32)pC->nField );
88612 if( pC->payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
88696 aOffset[++i] = (u32)(offset64 & 0xffffffff);
88697 }while( (u32)i<=p2 && zHdr<zEndHdr );
88717 pC->iHdrOffset = (u32)(zHdr - zData);
88900 u32 serial_type; /* Type field */
88906 u32 len; /* Length of a field */
89037 pRec->uTemp = 8+(u32)uu;
89075 len = (u32)pRec->n;
89584 sqlite3BtreeGetMeta(db->aDb[iDb].pBt, iCookie, (u32 *)&iMeta);
89723 u32 p2;
89733 if( pCur && pCur->pgnoRoot==(u32)pOp->p2 ){
89754 p2 = (u32)pOp->p2;
89773 assert( p2<=(u32)(p->nMem+1 - p->nCursor) );
91375 u32 n;
91400 if( n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
92085 rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);
92192 db->aDb[pOp->p2].pBt, (u32)pOp->p1, (pOp->p3 ? &nChange : 0)
94086 u32 constMask;
94314 u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;
94614 int (*xCall)(BtCursor*, u32, u32, void*)
95741 u32 szPma = sqlite3GlobalConfig.szPma;
99081 pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
99085 pParse->newmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
101700 SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr, u32 n){
101710 assert( n==(u32)sqlite3Strlen30(z) );
101958 u32 staticFlag; /* EP_Static if space not obtained from malloc */
101993 u32 nSize = (u32)exprStructSize(p);
102563 SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList *pList){
102565 u32 m = 0;
102596 SQLITE_PRIVATE u32 sqlite3IsTrueOrFalse(const char *zIn){
102609 u32 v;
103209 u32 inFlags, /* IN_INDEX_LOOP, _MEMBERSHIP, and/or _NOOP_OK */
103394 u32 savedNQueryLoop = pParse->nQueryLoop;
104823 u32 constMask = 0; /* Mask of function arguments that are constant */
105921 u32 combinedFlags;
106883 u32 savedDbFlags; /* Saved value of db->mDbFlags */
107156 u32 savedDbFlags = db->mDbFlags;
107922 u32 nReplace;
108956 u32 aRoot[ArraySize(aTable)];
108985 aRoot[i] = (u32)pParse->regRoot;
109042 u32 nRowid; /* Sizeof aRowid[] */
109045 u32 iHash; /* Tiebreaker hash */
109060 u32 iPrn; /* Pseudo-random number used for sampling */
109229 p->iPrn = 0x689e962d*(u32)nCol ^ 0xd0944565*(u32)sqlite3_value_int(argv[2]);
111999 u32 flags, /* LOCATE_VIEW or LOCATE_NOERR */
112059 u32 flags,
113054 u32 h = 0;
114053 u32 colFlags = p->aCol[ii].colFlags;
116037 if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){
118176 u32 mask; /* Mask of OLD.* columns in use */
119107 u32 matchOther /* The escape char (LIKE) or '[' (GLOB) */
119109 u32 c, c2; /* Next pattern and input string chars */
119110 u32 matchOne = pInfo->matchOne; /* "?" or "_" */
119111 u32 matchAll = pInfo->matchAll; /* "*" or "%" */
119188 u32 prior_c = 0;
119276 u32 escape;
121780 #define COLUMN_MASK(x) (((x)>31) ? 0xffffffff : ((u32)1<<(x)))
121786 SQLITE_PRIVATE u32 sqlite3FkOldmask(
121790 u32 mask = 0;
123229 u32 colFlags;
126736 u32 nExt; /* Number of entries in aExt[] */
126771 u32 i;
126855 u32 i;
127858 static const u32 mask =
129629 u32 opMask; /* Mask of operations to perform */
129632 opMask = (u32)sqlite3Atoi(zRight);
130211 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
130334 SQLITE_PRIVATE int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFlags){
130423 sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);
130651 sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);
130778 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
130918 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
131061 u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
131287 u32 selFlags, /* Flag parameters, such as SF_Distinct */
133134 u32 cnt; /* Index added to make the name unique */
134370 u32 *aPermute; /* Mapping from ORDER BY terms to result set columns */
134419 aPermute = sqlite3DbMallocRawNN(db, sizeof(u32)*(nOrderBy + 1));
136357 u32 elistFlags = 0;
138351 u32 nAlloc; /* Slots allocated for azResult[] */
138352 u32 nRow; /* Number of rows in the result */
138353 u32 nColumn; /* Number of columns in the result */
138354 u32 nData; /* Slots used in azResult[]. (nRow+1)*nColumn */
139888 SQLITE_PRIVATE u32 sqlite3TriggerColmask(
139898 u32 mask = 0;
140791 u32 oldmask = (hasFK ? sqlite3FkOldmask(pParse, pTab) : 0);
140796 u32 colFlags = pTab->aCol[i].colFlags;
141719 u32 saved_mDbFlags; /* Saved value of db->mDbFlags */
141723 u32 saved_openFlags; /* Saved value of db->openFlags */
141892 u32 meta;
143382 u32 iLikeRepCntr; /* LIKE range processing counter register (times 2) */
143449 u32 wsFlags; /* WHERE_* flags describing the plan */
143616 u32 opMask; /* Acceptable operators */
143819 u32 op, /* Mask of WO_xx values describing operator */
144044 u32 flags; /* Flags that describe this loop */
144972 u32 *ai = (u32*)sqlite3DbMallocZero(pParse->db, sizeof(u32)*(pTab->nCol+1));
145597 pLevel->iLikeRepCntr = (u32)++pParse->nMem;
146299 u32 x = pLevel->iLikeRepCntr;
148697 u32 opMask, /* Operator(s) to scan for */
148761 u32 op, /* Mask of WO_xx values describing operator */
149161 assert( (u32)n==pLoop->u.btree.nEq );
149926 (u32)iLower, (u32)iUpper, nOut));
150773 u32 saved_wsFlags; /* Original value of pNew->wsFlags */
152785 u32 wsFlags = pFrom->aLoop[nLoop-1]->wsFlags;
154900 u32 selFlags = p->selFlags;
161249 u32 n = yymsp[0].minor.yy0.n;
163559 u32 j; /* Bytes of normalized SQL generated so far */
163603 assert( pStr->nChar>=(u32)iStartIN );
164771 sqlite3GlobalConfig.szSorterRef = (u32)iVal;
164992 u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
165931 if( p && (p->funcFlags & SQLITE_FUNC_ENCMASK)==(u32)enc && p->nArg==nArg ){
168140 db->dbOptFlags = va_arg(ap, u32);
168317 ** "ptr" is a pointer to a u32.
168326 u32 *ptr = va_arg(ap, u32*);
169812 typedef unsigned int u32; /* 4-byte unsigned integer */
169886 u32 nLeafAdd; /* Number of leaf blocks added this trans */
170112 u32 *aMI; /* See above */
170232 SQLITE_PRIVATE int sqlite3Fts3EvalPhraseStats(Fts3Cursor *, Fts3Expr *, u32 *);
170362 u32 a;
170422 u32 a;
170435 *pi = (int)(a | ((u32)(*ptr & 0x07) << 28));
173542 const u32 nMinMerge = 64; /* Minimum amount of incr-merge work to do */
175797 pE->aMI = (u32 *)sqlite3_malloc64(pTab->nColumn * 3 * sizeof(u32));
175799 memset(pE->aMI, 0, pTab->nColumn * 3 * sizeof(u32));
175883 u32 *aiOut /* Array to write results into (see above) */
175892 aiOut[iCol*3 + 1] = (u32)pCsr->nDoc;
175893 aiOut[iCol*3 + 2] = (u32)pCsr->nDoc;
181018 u32 *pnWord /* IN/OUT: Incr. by number tokens inserted */
181149 u32 *aSz
181293 u32 *aSz, /* Sizes of deleted document written here */
183571 u32 *a, /* The integer values */
183587 u32 *a, /* Write the integer values */
183597 a[i] = (u32)(x & 0xffffffff);
183611 u32 *aSz /* Sizes of each column, in tokens */
183655 u32 *aSzIns, /* Size increases */
183656 u32 *aSzDel, /* Size decreases */
183661 u32 *a; /* Array of integers that becomes the BLOB */
183669 a = sqlite3_malloc64( (sizeof(u32)+10)*(sqlite3_int64)nStat );
183687 memset(a, 0, sizeof(u32)*(nStat) );
183695 if( nChng<0 && a[0]<(u32)(-nChng) ){
183701 u32 x = a[i+1];
183776 u32 *aSz = 0;
183777 u32 *aSzIns = 0;
183778 u32 *aSzDel = 0;
183792 sqlite3_int64 nByte = sizeof(u32) * ((sqlite3_int64)p->nColumn+1)*3;
183793 aSz = (u32 *)sqlite3_malloc64(nByte);
185816 u32 *aSzDel
185832 memset(aSzDel, 0, sizeof(u32) * (p->nColumn+1) * 2);
185869 u32 *aSzIns = 0; /* Sizes of inserted documents */
185870 u32 *aSzDel = 0; /* Sizes of deleted documents */
186119 u32 *aMatchinfo; /* Pre-allocated buffer */
186124 ** (nElem * sizeof(u32)) bytes in size. See the MatchinfoBuffer code below
186132 u32 aMatchinfo[1];
186158 sqlite3_int64 nByte = sizeof(u32) * (2*(sqlite3_int64)nElem + 1)
186167 + sizeof(u32)*((int)nElem+1);
186178 MatchinfoBuffer *pBuf = (MatchinfoBuffer*)((u8*)p - ((u32*)p)[-1]);
186180 assert( (u32*)p==&pBuf->aMatchinfo[1]
186181 || (u32*)p==&pBuf->aMatchinfo[pBuf->nElem+2]
186183 if( (u32*)p==&pBuf->aMatchinfo[1] ){
186194 static void (*fts3MIBufferAlloc(MatchinfoBuffer *p, u32 **paOut))(void*){
186196 u32 *aOut = 0;
186208 aOut = (u32*)sqlite3_malloc64(p->nElem * sizeof(u32));
186211 if( p->bGlobal ) memcpy(aOut, &p->aMatchinfo[1], p->nElem*sizeof(u32));
186221 memcpy(&p->aMatchinfo[2+p->nElem], &p->aMatchinfo[1], p->nElem*sizeof(u32));
186908 p->aMatchinfo[iStart + iCol] = (u32)nHit;
187278 pInfo->aMatchinfo[0] = (u32)nDoc;
187292 u32 iVal;
187299 iVal = (u32)(((u32)(nToken&0xffffffff)+nDoc/2)/nDoc);
187320 pInfo->aMatchinfo[iCol] = (u32)nToken;
187336 size_t nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);
187372 ** 'matchinfo' data is an array of 32-bit unsigned integers (C type u32).
187384 u32 *aOut = 0;
187405 size_t nMatchinfo = 0; /* Number of u32 elements in match-info */
187451 int n = pCsr->pMIBuffer->nElem * sizeof(u32);
188658 typedef unsigned int u32;
188719 u32 n; /* Bytes of content, or number of sub-nodes */
188722 u32 iAppend; /* More terms for ARRAY and OBJECT */
188723 u32 iKey; /* Key for ARRAY objects in json_tree() */
188724 u32 iReplace; /* Replacement content for JNODE_REPLACE */
188732 u32 nNode; /* Number of slots of aNode[] used */
188733 u32 nAlloc; /* Number of slots of aNode[] allocated */
188736 u32 *aUp; /* Index of parent of each node */
188741 u32 iHold; /* Replace cache line with the lowest iHold value */
188795 static int jsonGrow(JsonString *p, u32 N){
188822 static void jsonAppendRaw(JsonString *p, const char *zIn, u32 N){
188862 static void jsonAppendString(JsonString *p, const char *zIn, u32 N){
188863 u32 i;
188917 u32 n = (u32)sqlite3_value_bytes(pValue);
188923 u32 n = (u32)sqlite3_value_bytes(pValue);
188968 static u32 jsonNodeSize(JsonNode *pNode){
189037 u32 j = 1;
189055 u32 j = 1;
189110 static u32 jsonHexToInt4(const char *z){
189111 u32 v;
189199 u32 i;
189200 u32 n = pNode->n;
189203 u32 j;
189216 u32 v = jsonHexToInt4(z+i+1);
189225 u32 vlo;
189275 static int jsonParseAddNode(JsonParse*,u32,u32,const char*);
189292 u32 eType, /* Node type */
189293 u32 n, /* Content size or sub-node count */
189296 u32 nNew;
189319 u32 eType, /* Node type */
189320 u32 n, /* Content size or sub-node count */
189352 static int jsonParseValue(JsonParse *pParse, u32 i){
189354 u32 j;
189370 if( x==(-2) && pParse->nNode==(u32)iThis+1 ) return j+1;
189391 pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1;
189403 if( x==(-3) && pParse->nNode==(u32)iThis+1 ) return j+1;
189413 pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1;
189545 static void jsonParseFillInParentage(JsonParse *pParse, u32 i, u32 iParent){
189547 u32 j;
189573 u32 *aUp;
189575 aUp = pParse->aUp = sqlite3_malloc64( sizeof(u32)*pParse->nNode );
189609 u32 iMinHold = 0xffffffff;
189610 u32 iMaxHold = 0;
189660 static int jsonLabelCompare(JsonNode *pNode, const char *zKey, u32 nKey){
189684 u32 iRoot, /* Begin the search at this node */
189689 u32 i, j, nKey;
189731 u32 iStart, iLabel;
189805 u32 iStart;
189951 u32 i;
190055 u32 i;
190130 u32 iTarget, /* Node of the TARGET in pParse */
190133 u32 i, j;
190134 u32 iRoot;
190148 u32 nKey;
190238 u32 n;
190255 n = (u32)sqlite3_value_bytes(argv[i]);
190280 u32 i;
190285 for(i=1; i<(u32)argc; i++){
190313 u32 i;
190322 for(i=1; i<(u32)argc; i+=2){
190360 u32 i;
190371 for(i=1; i<(u32)argc; i+=2){
190558 u32 n;
190570 n = (u32)sqlite3_value_bytes(argv[0]);
190613 u32 iRowid; /* The rowid */
190614 u32 iBegin; /* The first node of the scan */
190615 u32 i; /* Index in sParse.aNode[] of current row */
190616 u32 iEnd; /* EOF when i equals or exceeds this value */
190731 u32 iUp = p->sParse.aUp[p->i];
190768 u32 i /* Path to this element */
190771 u32 iUp;
190805 u32 iKey;
191269 typedef unsigned int u32;
191341 u32 nBusy; /* Current number of users of this structure */
191343 u32 nCursor; /* Number of open cursors */
191344 u32 nNodeRef; /* Number RtreeNodes with positive nRef */
191471 u32 anQueue[RTREE_MAX_DEPTH+1]; /* Number of queued entries by iLevel */
191484 u32 u; /* Unsigned for byte-order conversions */
191585 u32 iSize; /* Size of this object */
191678 pCoord->u = _byteswap_ulong(*(u32*)p);
191680 pCoord->u = __builtin_bswap32(*(u32*)p);
191682 pCoord->u = *(u32*)p;
191685 (((u32)p[0]) << 24) +
191686 (((u32)p[1]) << 16) +
191687 (((u32)p[2]) << 8) +
191688 (((u32)p[3]) << 0)
191729 u32 i;
191732 assert( sizeof(u32)==4 );
192349 c.u = _byteswap_ulong(*(u32*)a); \
192355 c.u = __builtin_bswap32(*(u32*)a); \
192375 c.u = ((u32)a[0]<<24) + ((u32)a[1]<<16) \
192376 +((u32)a[2]<<8) + a[3]; \
193069 memset(pCsr->anQueue, 0, sizeof(u32)*(pRtree->iDepth + 1));
196961 memset(pCsr->anQueue, 0, sizeof(u32)*(pRtree->iDepth + 1));
199180 typedef unsigned int u32;
199208 u32 iCookie;
199316 u32 iDbPage;
199317 u32 iWalFrame;
199382 u32 iMaxFrame; /* Largest iWalFrame value in aFrame[] */
199383 u32 mLock;
199430 u32 iCookie; /* Cookie value for main db files */
201713 pRet->iCookie = (u32)sqlite3_column_int64(pStmt, 1);
201717 pRet->iOalSz = (u32)sqlite3_column_int64(pStmt, 1);
201949 u32 volatile *ptr;
202059 const u32 mReq = (1<<WAL_LOCK_WRITE)|(1<<WAL_LOCK_CKPT)|(1<<WAL_LOCK_READ0);
202060 u32 iFrame;
202077 iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
202091 pRbu->aFrame[pRbu->nFrame-1].iDbPage = (u32)(iOff / pRbu->pgsz) + 1;
202697 ((u32 volatile*)ptr)[24] = p->iMaxFrame;
202716 u32 iSector;
203518 static u32 rbuGetU32(u8 *aBuf){
203519 return ((u32)aBuf[0] << 24)
203520 + ((u32)aBuf[1] << 16)
203521 + ((u32)aBuf[2] << 8)
203522 + ((u32)aBuf[3]);
203529 static void rbuPutU32(u8 *aBuf, u32 iVal){
203580 u32 iRoot = rbuGetU32(&aBuf[52]) ? 1 : 0;
204383 u32 iChildPg; /* Child node (or 0 if this is a leaf) */
204385 u32 *aOvfl; /* Array of overflow page numbers */
204392 u32 iPgno; /* Page number */
204403 u32 iRightChildPg; /* Right-child page number (or 0) */
204419 u32 iPageno; /* Value of 'pageno' column */
204738 u32 nPayload; /* Bytes of payload total (local+overflow) */
204745 if( nPayload>(u32)p->nMxPayload ) p->nMxPayload = nPayload;
204749 assert( nPayload>=(u32)nLocal );
204751 if( nPayload>(u32)nLocal ){
204759 pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
204764 u32 iPrev = pCell->aOvfl[j-1];
204837 u32 iRoot = (u32)sqlite3_column_int64(pCsr->pStmt, 1);
205898 #define SESSION_UINT32(x) (((u32)(x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])
205906 u32 y = SESSION_UINT32(aRec+4);
209124 u32 *aMask;
209137 u32 *aUpdateMask; /* Used by sessionUpdateFind */
209170 p->aUpdateMask = sqlite3_malloc(nU32*sizeof(u32));
209177 memset(p->aUpdateMask, 0, nU32*sizeof(u32));
209195 if( 0==memcmp(p->aUpdateMask, (*pp)->aMask, nU32*sizeof(u32)) ){
209217 int nByte = sizeof(SessionUpdate) * nU32*sizeof(u32);
209227 pUp->aMask = (u32*)&pUp[1];
209228 memcpy(pUp->aMask, p->aUpdateMask, nU32*sizeof(u32));
211800 typedef unsigned int u32;
212038 static int sqlite3Fts5BufferSize(int*, Fts5Buffer*, u32);
212040 static void sqlite3Fts5BufferAppendBlob(int*, Fts5Buffer*, u32, const u8*);
212056 (u32)((pBuf)->n) + (u32)(nn) <= (u32)((pBuf)->nSpace) ? 0 : \
212293 static int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v);
212294 static int sqlite3Fts5GetVarintLen(u32 iVal);
212298 #define fts5GetVarint32(a,b) sqlite3Fts5GetVarint32(a,(u32*)&b)
212609 static int sqlite3Fts5UnicodeCategory(u32 iCode);
214845 static int sqlite3Fts5BufferSize(int *pRc, Fts5Buffer *pBuf, u32 nByte){
214846 if( (u32)pBuf->nSpace<nByte ){
214882 return (int)((((u32)aBuf[0])<<24) + (aBuf[1]<<16) + (aBuf[2]<<8) + aBuf[3]);
214893 u32 nData,
215178 u32 hash = 13;
215219 u32 i;
218953 sqlite3_result_int(pCtx, aArr[sqlite3Fts5UnicodeCategory((u32)iCode)]);
219462 int nByte = sqlite3Fts5GetVarintLen((u32)nPos);
222036 u32 nMatch = 0;
222037 u32 nKeep = 0;
222038 u32 nNew = 0;
222039 u32 iTermOff;
222063 u32 nCmp;
222064 u32 i;
222065 nCmp = (u32)MIN(nNew, nTerm-nMatch);
222071 if( (u32)nTerm==nMatch ){
223387 u32 aUsed[(FTS5_MAX_SEGMENT+31) / 32];
223390 u32 mask;
223396 aUsed[(iId-1) / 32] |= (u32)1 << ((iId-1) % 32);
223403 for(iSegid=0; mask & ((u32)1 << iSegid); iSegid++);
224282 u32 dummy;
230868 u32 iCode;
230880 if( (u32)aNew[i]>iCode ) break;
231035 p->aCategory[sqlite3Fts5UnicodeCategory((u32)iCode)]
231064 u32 iCode; /* non-ASCII codepoint read from input */
231931 u32 iCode;
232752 static int sqlite3Fts5UnicodeCategory(u32 iCode) {
232821 static int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v){
232822 u32 a,b;
232876 *v = ((u32)v64) & 0x7FFFFFFF;
232900 u32 a,b,s;
233132 static int sqlite3Fts5GetVarintLen(u32 iVal){