Lines Matching refs:BtShared

8872 typedef struct BtShared BtShared;
9049 ** use mutexes to access the BtShared structures. So make the
10332 ** Btrees that refer to the same underlying BtShared object.
50877 u16 maxLocal; /* Copy of BtShared.maxLocal or BtShared.maxLeaf */
50878 u16 minLocal; /* Copy of BtShared.minLocal or BtShared.minLeaf */
50886 BtShared *pBt; /* Pointer to BtShared that this page is part of */
50902 ** A linked list of the following structures is stored at BtShared.pLock.
50904 ** is opened on the table with root page BtShared.iTable. Locks are removed
50912 BtLock *pNext; /* Next in BtShared.pLock list */
50930 ** points to the same BtShared object. The database cache and the
50932 ** the BtShared object.
50936 ** in the referenced BtShared that point back to this Btree since those
50937 ** cursors have to go through this Btree to find their BtShared and
50942 BtShared *pBt; /* Sharable content of this btree */
50973 ** to this one BtShared object. BtShared.nRef is the number of
50976 ** Fields in this structure are accessed under the BtShared.mutex
50980 ** The pSchema field may be set once under BtShared.mutex and
50985 ** If a BtShared client fails to obtain a write-lock on a database
50993 ** 1) The current writer (BtShared.pWriter) concludes its transaction, OR
51001 struct BtShared {
51024 void (*xFreeSchema)(void*); /* Destructor for BtShared.pSchema */
51029 BtShared *pNext; /* Next on a list of sharable BtShared structs */
51033 u8 *pTmpSpace; /* BtShared.pageSize bytes of space for tmp use */
51037 ** Allowed values for BtShared.btsFlags
51086 ** Fields in this structure are accessed under the BtShared.mutex
51091 BtShared *pBt; /* The BtShared this cursor points to */
51143 ** on a different connection that shares the BtShared cache with this
51249 BtShared *pBt; /* The tree being checked out */
51273 ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
51274 ** set BtShared.db to the database handle associated with p and the
51288 ** Release the BtShared mutex associated with B-Tree handle p and
51292 BtShared *pBt = p->pBt;
51338 /* Unless the database is sharable and unlocked, then BtShared.db
51357 ** BtShared address. Then acquire our lock. Then reacquire
51358 ** the other BtShared locks that we used to hold in ascending
51392 ** Return true if the BtShared mutex is held on the btree, or if the
51432 ** Enter the mutexes in accending order by BtShared pointer address
51467 ** mutex and all required BtShared mutexes.
51606 ** A list of BtShared objects that are eligible for participation
51614 SQLITE_PRIVATE BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
51616 static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
51640 ** manipulate entries in the BtShared.pLock linked list used to store
51643 ** of each BtShared structure and so this locking is not necessary.
51750 ** shares the same BtShared object is currently reading or writing
51781 BtShared *pBt = p->pBt;
51843 ** database (one with the BtShared.sharable flag set), and
51853 BtShared *pBt = p->pBt;
51917 BtShared *pBt = p->pBt;
51961 BtShared *pBt = p->pBt;
51980 ** Verify that the cursor holds the mutex on its BtShared
51998 static void invalidateAllOverflowCache(BtShared *pBt){
52026 BtShared *pBt = pBtree->pBt;
52041 ** Set bit pgno of the BtShared.pHasContent bitvec. This is called
52045 ** The BtShared.pHasContent bitvec exists to work around an obscure
52068 ** The solution is the BtShared.pHasContent bitvec. Whenever a page is
52072 ** set in BtShared.pHasContent. The contents of the bitvec are cleared
52075 static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
52091 ** Query the BtShared.pHasContent vector.
52097 static int btreeGetHasContent(BtShared *pBt, Pgno pgno){
52103 ** Clear (destroy) the BtShared.pHasContent bitvec. This should be
52106 static void btreeClearHasContent(BtShared *pBt){
52176 static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
52322 static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
52346 static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
52398 static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
52929 BtShared *pBt; /* A copy of pPage->pBt */
52975 BtShared *pBt; /* The main btree structure */
53077 BtShared *pBt = pPage->pBt;
53111 static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
53133 BtShared *pBt, /* The btree */
53154 static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
53168 static Pgno btreePagecount(BtShared *pBt){
53186 BtShared *pBt, /* The database file */
53259 BtShared *pBt = (BtShared*)pArg;
53282 ** SQLITE_CONSTRAINT error. We cannot allow two or more BtShared
53294 BtShared *pBt = 0; /* Shared part of btree structure */
53346 ** existing BtShared object that we can share with
53375 for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
53478 /* Add the new BtShared object to the linked list sharable BtShareds.
53493 pBt->pNext = GLOBAL(BtShared*,sqlite3SharedCacheList);
53494 GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt;
53558 ** Decrement the BtShared.nRef counter. When it reaches zero,
53559 ** remove the BtShared structure from the sharing list. Return
53560 ** true if the BtShared.nRef counter reaches zero and return
53563 static int removeFromSharingList(BtShared *pBt){
53566 BtShared *pList;
53574 if( GLOBAL(BtShared*,sqlite3SharedCacheList)==pBt ){
53575 GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt->pNext;
53577 pList = GLOBAL(BtShared*,sqlite3SharedCacheList);
53601 static void allocateTempSpace(BtShared *pBt){
53622 static void freeTempSpace(BtShared *pBt){
53631 BtShared *pBt = p->pBt;
53662 ** Clean out and delete the BtShared object.
53701 BtShared *pBt = p->pBt;
53715 BtShared *pBt = p->pBt;
53737 BtShared *pBt = p->pBt;
53751 BtShared *pBt = p->pBt;
53783 BtShared *pBt = p->pBt;
53889 BtShared *pBt = p->pBt;
53935 static int lockBtree(BtShared *pBt){
53983 ** return SQLITE_OK and return without populating BtShared.pPage1.
54021 ** of BtShared.pageSize, we have discovered that the page-size is
54095 static int countValidCursors(BtShared *pBt, int wrOnly){
54114 static void unlockBtreeIfUnused(BtShared *pBt){
54131 static int newDatabase(BtShared *pBt){
54221 BtShared *pBt = p->pBt;
54368 BtShared *pBt = pPage->pBt;
54475 BtShared *pBt, /* Btree */
54548 static int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);
54567 static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg, int bCommit){
54663 static Pgno finalDbSize(BtShared *pBt, Pgno nOrig, Pgno nFree){
54691 BtShared *pBt = p->pBt;
54731 static int autoVacuumCommit(BtShared *pBt){
54813 BtShared *pBt = p->pBt;
54838 BtShared *pBt = p->pBt;
54910 BtShared *pBt = p->pBt;
54943 ** code to errCode for every cursor on BtShared that pBtree
54986 BtShared *pBt = p->pBt;
55050 BtShared *pBt = p->pBt;
55082 BtShared *pBt = p->pBt;
55143 BtShared *pBt = p->pBt; /* Shared b-tree handle */
55169 ** variables and link the cursor into the BtShared list. */
55231 BtShared *pBt = pCur->pBt;
55377 BtShared *pBt, /* The database file */
55507 BtShared *pBt = pCur->pBt; /* Btree this cursor belongs to */
55773 ** Hence, a mutex on the BtShared should be held prior to calling
55800 BtShared *pBt = pCur->pBt;
56531 BtShared *pBt, /* The btree */
56849 static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
56981 BtShared *pBt = pPage->pBt;
57070 BtShared *pBt = pPage->pBt;
57426 BtShared *const pBt = pPage->pBt; /* B-Tree Database */
57518 BtShared *pBt = pPage->pBt;
57567 BtShared * const pBt = pFrom->pBt;
57656 BtShared *pBt; /* The whole database */
58307 BtShared *pBt = pRoot->pBt; /* The BTree */
58509 BtShared *pBt = p->pBt;
58647 BtShared *pBt = p->pBt;
58770 BtShared *pBt = p->pBt;
58924 BtShared *pBt, /* The BTree that contains the table */
58985 BtShared *pBt = p->pBt;
59034 BtShared *pBt = p->pBt;
59157 BtShared *pBt = p->pBt;
59183 BtShared *pBt = p->pBt;
59494 BtShared *pBt;
59716 BtShared *pBt = p->pBt;
59815 ** open so it is safe to access without the BtShared mutex.
59828 ** open so it is safe to access without the BtShared mutex.
59855 BtShared *pBt = p->pBt;
59904 BtShared *pBt = p->pBt;
60025 BtShared *pBt = pBtree->pBt;
60121 ** handle mutex and the mutex associated with the source BtShared
60127 ** associated with the source database BtShared structure will always
60715 ** It is assumed that the mutex associated with the BtShared object
60748 ** It is assumed that the mutex associated with the BtShared object
61632 ** that both the BtShared and database handle mutexes are held. */
63354 ** this routine obtains the mutex associated with each BtShared structure
63356 ** sets the BtShared.db member of each of the BtShared structures, ensuring
63360 ** sqlite3BtreeEnter() is invoked to set the BtShared.db variables
63361 ** of all of BtShared structures accessible via the database handle
109488 /* Assert that the mutex (if any) associated with the BtShared database
109549 ** 1) By this function. In this case, all BtShared mutexes and the mutex
109553 ** the sqlite3.pDisconnect list. In this case either the BtShared mutex