Lines Matching defs:BtShared
8215 typedef struct BtShared BtShared;
8377 ** use mutexes to access the BtShared structures. So make the
9611 ** Btrees that refer to the same underlying BtShared object.
48718 u16 maxLocal; /* Copy of BtShared.maxLocal or BtShared.maxLeaf */
48719 u16 minLocal; /* Copy of BtShared.minLocal or BtShared.minLeaf */
48727 BtShared *pBt; /* Pointer to BtShared that this page is part of */
48743 ** A linked list of the following structures is stored at BtShared.pLock.
48745 ** is opened on the table with root page BtShared.iTable. Locks are removed
48753 BtLock *pNext; /* Next in BtShared.pLock list */
48771 ** points to the same BtShared object. The database cache and the
48773 ** the BtShared object.
48777 ** in the referenced BtShared that point back to this Btree since those
48778 ** cursors have to go through this Btree to find their BtShared and
48783 BtShared *pBt; /* Sharable content of this btree */
48814 ** to this one BtShared object. BtShared.nRef is the number of
48817 ** Fields in this structure are accessed under the BtShared.mutex
48821 ** The pSchema field may be set once under BtShared.mutex and
48826 ** If a BtShared client fails to obtain a write-lock on a database
48834 ** 1) The current writer (BtShared.pWriter) concludes its transaction, OR
48842 struct BtShared {
48864 void (*xFreeSchema)(void*); /* Destructor for BtShared.pSchema */
48869 BtShared *pNext; /* Next on a list of sharable BtShared structs */
48873 u8 *pTmpSpace; /* BtShared.pageSize bytes of space for tmp use */
48877 ** Allowed values for BtShared.btsFlags
48926 ** Fields in this structure are accessed under the BtShared.mutex
48931 BtShared *pBt; /* The BtShared this cursor points to */
48975 ** on a different connection that shares the BtShared cache with this
49074 BtShared *pBt; /* The tree being checked out */
49098 ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
49099 ** set BtShared.db to the database handle associated with p and the
49113 ** Release the BtShared mutex associated with B-Tree handle p and
49117 BtShared *pBt = p->pBt;
49163 /* Unless the database is sharable and unlocked, then BtShared.db
49182 ** BtShared address. Then acquire our lock. Then reacquire
49183 ** the other BtShared locks that we used to hold in ascending
49217 ** Return true if the BtShared mutex is held on the btree, or if the
49257 ** Enter the mutexes in accending order by BtShared pointer address
49292 ** mutex and all required BtShared mutexes.
49412 ** A list of BtShared objects that are eligible for participation
49420 SQLITE_PRIVATE BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
49422 static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
49446 ** manipulate entries in the BtShared.pLock linked list used to store
49449 ** of each BtShared structure and so this locking is not necessary.
49556 ** shares the same BtShared object is currently reading or writing
49587 BtShared *pBt = p->pBt;
49649 ** database (one with the BtShared.sharable flag set), and
49659 BtShared *pBt = p->pBt;
49723 BtShared *pBt = p->pBt;
49767 BtShared *pBt = p->pBt;
49786 ** Verify that the cursor holds the mutex on its BtShared
49809 static void invalidateAllOverflowCache(BtShared *pBt){
49836 BtShared *pBt = pBtree->pBt;
49853 ** Set bit pgno of the BtShared.pHasContent bitvec. This is called
49857 ** The BtShared.pHasContent bitvec exists to work around an obscure
49880 ** The solution is the BtShared.pHasContent bitvec. Whenever a page is
49884 ** set in BtShared.pHasContent. The contents of the bitvec are cleared
49887 static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
49903 ** Query the BtShared.pHasContent vector.
49909 static int btreeGetHasContent(BtShared *pBt, Pgno pgno){
49915 ** Clear (destroy) the BtShared.pHasContent bitvec. This should be
49918 static void btreeClearHasContent(BtShared *pBt){
49980 static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
50103 static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
50127 static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
50179 static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
50709 BtShared *pBt; /* A copy of pPage->pBt */
50755 BtShared *pBt; /* The main btree structure */
50857 BtShared *pBt = pPage->pBt;
50892 static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
50914 BtShared *pBt, /* The btree */
50934 static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
50948 static Pgno btreePagecount(BtShared *pBt){
50966 BtShared *pBt, /* The database file */
51036 BtShared *pBt = (BtShared*)pArg;
51059 ** SQLITE_CONSTRAINT error. We cannot allow two or more BtShared
51071 BtShared *pBt = 0; /* Shared part of btree structure */
51122 ** existing BtShared object that we can share with
51146 for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
51248 /* Add the new BtShared object to the linked list sharable BtShareds.
51263 pBt->pNext = GLOBAL(BtShared*,sqlite3SharedCacheList);
51264 GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt;
51328 ** Decrement the BtShared.nRef counter. When it reaches zero,
51329 ** remove the BtShared structure from the sharing list. Return
51330 ** true if the BtShared.nRef counter reaches zero and return
51333 static int removeFromSharingList(BtShared *pBt){
51336 BtShared *pList;
51344 if( GLOBAL(BtShared*,sqlite3SharedCacheList)==pBt ){
51345 GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt->pNext;
51347 pList = GLOBAL(BtShared*,sqlite3SharedCacheList);
51371 static void allocateTempSpace(BtShared *pBt){
51380 static void freeTempSpace(BtShared *pBt){
51389 BtShared *pBt = p->pBt;
51420 ** Clean out and delete the BtShared object.
51459 BtShared *pBt = p->pBt;
51482 BtShared *pBt = p->pBt;
51497 BtShared *pBt = p->pBt;
51529 BtShared *pBt = p->pBt;
51617 BtShared *pBt = p->pBt;
51663 static int lockBtree(BtShared *pBt){
51711 ** return SQLITE_OK and return without populating BtShared.pPage1.
51749 ** of BtShared.pageSize, we have discovered that the page-size is
51818 static void unlockBtreeIfUnused(BtShared *pBt){
51835 static int newDatabase(BtShared *pBt){
51911 BtShared *pBt = p->pBt;
52057 BtShared *pBt = pPage->pBt;
52164 BtShared *pBt, /* Btree */
52237 static int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);
52257 static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg){
52368 BtShared *pBt = p->pBt;
52395 static int autoVacuumCommit(BtShared *pBt){
52485 BtShared *pBt = p->pBt;
52507 BtShared *pBt = p->pBt;
52576 BtShared *pBt = p->pBt;
52617 static int countWriteCursors(BtShared *pBt){
52629 ** code to errCode for every cursor on BtShared that pBtree
52672 BtShared *pBt = p->pBt;
52735 BtShared *pBt = p->pBt;
52767 BtShared *pBt = p->pBt;
52828 BtShared *pBt = p->pBt; /* Shared b-tree handle */
52854 ** variables and link the cursor into the BtShared list. */
52946 BtShared *pBt = pCur->pBt;
53092 BtShared *pBt, /* The database file */
53220 BtShared *pBt = pCur->pBt; /* Btree this cursor belongs to */
53488 ** Hence, a mutex on the BtShared should be held prior to calling
53527 BtShared *pBt = pCur->pBt;
53628 BtShared *pBt = p->pBt;
54192 BtShared *pBt,
54472 static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
54604 BtShared *pBt = pPage->pBt;
54693 BtShared *pBt = pPage->pBt;
55063 BtShared *const pBt = pPage->pBt; /* B-Tree Database */
55155 BtShared *pBt = pPage->pBt;
55204 BtShared * const pBt = pFrom->pBt;
55289 BtShared *pBt; /* The whole database */
55933 BtShared *pBt = pRoot->pBt; /* The BTree */
56135 BtShared *pBt = p->pBt;
56266 BtShared *pBt = p->pBt;
56388 BtShared *pBt = p->pBt;
56535 BtShared *pBt, /* The BTree that contains the table */
56594 BtShared *pBt = p->pBt;
56634 BtShared *pBt = p->pBt;
56757 BtShared *pBt = p->pBt;
56783 BtShared *pBt = p->pBt;
57074 BtShared *pBt;
57296 BtShared *pBt = p->pBt;
57396 ** open so it is safe to access without the BtShared mutex.
57409 ** open so it is safe to access without the BtShared mutex.
57436 BtShared *pBt = p->pBt;
57485 BtShared *pBt = p->pBt;
57605 BtShared *pBt = pBtree->pBt;
57691 ** handle mutex and the mutex associated with the source BtShared
57697 ** associated with the source database BtShared structure will always
58250 ** It is assumed that the mutex associated with the BtShared object
58283 ** It is assumed that the mutex associated with the BtShared object
59264 ** that both the BtShared and database handle mutexes are held. */
60490 ** this routine obtains the mutex associated with each BtShared structure
60492 ** sets the BtShared.db member of each of the BtShared structures, ensuring
60496 ** sqlite3BtreeEnter() is invoked to set the BtShared.db variables
60497 ** of all of BtShared structures accessible via the database handle
101619 /* Assert that the mutex (if any) associated with the BtShared database
101655 ** 1) By this function. In this case, all BtShared mutexes and the mutex
101659 ** the sqlite3.pDisconnect list. In this case either the BtShared mutex