Lines Matching defs:data
943 ** that when data is appended to a file, the data is appended
1003 ** sync operation only needs to flush data to mass storage. Inode
1060 ** flag may be ORed in to indicate that only the data of the file
1130 ** that when data is appended to a file, the data is appended
1461 ** The "data version" for the pager is written into the pointer. The
1462 ** "data version" changes whenever any change occurs to the corresponding
1780 void *pAppData; /* Pointer to application-specific data */
2050 ** it might allocate any required mutexes or initialize internal data
2804 ** part of committing a transaction (e.g. to flush data accumulated in memory
3120 ** Definition: A <b>result table</b> is memory data structure created by the
3180 ** to any internal data structures of SQLite. It uses only the public
3426 ** do not try to access data they are not allowed to see, or that they do not
3927 ** <tr><td> file:data.db <td>
3928 ** Open the file "data.db" in the current directory.
3929 ** <tr><td> file:/home/fred/data.db<br>
3930 ** file:///home/fred/data.db <br>
3931 ** file://localhost/home/fred/data.db <br> <td>
3932 ** Open the database file "/home/fred/data.db".
3933 ** <tr><td> file://darkstar/home/fred/data.db <td>
3936 ** file:///C:/Documents%20and%20Settings/fred/Desktop/data.db
3937 ** <td> Windows only: Open the file "data.db" on fred's desktop on drive
3941 ** <tr><td> file:data.db?mode=ro&cache=private <td>
3942 ** Open file "data.db" in the current directory for read-only access.
3945 ** <tr><td> file:/home/fred/data.db?vfs=unix-dotfile <td>
3946 ** Open file "/home/fred/data.db". Use the special VFS "unix-dotfile"
3948 ** <tr><td> file:data.db?mode=readonly <td>
3950 ** Use "ro" instead: "file:data.db?mode=ro".
4978 ** [prepared statement] returns no data (for example an [UPDATE]).
4980 ** mean that one or more rows of data will be returned. ^A SELECT statement
5092 ** data stored in that column is of the declared type. SQLite is
5135 ** ^If the SQL statement being executed returns any data, then [SQLITE_ROW]
5136 ** is returned each time a new row of data is ready for processing by the
5138 ** sqlite3_step() is called again to retrieve the next row of data.
5202 ** pragma returns 0 columns of data.
5289 ** each return the value of a result column in a specific data format. If
5295 ** [SQLITE_INTEGER | datatype code] for the initial data type
5530 ** the application data pointer. Function sqlite3_create_window_function()
5565 ** will pick the one that involves the least amount of data conversion.
5615 ** the application data pointer. The destructor is invoked when the function
5620 ** data pointer which was the fifth parameter to sqlite3_create_function_v2().
6338 ** ^The fourth argument, pArg, is an application data pointer that is passed
6344 ** function requires the least amount of data transformation.
6350 ** application data pointer and with two strings in the encoding specified
6383 ** check the return code and dispose of the application data pointer
6873 ** file. ^The callback is passed a copy of the generic data pointer (P),
6992 ** and schema data structures between [database connection | connections]
7201 ** data type: "INTEGER"
7217 char const **pzDataType, /* OUTPUT: Declared data type */
7643 ** parameter is an arbitrary client data pointer that is passed through
7666 void *pClientData /* Client data for xCreate/xConnect */
7672 void *pClientData, /* Client data for xCreate/xConnect */
7954 ** ^(This function is used to read data from an open [BLOB handle] into a
7955 ** caller-supplied buffer. N bytes of data are copied into buffer Z
7959 ** [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is
7960 ** less than zero, [SQLITE_ERROR] is returned and no data is read.
7983 ** ^(This function is used to write data into an open [BLOB handle] from a
7984 ** caller-supplied buffer. N bytes of data are copied from the buffer Z
8000 ** [SQLITE_ERROR] is returned and no data is written. The size of the
8003 ** than zero [SQLITE_ERROR] is returned and no data is written.
8357 ** The [SQLITE_FCNTL_DATA_VERSION] returns the data version counter
9044 ** The intent of the xInit() method is to set up global data structures
9246 ** the data between the two databases, and finally
9622 ** is invoked each time data is committed to a database in wal mode.
9869 ** any modifications to internal or persistent data structures have been made.
10907 void *pUser; /* Callback implementation user data */
11269 ** deleted or updated rows. For each unique primary key value, data is only
12191 void **ppRebase, int *pnRebase, /* OUT: Rebase data */
12497 ** the sessions module invokes to incrementally request input data as it is
12515 ** error occurs the xInput method should copy up to (*pnData) bytes of data
12546 ** The xOutput callback is invoked zero or more times to return data to
12550 ** data being returned. If the xOutput callback successfully processes the
12551 ** supplied data, it should return SQLITE_OK to indicate success. Otherwise,
12558 ** no guarantees are made as to the size of the chunks of data returned.
12664 ** and output data in approximately 1 KiB chunks. This operand may be used
12667 ** If this value is greater than 0, it is used as the new streaming data
12855 ** "auxiliary data". The pointer may then be retrieved by the current or any
12859 ** Each extension function is allocated a single auxiliary data slot for
12862 ** single auxiliary data context.
12864 ** If there is already an auxiliary data pointer when this function is
12870 ** auxiliary data pointer after the FTS5 query has finished.
12873 ** the auxiliary data is set to NULL and an error code returned. If the
12874 ** xDelete parameter was not NULL, it is invoked on the auxiliary data
12880 ** Returns the current auxiliary data pointer for the fts5 extension
12883 ** If the bClear argument is non-zero, then the auxiliary data is cleared
13160 ** extra data to the FTS index or require FTS5 to query for multiple terms,
13948 void *data; /* Data associated with this element */
13974 #define sqliteHashData(E) ((E)->data)
14389 ** that can be stored in a u32 without loss of data. The value
15081 ** actual data in the bytes used for locking. The pager never allocates
15256 #define PAGER_GET_NOCONTENT 0x01 /* Do not load data from disk */
15538 ** With BTREE_INTKEY, the table key is a 64-bit integer and arbitrary data
15545 #define BTREE_BLOBKEY 2 /* Table has keys only - no data */
15691 #define BTREE_PREFORMAT 0x80 /* Inserted data is a preformated cell */
15697 ** an arbitrary key and no data. These btrees have pKey,nKey set to the
15714 ** pData data not used
15733 int nZero; /* Extra zero data appended after pData,nData */
15892 char *z; /* Pointer to data for string (char array) types */
15979 ** number of columns of data returned by the statement.
16018 #define OP_VUpdate 7 /* synopsis: data=r[P3@P2] */
16139 #define OP_Insert 128 /* synopsis: intkey=r[P3] data=r[P2] */
16144 #define OP_SorterData 133 /* synopsis: r[P2]=data */
16145 #define OP_RowData 134 /* synopsis: r[P2]=data */
16506 void *pData; /* Page data */
16791 u8 safety_level; /* How aggressive at syncing data to disk */
17255 #define SQLITE_Stat4 0x00000800 /* Use STAT4 data */
17310 void *pUserData; /* User data parameter */
17402 ** as the user-data (sqlite3_user_data()) for the function. If
17428 ** a single query. The iArg is ignored. The user-data is always set
17437 ** ignored and the user-data for these functions is set to an
17456 ** available as the function user-data (sqlite3_user_data()). The
17991 ** A record is an object that contains one or more fields of data.
18119 tRowcnt *aiRowEst; /* Non-logarithmic stat1 data for this index */
18193 u8 directMode; /* Direct rendering mode means take data directly
18792 ** The next group of fields stores intermediate data. */
18802 int iDataCur; /* Index of the data cursor */
18969 #define SRT_Fifo 8 /* Store result as data with an automatic rowid */
18979 #define SRT_Table 14 /* Store result as data with an automatic rowid */
18980 #define SRT_Upfrom 15 /* Store result as data with rowid */
19069 int iDataCur; /* The data cursor associated with the index */
19466 ** Structure containing global configuration data for the SQLite library.
19564 union { /* Extra data for callback */
19685 ** data structures on sqlite3DebugPrintf() using a tree-like view.
22045 /* All of the upper-to-lower conversion data is above. The following
22487 u8 nullRow; /* True if pointing to a row with no data */
22705 #define MEM_Cleared 0x0100 /* NULL set by OP_Null, not from data */
22751 ** Each auxiliary data pointer stored by a user defined function
22760 void *pAux; /* Aux data pointer */
22761 void (*xDeleteAux)(void*); /* Destructor for the aux data */
23154 ** state vector. If writable static data is unsupported on the target,
23156 ** case where writable static data is supported, wsdStat can refer directly
24801 ** as the user-data for the function.
25354 ** structure. If writable static data is unsupported on the target,
25356 ** case where writable static data is supported, wsdHooks can refer directly
26352 ** u.hdr.prevSize can be part of the data for that chunk and should
26366 ** The second block of a chunk is user data if the chunk is checked
26367 ** out. If a chunk is checked out, the user data may extend into
27168 ** Obtain or release the mutex needed to access global data structures.
32335 ** Generate a human-readable diagram of the data structure that go
32391 ** Generate a human-readable diagram of the data structure that go
32461 ** Generate a human-readable diagram of the data structure that go
32687 ** state vector. If writable static data is unsupported on the target,
32689 ** case where writable static data is supported, wsdPrng can refer directly
34524 ** A = 0xxxxxxx 7 bits of data and one flag bit
34525 ** B = 1xxxxxxx 7 bits of data and one flag bit
34526 ** C = xxxxxxxx 8 bits of data
34541 ** The length of data write will be between 1 and 9 bytes. The number
35461 ** a pointer to a static null element with HashElem.data==0 is returned.
35531 ** that matches pKey. Return the data for this element if it is
35537 return findElementWithHash(pH, pKey, 0)->data;
35541 ** and the data is "data".
35547 ** new data replaces the old data and the old data is returned.
35549 ** the new data is returned and the hash table is unchanged.
35551 ** If the "data" parameter to this function is NULL, then the
35554 SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, void *data){
35562 if( elem->data ){
35563 void *old_data = elem->data;
35564 if( data==0 ){
35567 elem->data = data;
35572 if( data==0 ) return 0;
35574 if( new_elem==0 ) return data;
35576 new_elem->data = data;
35609 /* 7 */ "VUpdate" OpHelp("data=r[P3@P2]"),
35730 /* 128 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
35735 /* 133 */ "SorterData" OpHelp("r[P2]=data"),
35736 /* 134 */ "RowData" OpHelp("r[P2]=data"),
36009 /* Delete a key (with its corresponding data) from the key/value
36022 ** by zClass and put the text data associated with that key in the first
36027 ** Return the total number of bytes in the data, without truncation, and
36031 ** If nBuf<=0 then this routine simply returns the size of the data without
36716 ** random data.
39051 ** The file suffix added to the data base filename in order to create the
40162 ** Read data from a file into a buffer. Return SQLITE_OK if all
40189 ** data from the memory mapping using memcpy(). */
40243 ** absolute offset iOff, then attempt to write nBuf bytes of data from
40251 const void *pBuf, /* Copy data from this buffer to the file */
40300 ** Write data from a buffer into a file. Return SQLITE_OK on success
40347 ** data from the memory mapping using memcpy(). */
40579 ** file data is synced.
40675 ** use read() and write() to access data beyond this point from now on.
43577 ** Write nBuf bytes of random data to the supplied buffer zBuf.
44330 /* if the conch has data compare the contents */
45400 * and an isolated heap will be created to store all allocated data.
45405 * function), all data that was allocated using the isolated heap will
45407 * data will almost certainly result in an immediate access violation.
47049 ** This function sets the data directory or the temporary directory based on
47051 ** data directory or 2 in order to set the temporary directory. The zValue
47789 ** Read data from a file into a buffer. Return SQLITE_OK if all
47816 ** data from the memory mapping using memcpy(). */
47870 ** Write data from a buffer into a file. Return SQLITE_OK on success
47894 ** data from the memory mapping using memcpy(). */
50680 ** NOTE: We are dealing with a relative path name and the data
50683 ** one by prepending the data directory and a slash.
50737 ** NOTE: We are dealing with a relative path name and the data
50740 ** one by prepending the data directory and a backslash.
50759 ** NOTE: We are dealing with a relative path name and the data
50762 ** one by prepending the data directory and a backslash.
51521 ** Read data from an memdb-file.
51563 ** Write data to an memdb-file.
51971 ** random data.
52683 printf("%3d: nRef %2d flgs %02x data ", i, pPg->nRef, pPg->flags);
53288 ** function is 0, then the data area associated with page 1 is zeroed, but
53639 ** in memory directly after the associated page data, if the database is
53748 ** Global data used by this cache.
55756 ** * All writing and syncing of journal and database data has finished.
55781 ** to read or write data returns an error. Eventually, once all
56015 ** the pcache module to the pagerStress() routine to write cached data
56193 void *(*xCodec)(void*,void*,Pgno,int); /* Routine for en/decoding data */
56233 ** Journal files begin with the following magic string. The data
56238 ** written, semi-random garbage data might appear in the journal
56241 ** sanity checking data is an attempt to discover the garbage in the
56245 ** of a 32-bit checksum on each page of data. The checksum covers both
56246 ** the page number and the pPager->pageSize bytes of data for the page.
56249 ** because garbage data that appears at the end of a journal is likely
56250 ** data that was once in other files that have now been deleted. If the
56251 ** garbage data came from an obsolete journal file, the checksums might
56696 ** file when it contains rollback data for exactly one page.
56748 ** Return a 32-bit hash of the page data for pPage.
56984 ** file it may contain some garbage data. There are two scenarios
56991 ** that garbage data is never appended to the journal file.
57029 ** be significantly slower than contiguously writing data to the file,
57030 ** even if that means explicitly writing data to the block of
57224 /* Write the super-journal data to the end of the journal file. If
57240 ** and 8 bytes of magic data just written to the file. This is
57683 ** of data. Compute and return a checksum based ont the contents of the
57684 ** page of data and the current value of pPager->cksumInit.
57688 ** of the page data, starting with byte offset (pPager->pageSize%200).
57761 ** to the database file, then the IO error code is returned. If data
57816 /* Read the page number and page data from the journal or sub-journal
57828 ** it could cause invalid data to be written into the journal. We need to
57829 ** detect this invalid data (with high probability) and ignore it.
57882 ** journal. Otherwise, a power loss might leave modified data in the
57918 /* Write the data read from the journal back into the database file.
57919 ** This is usually safe even for an encrypted database - as the data
57921 ** is if the data was just read from an in-memory sub-journal. In that
57947 /* If this is a rollback of a savepoint and data was not written to
57959 ** the data just read from the sub-journal. Mark the page as dirty
58272 ** + pPager->pageSize bytes of data.
58642 ** updated as data is copied out of the rollback journal and into the
59572 void *pData, /* xFetch()'d data for this page */
59816 ** of this connections data, then proceed to rolling back the old,
59817 ** out-of-date data that follows it. Database corruption.
59847 ** all data has really hit the disk before nRec is updated to mark
59852 ** for garbage data to be appended to the file, the nRec field
59908 ** SQLITE_BUSY is returned and no data is written to the database file.
59911 ** is not yet open, it is created and opened before any data is
59982 /* Write out the page data. */
61013 ** Otherwise, a new page object is allocated and populated with data
61018 ** The extra data appended to a page is always initialized to zeros the
61021 ** data is left as it was when the page object was last used.
61035 ** a new page into the cache to be filled with the data read
61038 ** If PAGER_GET_NOCONTENT is true, then the data returned is zeroed instead
61475 ** transactions may copy data from the sub-journal into the database
61549 ** Mark a single data page as writeable. The page is written into the
61728 ** Mark a data page as writeable. This routine must be called before
61730 ** of this function and be careful not to change any page data unless
61777 ** The overlying software layer calls this routine when all of the data
61786 ** memory pressure forces page pPg out of the cache, the data does need
61815 ** page data. In this case the file will be updated when the current
62263 ** In WAL mode, all cache-entries containing data modified within the
62265 ** their pre-transaction state by re-reading data from the database or
62680 ** meta-data associated with pPg (i.e. data stored in the nExtra bytes
62797 ** sync()ed before any data is written to database file page needSyncPgno.
62841 ** Return a pointer to the data for the specified page.
63409 ** of page data. The frame-header is six big-endian 32-bit unsigned
63485 ** data structure called the wal-index is maintained to expedite the
63831 ** only support mandatory file-locks, we do not read or write data
63848 ** file are calculated by treating all data as an array of 32-bit
63850 ** all data as 32-bit little-endian words.
64081 ** Generate or extend an 8 byte checksum based on the data in
64187 u8 *aData, /* Pointer to page data */
64218 u8 *aData, /* Pointer to page data (for checksum) */
64219 u8 *aFrame /* Frame data */
64242 ** and the frame-data matches the checksum in the last 8
64619 u8 *aData; /* Pointer to data part of aFrame buffer */
64635 ** data. Similarly, if the 'magic' value is invalid, ignore the whole
65411 u32 iFrame = 0; /* Wal frame containing data for iDbpage */
65479 ** database plus the amount of data in the wal file, plus the
65490 /* Iterate through the contents of the WAL, copying data to the db file */
65884 u8 *aData; /* Pointer to data part of aFrame buffer */
66506 Pgno pgno, /* Database page number to read data for */
66509 u32 iRead = 0; /* If !=0, WAL frame to return data from */
66518 ** no data will be read from the wal under any circumstances. Return early
66538 ** i.e. these slots may contain garbage data. However, we assume
66612 u8 *pOut /* Buffer to write page data to */
66708 ** If any data has been written (but not committed) to the log file, this
66919 /* Write the page data */
66935 u8 *aBuf; /* Buffer to load data from wal file into */
67174 /* Append data to the wal-index. It is not necessary to lock the
67176 ** guarantees that there are no other writers, and no data that may
67303 /* Copy data from the log to the database file. */
67603 ** key and data for any entry are combined to form the "payload". A
67609 ** information such as the size of key and data.
67704 ** only keys and no data. The intkey flag means that the key is an integer
67741 ** As a special case, all 8 bytes of the 9th byte are used as data. This
67753 ** bytes of key and data in a btree cell.
67759 ** var Number of bytes of data. Omitted if the zerodata flag is set.
67765 ** filled with data (pagesize - 4 bytes). The last page can have as little
67766 ** as 1 byte of data.
67861 u8 *aData; /* Pointer to disk image of the page data */
67934 ** If the shared-data extension is enabled, there may be multiple users
69188 ** when a page that previously contained data becomes a free-list leaf
69195 ** 1) When all data is deleted from a page and the page becomes
69197 ** (as free-list leaf pages contain no meaningful data). Sometimes
69210 ** is extracted from the free-list and reused, then the original data
69615 u8 *pPtrmap; /* The pointer map data */
69638 /* The first byte of the extra data is the MemPage.isInit byte.
69675 u8 *pPtrmap; /* Pointer map page data */
69943 ** data area of the btree-page. The return number includes the cell
69944 ** data header and the local payload, but not any overflow page or
70122 unsigned char *data; /* The page data */
70134 data = pPage->aData;
70138 assert( nCell==get2byte(&data[hdr+3]) || CORRUPT_DB );
70147 if( (int)data[hdr+7]<=nMaxFrag ){
70148 int iFree = get2byte(&data[hdr+1]);
70151 int iFree2 = get2byte(&data[iFree]);
70153 if( 0==iFree2 || (data[iFree2]==0 && data[iFree2+1]==0) ){
70154 u8 *pEnd = &data[cellOffset + nCell*2];
70157 int sz = get2byte(&data[iFree+2]);
70158 int top = get2byte(&data[hdr+5]);
70164 sz2 = get2byte(&data[iFree2+2]);
70166 memmove(&data[iFree+sz+sz2], &data[iFree+sz], iFree2-(iFree+sz));
70174 memmove(&data[cbrk], &data[top], iFree-top);
70175 for(pAddr=&data[cellOffset]; pAddr<pEnd; pAddr+=2){
70187 iCellStart = get2byte(&data[hdr+5]);
70190 memcpy(&temp[iCellStart], &data[iCellStart], usableSize - iCellStart);
70194 pAddr = &data[cellOffset + i*2];
70214 memcpy(&data[cbrk], &src[pc], size);
70217 data[hdr+7] = 0;
70221 if( data[hdr+7]+cbrk-iCellFirst!=pPage->nFree ){
70225 put2byte(&data[hdr+5], cbrk);
70226 data[hdr+1] = 0;
70227 data[hdr+2] = 0;
70228 memset(&data[iCellFirst], 0, cbrk-iCellFirst);
70249 u8 * const aData = pPg->aData; /* Page data */
70321 u8 * const data = pPage->aData; /* Local cache of pPage->aData */
70324 u8 *pTmp; /* Temp ptr into data[] */
70343 pTmp = &data[hdr+5];
70361 if( (data[hdr+2] || data[hdr+1]) && gap+2<=top ){
70365 assert( pSpace+nByte<=data+pPage->pBt->usableSize );
70366 *pIdx = g2 = (int)(pSpace-data);
70386 top = get2byteNotZero(&data[hdr+5]);
70398 put2byte(&data[hdr+5], top);
70425 unsigned char *data = pPage->aData; /* Page content */
70426 u8 *pTmp; /* Temporary ptr into data[] */
70441 if( data[iPtr+1]==0 && data[iPtr]==0 ){
70444 while( (iFreeBlk = get2byte(&data[iPtr]))<iStart ){
70465 iEnd = iFreeBlk + get2byte(&data[iFreeBlk+2]);
70470 iFreeBlk = get2byte(&data[iFreeBlk]);
70478 int iPtrEnd = iPtr + get2byte(&data[iPtr+2]);
70486 if( nFrag>data[hdr+7] ) return SQLITE_CORRUPT_PAGE(pPage);
70487 data[hdr+7] -= nFrag;
70489 pTmp = &data[hdr+5];
70497 put2byte(&data[hdr+1], iFreeBlk);
70498 put2byte(&data[hdr+5], iEnd);
70501 put2byte(&data[iPtr], iStart);
70506 memset(&data[iStart], 0, iSize);
70508 put2byte(&data[iStart], iFreeBlk);
70509 put2byte(&data[iStart+2], iSize);
70605 u8 *data; /* Equal to pPage->aData */
70623 data = pPage->aData;
70627 top = get2byteNotZero(&data[hdr+5]);
70635 pc = get2byte(&data[hdr+1]);
70636 nFree = data[hdr+7] + top; /* Init nFree to non-freeblock free space */
70650 next = get2byte(&data[pc]);
70651 size = get2byte(&data[pc+2]);
70690 u8 *data; /* Equal to pPage->aData */
70697 data = pPage->aData;
70701 pc = get2byteAligned(&data[cellOffset+i*2]);
70707 sz = pPage->xCellSize(pPage, &data[pc]);
70726 u8 *data; /* Equal to pPage->aData */
70738 data = pPage->aData + pPage->hdrOffset;
70741 if( decodeFlags(pPage, data[0]) ){
70748 pPage->aCellIdx = data + pPage->childPtrSize + 8;
70753 pPage->nCell = get2byte(&data[3]);
70764 || get2byteNotZero(&data[5])==(int)pBt->usableSize
70779 unsigned char *data = pPage->aData;
70786 assert( sqlite3PagerGetData(pPage->pDbPage) == data );
70790 memset(&data[hdr], 0, pBt->usableSize - hdr);
70792 data[hdr] = (char)flags;
70794 memset(&data[hdr+1], 0, 4);
70795 data[hdr+7] = 0;
70796 put2byte(&data[hdr+5], pBt->usableSize);
70800 pPage->aDataEnd = &data[pBt->pageSize];
70801 pPage->aCellIdx = &data[first];
70802 pPage->aDataOfst = &data[pPage->childPtrSize];
71013 ** This routine needs to reset the extra data section at the end of the
71014 ** page to agree with the restored data.
71429 ** data is passed to system call write(). So to avoid this error,
71566 ** Change the way data is synced to disk in order to increase or decrease
72041 unsigned char *data;
72050 data = pP1->aData;
72053 memcpy(data, zMagicHeader, sizeof(zMagicHeader));
72055 data[16] = (u8)((pBt->pageSize>>8)&0xff);
72056 data[17] = (u8)((pBt->pageSize>>16)&0xff);
72057 data[18] = 1;
72058 data[19] = 1;
72060 data[20] = (u8)(pBt->pageSize - pBt->usableSize);
72061 data[21] = 64;
72062 data[22] = 32;
72063 data[23] = 32;
72064 memset(&data[24], 0, 100-24);
72070 put4byte(&data[36 + 4*4], pBt->autoVacuum);
72071 put4byte(&data[36 + 7*4], pBt->incrVacuum);
72074 data[31] = 1;
73411 ** of data. For index btrees, this will be the size of the key.
73447 ** pointer-map data instead of reading the content of page ovfl to do so.
73479 ** out to be wrong, fall back to loading the data of page
73520 ** Copy data from a buffer to a page, or from a page to a buffer.
73522 ** pPayload is a pointer to data stored on database page pDbPage.
73523 ** If argument eOp is false, then nByte bytes of data are copied
73526 ** of data are copied from the buffer pBuf to pPayload.
73531 void *pPayload, /* Pointer to page data */
73538 /* Copy data from buffer to page (a write operation) */
73545 /* Copy data from page to buffer (a read operation) */
73610 /* Trying to read or write past the end of the data is an error. The
73618 /* Check if data must be read/written to/from the btree page itself. */
73686 ** data is not required. So first try to lookup the overflow
73700 ** range of data that is being read (eOp==0) or written (eOp!=0).
73711 ** 2) data is required from the start of this overflow page, and
73717 ** then data can be read directly from the database file into the
73824 ** the key if index btrees (pPage->intKey==0) and is the data for
73826 ** key/data is written into *pAmt. If *pAmt==0, then the value
73830 ** and data to fit on the local page and for there to be no overflow
73832 ** key and data without making a copy. If the key and/or data spills
73834 ** the key/data and copy it into a preallocated buffer.
73837 ** page of the database. The data might change or move the next time
73867 ** many bytes of the key or data as are available on the local
73870 ** The pointer returned is ephemeral. The key/data may move
73876 ** These routines is used to get quick access to key and data
75539 /* If pToRelease is not zero than pPayload points into the data area
75543 /* If pPayload is part of the data area of pPage, then make sure pPage
75599 /* If pToRelease is not zero than pPrior points into the data area
75603 /* If pPrior is part of the data area of pPage, then make sure pPage
75631 u8 *data; /* pPage->aData */
75632 u8 *ptr; /* Used to move bytes around within data[] */
75643 data = pPage->aData;
75645 assert( pPage->pBt->usableSize > (u32)(ptr-data) );
75648 testcase( pc==(u32)get2byte(&data[hdr+5]) );
75661 memset(&data[hdr+1], 0, 4);
75662 data[hdr+7] = 0;
75663 put2byte(&data[hdr+5], pPage->pBt->usableSize);
75668 put2byte(&data[hdr+3], pPage->nCell);
75696 int idx = 0; /* Where to write new cell content in data[] */
75698 u8 *data; /* The content of the whole page */
75740 data = pPage->aData;
75741 assert( &data[pPage->cellOffset]==pPage->aCellIdx );
75756 memcpy(&data[idx+4], pCell+4, sz-4);
75757 put4byte(&data[idx], iChild);
75759 memcpy(&data[idx], pCell, sz);
75766 if( (++data[pPage->hdrOffset+4])==0 ) data[pPage->hdrOffset+3]++;
75767 assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );
75914 ** such cells before overwriting the page data.
75926 u8 * const aData = pPg->aData; /* Pointer to data for pPg */
76023 u8 *pEnd; /* Maximum extent of cell data */
76438 ** match the new data. The initialization of pTo can actually fail under
76675 ** leafData: 1 if pPage holds key+data and pParent holds only keys.
77091 /* If the tree is a leaf-data tree, and the siblings are leaves,
77104 /* Obscure case for non-leaf-data trees: If the cell at pCell was
77465 ** the previous call, as the overflow cell data will have been
77509 const BtreePayload *pX, /* Source of data to write */
77525 /* Mixed read data and zeros at the end. Make a recursive call
77526 ** to write the zeros then fall through to write the real data */
77629 BtCursor *pCur, /* Insert data into the table of this cursor */
77650 ** example, when inserting data into a table with auto-generated integer
77653 ** data into the intkey B-Tree. In this case btreeMoveto() recognizes
77689 ** keys with no associated data. If the cursor was opened expecting an
77691 ** blob of associated data. */
77901 ** fails. Internal data structure corruption will result otherwise.
77935 ** writes the data for the new cell into the BtShared.pTmpSpace buffer
77948 u32 nRem; /* Bytes of data still to copy */
78376 /* Update the pointer-map and meta-data with the new root-page number. */
79045 u8 *data; /* Page content */
79088 data = pPage->aData;
79093 contentOffset = get2byteNotZero(&data[hdr+5]);
79098 nCell = get2byte(&data[hdr+3]);
79104 assert( pPage->aCellIdx==&data[cellStart] );
79105 pCellIdx = &data[cellStart + 2*(nCell-1)];
79109 pgno = get4byte(&data[hdr+8]);
79132 assert( pCellIdx==&data[cellStart + i*2] );
79141 pCell = &data[pc];
79206 pc = get2byteAligned(&data[cellStart+i*2]);
79207 size = pPage->xCellSize(pPage, &data[pc]);
79217 i = get2byte(&data[hdr+1]);
79221 size = get2byte(&data[i+2]);
79228 j = get2byte(&data[i]);
79266 if( heap[0]==0 && nFrag!=data[hdr+7] ){
79269 nFrag, data[hdr+7], iPage);
79598 ** This function modifies the data stored as part of that entry.
79600 ** Only the data content may only be modified, it is not possible to
79601 ** change the length of the data stored. If this function is called with
79602 ** parameters that attempt to write past the end of the existing data,
79968 ** Parameter zSrcData points to a buffer containing the data for
79969 ** page iSrcPg from the source database. Copy this data into the
79975 const u8 *zSrcData, /* Source database page data */
80039 /* Copy the data from the source page into the destination page.
80258 /* This block ensures that all data required to recreate the original
80426 ** copied into the destination database, then the data written to the
80428 ** to be updated with the new data before the backup operation is
80446 ** the new data into the backup.
81348 ** affinity even if that results in loss of data. This routine is
81648 ** freed. If pFrom contains ephemeral data, a copy is made.
81781 ** Move data out of a btree key or data field and into a Mem structure.
81782 ** The data is payload from the entry that pCur is currently pointing
81783 ** to. offset and amt determine what portion of the data or key to retrieve.
81797 u32 offset, /* Offset from the start of data to return bytes from. */
81799 Mem *pMem /* OUT: Return data in this Mem structure. */
81821 Mem *pMem /* OUT: Return data in this Mem structure. */
81885 ** except the data returned is in the encoding specified by the second
82433 int iField; /* Next unread data byte */
82434 int szField = 0; /* Size of the current data field */
83966 /* Note: this cast is safe, because the origin data point was an int
86056 ** all auxiliary data pointers currently cached by the VM passed as
86060 ** only invoked for those auxiliary data pointers created by the user
86224 ** data and index records. Each serialized value consists of a
86225 ** 'serial-type' and a blob of data. The serial type is an 8-byte unsigned
86229 ** the blob of data that it corresponds to. In a table record, all serial
86230 ** types are stored at the start of the record, and the blobs of data at
86232 ** serial-type and data blob separately.
86234 ** The following table describes the various storage classes for data:
86236 ** serial type bytes of data type
86350 ** Return the length of the data corresponding to the supplied serial-type.
86427 ** Deserialize the data blob pointed to by buf as serial type serial_type
86656 u32 d1; /* Offset into aKey[] of next data element */
87068 u32 d1; /* Offset into aKey[] of next data element */
88500 ** Execute the statement pStmt, either until a row of data is ready, the
88740 ** Extract the user data from a sqlite3_context structure and return a
88749 ** Extract the user data from a sqlite3_context structure and return a
88907 ** Return the auxiliary data pointer, if any, for the iArg'th argument to
88913 ** auxiliary data pointers that is available to all functions within a
88934 ** Set the auxiliary data pointer and delete function, for the iArg'th
88940 ** Undocumented behavior: If iArg is negative then make the data available
89384 const void *zData, /* Pointer to the data to be bound */
89385 i64 nData, /* Number of bytes of data to be bound */
89386 void (*xDel)(void*), /* Destructor for the data */
89387 u8 encoding /* Encoding for the data */
90007 ** Return status data for a single loop within query pStmt.
90066 ** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
91022 ** Return the symbolic name for the data type of a pMem
91724 ** P4 points to a blob of data P1 bytes long. Store this
92310 ** without data loss, then jump immediately to P2, or if P2==0
92986 ** P5 is a bitmask of data types. SQLITE_INTEGER is the least significant
93151 ** Interpret the data that cursor P1 points to as a structure built using
93153 ** information about the format of the data.) Extract the P2-th column
93174 u32 *aOffset; /* aOffset[i] is offset to start of data for i-th column */
93175 int len; /* The length of the serialized data for the column */
93262 ** types use so much data space that there can only be 4096 and 32 of
93334 ** (2) the entire header was used but not all data was used
93335 ** (3) the end of the data extends beyond the end of the record.
93613 ** use as a data record in a database table or as a key
93638 u64 nData; /* Number of bytes of data space */
93656 ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |
93663 ** corresponding data element (see sqlite3VdbeSerialType()). The
93667 nData = 0; /* Number of bytes of data space */
93737 ** nData Number of bytes of data space needed for the record
94337 ** Often, v-tables store their data in other SQLite tables, which
94688 ** can be used as zero-length data for OP_Insert. This is an optimization
94713 /* Make register reg[P3] into a value that can be used as the data
94714 ** form sqlite3BtreeInsert() where the length of the data is zero. */
94822 ** row of data. The content of that one row is the content of memory
95861 ** Synopsis: intkey=r[P3] data=r[P2]
95864 ** created if it doesn't already exist or the data for an existing
95865 ** entry is overwritten. The data is the value MEM_Blob stored in register
95898 Mem *pData; /* MEM cell holding data for the record to be inserted */
96189 ** Synopsis: r[P2]=data
96191 ** Write into register P2 the current sorter data for sorter cursor P1.
96215 ** Synopsis: r[P2]=data
96219 ** There is no interpretation of the data.
96224 ** If cursor P2 is a table, then the content extracted is the data.
96234 ** then a copy of the data is made into memory. P3!=0 is faster, but
96531 ** Advance cursor P1 so that it points to the next key/data pair in its
96555 ** Back up cursor P1 so that it points to the previous key/data pair in its
97251 ** Remove the internal (in-memory) data structures that describe
97265 ** Remove the internal (in-memory) data structures that describe
97279 ** Remove the internal (in-memory) data structures that describe
98568 ** data is available) and the error code returned when xColumn or
98577 /* If there is data, jump to P2 */
98621 ** Synopsis: data=r[P3@P2]
98754 ** whether meta data associated with a user function argument using the
98773 ** whether meta data associated with a user function argument using the
99284 int iOffset; /* Byte offset of blob in cursor data */
99708 ** Read data from a blob handle.
99715 ** Write data to a blob handle.
99722 ** Query a blob handle for the size of the data.
99881 ** When Rewind() is called, any data remaining in memory is flushed to a
99882 ** final PMA. So at this point the data is stored in some number of sorted
99893 ** merged T bytes of data into a single sorted PMA, the main thread
99895 ** with merging the next T bytes of data. And so on.
99902 ** First, T bytes of data from the first SORTER_MAX_MERGE_COUNT PMAs on
99903 ** disk are merged together. Then T bytes of data from the second set, and
99927 ** Hard-coded maximum amount of data to accumulate in memory before flushing
99946 ** A container for a temp file handle and the current amount of data
99951 i64 iEof; /* Bytes of data stored in pFd */
99976 ** ("EOF" means "End Of File". When aReadr[] is at EOF there is no more data.)
100036 PmaReader *aReadr; /* Array of PmaReaders to merge data from */
100098 PmaReader *pReader; /* Readr data from here after Rewind() */
100151 ** size. When the IncrMerger is initialized, it reads enough data from
100155 ** sorted record data from pMerger.
100167 ** background thread to prepare data for the PmaReader, with a single
100170 ** of data.
100174 MergeEngine *pMerger; /* Merge engine thread reads data from */
100176 int mxSz; /* Maximum bytes of data to store */
100224 /* The data for the record immediately follows this header */
100227 /* Return a pointer to the buffer containing the record data for SorterRecord
100254 ** Read the next nByte bytes of data from the PMA p.
100255 ** If successful, set *ppOut to point to a buffer containing the data
100264 int nByte, /* Bytes of data to read */
100265 u8 **ppOut /* OUT: Pointer to buffer containing data */
100268 int nAvail; /* Bytes of data available in buffer */
100278 /* If there is no more data to be read from the buffer, read the next
100279 ** p->nBuffer bytes of data from the file into it. Or, if there are less
100280 ** than p->nBuffer bytes remaining in the PMA, read all remaining data. */
100286 /* Determine how many bytes of data to read. */
100294 /* Readr data from the file. Return early if an error occurs. */
100302 /* The requested data is available in the in-memory buffer. In this
100303 ** case there is no need to make a copy of the data, just return a
100308 /* The requested data is not all available in the in-memory buffer.
100324 /* Copy as much data as is available in the buffer into the start of
100335 u8 *aNext; /* Pointer to buffer to copy data from */
100353 ** Read a varint from the stream of data accessed by p. Set *pnOut to
101248 ** Write nData bytes of data to the PMA. Return SQLITE_OK
101276 ** Flush any buffered data to disk and clean up the PMA-writer object.
101278 ** Return SQLITE_OK if flushing the buffered data succeeds or is not
101321 ** Each record consists of a varint followed by a blob of data (the
101322 ** key). The varint is the number of bytes in the blob of data.
101652 ** of the data stored in aFile[1] is the same as that used by regular PMAs,
101765 ** Allocate and return a new IncrMerger object to read data from pMerger.
101874 ** function returns, the first key of merged data may be read from the
101885 ** vdbePmaReaderIncrMergeInit() to initialize each PmaReader that feeds data
102207 ** MergeEngine here. This MergeEngine will read data from exactly
102366 /* If no data has been written to disk, then do not do so now. Instead,
102367 ** sort the VdbeSorter.pRecord list. The vdbe layer will read data directly
102407 ** SQLITE_DONE end of data
103044 int nSpill; /* Bytes of data before flushing */
103055 ** Read data from the in-memory journal file. This is the implementation
103144 ** journal data to roll back changes made to the internal page-cache
103157 ** Write data to the file.
103161 const void *zBuf, /* Take data to be written from here */
103169 /* If the file should be created now, create it and write the new data
108117 ** Check pExpr to see if it is an invariant constraint on data source pSrc.
110327 ** or OPFLAG_TYPEOFARG respectively, to avoid unnecessary data
112797 ** is parsed (i.e. sqlite3AddColumn()) add the new Column data to
114707 ** As with sqlite_stat2, the sqlite_stat4 table contains histogram data
115018 /* Maximum number of samples. 0 if STAT4 data is not collected */
115297 ** The purpose of this routine is to collect statistical data and/or
116173 ** the old data with the new instead of allocating a new array. */
116237 /* If this is stat4 data, then calculate aAvgEq[] values for all
116307 ** data equivalent to the following:
116397 /* This next condition is true if data has already been loaded from
116461 ** during compilation and the sqlite_stat4 table is present, no data is
116466 ** returned. However, in this case, data is read from the sqlite_stat1
117700 /* Initialize any AUTOINCREMENT data structures required.
118256 ** Remove the memory data structures associated with the given
118259 ** This routine just deletes the data structure. It does not unlink
118260 ** the table data structure from the hash table. But it does destroy
118893 ** Clean up the data structures associated with the RETURNING clause.
119787 ** internal schema data structures and the generated VDBE code so that they
120382 /* Reparse everything to update our internal data structures */
121855 ** has just been created, it contains no data and the index initialization
121905 /* Fill the index with data and reparse the schema. Code an OP_Expire
121994 /* Indexes with default row estimates should not have stat1 data */
122001 ** 2020-05-27: If some of the stat data is coming from the sqlite_stat1
122005 ** stat1 data to be ignored by the query planner.
123987 int iDataCur = 0; /* VDBE cursor for the canonical data source */
124396 ** 1. iDataCur is an open cursor on the btree that is the canonical data
124434 int iDataCur, /* Cursor from which column data is extracted */
124585 int iDataCur, /* Cursor of table holding data. */
124650 int iDataCur, /* Cursor number from which to take column data */
127591 ** regBase is the first of an array of register that contains the data
127678 int regData, /* Parent row data starts here */
128004 ** row data.
128014 int regOld, /* Previous row data is stored here */
128015 int regNew, /* New row data is stored here */
129183 Select *pSelect, /* A SELECT statement to use as the data source */
129207 ** insert with data coming from a single-row VALUES clause, the code executes
129260 ** values from a SELECT but the data is being inserted into a table
129288 Select *pSelect, /* A SELECT statement to use as the data source */
129298 int nColumn; /* Number of columns in the data */
129300 int iDataCur = 0; /* VDBE cursor that is the main data repository */
129317 int regFromSelect = 0;/* Base register for data coming from SELECT */
129320 int regIns; /* Block of regs holding rowid+data being inserted */
129506 /* Figure out how many columns of data are supplied. If the data
129576 /* This is the case if the data for the INSERT is coming from a
129614 /* Make sure the number of columns in the source data matches the number
129730 /* Compute data for ordinary columns of the new entry. Values
129845 /* Copy the new data already generated. */
129986 /* The bottom of the main insertion loop, if the data source
130117 ** the indexes in a different order. The following data structures accomplish
130182 ** the data to be inserted or the data after the update. There will be
130190 ** the data prior to an UPDATE rather than afterwards. regOldData is zero
130272 int iDataCur, /* Canonical data cursor (main table or PK index) */
131157 int iDataCur, /* Cursor of the canonical data source */
131225 ** The cursor for the object that contains the complete data (normally
131311 ** Check to see if index pSrc is compatible as a source of data
131385 Select *pSelect, /* A SELECT statement to use as the data source */
131403 int regData, regRowid; /* Registers holding data and rowid */
131804 int callbackIsInit; /* True if callback data is initialized */
133378 ** state vector. If writable static data is unsupported on the target,
133380 ** case where writable static data is supported, wsdStat can refer directly
135410 ** the returned data set are:
137108 pragmaVtabColumn, /* xColumn - read data */
137109 pragmaVtabRowid, /* xRowid - read data */
137110 0, /* xUpdate - write data */
137262 ** or executed. All the parser does is build the internal data
137335 ** data structures for a single database file. The index of the
138852 ** This routine does the work of loading query data into an array of
138901 int regData, /* First register holding data to be sorted */
138902 int regOrigData, /* First register holding data before packing */
138903 int nData, /* Number of elements in the regData data array */
138920 ** (1) The data to be sorted has already been packed into a Record
139295 ** are evaluated in order to get the data for this row. If srcTab is
139296 ** zero or more, then data is pulled from srcTab and p->pEList is used only
139302 int srcTab, /* Pull data from this table if non-negative */
139516 /* Store the result as data using a unique key.
139586 ** item into the set table with bogus data.
139634 case SRT_Coroutine: /* Send data to a co-routine */
139867 int nColumn, /* Number of columns of data */
140169 ** data for the result-set column of the sub-select.
141060 SelectDest dest; /* Alternative data destination */
141236 /* Convert the data in the temporary table into whatever form
141422 ** The data to be output is contained in pIn->iSdst. There are
141441 SelectDest *pIn, /* Coroutine supplying data */
141442 SelectDest *pDest, /* Where to send the data */
141476 /* Store the result as data using a unique key.
141582 ** AltB: Called when there is data from both coroutines and A<B.
141584 ** AeqB: Called when there is data from both coroutines and A==B.
141586 ** AgtB: Called when there is data from both coroutines and A>B.
141588 ** EofA: Called when data is exhausted from selectA.
141590 ** EofB: Called when data is exhausted from selectB.
141642 ** until all data is exhausted then jump to the "end" labe. AltB, AeqB,
141870 ** are exhausted and only data in select B remains.
141884 ** are exhausted and only data in select A remains.
142316 ** passes over the data. Furthermore, because the temporary table
142326 ** but only has to scan the data once. And because indices might
142327 ** exist on the table t1, a complete scan of the data might be
142495 Walker w; /* Walker to persist agginfo data */
144161 Table *pTab = pFrom->pTab; /* Table for this data source */
144163 char *zTabName; /* AS name for this data source */
144164 const char *zSchemaName = 0; /* Schema name for this data source */
144165 int iDb; /* Schema index for this data src */
145423 ** being unused if the data can be extracted in pre-sorted order.
145900 VdbeComment((v, "indicate data in accumulator"));
145973 ** contains the data for table <tbl> or on one of its indexes. It
146185 ** This structure is used to pass data from sqlite3_get_table() through
146244 /* Copy over the row data
147721 ** populated by the caller (there is no data to populate them with anyway).
148144 int iDataCur; /* Cursor for the canonical data btree */
148557 ** the outer INSERT and the data cursor should be pointing at the row
148756 ** row data. This array is used to check constants, create the new
151844 SrcList *pSrclist, /* FROM clause pLvl reads data from */
152208 ** clause that the scan reads data from.
152215 SrcList *pSrclist, /* FROM clause pLvl reads data from */
153338 ** to access the data.
154043 ** A: <loop body> # Return data, whatever.
156710 ** into aiCur[0] and aiCur[1]. iaCur[0] gets the cursor of the data
156732 ** the data cursor to the row selected by the index cursor.
158214 ** on the stat4 data for the index. this scan will be peformed multiple
158346 ** In the absence of sqlite_stat4 ANALYZE data, or if such data cannot be
158518 ** the histogram data. This only works when x is the left-most
158519 ** column of an index and sqlite_stat4 histogram data is available
159478 ** If we do not have real sqlite_stat1 data, always prefer to use
159566 /* Adjust nOut using stat4 data. Or, if there is no stat4
159567 ** data, using some other estimate. */
160080 ** an equal number of appearances. Without STAT4 data, we still want
160177 ** then the sqlite_stat1 data becomes important for scoring the
161386 ** cost of sorting nRowEst rows of data where the first X terms of
162123 ** data from the various tables of the loop.
163002 /* If this scan uses an index, make VDBE code substitutions to read data
166651 ** YYCODETYPE is the data type used to store the integer codes
166662 ** YYACTIONTYPE is the data type used for "action codes" - numbers
166665 ** sqlite3ParserTOKENTYPE is the data type used for minor type for terminal
166674 ** YYMINORTYPE is the data type used for all minor types.
174801 /* Invoke any destructors registered for collation sequence user data. */
176688 /* Allocate the sqlite data structure */
177231 ** data for this thread has been deallocated.
177233 ** SQLite no longer uses thread-specific data so this routine is now a
177249 char const **pzDataType, /* OUTPUT: Declared data type */
178742 ** A = 0xxxxxxx 7 bits of data and one flag bit
178743 ** B = 1xxxxxxx 7 bits of data and one flag bit
178821 ** iterate through a single leaf node's data) and LeavesReader (to
178847 ** New data is spilled to a new leaf node when the current node
178848 ** exceeds LEAF_MAX bytes (default 2048). New data which itself is
178864 ** to describe what data is stored by the each subtree. Interior
178893 ** iBlockid+i. Interior nodes only store enough term data to
178898 ** New data is spilled to a new interior node at the same height when
178987 ** data for a particular docid with newer data, so deletes or updates
178988 ** will eventually overtake the earlier data and knock it out. The
178989 ** query logic likewise merges doclists so that newer data knocks out
178990 ** older data.
179258 void *data; /* Data associated with this element */
179269 ** FTS3_HASH_BINARY pKey points to binary data nKey bytes long.
179309 #define fts3HashData(E) ((E)->data)
179343 ** This is the maximum amount of data (in bytes) to store in the
179556 ** pending data structures, including hash table overhead, but not including
179566 int nMaxPendingData; /* Max pending data before flush to disk */
179567 int nPendingData; /* Current bytes of pending data */
179626 MatchinfoBuffer *pMIBuffer; /* Buffer for matchinfo data */
179721 ** matchinfo data. If it is not NULL, it points to an array of size nCol*3,
179975 ** The length of data written will be between 1 and FTS3_VARINT_MAX bytes.
180511 ** to return the docid, followed by each column of text data in order
180513 ** being returned directly each column of text data is passed to an SQL
181499 ** The data structures are corrupt. */
181515 ** a b-tree for a term or term prefix. The node data is passed to this
181549 ** Even if the data structure on disk is corrupted, this (reading two
182625 ** Fts3SegReaderPending might segfault, as the data structures used by
184572 ** of data that will fit on a single leaf page of an intkey table in
184581 ** data from the %_stat table to calculate it.
184587 ** data stored in all rows of each column of the table, from left
184655 ** table actually contains the same data as the index. To prevent this from
185059 ** expression, using the data currently stored in the position lists
186123 ** xFilter - Initialize a cursor to point at the start of its data.
186610 /* The final Fts3Expr data structure, including the Fts3Phrase,
186617 ** to assemble data in two dynamic buffers:
187915 ** that matches pKey,nKey. Return the data for this element if it is
187922 return pElem ? pElem->data : 0;
187926 ** and the data is "data".
187933 ** new data replaces the old data and the old data is returned.
187935 ** the new data is returned and the hash table is unchanged.
187937 ** If the "data" parameter to this function is NULL, then the
187944 void *data /* The data */
187960 void *old_data = elem->data;
187961 if( data==0 ){
187964 elem->data = data;
187968 if( data==0 ) return 0;
187973 return data;
187977 if( new_elem==0 ) return data;
187982 return data;
187994 new_elem->data = data;
188721 ** containing a pointer to be stored as the hash data corresponding
188727 ** is a blob containing the pointer stored as the hash data corresponding
189757 ** xFilter - Initialize a cursor to point at the start of its data.
189923 ** This means that if we have a pointer into a buffer containing node data,
189925 ** overread, even if the node data is corrupted.
189984 ** An instance of the following data structure is used to build doclists
190034 char *aNode; /* Pointer to node data (or NULL) */
190081 int nData; /* Bytes of data in aData */
190083 i64 nLeafData; /* Number of bytes of leaf data written */
190113 int nData; /* Bytes of valid data so far */
190114 char *aData; /* Node data */
190367 sqlite3_int64 iDocid, /* Docid to read size data for */
190402 ** writing data to the fts3 table. If this lock is not acquired first, then
190533 sqlite3_int64 i /* Value to append to data */
190862 /* Locate the statement handle used to insert data into the %_content
190913 ** Remove all data from the FTS3 table. Clear the hash table containing
191062 ** This function reads data from a single row of the %_segments table. The
191087 char **paBlob, /* OUT: Blob data in malloc'd buffer */
191088 int *pnBlob, /* OUT: Size of blob data */
191278 ** safe (no risk of overread) even if the node data is corrupted. */
191313 ** of these statements is untrue, then the data structure is corrupt.
191814 char *z, /* Pointer to buffer containing block data */
191860 sqlite3_int64 nLeafData, /* Bytes of leaf data in segment */
192146 /* Allocate a buffer in which to accumulate data */
192176 nDoclist; /* Doclist data */
192212 nDoclist; /* Doclist data */
192242 ** zTerm is transient, so take a copy of the term data. Otherwise, just
192267 ** Flush all data associated with the SegmentWriter object pWriter to the
192546 ** Cache data in the Fts3MultiSegReader.aBuffer[] buffer (overwriting any
192547 ** existing data). Grow the buffer if required.
193518 ** This function opens a cursor used to read the input data for an
193574 ** to build up nodes or other blobs of data in.
193580 int n; /* Number of valid bytes of data in a[] */
193605 sqlite3_int64 nLeafData; /* Bytes of leaf page data so far */
193611 ** An object of the following type is used to read data from a single
193976 ** is made to write any data to disk. Instead, this function serves only
194334 Fts3MultiSegReader *pCsr, /* Cursor that data will be read from */
194634 ** its data was copied to the output segment by the incrmerge operation)
194668 /* The incremental merge did not copy all the data from this
194803 Fts3MultiSegReader *pCsr; /* Cursor used to read input data */
195489 ** of subsiduary data structures accordingly.
195508 ** data in the pendingTerms hash table. */
195680 ** Flush any data in the pending-terms hash table to disk. If successful,
195682 ** there was any data to flush) into a single segment.
195779 char *pHead; /* Position list data following iHead */
195781 char *pTail; /* Position list data following iTail */
195793 ** accumulating the data returned by the matchinfo() function.
195813 int bGlobal; /* Set if global data is loaded */
196307 const char *zAppend, /* Pointer to data to append to buffer */
196316 ** appended data.
196329 /* Append the data to the string buffer. */
196542 ** contains the position of the first matching term in the column data).
196566 ** This function gathers 'y' or 'b' data for a single phrase.
196843 ** data written to the first nCol elements of pInfo->aMatchinfo[] is
197053 ** Populate pCsr->aMatchinfo[] with data for the current row. The
197054 ** 'matchinfo' data is an array of 32-bit unsigned integers (C type u32).
197073 /* If there is cached matchinfo() data, but the format string for the
197075 ** the cached data. */
197083 ** allocate the array used to accumulate the matchinfo data and
197156 ** the data in the current row. The first iteration of the for(...) loop
197349 ** If an OOM occurs while retrieving the data (this can happen if SQLite
197350 ** needs to transform the data from utf-16 to utf-8), return SQLITE_NOMEM
197449 /* Retrieve matchinfo() data. */
199752 ** jsonSetFunc() via the user-data value.
200841 jsonEachColumn, /* xColumn - read data */
200842 jsonEachRowid, /* xRowid - read data */
200869 jsonEachColumn, /* xColumn - read data */
200870 jsonEachRowid, /* xRowid - read data */
200966 ** The data structure for a single virtual r-tree table is stored in three
200971 ** CREATE TABLE %_node(nodeno INTEGER PRIMARY KEY, data BLOB)
200975 ** The data for each node of the r-tree structure is stored in the %_node
200978 ** And for each row of data in the table, there is an entry in the %_rowid
201114 char *zReadAuxSql; /* SQL for statement to read aux data */
201237 sqlite3_stmt *pReadAux; /* Statement to read aux-data */
201677 rc = sqlite3_blob_open(pRtree->db, pRtree->zDb, zTab, "data", iNode, 0,
201685 ** be because the shadow tables hold erroneous data. */
201708 ** of the r-tree structure. A height of zero means all data is stored on
201836 ** count drops to zero, the node data is written to the database.
203783 ** cell, adjust the r-tree data structure if required.
204190 ** 2. The supplied data violates the "x2>=x1" constraint.
204379 ** on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST.
204438 rtreeColumn, /* xColumn - read data */
204439 rtreeRowid, /* xRowid - read data */
204440 rtreeUpdate, /* xUpdate - write data */
204495 ");CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);",
204638 "SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1",
204799 ** to the rtree (between 1 and 5, inclusive) and (2) a blob of data containing
204803 ** SELECT rtreenode(2, data) FROM rt_node;
204856 ** SELECT rtreedepth(data) FROM rt_node WHERE nodeno=1;
204986 "SELECT data FROM %Q.'%q_node' WHERE nodeno=?",
207026 /* Change the data */
207100 geopolyColumn, /* xColumn - read data */
207101 rtreeRowid, /* xRowid - read data */
207102 geopolyUpdate, /* xUpdate - write data */
207288 void *pContext /* Extra data associated with the callback */
207312 void *pContext, /* Extra data passed into the callback */
207313 void (*xDestructor)(void*) /* Destructor for the extra data */
207365 ** for handling unicode data) and SQLite. The integration uses
208250 ** data to disk when saving the state of an ongoing update to the RBU
208367 ** may also be named data<integer>_<target>, where <integer> is any sequence
208779 ** may either add further data to the *-oal file, or compute data that will
208791 ** sqlite3rbu_step() will copy a page of data from the *-wal file into
209096 sqlite3_stmt *pSelect; /* Source data */
209740 ** data[0-9]_<name>
209770 if( strlen(zIn)>4 && memcmp("data", zIn, 4)==0 ){
211850 ** data from the wal file into the database file according to the
211925 ** Called when a page of data is written to offset iOff of the database
211936 ** a single frame of data from the wal file into the database file, as
213442 ** Read data from an rbuVfs-file.
213508 ** Write data to an rbuVfs-file.
214040 ** random data.
214208 /* #include "sqliteInt.h" ** Requires access to internal data structures ** */
214269 /* Forward reference to data structured used in this module */
214715 ** Load a copy of the page data for page iPg into the buffer belonging
215066 statColumn, /* xColumn - read data */
215067 statRowid, /* xRowid - read data */
215109 ** SELECT data FROM sqlite_dbpage('aux1') WHERE pgno=123;
215116 ** The data field of sqlite_dbpage table can be updated. The new
215121 /* #include "sqliteInt.h" ** Requires access to internal data structures ** */
215165 "CREATE TABLE x(pgno INTEGER PRIMARY KEY, data BLOB, schema HIDDEN)");
215362 case 1: { /* data */
215494 dbpageColumn, /* xColumn - read data */
215495 dbpageRowid, /* xRowid - read data */
215567 i64 nMalloc; /* Number of bytes of data allocated */
215572 SessionHook hook; /* APIs to grab new and old data with */
215586 ** input data. Input data may be supplied either as a single large buffer
215631 ** The data associated with each hash-table entry is a structure containing
215655 ** there is no separation of header and data. Each field begins with a
215976 ** This macro is used to calculate hash key values for data structures. In
215977 ** order to use this macro, the entire data structure must be represented
215979 ** for a data structure represented as three such integers, the macro may
215987 ** In practice, the data structures this macro is used for are the primary
216012 ** Append the hash of the data type passed as the second argument to the
217506 ** Ensure that there is room in the buffer to append nByte bytes of data.
217598 ** called. Otherwise, append a blob of data to the buffer.
217743 ** (i.e. nothing has changed), then no data at all is appended to the buffer.
218404 ** object and the buffer is full, discard some data to free up space.
218422 ** data is in the buffer.
218482 u8 *aData, /* Buffer containing string or blob data */
218522 SessionInput *pIn, /* Input data */
218645 SessionInput *pIn, /* Input data */
218761 /* Make sure the buffer contains at least 10 bytes of input data, or all
218762 ** remaining data if there are less than 10 bytes available. This is
221107 sqlite3_changeset_iter *pIter, /* Input data */
221516 ** "auxiliary data". The pointer may then be retrieved by the current or any
221520 ** Each extension function is allocated a single auxiliary data slot for
221523 ** single auxiliary data context.
221525 ** If there is already an auxiliary data pointer when this function is
221531 ** auxiliary data pointer after the FTS5 query has finished.
221534 ** the auxiliary data is set to NULL and an error code returned. If the
221535 ** xDelete parameter was not NULL, it is invoked on the auxiliary data
221541 ** Returns the current auxiliary data pointer for the fts5 extension
221544 ** If the bClear argument is non-zero, then the auxiliary data is cleared
221821 ** extra data to the FTS index or require FTS5 to query for multiple terms,
222197 ** Buffer object for the incremental building of string data.
222287 ** to access the data stored in the %_data table.
222385 ** Insert or remove data to or from the index. Each time a document is
222408 i64 iDocid /* Docid to add or remove data from */
222412 ** Flush any data stored in the in-memory hash tables to the database.
222418 ** Discard any data stored in the in-memory hash tables. Do not write it
222568 ** code to access the data stored in the %_content and %_docsize tables.
222882 ** fts5YYCODETYPE is the data type used to store the integer codes
222893 ** fts5YYACTIONTYPE is the data type used for "action codes" - numbers
222896 ** sqlite3Fts5ParserFTS5TOKENTYPE is the data type used for minor type for terminal
222905 ** fts5YYMINORTYPE is the data type used for all minor types.
224846 Fts5Bm25Data **ppData /* OUT: bm25-data object for this query */
224975 void *pUserData; /* User-data pointer */
225075 ** ensures that the byte following the buffer data is set to 0x00, even
225093 ** following the buffer data is set to 0x00, even though this byte is not
225226 ** pBuf, which must be already be large enough to hold the new data.
227080 ** subset of the old, so it is not possible for data yet to be read to
229484 ** its current data are stored in a single memory allocation. The
229486 ** data immediately follows the key data in memory.
229488 ** The data that follows the key is in a similar, but not identical format
229489 ** to the doclist data stored in the database. It is:
229497 ** Offset of last rowid written to data area. Relative to first byte of
229501 ** Bytes of data written since iRowidOff.
229509 int nData; /* Total bytes of data (incl. structure) */
230034 ** * all segment b-tree leaf data is stored in fixed size page records
230100 ** A single record within the %_data table. The data is a list of varints.
230109 ** Most of each segment leaf is taken up by term/doclist data. The
230114 ** blob: first term data
230118 ** varint: number of bytes of new term data (nNew)
230119 ** blob: nNew bytes of new term data
230170 ** term/doclist data fits on a single leaf page. If this is not the case,
230182 ** blob: first term data
230291 Fts5Hash *pHash; /* Hash table for in-memory data */
230292 int nPendingData; /* Current bytes of pending data */
230352 Fts5Buffer buf; /* Buffer containing leaf data */
230360 Fts5Buffer buf; /* Buffer containing page data */
230399 ** position list data (one byte passed the position-list size field).
230401 ** position list data. The exception is if the rowid for the current entry
230405 ** Buffer containing current leaf page data. Set to NULL at EOF.
230409 ** the offset immediately following the term data.
230437 Fts5Data *pLeaf; /* Current leaf data */
230490 ** visiting each term/rowid pair in the merged data.
230493 ** segments that this object is merging data from. Both the aSeg[] and
230536 ** Record containing the doclist-index data.
230676 u8 *aOut = 0; /* Read blob data into this buffer */
230710 ** Release a reference to data record returned by an earlier call to
231676 u8 *a = pIter->pLeaf->p; /* Buffer to read data from */
231709 u8 *a = pIter->pLeaf->p; /* Buffer to read data from */
231711 int nNew; /* Bytes of new data */
231766 ** merge and all data has already been "trimmed". See function
232174 Fts5Data *pLeaf = pIter->pLeaf; /* Current leaf data */
232256 Fts5Data *pLeaf = pIter->pLeaf; /* Current leaf data */
233170 ** function appends the position list data for the current entry to
233297 /* All data is stored on the current page. Populate the output
233301 /* The data is distributed over two or more pages. Copy it into the
233390 /* All data is stored on the current page. Populate the output
233397 /* The data is distributed over two or more pages. Copy it into the
233443 ** The new object will be used to iterate through data in structure pStruct.
233444 ** If iLevel is -ve, then all data in all segments is merged. Or, if iLevel
233445 ** is zero or greater, data from the first nSegment segments on level iLevel
233449 ** iterated data.
233707 ** Discard all data currently cached in the hash-tables.
234051 /* Append the number of bytes of new data, then the term data itself
234136 ** Flush any data cached by the writer object to the database. Free any
234301 Fts5Iter *pIter = 0; /* Iterator to read input data */
234394 /* Append the position-list data to the output */
234494 ** A total of nLeaf leaf pages of data has just been flushed to a level-0
234730 ** Flush any data stored in the in-memory hash tables to the database.
234786 ** segment in the data structure. */
235111 /* Merge data from two or more poslists */
235208 int iIdx, /* Index to scan for data */
235240 Fts5Iter *p1 = 0; /* Iterator used to gather data from index */
235364 ** Commit data to disk.
235374 ** Discard any data stored in the in-memory hash tables. Do not write it
235425 pConfig, "data", "id INTEGER PRIMARY KEY, block BLOB", 0, pzErr
235513 ** Insert or remove data to or from the index. Each time a document is
236324 ** Decode a segment-data rowid from the %_data table. This function is
236620 /* Read the term data for the next term*/
236686 /* Decode any more doclist data that appears on the page before the
236697 int nByte; /* Bytes of data */
236886 ** During a write-transaction the fts5_index.c module may cache some data
236924 void *pUserData; /* User-data pointer */
236946 Fts5Global *pGlobal; /* Global (connection wide) data */
236947 Fts5Cursor *pSortCsr; /* Sort data from this cursor */
237020 /* Auxiliary data storage */
237022 Fts5Auxdata *pAuxdata; /* First in linked list of saved aux-data */
237338 ** idxStr is used to encode data from the WHERE clause. For each argument
237556 ** is moved to point at a different row. It clears all cached data
239357 void **ppArg /* OUT: User data for *pxFunc */
239431 void *pUserData, /* User data for aux. function */
239470 void *pUserData, /* User data for aux. function */
239633 "config", "content", "data", "docsize", "idx"
239967 const char *zTail, /* Tail of table name e.g. "data", "config" */
239982 fts5StorageRenameOne(pConfig, &rc, "data", zName);
240748 ** Obtain an SQLite statement handle that may be used to read data from the
240875 ** Flush any data currently held in-memory to disk.
243384 ** A = 0xxxxxxx 7 bits of data and one flag bit
243385 ** B = 1xxxxxxx 7 bits of data and one flag bit
243386 ** C = xxxxxxxx 8 bits of data
243407 ** The length of data write will be between 1 and 9 bytes. The number
244557 stmtColumn, /* xColumn - read data */
244558 stmtRowid, /* xRowid - read data */
245637 void* sqlite3Codec(void *ctx, void *data, Pgno pgno, int mode){
245639 unsigned char *pData = (unsigned char *)data;
245643 if(ctx == NULL || data == NULL){