Lines Matching defs:iTable

171      && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
263 if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
278 ** Add a lock on the table with root-page iTable to the shared-btree used
294 static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
312 assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );
316 if( pIter->iTable==iTable && pIter->pBtree==p ){
323 ** with table iTable, allocate one and link it into the list.
330 pLock->iTable = iTable;
372 assert( pLock->iTable!=1 || pLock==&p->lock );
373 if( pLock->iTable!=1 ){
1746 p->lock.iTable = 1;
2610 assert( p->lock.pBtree==p && p->lock.iTable==1 );
3405 ** iTable. If a read-only cursor is requested, it is assumed that
3428 ** No checking is done to make sure that page iTable really is the
3437 int iTable, /* Root page of table to open */
3451 assert( hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, wrFlag+1) );
3452 assert( wrFlag==0 || !hasReadConflicts(p, iTable) );
3462 if( iTable==1 && btreePagecount(pBt)==0 ){
3468 pCur->pgnoRoot = (Pgno)iTable;
3485 int iTable, /* Root page of table to open */
3492 rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
7098 ** Delete all information from a single table in the database. iTable is
7106 ** If pnChange is not NULL, then table iTable must be an intkey table. The
7110 int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){
7116 /* Invalidate all incrblob cursors open on table iTable (assuming iTable
7121 rc = saveAllCursors(pBt, (Pgno)iTable, 0);
7123 rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
7137 ** If AUTOVACUUM is enabled and the page at iTable is not the last
7140 ** iTable and that last slot formerly occupied by the last root page
7141 ** is added to the freelist instead of iTable. In this say, all
7149 static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
7170 rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
7172 rc = sqlite3BtreeClearTable(p, iTable, 0);
7180 if( iTable>1 ){
7189 if( iTable==maxRootPgno ){
7209 rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
7252 int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
7255 rc = btreeDropTable(p, iTable, piMoved);