Lines Matching defs:btree

10339 ** Defer sourcing vdbe.h and btree.h until after the "u8" and
10343 /************** Include btree.h in the middle of sqliteInt.h *****************/
10344 /************** Begin file btree.h *******************************************/
10681 /************** End of btree.h ***********************************************/
11258 ** NOTE: These values must match the corresponding BTREE_ values in btree.h.
12313 #define SQLITE_CellSizeCk 0x10000000 /* Check btree cell sizes on load */
12873 ** or greater than a key in the btree, respectively. These are normally
15936 Pgno pgnoRoot; /* Root page of the open btree cursor */
42122 ** is the extension added by the btree.c module containing information such
42148 ** The btree.c module deals with pointers to MemPage objects.
44563 ** 28 of the database header by the btree). If the size of the file
47766 /* This routine is only called by btree immediately after creating
48830 /* pPager->szMmap = SQLITE_DEFAULT_MMAP_SIZE // will be set by btree.c */
54802 ** This code really belongs in btree.c. But btree.c is getting too
54857 ** Each page can be either a btree page, a freelist page, an overflow
54860 ** The first page is always a btree page. The first 100 bytes of the first
54913 ** Each btree pages is divided into three sections: The header, the
54943 ** The flags define the format of this btree page. The leaf flag means that
54994 ** bytes of key and data in a btree cell.
55123 ** a btree handle is closed.
55158 sqlite3 *db; /* The database connection holding this btree */
55159 BtShared *pBt; /* Sharable content of this btree */
55165 int nBackup; /* Number of backup operations reading this btree */
55252 BtLock *pLock; /* List of locks held on this shared-btree struct */
55347 #define BTCF_Multiple 0x20 /* Maybe another cursor on the same btree */
55437 ** PTRMAP_BTREE: The database page is a non-root btree page. The page number
55438 ** identifies the parent page in the btree.
55504 ** cell addresses in a btree header.
55657 ** Return true if the BtShared mutex is held on the btree, or if the
55760 ** are null #defines in btree.h.
55762 ** If shared cache is disabled, then all btree mutex routines, including
55763 ** the ones below, are no-ops and are null #defines in btree.h.
55801 /************** Begin file btree.c *******************************************/
55841 ** from the header of a btree page. If the page size is 65536 and the page
56104 ** Add a lock on the table with root-page iTable to the shared-btree used
56262 ** on the shared btree structure pBt.
56268 ** on the shared btree structure pBt.
56479 ** the location in the btree is remembered in such a way that it can be
56480 ** moved back to the same spot after the btree has been modified. This
56484 ** If there are two or more cursors on the same btree, then all such
56552 BtCursor *pCur, /* Cursor open on the btree to be searched */
56553 const void *pKey, /* Packed key if the btree is an index */
56622 ** from under them, for example. Cursor might also move if a btree
56636 ** has been moved by some outside activity (such as a btree rebalance or
56810 ** Given a btree page and a cell index (0 means the first cell on
56868 ** btreeParseCellPtr() => table btree leaf nodes
56869 ** btreeParseCellNoPayload() => table btree internal nodes
56870 ** btreeParseCellPtrIndex() => index btree nodes
57011 ** data area of the btree-page. The return number includes the cell
57540 BtShared *pBt; /* The main btree structure */
57693 ** the btree layer.
57720 BtShared *pBt, /* The btree */
57854 BtShared *pBt, /* The btree */
57890 /* pPage might not be a btree page; it might be an overflow page
57894 ** btreeInitPage() be called on every btree page so we make
57902 ** Invoke the busy handler for a btree.
57940 BtShared *pBt = 0; /* Shared part of btree structure */
58060 ** The following asserts make sure that structures used by the btree are
58318 /* If there are still other outstanding references to the shared-btree
58320 ** up the shared-btree.
58411 Btree *p, /* The btree to set the safety level on */
58932 /* If the btree is already in a write-transaction, or it
58951 ** on this shared-btree structure and a second write transaction is
59113 ** PTRMAP_BTREE: pPage is a btree-page. The pointer points at a child
59116 ** PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow
59211 /* If pDbPage was a btree-page, then it may have child pages and/or cells
59509 ** Otherwise, sync the database file for the btree pBt. zMaster points to
59563 ** transaction count of the shared btree. If the transaction count
59889 Btree *p, /* The btree */
59935 /* If there are two or more cursors on the same btree, then all such
59949 Btree *p, /* The btree */
60286 /* Check if data must be read/written to/from the btree page itself. */
60511 ** any btree routine is called.
61117 ** Zero is the common case. The btree implementation is free to use the
61119 ** SQLite btree implementation does not. (Note that the comdb2 btree
61227 ** Zero is the common case. The btree implementation is free to use the
61229 ** SQLite btree implementation does not. (Note that the comdb2 btree
61332 BtShared *pBt, /* The btree */
63001 ** offset section of the btree page will be overwritten and we will no
64811 ** entry represents the span of a cell or freeblock on a btree page.
65124 Btree *p, /* The btree to be checked */
65310 ** a single shared-btree. The memory is used by client code for its own
65312 ** the shared-btree). The btree layer manages reference counting issues.
65314 ** The first time this is called on a shared-btree, nBytes bytes of memory
65323 ** Just before the shared-btree is closed, the function passed as the
65326 ** on the memory, the btree layer does that.
65341 ** btree as the argument handle holds an exclusive lock on the
65510 /************** End of btree.c ***********************************************/
66084 ** no need to check the return values of the btree methods here, as
66591 ** sqlite3_value_text()), or for ensuring that values to be used as btree
67251 ** Move data out of a btree key or data field and into a Mem structure.
67258 ** pMem->zMalloc to hold the content from the btree, if possible. New
67270 int key, /* If true, retrieve from the btree key, not data. */
67296 int key, /* If true, retrieve from the btree key, not data. */
67299 char *zData; /* Data from the btree layer */
67300 u32 available = 0; /* Number of bytes available on the local btree page */
71027 ** pointed to was deleted out from under it. Or maybe the btree was
77484 ** back any currently active btree transactions. If there are any active
77891 ** since moved into the btree layer. */
77921 ** in btree.h. These flags control aspects of the operation of
77922 ** the btree. The BTREE_OMIT_JOURNAL and BTREE_SINGLE flags are
78351 ** Cursor P1 is on an index btree. If the record identified by P3 and P4
78368 ** Cursor P1 is on an index btree. If the record identified by P3 and P4
78387 ** Cursor P1 is on an index btree. If the record identified by P3 and P4
78390 ** P1 index btree has a matching key prefix. If there are no matches, jump
78489 ** P1 is the index of a cursor open on an SQL table btree (with integer
79254 ** The P3 value is a hint to the btree implementation. If P3==1, that
79287 ** The P3 value is a hint to the btree implementation. If P3==1, that
79665 /* All OP_Destroy operations occur on the same btree */
79802 ** on every btree. This is a prerequisite for invoking
81595 /* This VDBE program seeks a btree cursor to the identified
93753 /* Open the database file. If the btree is successfully opened, use
96135 ** no rowid btree for a WITHOUT ROWID. Instead, the canonical
96136 ** data storage is a covering index btree.
96186 /* Bypass the creation of the PRIMARY KEY btree and the sqlite_master
96736 ** used by SQLite when the btree layer moves a table root page. The
96779 ** if a root-page of another table is moved by the btree-layer whilst
96808 ** in case a root-page belonging to another table is moved by the btree layer
96923 ** at the btree level, in case the sqlite_sequence table needs to
99985 ** 1. iDataCur is an open cursor on the btree that is the canonical data
100145 ** btree for the table pTab. (This will be either the table itself
105177 u8 pik_flags; /* flag values passed to the btree insert */
117520 ** command. If the latter, then the row-records in the table btree on disk
117586 int iDataCur; /* Cursor for the canonical data btree */
118647 ** was committed at the btree level). So it safe to end the transaction
120024 struct { /* Information for internal btree tables */
120027 } btree;
120429 #define WHERE_INDEXED 0x00000200 /* WhereLoop.u.btree.pIndex is valid */
120488 Index *pIndex = pLoop->u.btree.pIndex;
120489 u16 nEq = pLoop->u.btree.nEq;
120551 || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0))
120569 assert( pLoop->u.btree.pIndex!=0 );
120570 pIdx = pLoop->u.btree.pIndex;
120642 if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 && pLoop->u.btree.pIndex!=0 ){
120643 zObj = pLoop->u.btree.pIndex->zName;
120792 && pLoop->u.btree.pIndex!=0
120793 && pLoop->u.btree.pIndex->aSortOrder[iEq]
120905 nEq = pLoop->u.btree.nEq;
120907 pIdx = pLoop->u.btree.pIndex;
120913 nReg = pLoop->u.btree.nEq + nExtraReg;
121120 sHint.pIdx = pLoop->u.btree.pIndex;
121134 if( pLoop->u.btree.nEq==0 && pTerm!=pEndRange ){
121376 assert( pLoop->u.btree.nEq==1 );
121532 u16 nEq = pLoop->u.btree.nEq; /* Number of == or IN terms */
121549 pIdx = pLoop->u.btree.pIndex;
122035 && (ii==0 || pSubLoop->u.btree.pIndex==pCov)
122036 && (HasRowid(pTab) || !IsPrimaryKeyIndex(pSubLoop->u.btree.pIndex))
122039 pCov = pSubLoop->u.btree.pIndex;
124231 pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol;
124257 pLoop->u.btree.pIndex = pIdx;
124278 assert( (u32)n==pLoop->u.btree.nEq );
124798 Index *p = pLoop->u.btree.pIndex;
124799 int nEq = pLoop->u.btree.nEq;
124878 ** The value in (pBuilder->pNew->u.btree.nEq) is the number of the index
124915 Index *p = pLoop->u.btree.pIndex;
124916 int nEq = pLoop->u.btree.nEq;
125084 Index *p = pBuilder->pNew->u.btree.pIndex;
125085 int nEq = pBuilder->pNew->u.btree.nEq;
125150 Index *p = pBuilder->pNew->u.btree.pIndex;
125214 if( p->u.btree.pIndex && (zName = p->u.btree.pIndex->zName)!=0 ){
125220 sqlite3DebugPrintf(".%-16s %2d", zName, p->u.btree.nEq);
125270 }else if( (p->wsFlags & WHERE_AUTO_INDEX)!=0 && p->u.btree.pIndex!=0 ){
125271 sqlite3DbFree(db, p->u.btree.pIndex->zColAff);
125272 sqlite3DbFree(db, p->u.btree.pIndex);
125273 p->u.btree.pIndex = 0;
125317 pFrom->u.btree.pIndex = 0;
125619 Index *pIndex = p->u.btree.pIndex;
125621 p->u.btree.pIndex = 0;
125713 ** We have so far matched pBuilder->pNew->u.btree.nEq terms of the
125739 u16 saved_nEq; /* Original value of pNew->u.btree.nEq */
125760 assert( pNew->u.btree.nEq<pProbe->nColumn );
125762 saved_nEq = pNew->u.btree.nEq;
125805 pNew->u.btree.nEq = saved_nEq;
125833 assert( saved_nEq==pNew->u.btree.nEq );
125883 int nEq = ++pNew->u.btree.nEq;
125897 && pNew->u.btree.nEq<=pProbe->nSampleCol
125955 && pNew->u.btree.nEq<pProbe->nColumn
125965 pNew->u.btree.nEq = saved_nEq;
125989 pNew->u.btree.nEq++;
126000 pNew->u.btree.nEq = saved_nEq;
126131 struct SrcList_item *pSrc; /* The FROM clause btree term to add */
126198 pNew->u.btree.nEq = 1;
126200 pNew->u.btree.pIndex = 0;
126239 pNew->u.btree.nEq = 0;
126246 pNew->u.btree.pIndex = pProbe;
126901 }else if( (pIndex = pLoop->u.btree.pIndex)==0 || pIndex->bUnordered ){
126921 if( j<pLoop->u.btree.nEq
126949 && j>=pLoop->u.btree.nEq
127513 pLoop->u.btree.nEq = 1;
127537 pLoop->u.btree.nEq = j;
127538 pLoop->u.btree.pIndex = pIdx;
127989 if( pLoop->u.btree.pIndex!=0 ){
128004 Index *pIx = pLoop->u.btree.pIndex;
128154 VdbeComment((v, "next skip-scan on %s", pLoop->u.btree.pIndex->zName));
128249 pIdx = pLoop->u.btree.pIndex;