Lines Matching refs:iTab
8925 SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock);
51686 Pgno iTab = 0;
51717 iTab = pIdx->pTable->tnum;
51721 iTab = iRoot;
51724 /* Search for the required lock. Either a write-lock on root-page iTab, a
51726 ** read-lock on iTab will suffice. Return 1 if any of these are found. */
51729 && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
51776 ** (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return
51780 static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){
51787 assert( !(p->db->flags&SQLITE_ReadUncommitted)||eLock==WRITE_LOCK||iTab==1 );
51821 if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
59932 ** Obtain a lock on the table whose root page is iTab. The
59936 SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
59945 rc = querySharedCacheTableLock(p, iTab, lockType);
59947 rc = setSharedCacheTableLock(p, iTab, lockType);
79815 int iTab = pParse->nTab++; /* Cursor of the RHS table */
79856 sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
79880 sqlite3VdbeAddOp3(v, OP_OpenRead, iTab, pIdx->tnum, iDb);
79888 sqlite3SetHasNullFlag(v, iTab, *prRhsHasNull);
79930 pX->iTable = iTab;
80434 SQLITE_PRIVATE void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){
80456 assert( p->iReg==0 || p->iTable!=iTab || p->iColumn!=iCol );
80464 p->iTable = iTab;
80485 p->iTable = iTab;
80749 int iTab = pExpr->iTable;
80750 if( iTab<0 ){
80757 iTab = pParse->iPartIdxTab;
80761 pExpr->iColumn, iTab, target,
82131 ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
82146 SQLITE_PRIVATE int sqlite3ExprCompare(Expr *pA, Expr *pB, int iTab){
82159 if( pA->op==TK_COLLATE && sqlite3ExprCompare(pA->pLeft, pB, iTab)<2 ){
82162 if( pB->op==TK_COLLATE && sqlite3ExprCompare(pA, pB->pLeft, iTab)<2 ){
82175 if( sqlite3ExprCompare(pA->pLeft, pB->pLeft, iTab) ) return 2;
82176 if( sqlite3ExprCompare(pA->pRight, pB->pRight, iTab) ) return 2;
82177 if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;
82181 && (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
82192 ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
82202 SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList *pA, ExprList *pB, int iTab){
82211 if( sqlite3ExprCompare(pExprA, pExprB, iTab) ) return 1;
82230 ** Expr.iTable<0 then assume a table number given by iTab.
82236 SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Expr *pE1, Expr *pE2, int iTab){
82237 if( sqlite3ExprCompare(pE1, pE2, iTab)==0 ){
82241 && (sqlite3ExprImpliesExpr(pE1, pE2->pLeft, iTab)
82242 || sqlite3ExprImpliesExpr(pE1, pE2->pRight, iTab) )
82247 && sqlite3ExprCompare(pE1->pLeft, pE2->pLeft, iTab)==0
84367 int iTab /* Next available cursor */
84419 iTabCur = iTab++;
84420 iIdxCur = iTab++;
84421 pParse->nTab = MAX(pParse->nTab, iTab);
84702 int iTab;
84709 iTab = pParse->nTab;
84713 analyzeOneTable(pParse, pTab, 0, iStatCur, iMem, iTab);
86134 int iTab; /* The root page of the table to be locked */
86142 ** The table to be locked has root page iTab and is found in database iDb.
86152 int iTab, /* Root page number of the table to be locked */
86164 if( p->iDb==iDb && p->iTab==iTab ){
86176 p->iTab = iTab;
86199 sqlite3VdbeAddOp4(pVdbe, OP_TableLock, p1, p->iTab, p->isWriteLock,
88361 int iTab = pTab->tnum;
88368 if( iDestroyed==0 || iTab<iDestroyed ){
88369 iLargest = iTab;
88746 int iTab = pParse->nTab++; /* Btree cursor used for pTab */
88785 sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
88786 addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iTab, 0); VdbeCoverage(v);
88789 sqlite3GenerateIndexKey(pParse,pIndex,iTab,regRecord,0,&iPartIdxLabel,0,0);
88792 sqlite3VdbeAddOp2(v, OP_Next, iTab, addr1+1); VdbeCoverage(v);
88818 sqlite3VdbeAddOp1(v, OP_Close, iTab);
102002 ** form a distinct entry. iTab is a sorting index that holds previously
102003 ** seen combinations of the N values. A new entry is made in iTab
102011 int iTab, /* A sorting index used to test for distinctness */
102021 sqlite3VdbeAddOp4Int(v, OP_Found, iTab, addrRepeat, iMem, N); VdbeCoverage(v);
102023 sqlite3VdbeAddOp2(v, OP_IdxInsert, iTab, r1);
102575 int iTab;
102590 iTab = pSort->iECursor;
102605 addr = 1 + sqlite3VdbeAddOp2(v, OP_SorterSort, iTab, addrBreak);
102608 sqlite3VdbeAddOp2(v, OP_SorterData, iTab, regSortOut);
102613 addr = 1 + sqlite3VdbeAddOp2(v, OP_Sort, iTab, addrBreak); VdbeCoverage(v);
102615 sqlite3VdbeAddOp3(v, OP_Column, iTab, nKey+1, regRow);
102671 sqlite3VdbeAddOp2(v, OP_SorterNext, iTab, addr); VdbeCoverage(v);
102673 sqlite3VdbeAddOp2(v, OP_Next, iTab, addr); VdbeCoverage(v);
110556 Bitmask maskSelf; /* Bitmask identifying table iTab */
110560 u8 iTab; /* Position in FROM clause of table for this loop */
113405 int iTab;
113424 iTab = pX->iTable;
113425 sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iTab, 0);
113440 pIn->iCur = iTab;
113442 pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iReg);
113444 pIn->addrInTop = sqlite3VdbeAddOp3(v, OP_Column, iTab, 0, iReg);
114671 struct SrcList_item *pItem = pWInfo->pTabList->a + p->iTab;
114674 p->iTab, nb, p->maskSelf, nb, p->prereq);
114884 if( p->iTab!=pTemplate->iTab ) continue;
114920 if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){
114921 /* If either the iTab or iSortIdx values for two WhereLoop are different
114996 ** (1) They have the same iTab.
115449 static int whereUsablePartialIndex(int iTab, WhereClause *pWC, Expr *pWhere){
115453 if( sqlite3ExprImpliesExpr(pTerm->pExpr, pWhere, iTab) ) return 1;
115460 ** is idenfied by pBuilder->pNew->iTab. That table is guaranteed to be
115517 pSrc = pTabList->a + pNew->iTab;
115599 && !whereUsablePartialIndex(pNew->iTab, pWC, pProbe->pPartIdxWhere) ){
115683 ** pBuilder->pNew->iTab. That table is guaranteed to be a virtual table.
115713 pSrc = &pWInfo->pTabList->a[pNew->iTab];
115870 pItem = pWInfo->pTabList->a + pNew->iTab;
115965 int iTab;
115977 for(iTab=0, pItem=pTabList->a; iTab<nTabList; iTab++, pItem++){
115978 pNew->iTab = iTab;
116088 iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor;
116633 pLevel->iFrom = pWLoop->iTab;
117104 if( (pWInfo->pTabList->a[pLoop->iTab].jointype & JT_LEFT)==0 ) break;