Lines Matching defs:size

1503 #define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */
1654 ** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values
1655 ** mean that writes of blocks that are nnn bytes in size and
1659 ** first then the size of the file is extended, never the other
1804 ** The xSectorSize() method returns the sector size of the
1805 ** device that underlies the file. The sector size is the
1830 ** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values
1831 ** mean that writes of blocks that are nnn bytes in size and
1835 ** first then the size of the file is extended, never the other
1852 int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
1901 ** implements [sqlite3_deserialize()] to set an upper bound on the size
1905 ** of the integer pointed to and the current database size. The integer
1910 ** extends and truncates the database file in chunks of a size specified
1912 ** point to an integer (type int) containing the new chunk-size to use
2283 ** The szOsFile field is the size of the subclassed [sqlite3_file]
2395 ** output buffer xFullPathname. The exact size of the output buffer
2696 ** xSize should return the allocated size of a memory allocation
2697 ** previously obtained from xMalloc or xRealloc. The allocated size
2698 ** is always at least as big as the requested size but may be larger.
2700 ** The xRoundup method returns what would be the allocated size of
2701 ** a memory allocation given a particular requested size. Most memory
2734 int (*xSize)(void*); /* Return the size of an allocation */
2735 int (*xRoundup)(int); /* Round up request size to allocation size */
2853 ** 8-byte aligned memory (pMem), the size of each page cache line (sz),
2855 ** The sz argument should be the size of the largest database page
2885 ** the number of bytes in the memory buffer, and the minimum allocation size.
2893 ** The minimum allocation size is capped at 2**12. Reasonable values
2894 ** for the minimum allocation size are 2**5 through 2**8.</dd>
2923 ** the default size of lookaside memory on each [database connection].
2925 ** size of each lookaside buffer slot and the second is the number of
2927 ** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
3015 ** that are the default mmap size limit (the default setting for
3016 ** [PRAGMA mmap_size]) and the maximum allowed mmap size limit.
3019 ** [SQLITE_FCNTL_MMAP_SIZE] file control. ^(The maximum allowed mmap size
3021 ** compile-time maximum mmap size set by the
3031 ** that specifies the maximum size of the created heap.
3049 ** to be sorted exceeds the page size times the minimum of the
3056 ** [Statement journals] are held in memory until their size (in bytes)
3069 ** of type (int) - the new value of the sorter-reference size threshold.
3074 ** than the configured sorter-reference size threshold - then a reference
3085 ** [sqlite3_int64] parameter which is the default maximum size for an in-memory
3087 ** size can be adjusted up or down for individual databases using the
3147 ** size of each lookaside buffer slot. ^The third argument is the number of
3148 ** slots. The size of the buffer in the first argument must be greater than
3861 ** buffer supplied as the second parameter whose size is given by
3872 ** ^As long as the buffer size is greater than zero, sqlite3_snprintf()
3874 ** parameter "n" is the total size of the buffer, including space for
3926 ** of at least N bytes in size or NULL if insufficient memory is available.
3927 ** ^If M is the size of the prior allocation, then min(N,M) bytes
3939 ** sqlite3_msize(X) returns the size of that memory allocation in bytes.
4083 ** and limiting database size using the [max_page_count] [PRAGMA]
4879 ** ^(This interface allows the size of various constructs to be limited
4883 ** class of constructs to be size limited. The third parameter is the
4909 ** interface to further control untrusted SQL. The size of the database
4928 ** <dd>The maximum size of any string or BLOB or table row, in bytes.<dd>)^
5197 ** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of
5437 ** (just an integer to hold its size) while it is being processed.
5464 ** ^[SQLITE_TOOBIG] might be returned if the size of a string or BLOB
5899 ** or sqlite3_column_bytes16() interfaces can be used to determine the size
6008 ** sqlite3_column_bytes16() to find the size of the result. Do not mix calls
6413 ** These routines extract type, size, and content information from
6722 ** a BLOB containing all zero bytes and N bytes in size.
7532 ** sqlite3_hard_heap_limit64() is the size of
7536 ** size of heap limits can be determined by invoking
8202 ** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.
8273 ** ^Use the [sqlite3_blob_bytes()] interface to determine the size of
8274 ** the opened blob. ^The size of a blob may not be changed by this
8275 ** interface. Use the [UPDATE] SQL command to change the size of a
8351 ** ^Returns the size in bytes of the BLOB accessible via the
8354 ** blob content; they cannot change the size of a blob.
8374 ** ^The size of the blob (and hence the maximum value of N+iOffset)
8411 ** not possible to increase the size of a BLOB using this API.
8413 ** [SQLITE_ERROR] is returned and no data is written. The size of the
9007 ** [SQLITE_TOOBIG] if the size of the dynamic string exceeds
9195 ** memory requested being larger than the lookaside slot size.
9269 ** inefficiencies that can be resolved by increasing the cache size.
9389 ** its size or internal structure and never deals with the
9468 ** first parameter, szPage, is the size in bytes of the pages that must
9489 ** suggested maximum cache-size (number of pages stored by) the cache
9773 ** changes the size of the source database or the number of pages remaining,
10827 ** If P is not a NULL pointer, then the size of the database in bytes
10847 ** The size of the database is written into *P even if the
10861 sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */
10887 ** in P. The serialized database P is N bytes in size. M is the size of
10891 ** size does not exceed M bytes.
10896 ** SQLite will try to increase the buffer size using sqlite3_realloc64()
10915 sqlite3_int64 szBuf, /* Total size of buffer pData[] */
10932 ** grow the size of the database using calls to [sqlite3_realloc64()]. This
10934 ** Without this flag, the deserialized database cannot increase in size beyond
11297 ** and *pnChangeset to the size of the changeset in bytes before returning
11849 ** is stored in *ppOut, the size of the same buffer is stored in *pnOut, and
11951 ** Add all changes within the changeset (or patchset) in buffer pData (size
12045 ** is returned and the output variables are set to the size of and a
12207 ** is set to the size of the buffer in bytes. It is the responsibility of the
12489 ** to the conflict resolutions described by buffer pRebase (size nRebase
12503 ** in size. This function allocates and populates a buffer with a copy
12507 ** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the
12572 ** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no
12607 ** points to a buffer nData bytes in size containing the chunk of output
12616 ** no guarantees are made as to the size of the chunks of data returned.
12726 ** chunk size for both input and output. Before returning, the (int) value
12728 ** chunk size.
12843 ** containing the text in utf-8 encoding, (*pn) is set to the size in bytes
13123 ** size of the token in bytes. The 4th and 5th arguments are the byte offsets
13360 ** limits the size of a row in a table or index.
13363 ** to count the size: 2^31-1 or 2147483647.
13442 ** IMPLEMENTATION-OF: R-30185-15359 The default suggested cache size is -2000,
13443 ** which means the cache size is limited to 2048000 bytes of memory.
13444 ** IMPLEMENTATION-OF: R-48205-43578 The default suggested cache size can be
13480 /* Maximum page size. The upper bound on this value is 65536. This a limit
13487 ** with a page-size of 65536 bytes crashes, then an instance of SQLite
13488 ** compiled with the default page-size limit will not be able to rollback
13498 ** The default size of a database page.
13510 ** with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain
13511 ** device characteristics (sector-size and atomic write() support),
14607 ** Default maximum size of memory used by memory-mapped I/O in the VFS
14628 ** not exceed the maximum mmap size.
14836 ** tables in a join to 32 instead of 64. But it also reduces the size
14893 ** Default maximum size for persistent journal files. A negative
16244 /* Modify the page-size after the cache has been created. */
16247 /* Return the size in bytes of a PCache object. Used to preallocate
16308 /* Set and get the suggested cache-size for the specified pager-cache.
16319 /* Set or get the suggested spill-size for the specified pager-cache.
16321 ** The spill-size is the minimum number of pages in cache before the cache
16340 /* Return the header size */
16344 /* Number of dirty pages as a percentage of the configured cache size */
16454 ** The default size of a disk sector
16550 ** that all locks will fit on a single page even at the minimum page size.
16583 SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size);
16817 ** Lookaside malloc is a set of fixed-size buffers that can be used
16849 ** Enhancement on 2019-12-12: Two-size-lookaside
16853 ** The two-size-lookaside enhancement breaks up the lookaside allocation
16854 ** into two pools: One of 128-byte slots and the other of the default size
16856 ** failing over to the full-size pool if that does not work. Thus more
16867 u32 anStat[3]; /* 0: hits. 1: size misses. 2: full misses */
16873 void *pMiddle; /* First byte past end of full-size buffers and
16887 /* Size of the smaller allocations in two-size lookside */
17002 int nMaxSorterMmap; /* Maximum size of regions mapped by sorter */
17068 int nVTrans; /* Allocated size of aVTrans */
17498 u8 szEst; /* Estimated size of value in this column. sizeof(INT)==1 */
17669 LogEst szTabRow; /* Estimated size of each table row in bytes */
17964 LogEst szIdxRow; /* Estimated average row size in bytes */
18309 #define EXPR_FULLSIZE sizeof(Expr) /* Full size */
18317 #define EXPRDUP_REDUCE 0x0001 /* Used reduced-size Expr nodes */
19233 int szLookaside; /* Default lookaside buffer size */
19249 u32 szPma; /* Maximum Sorter PMA size */
19273 sqlite3_int64 mxMemdbSize; /* Default max memdb size */
19280 u32 szSorterRef; /* Min size in bytes to use sorter-refs */
20802 /* The minimum PMA size is set to this value multiplied by the database
20803 ** page size in bytes.
20809 /* Statement journals spill to disk when their size exceeds the following
20829 ** With the two-size-lookaside enhancement, less lookaside is required.
20832 ** using the older 1200,100 configuration without two-size-lookaside.
20843 /* The default maximum size of an in-memory database created using
22104 ** spec into a max size: a b c d e f */
23341 SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file *id, i64 size){
23342 return id->pMethods->xTruncate(id, size);
23906 (_sqliteZone_ ? _sqliteZone_->size(_sqliteZone_,x) : malloc_size(x))
23940 ** The memory size function can always be overridden manually by defining
23959 ** Like malloc(), but remember the size of the allocation
24012 ** Report the allocated size of a prior return from xMalloc()
24068 ** Round up a request size to the next valid allocation size.
24183 ** MemBlockHdr tells us the size of the allocation and the number of
24204 ** Number of malloc size increments to track.
24340 ** Round up a request size to the next valid allocation size.
24467 ** Change the size of an existing memory allocation.
24701 ** Maximum size (in Mem3Blocks) of a "small" chunk.
24718 ** size of the allocation in blocks if the allocation is free.
24722 ** previous chunk is free. The u.hdr.prevSize field is the size of
24748 u32 size4x; /* 4x the size of current chunk in Mem3Block elements */
24765 ** Memory available for allocation. nPool is the size of the array
24788 ** occur off of this chunk. szKeyBlk is the size (in Mem3Blocks)
24796 ** Array of lists of free blocks according to the block size
24797 ** for smaller chunks, or a hash on the block size for larger
24831 u32 size, hash;
24835 size = mem3.aPool[i-1].u.hdr.size4x/4;
24836 assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );
24837 assert( size>=2 );
24838 if( size <= MX_SMALL ){
24839 memsys3UnlinkFromList(i, &mem3.aiSmall[size-2]);
24841 hash = size % N_HASH;
24865 u32 size, hash;
24869 size = mem3.aPool[i-1].u.hdr.size4x/4;
24870 assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );
24871 assert( size>=2 );
24872 if( size <= MX_SMALL ){
24873 memsys3LinkIntoList(i, &mem3.aiSmall[size-2]);
24875 hash = size % N_HASH;
24912 ** size parameters for check-out and return a pointer to the
24963 ** *pRoot is the head of a list of free chunks of the same size
24964 ** or same size hash. In other words, *pRoot is an entry in either
24979 u32 iNext, prev, size, i, x;
24984 size = mem3.aPool[i-1].u.hdr.size4x;
24985 assert( (size&1)==0 );
24986 if( (size&2)==0 ){
24994 size = i + size/4 - prev;
24996 mem3.aPool[prev-1].u.hdr.size4x = size*4 | x;
24997 mem3.aPool[prev+size-1].u.hdr.prevSize = size;
25001 size /= 4;
25003 if( size>mem3.szKeyBlk ){
25005 mem3.szKeyBlk = size;
25011 ** Return a block of memory of at least nBytes in size.
25032 ** Look for an entry of the correct size in either the small
25102 u32 size, x;
25107 size = mem3.aPool[i-1].u.hdr.size4x/4;
25108 assert( i+size<=mem3.nPool+1 );
25110 mem3.aPool[i+size-1].u.hdr.prevSize = size;
25111 mem3.aPool[i+size-1].u.hdr.size4x &= ~2;
25117 size = mem3.aPool[mem3.iKeyBlk-1].u.hdr.prevSize;
25118 mem3.iKeyBlk -= size;
25119 mem3.szKeyBlk += size;
25136 ** Return the size of an outstanding allocation, in bytes. The
25137 ** size returned omits the 8-byte header overhead. This only
25149 ** Round up a request size to the next valid allocation size.
25182 ** Change the size of an existing memory allocation
25256 u32 size;
25269 for(i=1; i<=mem3.nPool; i+=size/4){
25270 size = mem3.aPool[i-1].u.hdr.size4x;
25271 if( size/4<=1 ){
25272 fprintf(out, "%p size error\n", &mem3.aPool[i]);
25276 if( (size&1)==0 && mem3.aPool[i+size/4-1].u.hdr.prevSize!=size/4 ){
25277 fprintf(out, "%p tail size does not match\n", &mem3.aPool[i]);
25281 if( ((mem3.aPool[i+size/4-1].u.hdr.size4x&2)>>1)!=(size&1) ){
25286 if( size&1 ){
25287 fprintf(out, "%p %6d bytes checked out\n", &mem3.aPool[i], (size/4)*8-8);
25289 fprintf(out, "%p %6d bytes free%s\n", &mem3.aPool[i], (size/4)*8-8,
25392 ** Let n be the size of the largest allocation divided by the minimum
25393 ** allocation size (after rounding all sizes up to a power of 2.) Let M
25415 ** size of the array is a power of 2.
25417 ** The size of this object must be a power of two. That fact is
25427 ** Maximum size of any allocation is ((1<<LOGMAX)*mem5.szAtom). Since
25474 ** size mem5.szAtom. aiFreelist[1] holds blocks of size szAtom*2.
25475 ** aiFreelist[2] holds free blocks of size szAtom*4. And so forth.
25480 ** Space for tracking which blocks are checked out and the size
25551 ** Return the size of an outstanding allocation, in bytes.
25564 ** Return a block of memory of at least nBytes in size.
25599 ** two in order to create a new free block of size iLogsize.
25644 u32 size, iLogsize;
25658 size = 1<<iLogsize;
25659 assert( iBlock+size-1<(u32)mem5.nBlock );
25662 mem5.aCtrl[iBlock+size-1] |= CTRL_FREE;
25666 assert( mem5.currentOut>=(size*mem5.szAtom) );
25668 mem5.currentOut -= size*mem5.szAtom;
25677 iBuddy = iBlock - size;
25680 iBuddy = iBlock + size;
25694 size *= 2;
25700 memset(&mem5.zPool[iBlock*mem5.szAtom], 0x55, size);
25733 ** Change the size of an existing memory allocation.
25766 ** Round up a request size to the next valid allocation size. If
25807 int nMinLog; /* Log base 2 of minimum allocation size in bytes */
25815 /* The size of a Mem5Link object must be a power of two. Verify that
25891 fprintf(out, "freelist items of size %d: %d\n", mem5.szAtom << i, n);
27688 ** Set the soft heap-size limit for the library. An argument of
27729 ** Set the hard heap-size limit for the library. An argument of zero
27886 ** xMalloc(). Hence we limit the maximum size to 0x7fffff00, giving
27931 ** Return the size of a memory allocation previously obtained from
27999 ** Add the size of memory allocation "p" to the count in
28054 ** Change the size of an existing memory allocation
28602 ** If the requested size of the temp buffer is larger than the size
28604 ** Do the size check before the memory allocation to prevent rogue
28623 ** On machines with a small stack size, you can redefine the
29360 /* Force exponential buffer size growth as long as it does not overflow,
29420 ** size of the memory allocation for StrAccum if necessary.
32096 ** The caller must ensure that zOut[] is at least 21 bytes in size.
32668 /* A 32-bit varint is used to store size information in btrees.
32670 ** A 3-byte varint is sufficient, for example, to record the size
33104 ** value for the pair and the size of the name/number pair, respectively.
33296 ** if the new size is the same as the prior size.
33431 unsigned int h; /* the hash of the key modulo hash table size */
33897 sqlite3_int64 mmapSize; /* Usable size of mapping at pMapRegion */
33898 sqlite3_int64 mmapSizeActual; /* Actual size of mapping at pMapRegion */
33902 int sectorSize; /* Device sector size */
33931 /* In test mode, increase the size of this structure a bit so that
34704 ** truncate a file to any size larger than 2GiB. Silently ignore any
35249 ** incorrectly for zero-size files. See ticket #3260. To work
35251 ** we always increase the file size to 1 by writing a single byte
37450 ** SQLite sets the dataOnly flag if the size of the file is unchanged.
37452 ** to disk, not the inode. We only set dataOnly if the file size is
37453 ** unchanged since the file size is part of the inode. However,
37455 ** file size has changed. The only real difference between fdatasync()
37458 ** We only care about the file size, not the other file attributes, so
37517 /* fdatasync() on HFS+ doesn't yet flush the file size if it changed correctly
37585 ** size, access time, etc) are synced. If dataOnly!=0 then only the
37644 ** Truncate an open file to a specified size
37652 /* If the user has configured a chunk-size for this file, truncate the
37654 ** actual file size after the operation may be larger than the requested
37655 ** size).
37680 /* If the file was just truncated to a size smaller than the currently
37681 ** mapped region, reduce the effective mapping size as well. SQLite will
37694 ** Determine the current size of a file in bytes
37708 /* When opening a zero-size database, the findInodeInfo() procedure
37711 ** layers, we need to report this file size as zero even though it is
37730 ** file-control operation. Enlarge the database to nBytes in size
37731 ** (rounded up to the next chunk-size). If the database is already
37736 i64 nSize; /* Required file size */
37759 ** at offset (nSize-1), to set the size of the file correctly.
37763 int nBlk = buf.st_blksize; /* File-system block size */
37993 /* etfs cluster size writes are atomic */
38012 /* full bitset of atomics from max sector size and smaller */
38020 /* full bitset of atomics from max sector size and smaller */
38033 /* Last chance verification. If the sector size isn't a multiple of 512
38043 ** Return the sector size in bytes of the underlying block device for
38049 ** a database and its journal file) that the sector size will be the
38080 ** Return the system page size.
38261 ** current system page-size.
38268 int shmsz = 32*1024; /* SHM region size */
38269 int pgsz = osGetpagesize(); /* System page size */
38270 assert( ((pgsz-1)&pgsz)==0 ); /* Page size must be a power of 2 */
38326 ** DMS byte and truncate the *-shm file to zero bytes in size. Then
38351 ** -shm header size) rather than 0 as a system debugging aid, to
38531 ** bytes in size.
38584 int nByte = nReqRegion*szRegion; /* Minimum required file size */
38940 ** Attempt to set the size of the memory mapping maintained by file
38956 i64 nNew /* Required mapping size */
39036 ** If parameter nByte is non-negative, then it is the requested size of
39038 ** requested size is the size of the file on disk. The actual size of the
39039 ** created mapping is either the requested size or the value configured
40242 int nOut /* Allocated size of buffer zOut */
41462 ** is a string buffer at least MAXPATHLEN+1 characters in size.
42383 int szChunk; /* Chunk size configured by FCNTL_CHUNK_SIZE */
42419 * The size of the buffer used by sqlite3_win32_write_debug().
42450 * This is the maximum possible initial size of the Win32-specific heap, in
42458 * This is the extra space for the initial size of the Win32-specific heap,
42466 * Calculate the maximum legal cache size, in pages, based on the maximum
42467 * possible initial heap size and the default page size, setting aside the
42477 * This is cache size used in the calculation of the initial size of the
42489 * Make sure that the calculated cache size, in pages, cannot cause the
42490 * initial size of the Win32-specific heap to exceed the maximum amount
42499 * The initial size of the Win32-specific heap. This value may be zero.
42508 * The maximum size of the Win32-specific heap. This value may be zero.
43356 ** "pnLargest" argument, if non-zero, will be used to return the size of the
43619 ** Change the size of an existing memory allocation
43647 ** Return the size of an outstanding allocation, in bytes.
43671 ** Round up a request size to the next valid allocation size.
45008 ** Truncate an open file to a specified size
45040 OSTRACE(("TRUNCATE pid=%lu, pFile=%p, file=%p, size=%lld, lock=%d\n",
45043 /* If the user has configured a chunk-size for this file, truncate the
45045 ** actual file size after the operation may be larger than the requested
45046 ** size).
45182 ** Determine the current size of a file in bytes
45745 ** Return the sector size in bytes of the underlying block device for
45751 ** a database and its journal file) that the sector size will be the
45770 ** on allocation size granularity boundaries.
45772 ** to get the granularity size.
45905 OSTRACE(("SHM-LOCK file=%p, lock=%d, offset=%d, size=%d\n",
46294 ** bytes in size.
46341 int nByte = (iRegion+1)*szRegion; /* Minimum required file size */
46342 sqlite3_int64 sz; /* Current size of wal-index file */
46405 OSTRACE(("SHM-MAP-CREATE pid=%lu, region=%d, size=%d, rc=%s\n",
46420 OSTRACE(("SHM-MAP-MAP pid=%lu, region=%d, offset=%d, size=%d, rc=%s\n",
46502 ** If parameter nByte is non-negative, then it is the requested size of
46504 ** requested size is the size of the file on disk. The actual size of the
46505 ** created mapping is either the requested size or the value configured
46517 OSTRACE(("MAP-FILE pid=%lu, pFile=%p, size=%lld\n",
47660 ** bytes in size.
48303 sqlite3_int64 szMax; /* Maximum allowed size of the file */
48316 static int memdbTruncate(sqlite3_file*, sqlite3_int64 size);
48474 ** the size of a file, never to increase the size.
48476 static int memdbTruncate(sqlite3_file *pFile, sqlite_int64 size){
48478 if( NEVER(size>p->sz) ) return SQLITE_FULL;
48479 p->sz = size;
48491 ** Return the current file-size of an memdb-file.
48551 ** Return the sector-size in bytes for an memdb-file.
48666 ** Populate the buffer zErrMsg (size nByte bytes) with a human readable
48738 sqlite3_int64 *piSize, /* Write size here, if not NULL */
48819 sqlite3_int64 szBuf, /* Total size of buffer pData[] */
48927 ** The size of the bitmap is fixed when the object is created.
48935 ** sometimes grow into tens of thousands or larger. The size of the
48945 /* Round the union size down to the nearest pointer boundary, since that's how
48952 ** Setting this to the "natural word" size of your CPU may improve
49362 int szCache; /* Configured cache size */
49450 ** Another example is when the database page size is smaller than the
49451 ** disk sector size. When any page of a sector is journalled, all pages
49555 ** cache size requested by the "PRAGMA cache_size" statement.
49560 ** suggested cache size is set to N. */
49566 ** page size. */
49594 ** Return the size in bytes of a PCache object.
49633 ** Change the page size for PCache object. The caller must ensure that there
49670 ** and without exceeding the cache size limit.
49713 ** size limit has been reached, then this routine can be invoked to
50116 ** Get the suggested cache-size value.
50124 ** Set the suggested cache-size value.
50135 ** argument is zero. Return the effective cache-spill size, which will
50161 ** Return the size of the header added by this middleware layer
50168 ** of the configured cache size.
50238 ** The size of the extension (MemPage+PgHdr+PgHdr1) can be determined at
50239 ** runtime using sqlite3_config(SQLITE_CONFIG_PCACHE_HDRSZ, &size). The
50241 ** size can vary according to architecture, compile-time options, and
50267 ** that is allocated when the page cache is created. The size of the local
50367 /* Cache configuration parameters. Page size (szPage) and the purgeable
50377 int szAlloc; /* Total size of one pcache line */
50417 int nInitPage; /* Initial bulk allocation size */
50496 /* Do not bother with a bulk allocation if the cache size very small */
50604 ** Return the size of a pcache allocation
51192 ** size, return the recycled buffer. Otherwise, free the buffer and
51411 ** Return the size of the header on each page of this PCACHE implementation.
51465 int *pnMax, /* OUT: Global maximum cache size */
51522 ** upper bound on the size of allocated memory. No memory is freed
51551 ** Target size for allocation chunks.
52073 /* Set the limiting size of a WAL file. */
52090 /* If the WAL is not empty, return the size of the database. */
52153 ** stored in each frame (i.e. the db page-size when the WAL was created).
52210 ** (3) Writes to the database file are an integer multiple of the page size
52214 ** an integer multiple of the page size in length or are taken from the
52235 ** is called to restore the database file to the same size it was at
52322 ** state - the file may or may not be locked and the database size is
52334 ** open. The database size is known in this state.
52432 ** db size etc.) are consistent with the contents of the file-system.
52557 ** The maximum allowed sector size. 64KiB. If the xSectorsize() method
52680 ** This flag is set by sqlite3PagerWrite() when the file-system sector-size
52681 ** is larger than the database page-size in order to prevent a journal sync
52699 ** dbSize is set based on the size of the database file, which may be
52700 ** larger than the size of the database (the value stored at offset
52701 ** 28 of the database header by the btree). If the size of the file
52702 ** is not an integer multiple of the page-size, the value stored in
52703 ** dbSize is rounded down (i.e. a 5KB file with 2K page-size has dbSize==2).
52704 ** Except, any file that is greater than 0 bytes in size is considered
52705 ** to have at least one page. (i.e. a 1KB file with 2K page-size leads
52719 ** Throughout a write-transaction, dbFileSize contains the size of
52744 ** size-hint passed to the method call. See pager_write_pagelist() for
52819 sqlite3_int64 szMmap; /* Desired maximum mmap size */
52828 u32 sectorSize; /* Assumed sector size during rollback */
52830 Pgno mxPgno; /* Maximum allowed size of the database */
52904 ** The size of the of each page record in the journal is given by
52910 ** The journal header size for this pager. This is usually the same
52911 ** size as a single disk sector. See also setSectorSize().
53330 ** to the page size.
53332 ** If it can be used, then the value returned is the size of the journal
53449 i64 szJ; /* Total size in bytes of journal file pJrnl */
53490 ** size of pPager->sectorSize bytes.
53492 ** i.e for a sector size of 512:
53521 ** set to 0, then truncate the journal file to zero bytes in size. Otherwise,
53527 ** following the truncation or zeroing described above the size of the
53554 ** is still held on the file. If there is a size limit configured for
53580 ** - 4 bytes: Sector size used by the process that wrote this journal.
53581 ** - 4 bytes: Database page size.
53643 /* The initial database size */
53645 /* The assumed sector size for this process */
53648 /* The page size */
53671 ** The loop is required here in case the sector-size is larger than the
53672 ** database page size. Since the zHeader buffer is only Pager.pageSize
53673 ** bytes in size, more than one call to sqlite3OsWrite() may be required
53694 ** page records following this header and *pDbSize is set to the size of the
53708 u32 *pDbSize /* OUT: Value of original database size field */
53742 ** field, the checksum-initializer and the database size at the start
53753 u32 iPageSize; /* Page-size field of journal header */
53754 u32 iSectorSize; /* Sector-size field of journal header */
53756 /* Read the page-size and sector-size journal header fields. */
53763 /* Versions of SQLite prior to 3.5.8 set the page-size field of the
53765 ** variable is already set to the correct page size.
53771 /* Check that the values read from the page-size and sector-size fields
53780 /* If the either the page-size or sector-size in the journal-header is
53788 /* Update the page-size to match the value read from the journal.
53795 /* Update the assumed sector-size to match the value used by
53883 ** file to the required size.
54094 ** cache size.
54128 ** Journal file is truncated to zero bytes in size.
54196 /* Make sure the new file size is written into the inode right away.
54265 ** required size. */
54629 ** size.
54730 ** This function is used to change the actual size of the database
54735 ** DBMOD or OPEN state, this function is a no-op. Otherwise, the size
54742 ** you try to truncate a file to some size that is larger than it
54782 ** Return a sanitized version of the sector-size of OS file pFile. The
54799 ** of the open database file. The sector size will be used
54800 ** to determine the size and alignment of journal header and
54803 ** For temporary files the effective sector size is always 512 bytes.
54805 ** Otherwise, for non-temporary files, the effective sector size is
54811 ** the effective sector size to its minimum value (512). The purpose of
54816 ** size. For backwards compatibility of the rollback journal file format,
54817 ** we cannot reduce the effective sector size below 512.
54826 /* Sector size doesn't matter for temporary files. Also, the file
54844 ** number of page records from the journal size.
54849 ** (5) 4 byte big-endian integer which is the sector size. The header
54850 ** is this many bytes in size.
54851 ** (6) 4 byte big-endian integer which is the page size.
54852 ** (7) zero padding out to the next sector size.
54863 ** value of nRec from the size of the journal file. But if a power
54865 ** case that the size of the journal file had already been increased but
54867 ** the value of nRec computed from the file size would be too large. For
54871 ** from the file size. This value is used when the user selects the
54969 ** size of the file.
54977 ** should be computed based on the journal file size.
54985 ** database file back to its original size.
55089 ** back a journal created by a process with a different sector size
55140 ** zero or the size of the database in page. Bytes 32..35 and 35..39
55269 Pgno nTruncate, /* Database size after this commit */
55359 ** to PAGER_READER state to determine the size of the database file
55360 ** in pages (assuming the page size currently stored in Pager.pageSize).
55362 ** If no error occurs, SQLITE_OK is returned and the size of the database
55369 /* Query the WAL sub-system for the database size. The WalDbsize()
55371 ** if the database size is not available. The database size is not
55382 ** WAL sub-system, determine the page count based on the size of
55383 ** the database file. If the size of the database file is not an
55384 ** integer multiple of the page-size, round up the result.
55494 i64 szJ; /* Effective size of the main journal */
55510 /* Set the database size back to the value it was before the savepoint
55520 /* Use pPager->journalOff as the effective size of the main rollback
55531 ** greater than the current database size (pPager->dbSize) but those
55634 ** Change the maximum size of any memory mapping made of the database file.
55814 ** Change the page size used by the Pager object. The new page size
55823 ** * the new page size (value of *pPageSize) is valid (a power
55831 ** then the pager object page size is set to *pPageSize.
55833 ** If the page size is changed, then this function uses sqlite3PagerMalloc()
55835 ** fails, SQLITE_NOMEM is returned and the page size remains unchanged.
55838 ** If the page size is not changed, either because one of the enumerated
55841 ** then *pPageSize is set to the old, retained page size before returning.
55918 ** maximum page count below the current size of the database.
55963 ** opened on a file less than N bytes in size, the output buffer is
55997 ** However, if the file is between 1 and <page-size> bytes in size, then
56044 ** a) The page number is less than or equal to the size of the
56105 ** size of the journal file so that the pager_playback() routine knows
56513 ** file size will be.
56825 u32 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE; /* Default page size */
57024 ** choose a default page size in case we have to create the
57025 ** database file. The default page size is the maximum of:
57029 ** + The largest page size that can be written atomically.
57066 ** In this case we accept the default page size and delay actually
57190 ** * The database file itself is greater than 0 bytes in size, and
57193 ** If the current size of the database file is 0 but a journal file
57248 /* If the database is zero pages in size, that means that either (1) the
57501 ** to its original size while this process was not holding a lock.
57503 ** to be the right size but is not actually valid. Avoid this
58179 /* Update the database size and return. */
58187 ** This is a variant of sqlite3PagerWrite() that runs when the sector size
58188 ** is larger than the page size. SQLite makes the (reasonable) assumption that
58193 ** Usually, the sector size is less than or equal to the page size, in which
58195 ** exceptional case where the page size is smaller than the sector size.
58215 /* This trick assumes that both the page-size and sector-size are
58597 ** blocks of size page-size, and
59082 ** the sub-journal to zero bytes in size. */
59515 ** Get/set the size-limit used for persistent journal files.
59517 ** Setting the size limit to -1 means no limit is enforced.
59845 ** frames, return the size in bytes of the page images stored within the
59892 ** The WAL header is 32 bytes in size and consists of the following eight
59897 ** 8: Database page size. Example: 1024
59905 ** frame consists of a 24-byte frame-header followed by a <page-size> bytes
59910 ** 4: For commit records, the size of the database image in pages
60021 ** first index block are the same size as all other index blocks in the
60037 ** allocated size of the page-mapping array - the page-mapping array merely
60170 ** the total header size is 136 bytes.
60182 u16 szPage; /* Database page size in bytes. 1==64K */
60286 ** assuming a database page size of szPage bytes. The offset returned
60302 i64 mxWalSize; /* Truncate WAL to this size upon reset */
60306 u32 szPage; /* Database page size */
60409 ** If the wal-index is currently smaller the iPage pages then the size
60600 ** 4: For commit records, the size of the database image in pages
60610 u32 nTruncate, /* New db size (or 0 for non-commit frames) */
60641 u32 *pnTruncate, /* OUT: New db size (or 0 if not commit) */
60680 ** and the new database size.
61044 int szPage; /* Page size according to the log */
61057 /* If the database page size is not a power of two, or is greater than
61262 i64 mxWalSize, /* Truncate WAL to this size on reset */
61329 ** Change the size to which the WAL file is trucated on each reset.
61721 ** Return the page-size in bytes used by the database.
61801 int szPage; /* Database page-size */
61862 ** about the eventual size of the db file to the VFS layer.
61866 i64 nSize; /* Current size of database file */
61871 /* If the size of the final database is larger than the current
61873 ** maximum size of the pending-byte page (65536 bytes), then
61974 ** If the WAL file is currently larger than nMax bytes in size, truncate
61987 sqlite3_log(rx, "cannot limit WAL size: %s", pWal->zWalName);
62174 /* page0 can be NULL if the SHM is zero bytes in size and pWal->writeLock
62989 ** (which is nOut bytes in size). Return SQLITE_OK if successful, or an
63010 ** Return the size of the database in pages (or zero, if unknown).
63309 const int szPage = pWal->szPage;/* Database page size */
63359 int szPage, /* Database page-size in bytes */
63361 Pgno nTruncate, /* Database size after this commit */
63370 int szFrame; /* The size of a single frame */
63535 ** journal size limit, if possible.
63893 ** read-lock. This function returns the database page-size if it is known,
63973 ** information such as the size of key and data.
63979 ** "no such page". The page size can be any power of 2 between 512 and 65536.
63989 ** 16 2 Page size in bytes. (1 means 65536)
64023 ** is to limit the maximum cell size so that at least 4 cells will fit
64029 ** the cell size drop below the min embedded payload fraction.
64069 ** which is stored in the key size entry of the cell header rather than in
64083 ** freeblocks. Each freeblock is at least 4 bytes in size. The byte offset
64085 ** increasing order. Because a freeblock must be at least 4 bytes in size,
64149 /* The following value is the maximum cell size assuming a maximum page
64150 ** size give above.
64155 ** assumes a minimum cell size of 6 bytes (4 bytes for the cell itself
64395 #define BTS_PAGESIZE_FIXED 0x0002 /* Page size can no longer be changed */
64420 ** maximum database size of 2^31 pages a minimum fanout of 2 for a
64996 ** from the header of a btree page. If the page size is 65536 and the page
65619 ** set to point to a malloced buffer pCur->nKey bytes in size containing
65635 ** up to the size of 1 varint plus 1 8-byte value when the cursor
66397 int size; /* Size of a cell */
66480 size = pPage->xCellSize(pPage, &src[pc]);
66481 cbrk -= size;
66482 if( cbrk<iCellFirst || pc+size>usableSize ){
66485 assert( cbrk+size<=usableSize && cbrk>=iCellFirst );
66486 testcase( cbrk+size==usableSize );
66487 testcase( pc+size==usableSize );
66494 memcpy(&temp[x], &data[x], (cbrk+size) - x);
66497 memcpy(&data[cbrk], &src[pc], size);
66517 ** size. If one can be found, return a pointer to the space and remove it
66534 int x; /* Excess size of the slot */
66536 int size; /* Size of the free slot */
66541 ** freeblock form a big-endian integer which is the size of the freeblock
66543 size = get2byte(&aData[pc+2]);
66544 if( (x = size - nByte)>=0 ){
66561 /* The slot remains on the free-list. Reduce its size to account
66569 if( pc<=iAddr+size ){
66607 assert( nByte>=0 ); /* Minimum cell size is 4 */
66615 /* EVIDENCE-OF: R-29356-02391 If the database uses a 65536-byte page size
66683 ** and the size of the block is iSize bytes.
66696 u8 hdr; /* Page header size. 0 or 100 */
66708 assert( iSize>=4 ); /* Minimum cell size is 4 */
66889 u32 next, size;
66902 size = get2byte(&data[pc+2]);
66903 nFree = nFree + size;
66904 if( next<=pc+size+3 ) break;
66911 if( pc+size>(unsigned int)usableSize ){
66919 ** the cell-content area. If this is greater than the usable-size
67012 ** offset to the cell content area will equal the page size minus the
67123 ** Return the size of the database file in pages. If there is any kind of
67450 ** the right size. This is to guard against size changes that result
67486 /* EVIDENCE-OF: R-51873-39618 The page size for a database file is
67507 /* EVIDENCE-OF: R-37497-42412 The size of the reserved region is
67588 /* If the B-Tree was successfully opened, set the pager-cache size to the
67590 ** do not change the pager-cache size.
67660 ** a cell is less than 4 bytes in size, it is rounded up to 4 bytes
67756 ** pages in the cache exceeds this soft limit. But the size of the
67775 ** The value returned is the current spill size. If zero is passed
67776 ** as an argument, no changes are made to the spill size setting, so
67777 ** using mxPage of 0 is a way to query the current spill size.
67827 ** Change the default pages size and the number of reserved bytes per page.
67828 ** Or, if the page size has already been fixed, return SQLITE_READONLY
67831 ** The page size must be a power of 2 between 512 and 65536. If the page
67832 ** size supplied does not meet this constraint then the page size is not
67843 ** If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size
67876 ** Return the currently defined page size
67905 ** The value returned is the larger of the current reserve size and
67906 ** the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES.
68138 /* EVIDENCE-OF: R-51873-39618 The page size for a database file is
68142 /* EVIDENCE-OF: R-25008-21688 The size of a page is a power of two
68152 /* EVIDENCE-OF: R-59310-51205 The "reserved space" size in the 1-byte
68156 ** EVIDENCE-OF: R-37497-42412 The size of the reserved region is
68161 /* After reading the first page of the database assuming a page size
68162 ** of BtShared.pageSize, we have discovered that the page-size is
68165 ** again with the correct page-size.
68179 /* EVIDENCE-OF: R-28312-64704 However, the usable size is not allowed to
68180 ** be less than 480. In other words, if the page size is 512, then the
68181 ** reserved space size cannot exceed 32. */
68444 ** reading page 1 it discovers that the page-size of the database
68446 ** pBt->pageSize to the page-size of the file on disk.
68502 /* If the db-size header field is incorrect (as it may be if an old
68504 ** this sooner rather than later means the database size can safely
68505 ** re-read the database size from page 1 if a savepoint or transaction
68836 ** nOrig pages in size containing nFree free pages. Return the expected
68837 ** size of the database in pages following an auto-vacuum operation.
68919 Pgno nOrig; /* Database size before freeing */
69455 ** Return the size of a BtCursor object in bytes.
69610 ** of data. For index btrees, this will be the size of the key.
69624 ** Return an upper bound on the size of any record for the table
69633 ** The current implementation merely returns the size of the underlying
70548 /* The maximum supported page-size is 65536 bytes. This means that
70558 /* This branch runs if the record-size field of the cell is a
70566 /* The record-size field is a 2 byte varint and the record
70585 testcase( nCell<0 ); /* True if key size is 2^32 or more */
70586 testcase( nCell==0 ); /* Invalid key size: 0x80 0x80 0x00 */
70587 testcase( nCell==1 ); /* Invalid key size: 0x80 0x80 0x01 */
70588 testcase( nCell==2 ); /* Minimum legal index key size */
70926 Pgno mxPage; /* Total size of the database file */
71377 ** size information about the cell in pInfo.
71466 int *pnSize /* Write cell size here */
71536 ** nPayload Total payload size in bytes
71832 ** cell and the size of each cell. Some of the apCell[] pointers might refer
71836 ** A szCell[] of zero means the size of that cell has not yet been computed.
71888 u16 *szCell; /* Local size of all cells in apCell[] */
71913 ** Return the size of the Nth element of the cell array
71929 ** szCell[] array contains the size in bytes of each cell. This function
72021 ** content area on page pPg. If the size of the content area is extended,
72279 ** least 13 bytes in size.
72348 ** record-length (a variable length integer at most 32-bits in size)
72511 ** size of a cell stored within an internal node is always less than 1/4
72512 ** of the page-size, the aOvflSpace[] buffer is guaranteed to be large
72521 u8 *aOvflSpace, /* page-size bytes of space for parent ovfl */
72526 int nMaxCells = 0; /* Allocated size of apCell, szCell, aFrom. */
72545 int szNew[NB+2]; /* Combined size of cells placed on i-th page */
72801 ** size of all cells on the i-th page and cntNew[] which is the index
73127 ** previously stored on a leaf node, and its reported size was 4
73129 ** (see btreeParseCellPtr(), 4 bytes is the minimum size of
73130 ** any cell). But it is important to pass the correct size to
73717 /* New entry is the same size as the old. Do an overwrite */
73834 /* Overwrite the old cell with the new if they are the same size.
73928 ** for the destination database. The size of the cell, in bytes, is left
74915 isFreeList ? "size" : "overflow list length",
75010 u32 usableSize; /* Usable size of the page */
75090 /* Check cell size */
75165 u32 size;
75167 size = pPage->xCellSize(pPage, &data[pc]);
75168 btreeHeapInsert(heap, (pc<<16)|(pc+size-1));
75179 int size, j;
75181 size = get2byte(&data[i+2]);
75182 assert( (u32)(i+size)<=usableSize ); /* due to btreeComputeFreeSpace() */
75183 btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
75191 assert( j==0 || j>i+size ); /* Enforced by btreeComputeFreeSpace() */
75671 ** Return the size of the header added to each page by this module.
75805 ** Attempt to set the page size of the destination to match the page size
76019 int pgszSrc = 0; /* Source page size */
76020 int pgszDest = 0; /* Destination page size */
76059 ** try to set its page size to the same as the source database. This
76061 ** not possible to create a database file that uses one page size by
76136 ** size may be different to the source page size.
76138 ** If the source page size is smaller than the destination page size,
76140 ** fix the size of the file. However it is important to call
76160 /* If the source page-size is smaller than the destination page-size,
76413 ** The size of file pTo may be reduced by this operation. If anything
76545 /* The szMalloc field holds the correct memory allocation size */
76750 ** If pMem->zMalloc already meets or exceeds the requested size, this
76779 ** terminate a UTF16 string, even if the initial size of the buffer
77409 ** too large - whose size exceeds SQLITE_MAX_LENGTH.
77532 ** size limit) then no memory allocation occurs. If the string can be
77545 int iLimit; /* Maximum allowed string or blob size */
78526 ** than its current size. nOp is guaranteed to be less than or equal
78542 ** by the minimum* amount required until the size reaches 512. Normal
78544 ** size of the op array or add 1KB of space, whichever is smaller. */
78554 /* Ensure that the size of a VDBE does not grow too large */
80399 ** a P4_SUBPROGRAM argument), expand the size of the array of subprograms
82558 const KeyInfo *pKeyInfo /* Compare size with this KeyInfo */
83064 ** size-of-header varint at the start of (pKey1/nKey1) fits in a single
83068 ** on schemas where the maximum valid header size is 63 bytes or less.
83161 ** uses the collation sequence BINARY and (c) that the size-of-header varint
83230 ** that the size-of-header varint that occurs at the start of each record
83233 ** maximum possible legal header size plus 8 bytes. Because there is
83236 ** limit the size of the header to 64 bytes in cases where the first field
83241 ** header size is (12*5 + 1 + 1) bytes. */
83287 /* Get the size of the index entry. Only indices entries of less
83303 /* The index entry must begin with a header size */
85388 ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
85952 ** The next global variable records the size of the largest MEM_Blob
85989 ** Test a register to see if it exceeds the current maximum blob size.
85990 ** If it does, record the new maximum blob size.
87498 i64 nByte; /* Total size of the output string or blob */
88611 assert( pC->szRow<=65536 ); /* Maximum page size is 64KiB */
88700 ** (1) the bytes of the header extend past the declared header size
88914 ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |
88922 ** hdr-size field is also a varint which is the offset from the beginning
89096 ** value is the size of the header in bytes including the size varint
89146 /* EVIDENCE-OF: R-06529-47362 Following the size varint are one or more
89563 ** P3==3 is the recommended pager cache size, and so forth. P1==0 is
89595 ** size, and so forth. P1==0 is the main database file and P1==1 is the
94694 ** Query a blob handle for the size of the data.
94949 ** actually N elements in size, where N is the smallest power of 2 greater
94953 ** The aTree[] array is also N elements in size. The value of N is stored in
95004 int nTree; /* Used size of aTree/aReadr (power of 2) */
95061 ** this variable is updated so as to be set to the size on disk of the
95065 int mnPmaSize; /* Minimum PMA size, in bytes */
95066 int mxPmaSize; /* Maximum PMA size, in bytes. 0==no limit */
95068 int pgsz; /* Main database page size */
95122 ** size. When the IncrMerger is initialized, it reads enough data from
95157 ** size. But I/O is more efficient if it occurs in page-sized blocks where
95159 ** the PMA so that aligned, page-size blocks are written.
95476 i64 *pnByte /* IN/OUT: Increment this value by PMA size */
95519 ** Compare key1 (buffer pKey1, size nKey1 bytes) with key2 (buffer pKey2,
95520 ** size nKey2 bytes). Use (pTask->pKeyInfo) for the collation sequences
95680 int pgsz; /* Page size of main database */
95740 i64 mxCache; /* Cache size in bytes*/
95746 /* A negative cache-size value C indicates that the cache is abs(C)
95747 ** KiB in size. */
96024 ** is guaranteed to be nByte bytes or smaller in size. This function
96025 ** attempts to extend the file to nByte bytes in size and to ensure that
96052 i64 nExtend, /* Attempt to extend file to this size */
96201 int nBuf, /* Buffer size */
96299 /* Set iSz to the expected size of file pTask->file after writing the PMA.
96548 ** than (page-size * cache-size), or
96551 ** than (page-size * 10) and sqlite3HeapNearlyFull() returns true.
97976 ** The zChunk array is always at least 8 bytes in size - usually much more.
97977 ** Its actual size is stored in the MemJournal.nChunkSize variable.
97990 ** For chunk size nChunkSize, return the number of bytes that should
98010 int nChunkSize; /* In-memory chunk-size */
98198 static int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
98202 if( size==0 ){
98207 for(pIter=p->pFirst; ALWAYS(pIter) && iOff<=size; pIter=pIter->pNext){
98217 p->endpoint.iOffset = size;
98244 ** Query the size of the file in bytes.
98286 ** flushed to disk either when it grows larger than nSpill bytes in size,
99475 ** lookupName() for a size reduction and performance increase.
100467 ** size of an AS clause in the result-set of a SELECT. The Z expression
101863 ** (2) the EP_xxx flags that indicate what the structure size should be.
101870 ** The size of the structure can be found by masking the return value
101874 ** Note that with flags==EXPRDUP_REDUCE, this routines works on full-size
101976 /* Set nNewSize to the size allocated for the structure pointed to
102247 /* Note that because the size of the allocation for p->a[] is not
102385 ** the size of the RHS and LHS match. But if the RHS is a SELECT,
102387 ** we can do the size check, so defer the size check until code generation.
102419 /* Remember the size of the LHS in iTable so that we can check that
103815 ** a sub-query, that the LHS is a vector of size 1.
109249 ** only the pointer (the 2nd parameter) matters. The size of the object
112153 ** db->aDb[] structure to a smaller size, if possible.
112979 ** 'BLOB' with a default size of 4 bytes. */
113090 /* If pCol is not NULL, store an estimate of the field size. The
113091 ** estimate is scaled so that the size of an integer is 1. */
113093 int v = 0; /* default size is approx 4 bytes */
113614 ** Estimate the average size of a row for an index.
114079 /* Estimate the average row size for the table and for all implied indices */
115112 ** Increase the allocation size to provide an extra nExtra bytes
115894 ** array is szEntry bytes in size. This routine uses sqlite3DbRealloc()
115897 ** When this function is called, *pnEntry contains the current size of
115903 ** reflect the new size of the array and a pointer to the new allocation
115991 ** Maximum size of a SrcList object.
119039 ** character is exactly one byte in size. Also, provde the Utf8Read()
119617 ** The zeroblob(N) function returns a zero-filled blob of size N bytes.
119654 i64 nOut; /* Maximum size of zOut */
119706 /* Grow the size of the output buffer only on substitutions
120868 ** Otherwise, it is set to point to an allocated array of size N, where
121816 ** to an array of size N, where N is the number of columns in table pTab.
128039 ** page cache size. The value returned is the maximum number of
128041 ** page cache size value and the persistent page cache size value
128044 ** Older versions of SQLite would set the default cache size to a
128047 ** size. But continue to take the absolute value of the default cache
128048 ** size of historical compatibility.
128074 int size = sqlite3AbsInt32(sqlite3Atoi(zRight));
128076 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_DEFAULT_CACHE_SIZE, size);
128078 pDb->pSchema->cache_size = size;
128091 ** database page size in bytes. The second form sets the
128092 ** database page size value. The value can only be set if
128099 int size = ALWAYS(pBt) ? sqlite3BtreeGetPageSize(pBt) : 0;
128100 returnSingleInt(v, size);
128102 /* Malloc may fail when setting the page-size, as there is an internal
128275 ** Get or set the size limit on rollback journal files.
128373 ** page cache size. The second form sets the local
128374 ** page cache size value. If N is positive then that is the
128384 int size = sqlite3Atoi(zRight);
128385 pDb->pSchema->cache_size = size;
128397 ** page cache spill size. The second form turns cache spill on
128398 ** or off. When turnning cache spill on, the size is set to the
128399 ** current cache_size. The third form sets a spill size that
128400 ** may be different form the cache size.
128420 int size = 1;
128421 if( sqlite3GetInt32(zRight, &size) ){
128422 sqlite3BtreeSetSpillSize(pDb->pBt, size);
128424 if( sqlite3GetBoolean(zRight, size!=0) ){
128437 ** Used to set mapping size limit. The mapping size limit is
128438 ** used to limit the aggregate size of all memory mapped regions of the
129622 int iTabCur; /* Cursor for a table whose size needs checking */
130338 int size;
130460 size = sqlite3AbsInt32(meta[BTREE_DEFAULT_CACHE_SIZE-1]);
130461 if( size==0 ){ size = SQLITE_DEFAULT_CACHE_SIZE; }
130462 pDb->pSchema->cache_size = size;
132799 ** Also try to estimate the size of the returned value and return that
133257 /* pCol->szEst = ... // Column size est for SELECT tables never used */
134092 ** size result sets.
141654 ** equal to the size of the original database. The copy operation of
141656 ** to the size of the original database for the rollback journal.
141657 ** Hence, temporary disk space that is approximately 2x the size of the
141811 ** to ensure that we do not try to change the page-size on a WAL database.
141818 /* Do not attempt to change the page size for a WAL database */
141903 BTREE_DEFAULT_CACHE_SIZE, 0, /* Preserve the default page cache size */
141964 /* This both clears the schemas and reduces the size of the db->aDb[]
143312 ** size of where.c and make it easier to edit. This file contains the routines
146453 ** This routine will increase the size of the pWC->a[] array as necessary.
146586 Expr *pRight, *pLeft; /* Right and left size of LIKE operator */
149498 ** appears that it should be 1 field in size. However, that would make it
150777 LogEst rLogSize; /* Logarithm of table size */
151216 ** estimated average size of the index and table records.
152633 /* Increase the size of the aTo set by one */
155091 Expr *pStart, /* Start window size if TK_PRECEDING or FOLLOWING */
155093 Expr *pEnd, /* End window size if TK_FOLLOWING or PRECEDING */
155935 ** regOld and regNew are each the first register in an array of size
157036 ** has access to the the size of the yyParser object and so the parser
159190 ** Try to increase the size of the parser stack. Return the number
162479 ** But by using this automatically generated code, the size of the code
164272 ** size at compile-time using -DSQLITE_PTRSIZE=n compile-time option */
164573 ** the size of each page cache line (sz), and the number of cache lines
164629 ** number of bytes in the memory buffer, and the minimum allocation size.
164638 /* cap min request size at 2^12 */
164722 ** integer (sqlite3_int64) values that are the default mmap size limit
164724 ** mmap size limit. */
164730 ** EVIDENCE-OF: R-34993-45031 The maximum allowed mmap size will be
164732 ** compile-time maximum mmap size set by the SQLITE_MAX_MMAP_SIZE
164748 ** unsigned integer value that specifies the maximum size of the created
164807 int nBig; /* Number of full-size slots */
164820 /* The size of a lookaside slot after ROUNDDOWN8 needs to be larger
167986 ** sqlite3_test_control(BITVEC_TEST, size, program)
167988 ** Run a test against a Bitvec object of size. The program argument
169898 int nNodeSize; /* Soft limit for node size */
169904 int nPgsz; /* Page size for host database */
169985 int nRowAvg; /* Average size of database rows, in pages */
170079 ** points to a malloced buffer, size nDoclist bytes, containing the results
170085 ** matchinfo data. If it is not NULL, it points to an array of size nCol*3,
170200 int nBuffer; /* Allocated size of aBuffer[] in bytes */
170738 "CREATE TABLE %Q.'%q_docsize'(docid INTEGER PRIMARY KEY, size BLOB);",
170750 ** Store the current database page-size in bytes in p->nPgsz.
171033 int *pnIndex, /* OUT: size of *apIndex[] array */
171520 /* Figure out the page-size for the database. This is required in order to
171905 int nBuffer = 0; /* Total term size */
171932 ** the size of zBuffer if required. */
171996 ** The buffer pointed to by argument zNode (size nNode bytes) contains an
171997 ** interior node of a b-tree segment. The zTerm buffer (size nTerm bytes)
172758 ** Argument pList points to a position list nList bytes in size. This
172885 ** required (since the size of [doclistA AND doclistB] is always less
172886 ** than or equal to the size of [doclistA] in that case). But this is
173216 ** in buffer aList[], size nList bytes.
173675 ** If the value passed as the third argument is a blob of size
174912 ** Determine the average document (row) size in pages. If successful,
174916 ** The average document size in pages is calculated by first calculating
174917 ** determining the average size in bytes, B. If B is less than the amount
174920 ** the number of overflow pages consumed by a record B bytes in size.
174925 /* The average document size, which is required to calculate the cost
178287 int h; /* the hash of the key modulo hash table size */
178389 int nInput; /* size of the input */
178662 ** size of the output word (exclusive of the '\0' terminator) into *pnOut.
179572 int nBytes; /* size of the input */
180258 ** of it. i.e. if a full-text index node is 900 bytes in size, then a buffer
180386 int nTermAlloc; /* Allocated size of zTerm buffer */
180547 /* 21 */ "SELECT size FROM %Q.'%q_docsize' WHERE docid=?",
180705 sqlite3_int64 iDocid, /* Docid to read size data for */
180770 ** document terms, and each configured prefix size (configured the FTS
181102 ** we ordered the doclists by size and flushed the largest until the
181405 ** to the size of the blob in bytes before returning.
181742 ** size of the previous offset-list.
182217 ** Return the size of the common prefix (if any) shared by zPrev and
182255 int nData = pTree->nData; /* Current size of node in bytes */
182502 nReq = sqlite3Fts3VarintLen(nPrefix) + /* varint containing prefix size */
182503 sqlite3Fts3VarintLen(nSuffix) + /* varint containing suffix size */
182538 nReq = 1 + /* varint containing prefix size */
182539 sqlite3Fts3VarintLen(nTerm) + /* varint containing suffix size */
182826 ** When this function is called, buffer *ppList (size *pnList bytes) contains
183329 ** A segment of size nByte bytes has just been written to absolute level
183350 ** such segments are smaller than nLimit bytes in size, they will be
183359 ** contain a size value. This happens if it was written by an
183361 ** the size of the segment, and so segment promotion does not
183589 int nBuf /* size of the BLOB */
183613 char *pBlob; /* The BLOB encoding of the document size */
183648 ** Varint 1+nCol: The total size, in bytes, of all text values in all
183909 int nAlloc; /* Allocated size of a[] (nAlloc>=n) */
183934 u8 bNoLeafData; /* If true, store 0 for segment size */
183961 ** bytes in size, extend (realloc) it to be so.
183965 ** to reflect the new size of the pBlob->a[] buffer.
184101 ** bytes in size, write the key here. */
184160 ** If the size of the value in blob pPrev is zero, then this is the first
184391 ** Compare the term in buffer zLhs (size in bytes nLhs) with that in
184392 ** zRhs (size in bytes nRhs) using memcmp. If one term is a prefix of
184747 int nAlloc = 0; /* Allocated size of aIdx[] */
184808 ** The first two arguments are a pointer to and the size of a segment b-tree
186088 SnippetPhrase *aPhrase; /* Array of size nPhrase */
186124 ** (nElem * sizeof(u32)) bytes in size. See the MatchinfoBuffer code below
186145 int nAlloc; /* Allocated size of buffer z in bytes */
187476 ** size that contains at least one instance of all phrases in the query
188213 ** the size of the range (always at least 1). In other words, the value
189293 u32 n, /* Content size or sub-node count */
189320 u32 n, /* Content size or sub-node count */
191235 ** table must be the same size as the root node. The content of each node
191437 ** The smallest possible node-size is (512-64)==448 bytes. And the largest
191438 ** supported cell size is 48 bytes (8 byte rowid + ten 4 byte coordinates).
193279 ** of the objects size in each dimension.
193486 ** Arguments aIdx, aDistance and aSpare all point to arrays of size
193558 ** Arguments aIdx, aCell and aSpare all point to arrays of size
194827 ** determine the node-size used by the rtree table being created or connected
194832 ** table already exists. In this case the node-size is determined by inspecting
194835 ** Otherwise, for an xCreate(), use 64 bytes less than the database page-size.
194837 ** database page-size is so large that more than RTREE_MAXCELLS entries
194838 ** would fit in a single node, use a smaller node-size.
194997 /* Figure out the node size to use. */
195193 ** is set to the size of the buffer in bytes.
195677 ** warnings coming from some compiler (notably, clang). In reality, the size
195679 ** GeoPoly.a[] array at the end is the appropriate size.
195688 /* The size of a memory allocation needed for a GeoPoly object sufficient
196845 /* Figure out the node size to use. */
199144 ** Valid if STAGE==1. The size in bytes of the *-oal file.
199235 ** it points to an array of flags nTblCol elements in size. The flag is
199385 int nFrameAlloc; /* Allocated size of aFrame[] array */
199390 i64 szTemp; /* Current size of all temp files in use */
199391 i64 szTempLimit; /* Total size limit for temp files */
199420 ** "sz" is set to the current size of the database file.
199533 ** routine will determine this size for you.
199540 ** This function returns the size of the output file in bytes (excluding
199563 /* ERROR: size integer not terminated by "\n" */
199581 /* ERROR: copy exceeds output file size */
199600 /* ERROR: insert count exceeds size of delta */
199619 /* ERROR: generated size does not match predicted size */
199635 int size;
199636 size = rbuDeltaGetInt(&zDelta, &lenDelta);
199638 /* ERROR: size integer not terminated by "\n" */
199641 return size;
199677 /* Figure out the size of the output */
202710 ** However, if the sector-size is larger than the page-size, and the
203584 rbuPutU32(&aBuf[28], 1); /* size of db file in pages */
203653 static int rbuVfsTruncate(sqlite3_file *pFile, sqlite_int64 size){
203656 int rc = rbuUpdateTempSize(p, size);
203659 return p->pReal->pMethods->xTruncate(p->pReal, size);
203677 ** Return the current file-size of an rbuVfs-file.
203792 ** Return the sector-size in bytes for an rbuVfs-file.
204122 ** Populate the buffer zErrMsg (size nByte bytes) with a human readable
204279 ** Configure the aggregate temp file size limit for this RBU handle.
204366 " mx_payload INTEGER," /* 7 Largest payload size of all cells */
204654 int nTotal /* Total record (payload) size */
204798 /* If connected to a ZIPVFS backend, find the page size and
204807 /* Not ZIPVFS: The default page size and offset */
205184 ** value must be a BLOB which is the correct page size, otherwise the
205591 ** Minimum chunk size used by streaming versions of functions.
206010 ** Allocate and return a pointer to a buffer nByte bytes in size. If
208002 int nRewind = buf.nBuf; /* Initial size of write buffer */
208500 ** If successful, SQLITE_OK is returned and *pnByte is set to the size of
208600 int *pnRec, /* If non-NULL, store size of record here */
208733 int *pnRec, /* If non-NULL, store size of record here */
209499 ** to an array nCol elements in size. In this case only those values for
210621 ** this case (*pnOut) is set to the size of the output buffer in bytes. It
210694 ** Add the changeset currently stored in buffer pData, size nData bytes,
210828 ** fields in size. This function appends an nCol sessions module
210941 ** before this function returns. In this case (*pnOut) is set to the size of
211290 ** containing the text in utf-8 encoding, (*pn) is set to the size in bytes
211570 ** size of the token in bytes. The 4th and 5th arguments are the byte offsets
211964 int pgsz; /* Approximate page size used in %_data */
212168 ** size. Return the number of bytes in the nChar character prefix of the
212387 int *pnDoclist /* OUT: size of doclist in bytes */
213093 ** Try to increase the size of the parser stack. Return the number
214367 int nFirstAlloc; /* Allocated size of aFirst[] */
214506 int nColSize = 0; /* Total size of iBestCol in tokens */
214780 /* Figure out the total size of the current row in tokens. */
215256 /* Maximum allowed page size */
216893 ** buffer and buffer size to the lookaside-reader init function, zero
219310 int nAlloc; /* Total size of allocation */
219311 int iSzPoslist; /* Offset of space for 4-byte poslist size */
219563 ** + 4 byte reserved for the "poslist size" varint.
219585 /* If this is a new rowid, append the 4-byte size field for the previous
219792 int *pnDoclist /* OUT: size of doclist in bytes */
219837 ** * all segment b-tree leaf data is stored in fixed size page records
219916 ** varint : size of first term
219937 ** varint: size of poslist in bytes multiplied by 2, not including
219962 ** footer is 0 bytes in size, then this field is the same as the
219963 ** size of the leaf page in bytes.
219984 ** varint : size of first term
220176 int nDlidx; /* Allocated size of aDlidx[] array */
220202 ** position list data (one byte passed the position-list size field).
220203 ** rowid field of the current entry. Usually this is the size field of the
220231 ** start of the "position-list-size" field within the page.
220257 int nRowidOffset; /* Allocated size of aRowidOffset[] array */
220373 ** Allocate and return a buffer at least nByte bytes in size.
221040 int szPromote = 0; /* Promote anything this size or smaller */
221366 ** position list size field. Read the varint and return the number of bytes
221382 ** position-list size field. Read the value of the field and store it
221543 ** the position-list size field for the first relevant rowid on the page.
221919 ** points to the start of the position-list size field. */
221958 ** pIter->iLeafOffset is already set to point to the position-list size
222910 ** buffer pBuf. It does not make a copy of the position-list size
222943 ** Parameter pPos points to a buffer containing a position list, size nPos.
223386 ** array is 63 elements, or 252 bytes, in size. */
223444 ** Return the size of the prefix, in bytes, that buffer
223481 ** Grow the pWriter->aDlidx[] array to at least nLvl elements in size.
223794 ** Append a rowid and position-list size field to the writers output.
223909 /* Grow the two buffers to pgsz + padding bytes in size. */
224084 int nPos; /* position-list size field value */
224277 ** in a 32-bit integer. Return the size of the largest prefix of this
224278 ** list nMax bytes or less in size.
224622 /* Read position list size */
224816 /* The maximum size of the output is equal to the sum of the
225192 ** size. Return the number of bytes in the nChar character prefix of the
225219 ** pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of
225430 ** Parameter anSize must point to an array of size nCol, where nCol is
225617 ** Check if buffer z[], size n bytes, contains as series of valid utf-8
228922 ** The first varint (if it exists) contains the size of the position list
228923 ** for phrase 0. The second (same disclaimer) contains the size of position
228924 ** list 1. And so on. There is no size field for the final position list,
228925 ** as it can be derived from the total size of the blob.
230327 int *aColSize; /* Array of size pConfig->nCol */
230328 i64 *aTotalSize; /* Array of size pConfig->nCol */
232862 /* A 32-bit varint is used to store size information in btrees.
232864 ** A 3-byte varint is sufficient, for example, to record the size