Lines Matching defs:BtShared

7667 typedef struct BtShared BtShared;
7829 ** use mutexes to access the BtShared structures. So make the
9020 ** Btrees that refer to the same underlying BtShared object.
46482 u16 maxLocal; /* Copy of BtShared.maxLocal or BtShared.maxLeaf */
46483 u16 minLocal; /* Copy of BtShared.minLocal or BtShared.minLeaf */
46492 BtShared *pBt; /* Pointer to BtShared that this page is part of */
46506 ** A linked list of the following structures is stored at BtShared.pLock.
46508 ** is opened on the table with root page BtShared.iTable. Locks are removed
46516 BtLock *pNext; /* Next in BtShared.pLock list */
46534 ** points to the same BtShared object. The database cache and the
46536 ** the BtShared object.
46540 ** in the referenced BtShared that point back to this Btree since those
46541 ** cursors have to go through this Btree to find their BtShared and
46546 BtShared *pBt; /* Sharable content of this btree */
46577 ** to this one BtShared object. BtShared.nRef is the number of
46580 ** Fields in this structure are accessed under the BtShared.mutex
46584 ** The pSchema field may be set once under BtShared.mutex and
46589 ** If a BtShared client fails to obtain a write-lock on a database
46597 ** 1) The current writer (BtShared.pWriter) concludes its transaction, OR
46605 struct BtShared {
46630 void (*xFreeSchema)(void*); /* Destructor for BtShared.pSchema */
46635 BtShared *pNext; /* Next on a list of sharable BtShared structs */
46641 u8 *pTmpSpace; /* BtShared.pageSize bytes of space for tmp use */
46683 ** Fields in this structure are accessed under the BtShared.mutex
46688 BtShared *pBt; /* The BtShared this cursor points to */
46730 ** on a different connection that shares the BtShared cache with this
46829 BtShared *pBt; /* The tree being checked out */
46853 ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
46854 ** set BtShared.db to the database handle associated with p and the
46868 ** Release the BtShared mutex associated with B-Tree handle p and
46872 BtShared *pBt = p->pBt;
46918 /* Unless the database is sharable and unlocked, then BtShared.db
46937 ** BtShared address. Then acquire our lock. Then reacquire
46938 ** the other BtShared locks that we used to hold in ascending
46972 ** Return true if the BtShared mutex is held on the btree, or if the
47012 ** Enter the mutexes in accending order by BtShared pointer address
47047 ** mutex and all required BtShared mutexes.
47167 ** A list of BtShared objects that are eligible for participation
47175 SQLITE_PRIVATE BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
47177 static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
47201 ** manipulate entries in the BtShared.pLock linked list used to store
47204 ** of each BtShared structure and so this locking is not necessary.
47311 ** shares the same BtShared object is currently reading or writing
47342 BtShared *pBt = p->pBt;
47404 ** database (one with the BtShared.sharable flag set), and
47414 BtShared *pBt = p->pBt;
47474 ** transaction. If it does not, then the BtShared.isPending variable
47478 BtShared *pBt = p->pBt;
47512 ** If there is not currently a writer, then BtShared.isPending must
47523 BtShared *pBt = p->pBt;
47543 ** Verify that the cursor holds the mutex on its BtShared
47566 static void invalidateAllOverflowCache(BtShared *pBt){
47593 BtShared *pBt = pBtree->pBt;
47610 ** Set bit pgno of the BtShared.pHasContent bitvec. This is called
47614 ** The BtShared.pHasContent bitvec exists to work around an obscure
47637 ** The solution is the BtShared.pHasContent bitvec. Whenever a page is
47641 ** set in BtShared.pHasContent. The contents of the bitvec are cleared
47644 static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
47660 ** Query the BtShared.pHasContent vector.
47666 static int btreeGetHasContent(BtShared *pBt, Pgno pgno){
47672 ** Clear (destroy) the BtShared.pHasContent bitvec. This should be
47675 static void btreeClearHasContent(BtShared *pBt){
47737 static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
47857 static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
47881 static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
47932 static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
48457 BtShared *pBt; /* A copy of pPage->pBt */
48502 BtShared *pBt; /* The main btree structure */
48602 BtShared *pBt = pPage->pBt;
48635 static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
48657 BtShared *pBt, /* The btree */
48677 static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
48691 static Pgno btreePagecount(BtShared *pBt){
48709 BtShared *pBt, /* The database file */
48779 BtShared *pBt = (BtShared*)pArg;
48805 ** SQLITE_CONSTRAINT error. We cannot allow two or more BtShared
48817 BtShared *pBt = 0; /* Shared part of btree structure */
48871 ** existing BtShared object that we can share with
48888 for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
48990 /* Add the new BtShared object to the linked list sharable BtShareds.
49005 pBt->pNext = GLOBAL(BtShared*,sqlite3SharedCacheList);
49006 GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt;
49070 ** Decrement the BtShared.nRef counter. When it reaches zero,
49071 ** remove the BtShared structure from the sharing list. Return
49072 ** true if the BtShared.nRef counter reaches zero and return
49075 static int removeFromSharingList(BtShared *pBt){
49078 BtShared *pList;
49086 if( GLOBAL(BtShared*,sqlite3SharedCacheList)==pBt ){
49087 GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt->pNext;
49089 pList = GLOBAL(BtShared*,sqlite3SharedCacheList);
49113 static void allocateTempSpace(BtShared *pBt){
49122 static void freeTempSpace(BtShared *pBt){
49131 BtShared *pBt = p->pBt;
49162 ** Clean out and delete the BtShared object.
49201 BtShared *pBt = p->pBt;
49224 BtShared *pBt = p->pBt;
49239 BtShared *pBt = p->pBt;
49271 BtShared *pBt = p->pBt;
49358 BtShared *pBt = p->pBt;
49404 static int lockBtree(BtShared *pBt){
49452 ** return SQLITE_OK and return without populating BtShared.pPage1.
49490 ** of BtShared.pageSize, we have discovered that the page-size is
49554 static void unlockBtreeIfUnused(BtShared *pBt){
49571 static int newDatabase(BtShared *pBt){
49647 BtShared *pBt = p->pBt;
49789 BtShared *pBt = pPage->pBt;
49895 BtShared *pBt, /* Btree */
49968 static int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);
49988 static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg){
50099 BtShared *pBt = p->pBt;
50126 static int autoVacuumCommit(BtShared *pBt){
50216 BtShared *pBt = p->pBt;
50238 BtShared *pBt = p->pBt;
50307 BtShared *pBt = p->pBt;
50348 static int countWriteCursors(BtShared *pBt){
50360 ** code to errCode for every cursor on BtShared that pBtree
50402 BtShared *pBt = p->pBt;
50470 BtShared *pBt = p->pBt;
50502 BtShared *pBt = p->pBt;
50561 BtShared *pBt = p->pBt; /* Shared b-tree handle */
50586 ** variables and link the cursor into the BtShared list. */
50678 BtShared *pBt = pCur->pBt;
50824 BtShared *pBt, /* The database file */
50952 BtShared *pBt = pCur->pBt; /* Btree this cursor belongs to */
51186 ** Hence, a mutex on the BtShared should be held prior to calling
51225 BtShared *pBt = pCur->pBt;
51316 BtShared *pBt = p->pBt;
51867 BtShared *pBt,
52145 static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
52277 BtShared *pBt = pPage->pBt;
52363 BtShared *pBt = pPage->pBt;
52725 BtShared *const pBt = pPage->pBt; /* B-Tree Database */
52817 BtShared *pBt = pPage->pBt;
52866 BtShared * const pBt = pFrom->pBt;
52951 BtShared *pBt; /* The whole database */
53574 BtShared *pBt = pRoot->pBt; /* The BTree */
53773 BtShared *pBt = p->pBt;
53903 BtShared *pBt = p->pBt;
54025 BtShared *pBt = p->pBt;
54172 BtShared *pBt, /* The BTree that contains the table */
54231 BtShared *pBt = p->pBt;
54271 BtShared *pBt = p->pBt;
54394 BtShared *pBt = p->pBt;
54418 BtShared *pBt = p->pBt;
54704 BtShared *pBt;
54926 BtShared *pBt = p->pBt;
55026 ** open so it is safe to access without the BtShared mutex.
55039 ** open so it is safe to access without the BtShared mutex.
55066 BtShared *pBt = p->pBt;
55115 BtShared *pBt = p->pBt;
55234 BtShared *pBt = pBtree->pBt;
55320 ** handle mutex and the mutex associated with the source BtShared
55326 ** associated with the source database BtShared structure will always
55875 ** It is assumed that the mutex associated with the BtShared object
55908 ** It is assumed that the mutex associated with the BtShared object
56879 ** that both the BtShared and database handle mutexes are held. */
58095 ** this routine obtains the mutex associated with each BtShared structure
58097 ** sets the BtShared.db member of each of the BtShared structures, ensuring
58101 ** sqlite3BtreeEnter() is invoked to set the BtShared.db variables
58102 ** of all of BtShared structures accessible via the database handle
96856 /* Assert that the mutex (if any) associated with the BtShared database
96892 ** 1) By this function. In this case, all BtShared mutexes and the mutex
96896 ** the sqlite3.pDisconnect list. In this case either the BtShared mutex