Lines Matching defs:pBtree

15514 SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *pBtree);
15516 SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock);
15552 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
67880 Btree *pBtree; /* Btree handle holding this lock */
68074 ** particular database connection identified BtCursor.pBtree.db.
68098 Btree *pBtree; /* The Btree to which this cursor belongs */
68582 sqlite3BtreeEnter(pCur->pBtree);
68586 sqlite3BtreeLeave(pCur->pBtree);
68778 ** Check to see if pBtree holds the required locks to read or write to the
68782 ** Btree connection pBtree:
68784 ** assert( hasSharedCacheTableLock(pBtree, iRoot, 0, WRITE_LOCK) );
68798 Btree *pBtree, /* Handle that must hold lock */
68803 Schema *pSchema = (Schema *)pBtree->pBt->pSchema;
68811 if( (pBtree->sharable==0)
68812 || (eLockType==READ_LOCK && (pBtree->db->flags & SQLITE_ReadUncommit))
68853 for(pLock=pBtree->pBt->pLock; pLock; pLock=pLock->pNext){
68854 if( pLock->pBtree==pBtree
68871 ** Return true if it would be illegal for pBtree to write into the
68875 ** It is illegal for pBtree to write if some other Btree object that
68884 ** assert( !hasReadConflicts(pBtree, iRoot) );
68886 static int hasReadConflicts(Btree *pBtree, Pgno iRoot){
68888 for(p=pBtree->pBt->pCursor; p; p=p->pNext){
68890 && p->pBtree!=pBtree
68891 && 0==(p->pBtree->db->flags & SQLITE_ReadUncommit)
68946 assert( eLock==READ_LOCK || pIter->pBtree==p || pIter->eLock==READ_LOCK);
68947 if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
68948 sqlite3ConnectionBlocked(p->db, pIter->pBtree->db);
69000 if( pIter->iTable==iTable && pIter->pBtree==p ){
69015 pLock->pBtree = p;
69052 assert( (pBt->btsFlags & BTS_EXCLUSIVE)==0 || pBt->pWriter==pLock->pBtree );
69053 assert( pLock->pBtree->inTrans>=pLock->eLock );
69054 if( pLock->pBtree==p ){
69093 assert( pLock->eLock==READ_LOCK || pLock->pBtree==p );
69125 return (p->pBtree->db==p->pBt->db);
69162 Btree *pBtree, /* The database file to check */
69168 assert( pBtree->hasIncrblobCur );
69169 assert( sqlite3BtreeHoldsMutex(pBtree) );
69170 pBtree->hasIncrblobCur = 0;
69171 for(p=pBtree->pBt->pCursor; p; p=p->pNext){
69173 pBtree->hasIncrblobCur = 1;
71123 p->lock.pBtree = p;
71469 assert( pTmp->pBtree!=p );
72170 if( pIter->pBtree!=p ){
72171 pBlock = pIter->pBtree->db;
72246 assert( p->lock.pBtree==p && p->lock.iTable==1 );
72919 ** code to errCode for every cursor on any BtShared that pBtree
72925 ** sharing the cache with pBtree.
72943 SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode, int writeOnly){
72948 if( pBtree ){
72949 sqlite3BtreeEnter(pBtree);
72950 for(p=pBtree->pBt->pCursor; p; p=p->pNext){
72955 (void)sqlite3BtreeTripAllCursors(pBtree, rc, 0);
72966 sqlite3BtreeLeave(pBtree);
73205 pCur->pBtree = p;
73284 Btree *pBtree = pCur->pBtree;
73285 if( pBtree ){
73287 sqlite3BtreeEnter(pBtree);
73308 assert( pBtree->sharable==0 );
73309 sqlite3BtreeClose(pBtree);
73311 sqlite3BtreeLeave(pBtree);
73313 pCur->pBtree = 0;
73691 assert( pCur->pBtree->db==pBt->db );
73847 assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
74120 assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
74142 assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
74212 assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
74249 pCur->pBtree->nSeek++; /* Performance measurement during testing */
74443 assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
74448 pCur->pBtree->nSeek++; /* Performance measurement during testing */
74596 && (pIdxKey->errCode!=SQLITE_NOMEM || pCur->pBtree->db->mallocFailed)
74664 assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
77639 Btree *p = pCur->pBtree;
78057 Btree *p = pCur->pBtree;
78517 return sqlite3BtreeClearTable(pCur->pBtree, pCur->pgnoRoot, 0);
79608 assert( sqlite3_mutex_held(pCsr->pBtree->db->mutex) );
79643 assert( hasSharedCacheTableLock(pCsr->pBtree, pCsr->pgnoRoot, 0, 2) );
79644 assert( !hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot) );
79655 pCur->pBtree->hasIncrblobCur = 1;
79664 SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBtree, int iVersion){
79665 BtShared *pBt = pBtree->pBt;
79676 rc = sqlite3BtreeBeginTrans(pBtree, 0, 0);
79680 rc = sqlite3BtreeBeginTrans(pBtree, 2, 0);
177393 Btree *pBtree;
177399 pBtree = sqlite3DbNameToBtree(db, zDbName);
177400 if( pBtree ){
177403 sqlite3BtreeEnter(pBtree);
177404 pPager = sqlite3BtreePager(pBtree);
177422 *(int*)pArg = sqlite3BtreeGetRequestedReserve(pBtree);
177424 sqlite3BtreeSetPageSize(pBtree, 0, iNew, 0);
177428 sqlite3BtreeClearCache(pBtree);
177435 sqlite3BtreeLeave(pBtree);