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.
50897 u16 maxLocal; /* Copy of BtShared.maxLocal or BtShared.maxLeaf */
50898 u16 minLocal; /* Copy of BtShared.minLocal or BtShared.minLeaf */
50906 BtShared *pBt; /* Pointer to BtShared that this page is part of */
50922 ** A linked list of the following structures is stored at BtShared.pLock.
50924 ** is opened on the table with root page BtShared.iTable. Locks are removed
50932 BtLock *pNext; /* Next in BtShared.pLock list */
50950 ** points to the same BtShared object. The database cache and the
50952 ** the BtShared object.
50956 ** in the referenced BtShared that point back to this Btree since those
50957 ** cursors have to go through this Btree to find their BtShared and
50962 BtShared *pBt; /* Sharable content of this btree */
50993 ** to this one BtShared object. BtShared.nRef is the number of
50996 ** Fields in this structure are accessed under the BtShared.mutex
51000 ** The pSchema field may be set once under BtShared.mutex and
51005 ** If a BtShared client fails to obtain a write-lock on a database
51013 ** 1) The current writer (BtShared.pWriter) concludes its transaction, OR
51021 struct BtShared {
51044 void (*xFreeSchema)(void*); /* Destructor for BtShared.pSchema */
51049 BtShared *pNext; /* Next on a list of sharable BtShared structs */
51053 u8 *pTmpSpace; /* BtShared.pageSize bytes of space for tmp use */
51057 ** Allowed values for BtShared.btsFlags
51106 ** Fields in this structure are accessed under the BtShared.mutex
51111 BtShared *pBt; /* The BtShared this cursor points to */
51163 ** on a different connection that shares the BtShared cache with this
51269 BtShared *pBt; /* The tree being checked out */
51293 ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
51294 ** set BtShared.db to the database handle associated with p and the
51308 ** Release the BtShared mutex associated with B-Tree handle p and
51312 BtShared *pBt = p->pBt;
51358 /* Unless the database is sharable and unlocked, then BtShared.db
51377 ** BtShared address. Then acquire our lock. Then reacquire
51378 ** the other BtShared locks that we used to hold in ascending
51412 ** Return true if the BtShared mutex is held on the btree, or if the
51452 ** Enter the mutexes in accending order by BtShared pointer address
51487 ** mutex and all required BtShared mutexes.
51626 ** A list of BtShared objects that are eligible for participation
51634 SQLITE_PRIVATE BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
51636 static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
51660 ** manipulate entries in the BtShared.pLock linked list used to store
51663 ** of each BtShared structure and so this locking is not necessary.
51770 ** shares the same BtShared object is currently reading or writing
51801 BtShared *pBt = p->pBt;
51863 ** database (one with the BtShared.sharable flag set), and
51873 BtShared *pBt = p->pBt;
51937 BtShared *pBt = p->pBt;
51981 BtShared *pBt = p->pBt;
52000 ** Verify that the cursor holds the mutex on its BtShared
52018 static void invalidateAllOverflowCache(BtShared *pBt){
52046 BtShared *pBt = pBtree->pBt;
52061 ** Set bit pgno of the BtShared.pHasContent bitvec. This is called
52065 ** The BtShared.pHasContent bitvec exists to work around an obscure
52088 ** The solution is the BtShared.pHasContent bitvec. Whenever a page is
52092 ** set in BtShared.pHasContent. The contents of the bitvec are cleared
52095 static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
52111 ** Query the BtShared.pHasContent vector.
52117 static int btreeGetHasContent(BtShared *pBt, Pgno pgno){
52123 ** Clear (destroy) the BtShared.pHasContent bitvec. This should be
52126 static void btreeClearHasContent(BtShared *pBt){
52196 static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
52342 static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
52366 static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
52418 static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
52949 BtShared *pBt; /* A copy of pPage->pBt */
52995 BtShared *pBt; /* The main btree structure */
53097 BtShared *pBt = pPage->pBt;
53131 static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
53153 BtShared *pBt, /* The btree */
53174 static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
53188 static Pgno btreePagecount(BtShared *pBt){
53206 BtShared *pBt, /* The database file */
53279 BtShared *pBt = (BtShared*)pArg;
53302 ** SQLITE_CONSTRAINT error. We cannot allow two or more BtShared
53314 BtShared *pBt = 0; /* Shared part of btree structure */
53366 ** existing BtShared object that we can share with
53395 for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
53498 /* Add the new BtShared object to the linked list sharable BtShareds.
53513 pBt->pNext = GLOBAL(BtShared*,sqlite3SharedCacheList);
53514 GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt;
53578 ** Decrement the BtShared.nRef counter. When it reaches zero,
53579 ** remove the BtShared structure from the sharing list. Return
53580 ** true if the BtShared.nRef counter reaches zero and return
53583 static int removeFromSharingList(BtShared *pBt){
53586 BtShared *pList;
53594 if( GLOBAL(BtShared*,sqlite3SharedCacheList)==pBt ){
53595 GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt->pNext;
53597 pList = GLOBAL(BtShared*,sqlite3SharedCacheList);
53621 static void allocateTempSpace(BtShared *pBt){
53642 static void freeTempSpace(BtShared *pBt){
53651 BtShared *pBt = p->pBt;
53682 ** Clean out and delete the BtShared object.
53721 BtShared *pBt = p->pBt;
53735 BtShared *pBt = p->pBt;
53757 BtShared *pBt = p->pBt;
53771 BtShared *pBt = p->pBt;
53803 BtShared *pBt = p->pBt;
53909 BtShared *pBt = p->pBt;
53955 static int lockBtree(BtShared *pBt){
54003 ** return SQLITE_OK and return without populating BtShared.pPage1.
54041 ** of BtShared.pageSize, we have discovered that the page-size is
54115 static int countValidCursors(BtShared *pBt, int wrOnly){
54134 static void unlockBtreeIfUnused(BtShared *pBt){
54151 static int newDatabase(BtShared *pBt){
54241 BtShared *pBt = p->pBt;
54388 BtShared *pBt = pPage->pBt;
54495 BtShared *pBt, /* Btree */
54568 static int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);
54587 static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg, int bCommit){
54683 static Pgno finalDbSize(BtShared *pBt, Pgno nOrig, Pgno nFree){
54711 BtShared *pBt = p->pBt;
54751 static int autoVacuumCommit(BtShared *pBt){
54833 BtShared *pBt = p->pBt;
54858 BtShared *pBt = p->pBt;
54930 BtShared *pBt = p->pBt;
54963 ** code to errCode for every cursor on BtShared that pBtree
55006 BtShared *pBt = p->pBt;
55070 BtShared *pBt = p->pBt;
55102 BtShared *pBt = p->pBt;
55163 BtShared *pBt = p->pBt; /* Shared b-tree handle */
55189 ** variables and link the cursor into the BtShared list. */
55251 BtShared *pBt = pCur->pBt;
55397 BtShared *pBt, /* The database file */
55527 BtShared *pBt = pCur->pBt; /* Btree this cursor belongs to */
55793 ** Hence, a mutex on the BtShared should be held prior to calling
55820 BtShared *pBt = pCur->pBt;
56551 BtShared *pBt, /* The btree */
56869 static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
57001 BtShared *pBt = pPage->pBt;
57090 BtShared *pBt = pPage->pBt;
57446 BtShared *const pBt = pPage->pBt; /* B-Tree Database */
57538 BtShared *pBt = pPage->pBt;
57587 BtShared * const pBt = pFrom->pBt;
57676 BtShared *pBt; /* The whole database */
58327 BtShared *pBt = pRoot->pBt; /* The BTree */
58529 BtShared *pBt = p->pBt;
58667 BtShared *pBt = p->pBt;
58790 BtShared *pBt = p->pBt;
58944 BtShared *pBt, /* The BTree that contains the table */
59005 BtShared *pBt = p->pBt;
59054 BtShared *pBt = p->pBt;
59177 BtShared *pBt = p->pBt;
59203 BtShared *pBt = p->pBt;
59514 BtShared *pBt;
59736 BtShared *pBt = p->pBt;
59835 ** open so it is safe to access without the BtShared mutex.
59848 ** open so it is safe to access without the BtShared mutex.
59875 BtShared *pBt = p->pBt;
59924 BtShared *pBt = p->pBt;
60045 BtShared *pBt = pBtree->pBt;
60141 ** handle mutex and the mutex associated with the source BtShared
60147 ** associated with the source database BtShared structure will always
60735 ** It is assumed that the mutex associated with the BtShared object
60768 ** It is assumed that the mutex associated with the BtShared object
61652 ** that both the BtShared and database handle mutexes are held. */
63374 ** this routine obtains the mutex associated with each BtShared structure
63376 ** sets the BtShared.db member of each of the BtShared structures, ensuring
63380 ** sqlite3BtreeEnter() is invoked to set the BtShared.db variables
63381 ** of all of BtShared structures accessible via the database handle
109508 /* Assert that the mutex (if any) associated with the BtShared database
109569 ** 1) By this function. In this case, all BtShared mutexes and the mutex
109573 ** the sqlite3.pDisconnect list. In this case either the BtShared mutex