Home | History | Annotate | Download | only in orig

Lines Matching defs:btree

9986 ** Defer sourcing vdbe.h and btree.h until after the "u8" and 
9990 /************** Include btree.h in the middle of sqliteInt.h *****************/
9991 /************** Begin file btree.h *******************************************/
10030 typedef struct Btree Btree;
10039 Btree **ppBtree, /* Return open Btree* here */
10055 SQLITE_PRIVATE int sqlite3BtreeClose(Btree*);
10056 SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int);
10058 SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
10060 SQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(Btree*,unsigned);
10061 SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*);
10062 SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
10063 SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
10064 SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
10065 SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree*);
10066 SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int);
10067 SQLITE_PRIVATE int sqlite3BtreeGetOptimalReserve(Btree*);
10068 SQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p);
10069 SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int);
10070 SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *);
10071 SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int);
10072 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster);
10073 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*, int);
10074 SQLITE_PRIVATE int sqlite3BtreeCommit(Btree*);
10075 SQLITE_PRIVATE int sqlite3BtreeRollback(Btree*,int,int);
10076 SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*,int);
10077 SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, int*, int flags);
10078 SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree*);
10079 SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree*);
10080 SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree*);
10081 SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *));
10082 SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *pBtree);
10083 SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock);
10084 SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *, int, int);
10086 SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *);
10087 SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *);
10088 SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *, Btree *);
10090 SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *);
10105 SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*);
10106 SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int, int*);
10108 SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree*, int, int);
10110 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
10111 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);
10113 SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p);
10160 Btree*, /* BTree containing table to open */
10195 SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*);
10196 SQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*);
10201 SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBt, int iVersion);
10206 SQLITE_PRIVATE int sqlite3BtreeIsReadonly(Btree *pBt);
10219 SQLITE_PRIVATE void sqlite3BtreeCursorList(Btree*);
10223 SQLITE_PRIVATE int sqlite3BtreeCheckpoint(Btree*, int, int *, int *);
10232 SQLITE_PRIVATE void sqlite3BtreeEnter(Btree*);
10240 SQLITE_PRIVATE int sqlite3BtreeSharable(Btree*);
10241 SQLITE_PRIVATE void sqlite3BtreeLeave(Btree*);
10247 SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree*);
10267 /************** End of btree.h ***********************************************/
10832 ** NOTE: These values must match the corresponding BTREE_ values in btree.h.
11530 Btree *pBt; /* The B*Tree structure for this database file */
11538 ** Most Schema objects are associated with a Btree. The exception is
11543 ** Schema objects are automatically deallocated when the last Btree that
11547 ** A thread must be holding a mutex on the corresponding Btree in order
11549 ** holding a mutex on the sqlite3 connection pointer that owns the Btree.
11837 #define SQLITE_CellSizeCk 0x10000000 /* Check btree cell sizes on load */
12193 int tnum; /* Root BTree page for this table */
13848 SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3*,const char*);
14224 SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *, Btree *);
15297 ** A cursor is a pointer into a single BTree within a database file.
15298 ** The cursor can seek to a BTree entry with a particular key, or
15299 ** loop over all entries of the Btree. You can also insert new BTree
15311 Btree *pBt; /* Separate file holding temporary table */
15327 Pgno pgnoRoot; /* Root page of the open btree cursor */
15961 Btree *pBt = db->aDb[i].pBt;
41145 ** is the extension added by the btree.c module containing information such
41171 ** The btree.c module deals with pointers to MemPage objects.
43574 ** 28 of the database header by the btree). If the size of the file
46754 /* This routine is only called by btree immediately after creating
47804 /* pPager->szMmap = SQLITE_DEFAULT_MMAP_SIZE // will be set by btree.c */
49647 ** behavior. But when the Btree needs to know the filename for matching to
53497 ** This file contains code used to implement mutexes on Btree objects.
53498 ** This code really belongs in btree.c. But btree.c is getting too
53539 ** BTrees. Each BTree is identified by the index of its root page. The
53553 ** Each page can be either a btree page, a freelist page, an overflow
53556 ** The first page is always a btree page. The first 100 bytes of the first
53609 ** Each btree pages is divided into three sections: The header, the
53639 ** The flags define the format of this btree page. The leaf flag means that
53690 ** bytes of key and data in a btree cell.
53757 ** first byte of on-disk image of every BTree page.
53770 ** walk up the BTree from any leaf to the root. Care must be taken to
53820 ** a btree handle is closed.
53823 Btree *pBtree; /* Btree handle holding this lock */
53833 /* A Btree handle
53850 ** in the referenced BtShared that point back to this Btree since those
53851 ** cursors have to go through this Btree to find their BtShared and
53854 struct Btree {
53855 sqlite3 *db; /* The database connection holding this btree */
53856 BtShared *pBt; /* Sharable content of this btree */
53862 int nBackup; /* Number of backup operations reading this btree */
53864 Btree *pNext; /* List of other sharable Btrees from the same db */
53865 Btree *pPrev; /* Back pointer of the same list */
53872 ** Btree.inTrans may take one of the following values.
53875 ** of the Btree structure. At most one of these may open a write transaction,
53888 ** private Btree object for the file and each of those Btrees points
53919 sqlite3 *db; /* Database connection currently using this Btree */
53949 BtLock *pLock; /* List of locks held on this shared-btree struct */
53950 Btree *pWriter; /* Btree with currently open write transaction */
54011 Btree *pBtree; /* The Btree to which this cursor belongs */
54045 #define BTCF_Multiple 0x20 /* Maybe another cursor on the same btree */
54135 ** PTRMAP_BTREE: The database page is a non-root btree page. The page number
54136 ** identifies the parent page in the btree.
54145 ** of handle p (type Btree*) are internally consistent.
54202 ** cell addresses in a btree header.
54226 static void lockBtreeMutex(Btree *p){
54240 static void SQLITE_NOINLINE unlockBtreeMutex(Btree *p){
54252 static void SQLITE_NOINLINE btreeLockCarefully(Btree *p);
54255 ** Enter a mutex on the given BTree object.
54259 ** But we keep a reference count in Btree.wantToLock so the behavior
54264 ** Btrees belonging to the same database connection as the p Btree
54270 SQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){
54271 /* Some basic sanity checking on the Btree. The list of Btrees
54273 ** Btree.pBt value. All elements of the list should belong to
54304 static void SQLITE_NOINLINE btreeLockCarefully(Btree *p){
54305 Btree *pLater;
54340 ** Exit the recursive mutex on a Btree.
54342 SQLITE_PRIVATE void sqlite3BtreeLeave(Btree *p){
54355 ** Return true if the BtShared mutex is held on the btree, or if the
54360 SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree *p){
54373 ** Enter and leave a mutex on a Btree given a cursor owned by that
54374 ** Btree. These entry points are used by incremental I/O and can be
54387 ** Enter the mutex on every Btree associated with a database
54402 Btree *p;
54411 Btree *p;
54420 ** Return true if a particular Btree requires a lock. Return FALSE if
54423 SQLITE_PRIVATE int sqlite3BtreeSharable(Btree *p){
54440 Btree *p;
54464 Btree *p;
54481 ** are null #defines in btree.h.
54483 ** If shared cache is disabled, then all btree mutex routines, including
54484 ** the ones below, are no-ops and are null #defines in btree.h.
54487 SQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){
54493 Btree *p = db->aDb[i].pBt;
54503 /************** Begin file btree.c *******************************************/
54543 ** from the header of a btree page. If the page size is 65536 and the page
54628 ** Btree connection pBtree:
54644 Btree *pBtree, /* Handle that must hold lock */
54719 ** It is illegal for pBtree to write if some other Btree object that
54721 ** the iRoot table. Except, if the other Btree object has the
54730 static int hasReadConflicts(Btree *pBtree, Pgno iRoot){
54745 ** Query to see if Btree handle p may obtain a lock of type eLock
54750 static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){
54759 /* If requesting a write-lock, then the Btree must have an open write
54806 ** Add a lock on the table with root-page iTable to the shared-btree used
54807 ** by Btree handle p. Parameter eLock must be either READ_LOCK or
54812 ** (a) The specified Btree object p is connected to a sharable
54815 ** (b) No other Btree objects hold a lock that conflicts
54822 static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
54850 /* If the above search did not find a BtLock struct associating Btree p
54880 ** the setSharedCacheTableLock() procedure) held by Btree object p.
54882 ** This function assumes that Btree p has an open read or write
54886 static void clearAllSharedCacheTableLocks(Btree *p){
54914 /* This function is called when Btree p is concluding its
54928 ** This function changes all write-locks held by Btree p into read-locks.
54930 static void downgradeAllSharedCacheTableLocks(Btree *p){
54960 ** on the shared btree structure pBt.
54966 ** on the shared btree structure pBt.
54991 Btree *pBtree, /* The database file to check */
55177 ** the location in the btree is remembered in such a way that it can be
55178 ** moved back to the same spot after the btree has been modified. This
55182 ** If there are two or more cursors on the same btree, then all such
55250 BtCursor *pCur, /* Cursor open on the btree to be searched */
55251 const void *pKey, /* Packed key if the btree is an index */
55320 ** from under them, for example. Cursor might also move if a btree
55334 ** has been moved by some outside activity (such as a btree rebalance or
55488 ** Given a btree page and a cell index (0 means the first cell on
55547 ** btreeParseCellPtr() => table btree leaf nodes
55548 ** btreeParseCellNoPayload() => table btree internal nodes
55549 ** btreeParseCellPtrIndex() => index btree nodes
55697 ** data area of the btree-page. The return number includes the cell
56230 BtShared *pBt; /* The main btree structure */
56383 ** the btree layer.
56407 BtShared *pBt, /* The btree */
56445 SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree *p){
56540 BtShared *pBt, /* The btree */
56576 /* pPage might not be a btree page; it might be an overflow page
56580 ** btreeInitPage() be called on every btree page so we make
56588 ** Invoke the busy handler for a btree.
56620 const char *zFilename, /* Name of the file containing the BTree database */
56622 Btree **ppBtree, /* Pointer to new Btree object written here */
56626 BtShared *pBt = 0; /* Shared part of btree structure */
56627 Btree *p; /* Handle to return */
56664 p = sqlite3MallocZero(sizeof(Btree));
56677 ** If this Btree is a candidate for shared cache, try to find an
56715 Btree *pExisting = db->aDb[iDb].pBt;
56746 ** The following asserts make sure that structures used by the btree are
56841 /* If the new Btree uses a sharable pBtShared, then link the new
56842 ** Btree into the list of all sharable Btrees for the same connection.
56847 Btree *pSib;
56982 SQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){
57005 /* If there are still other outstanding references to the shared-btree
57007 ** up the shared-btree.
57052 SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){
57066 SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
57086 Btree *p, /* The btree to set the safety level on */
57099 ** Return TRUE if the given btree is set to safety level 1. In other
57102 SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree *p){
57133 SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve, int iFix){
57166 SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree *p){
57181 SQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p){
57197 SQLITE_PRIVATE int sqlite3BtreeGetOptimalReserve(Btree *p){
57214 SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree *p, int mxPage){
57227 SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree *p, int newFlag){
57246 SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *p, int autoVacuum){
57270 SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *p){
57555 SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p){
57599 SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
57607 /* If the btree is already in a write-transaction, or it
57624 ** on this shared-btree structure and a second write transaction is
57785 ** PTRMAP_BTREE: pPage is a btree-page. The pointer points at a child
57788 ** PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow
57857 BtShared *pBt, /* Btree */
57883 /* If pDbPage was a btree-page, then it may have child pages and/or cells
58071 SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *p){
58181 ** Otherwise, sync the database file for the btree pBt. zMaster points to
58192 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zMaster){
58219 static void btreeEndTransaction(Btree *p){
58235 ** transaction count of the shared btree. If the transaction count
58281 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){
58313 SQLITE_PRIVATE int sqlite3BtreeCommit(Btree *p){
58350 SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode, int writeOnly){
58393 SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode, int writeOnly){
58462 SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree *p, int iStatement){
58493 SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
58519 ** Create a new cursor for the BTree whose root is on the page
58551 Btree *p, /* The btree */
58595 /* If there are two or more cursors on the same btree, then all such
58609 Btree *p, /* The btree */
58655 Btree *pBtree = pCur->pBtree;
58916 MemPage *pPage = pCur->apPage[pCur->iPage]; /* Btree page of current entry */
58917 BtShared *pBt = pCur->pBt; /* Btree this cursor belongs to */
58941 /* Check if data must be read/written to/from the btree page itself. */
59164 ** any btree routine is called.
59192 ** or be destroyed on the next call to any Btree routine,
59768 ** Zero is the common case. The btree implementation is free to use the
59770 ** SQLite btree implementation does not. (Note that the comdb2 btree
59878 ** Zero is the common case. The btree implementation is free to use the
59880 ** SQLite btree implementation does not. (Note that the comdb2 btree
59983 BtShared *pBt, /* The btree */
61656 ** offset section of the btree page will be overwritten and we will no
62218 BtShared *pBt = pRoot->pBt; /* The BTree */
62387 ** Insert a new record into the BTree. The key is given by (pKey,nKey)
62421 Btree *p = pCur->pBtree;
62568 Btree *p = pCur->pBtree;
62718 ** Create a new BTree table. Write into *piTable the page
62728 static int btreeCreateTable(Btree *p, int *piTable, int createTabFlags){
62871 SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree *p, int *piTable, int flags){
62884 BtShared *pBt, /* The BTree that contains the table */
62950 SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){
62998 static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
63101 SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
63130 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
63160 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
63260 ** Return the pager associated with a BTree. This routine is used for
63263 SQLITE_PRIVATE Pager *sqlite3BtreePager(Btree *p){
63460 ** entry represents the span of a cell or freeblock on a btree page.
63760 ** This routine does a complete check of the given BTree file. aRoot[] is
63773 Btree *p, /* The btree to be checked */
63889 SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *p){
63902 SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *p){
63910 SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree *p){
63917 ** Run a checkpoint on the Btree passed as the first argument.
63920 ** transaction on the shared-cache the argument Btree is connected to.
63924 Btree *p, int eMode, int *pnLog, int *pnCkpt){
63943 SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree *p){
63949 SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree *p){
63957 ** a single shared-btree. The memory is used by client code for its own
63959 ** the shared-btree). The btree layer manages reference counting issues.
63961 ** The first time this is called on a shared-btree, nBytes bytes of memory
63970 ** Just before the shared-btree is closed, the function passed as the
63973 ** on the memory, the btree layer does that.
63975 SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *p, int nBytes, void(*xFree)(void *)){
63988 ** btree as the argument handle holds an exclusive lock on the
63991 SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *p){
64008 SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
64097 SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBtree, int iVersion){
64147 ** Return true if the given Btree is read-only.
64149 SQLITE_PRIVATE int sqlite3BtreeIsReadonly(Btree *p){
64158 /************** End of btree.c ***********************************************/
64182 Btree *pDest; /* Destination b-tree file */
64188 Btree *pSrc; /* Source b-tree file */
64227 ** the Btree objects may have their own mutexes that require locking.
64241 static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
64290 static int checkReadTransaction(sqlite3 *db, Btree *p){
64463 ** Then clear the Btree layer MemPage.isInit flag. Both this module
64465 ** of the page 'extra' space to invalidate the Btree layers
64733 ** no need to check the return values of the btree methods here, as
64785 /* If a transaction is still open on the Btree, roll it back. */
64904 SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
65239 ** sqlite3_value_text()), or for ensuring that values to be used as btree
65899 ** Move data out of a btree
65906 ** pMem->zMalloc to hold the content from the btree, if possible. New
65918 int key, /* If true, retrieve from the btree key, not data. */
65944 int key, /* If true, retrieve from the btree key, not data. */
65947 char *zData; /* Data from the btree layer */
65948 u32 available = 0; /* Number of bytes available on the local btree page */
67890 ** Declare to the Vdbe that the BTree object at db->aDb[i] is used.
68718 Btree *pBt = db->aDb[i].pBt;
68752 Btree *pBt = db->aDb[i].pBt;
68764 Btree *pBt = db->aDb[i].pBt;
68834 Btree *pBt = db->aDb[i].pBt;
68879 Btree *pBt = db->aDb[i].pBt;
68912 Btree *pBt = db->aDb[i].pBt;
68988 Btree *pBt = db->aDb[i].pBt;
69531 ** pointed to was deleted out from under it. Or maybe the btree was
71433 Btree *pBt = db->aDb[i].pBt;
75236 BtCursor *pCrsr; /* The BTree cursor */
75875 ** back any currently active btree transactions. If there are any active
75971 Btree *pBt;
76199 Btree *pX;
76282 ** since moved into the btree layer. */
76302 ** The cursor points to a BTree table if P4==0 and to a BTree index
76307 ** in btree.h. These flags control aspects of the operation of
76308 ** the btree. The BTREE_OMIT_JOURNAL and BTREE_SINGLE flags are
76731 ** Cursor P1 is on an index btree. If the record identified by P3 and P4
76748 ** Cursor P1 is on an index btree. If the record identified by P3 and P4
76767 ** Cursor P1 is on an index btree. If the record identified by P3 and P4
76770 ** P1 index btree has a matching key prefix. If there are no matches, jump
76868 ** P1 is the index of a cursor open on an SQL table btree (with integer
77588 ** The P3 value is a hint to the btree implementation. If P3==1, that
77621 ** The P3 value is a hint to the btree implementation. If P3==1, that
77953 /* All OP_Destroy operations occur on the same btree */
78086 ** on every btree. This is a prerequisite for invoking
78839 Btree *pBt; /* Btree to change journal mode of */
78954 Btree *pBt;
79416 Btree *pBt;
79718 /* This VDBE program seeks a btree cursor to the identified
92037 /* Open the database file. If the btree is successfully opened, use
94461 ** no rowid btree for a WITHOUT ROWID. Instead, the canonical
94462 ** data storage is a covering index btree.
94513 /* Bypass the creation of the PRIMARY KEY btree and the sqlite_master
95049 ** used by SQLite when the btree layer moves a table root page. The
95092 ** if a root-page of another table is moved by the btree-layer whilst
95120 ** in case a root-page belonging to another table is moved by the btree layer
95235 ** at the btree level, in case the sqlite_sequence table needs to
95534 int iTab = pParse->nTab++; /* Btree cursor used for pTab */
95535 int iIdx = pParse->nTab++; /* Btree cursor used for pIndex */
96766 Btree *pBt;
97654 ** Find and return the schema associated with a BTree. Create
97657 SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
98276 ** 1. iDataCur is an open cursor on the btree that is the canonical data
98431 ** btree for the table pTab. (This will be either the table itself
103362 u8 pik_flags; /* flag values passed to the btree insert */
106279 Btree *pBt = pDb->pBt;
106305 Btree *pBt = pDb->pBt;
106471 Btree *pBt = pDb->pBt;
107670 Btree *pBt;
108207 Btree *pBt = db->aDb[iDb].pBt; /* Btree database to read cookie from */
108334 Btree *pBt = db->aDb[i].pBt;
115620 ** command. If the latter, then the row-records in the table btree on disk
115686 int iDataCur; /* Cursor for the canonical data btree */
116509 Btree *pMain; /* The database being vacuumed */
116510 Btree *pTemp; /* The temporary database we vacuum into */
116713 /* Copy Btree meta values */
116744 ** was committed at the btree level). So it safe to end the transaction
118125 struct { /* Information for internal btree tables */
118128 } btree;
118528 #define WHERE_INDEXED 0x00000200 /* WhereLoop.u.btree.pIndex is valid */
118587 Index *pIndex = pLoop->u.btree.pIndex;
118588 u16 nEq = pLoop->u.btree.nEq;
118650 || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0))
118668 assert( pLoop->u.btree.pIndex!=0 );
118669 pIdx = pLoop->u.btree.pIndex;
118741 if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 && pLoop->u.btree.pIndex!=0 ){
118742 zObj = pLoop->u.btree.pIndex->zName;
118892 && pLoop->u.btree.pIndex!=0
118893 && pLoop->u.btree.pIndex->aSortOrder[iEq]
119005 nEq = pLoop->u.btree.nEq;
119007 pIdx = pLoop->u.btree.pIndex;
119013 nReg = pLoop->u.btree.nEq + nExtraReg;
119237 assert( pLoop->u.btree.nEq==1 );
119392 u16 nEq = pLoop->u.btree.nEq; /* Number of == or IN terms */
119409 pIdx = pLoop->u.btree.pIndex;
119888 && (ii==0 || pSubLoop->u.btree.pIndex==pCov)
119889 && (HasRowid(pTab) || !IsPrimaryKeyIndex(pSubLoop->u.btree.pIndex))
119892 pCov = pSubLoop->u.btree.pIndex;
122053 pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol;
122079 pLoop->u.btree.pIndex = pIdx;
122100 assert( (u32)n==pLoop->u.btree.nEq );
122614 Index *p = pLoop->u.btree.pIndex;
122615 int nEq = pLoop->u.btree.nEq;
122694 ** The value in (pBuilder->pNew->u.btree.nEq) is the number of the index
122731 Index *p = pLoop->u.btree.pIndex;
122732 int nEq = pLoop->u.btree.nEq;
122900 Index *p = pBuilder->pNew->u.btree.pIndex;
122901 int nEq = pBuilder->pNew->u.btree.nEq;
122965 Index *p = pBuilder->pNew->u.btree.pIndex;
123029 if( p->u.btree.pIndex && (zName = p->u.btree.pIndex->zName)!=0 ){
123035 sqlite3DebugPrintf(".%-16s %2d", zName, p->u.btree.nEq);
123085 }else if( (p->wsFlags & WHERE_AUTO_INDEX)!=0 && p->u.btree.pIndex!=0 ){
123086 sqlite3DbFree(db, p->u.btree.pIndex->zColAff);
123087 sqlite3DbFree(db, p->u.btree.pIndex);
123088 p->u.btree.pIndex = 0;
123132 pFrom->u.btree.pIndex = 0;
123433 Index *pIndex = p->u.btree.pIndex;
123435 p->u.btree.pIndex = 0;
123527 ** We have so far matched pBuilder->pNew->u.btree.nEq terms of the
123553 u16 saved_nEq; /* Original value of pNew->u.btree.nEq */
123576 assert( pNew->u.btree.nEq<pProbe->nColumn );
123578 saved_nEq = pNew->u.btree.nEq;
123609 pNew->u.btree.nEq = saved_nEq;
123637 assert( saved_nEq==pNew->u.btree.nEq );
123687 int nEq = ++pNew->u.btree.nEq;
123701 && pNew->u.btree.nEq<=pProbe->nSampleCol
123759 && pNew->u.btree.nEq<pProbe->nColumn
123769 pNew->u.btree.nEq = saved_nEq;
123793 pNew->u.btree.nEq++;
123804 pNew->u.btree.nEq = saved_nEq;
123935 struct SrcList_item *pSrc; /* The FROM clause btree term to add */
124002 pNew->u.btree.nEq = 1;
124004 pNew->u.btree.pIndex = 0;
124043 pNew->u.btree.nEq = 0;
124050 pNew->u.btree.pIndex = pProbe;
124622 }else if( (pIndex = pLoop->u.btree.pIndex)==0 || pIndex->bUnordered ){
124642 if( j<pLoop->u.btree.nEq
124670 && j>=pLoop->u.btree.nEq
125229 pLoop->u.btree.nEq = 1;
125253 pLoop->u.btree.nEq = j;
125254 pLoop->u.btree.pIndex = pIdx;
125310 ** There are Btree cursors associated with each table. t1 uses cursor
125699 Index *pIx = pLoop->u.btree.pIndex;
125849 VdbeComment((v, "next skip-scan on %s", pLoop->u.btree.pIndex->zName));
125942 pIdx = pLoop->u.btree.pIndex;
131538 Btree *pBt = db->aDb[i].pBt;
131780 Btree *pBt = db->aDb[j].pBt;
131998 Btree *p = db->aDb[i].pBt;
134160 Btree *pBtree;
134575 ** Return the Btree pointer identified by zDbName. Return NULL if not found.
134577 SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3 *db, const char *zDbName){
134594 Btree *pBt;
134610 Btree *pBt;
163164 static int statDecodePage(Btree *pBt, StatPage *p){
163261 Btree *pBt = pTab->db->aDb[pTab->iDb].pBt;
163290 Btree *pBt = pTab->db->aDb[pCsr->iDb].pBt;