Lines Matching refs:iTable
13455 ** then the value of the node is the value in Mem[pExpr.iTable]. Any
13517 int iTable, /* Index of root page */
16141 int iTable; /* Cursor number of the source table */
16203 ** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is
16211 ** character '?' in the original SQL) then the Expr.iTable holds the index
16216 ** subquery gives a constant result, then iTable is -1. If the subquery
16218 ** then iTable is the address of a subroutine that computes the subquery.
16268 int iTable; /* TK_COLUMN: cursor number of table holding column
16345 #define EXPR_REDUCEDSIZE offsetof(Expr,iTable) /* Common features */
16902 int iTable; /* Table cursor number */
27238 pExpr->iTable, pExpr->iColumn, zFlgs);
27242 if( pExpr->iTable<0 ){
27247 pExpr->iTable, pExpr->iColumn, zFlgs);
27285 sqlite3TreeViewLine(pView,"REGISTER(%d)", pExpr->iTable);
27407 ** trigger programs. In this case Expr.iTable is set to 1 for the
27413 pExpr->iTable ? "NEW" : "OLD", pExpr->iColumn);
27437 pExpr->iTable, pExpr->iColumn, zFlgs);
27451 sqlite3TreeViewLine(pView, "IF-NULL-ROW %d", pExpr->iTable);
59711 ** is opened on the table with root page BtShared.iTable. Locks are removed
59717 Pgno iTable; /* Root page of table */
60627 && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
60719 if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
60734 ** Add a lock on the table with root-page iTable to the shared-btree used
60750 static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
60768 assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );
60772 if( pIter->iTable==iTable && pIter->pBtree==p ){
60779 ** with table iTable, allocate one and link it into the list.
60786 pLock->iTable = iTable;
60828 assert( pLock->iTable!=1 || pLock==&p->lock );
60829 if( pLock->iTable!=1 ){
62715 p->lock.iTable = 1;
63784 assert( p->lock.pBtree==p && p->lock.iTable==1 );
64612 ** iTable. If a read-only cursor is requested, it is assumed that
64645 ** No checking is done to make sure that page iTable really is the
64654 int iTable, /* Root page of table to open */
64672 assert( hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, (wrFlag?2:1)) );
64673 assert( wrFlag==0 || !hasReadConflicts(p, iTable) );
64685 if( iTable==1 && btreePagecount(pBt)==0 ){
64687 iTable = 0;
64692 pCur->pgnoRoot = (Pgno)iTable;
64702 if( pX->pgnoRoot==(Pgno)iTable ){
64714 int iTable, /* Root page of table to open */
64720 if( iTable<1 ){
64724 rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
69175 ** Delete all information from a single table in the database. iTable is
69183 ** If pnChange is not NULL, then table iTable must be an intkey table. The
69187 SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){
69193 rc = saveAllCursors(pBt, (Pgno)iTable, 0);
69196 /* Invalidate all incrblob cursors open on table iTable (assuming iTable
69199 invalidateIncrblobCursors(p, (Pgno)iTable, 0, 1);
69200 rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
69223 ** If AUTOVACUUM is enabled and the page at iTable is not the last
69226 ** iTable and that last slot formerly occupied by the last root page
69227 ** is added to the freelist instead of iTable. In this say, all
69235 static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
69242 assert( iTable>=2 );
69244 rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
69246 rc = sqlite3BtreeClearTable(p, iTable, 0);
69262 if( iTable==maxRootPgno ){
69282 rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
69317 SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
69320 rc = btreeDropTable(p, iTable, piMoved);
73160 printf(" r[%d]={%d:%d}", x->iReg, x->iTable, x->iColumn);
74216 sqlite3XPrintf(p, "r[%d]", pExpr->iTable);
91311 ** pExpr->iTable Set to the cursor number for the table obtained
91356 pExpr->iTable = -1;
91441 pExpr->iTable = pMatch->iCursor;
91460 pExpr->iTable = 1;
91463 pExpr->iTable = 0;
91489 }else if( pExpr->iTable==0 ){
91623 assert( pMatch->iCursor==pExpr->iTable );
91664 p->iTable = pItem->iCursor;
91756 pExpr->iTable = pItem->iCursor;
91829 pExpr->iTable = exprProbability(pList->a[1].pExpr);
91830 if( pExpr->iTable<0 ){
91846 pExpr->iTable = pDef->zName[0]=='u' ? 8388608 : 125829120;
92547 ** Expr.iTable The VDBE cursor number for X.Y
92657 ** The Expr.iTable value for Expr.op==TK_COLUMN nodes of the expression
93135 ** iTable: 0 or the number of columns on the LHS of an assignment
93136 ** pLeft->iTable: First in an array of register holding result, or 0
93151 assert( pRet==0 || pRet->iTable==0 );
93207 return pVector->iTable+iField;
94283 /* Remember the size of the LHS in iTable so that we can check that
94285 pFirst->iTable = pColumns->nId;
94476 if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){
94741 assert( p->iTable>=0 ); /* p cannot be part of a CHECK constraint */
94801 assert( pRes->iTable==pSrc->a[0].iCursor ); /* Not a correlated subquery */
94853 ** and pX->iTable is set to the index of that cursor.
94872 ** pX->iTable made to point to the ephemeral table instead of an
95125 pX->iTable = iTab;
95296 pExpr->iTable = pParse->nTab++;
95298 pExpr->iTable, (isRowid?0:nVal));
95316 sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
95381 sqlite3VdbeAddOp3(v, OP_InsertInt, pExpr->iTable, r2, iValToIns);
95388 sqlite3VdbeAddOp3(v, OP_Insert, pExpr->iTable, r2, r3);
95392 sqlite3VdbeAddOp4Int(v, OP_IdxInsert, pExpr->iTable, r2, r3, 1);
95464 sqlite3SetHasNullFlag(v, pExpr->iTable, rHasNullFlag);
95557 ** IN_INDEX_NOOP is returned, the table opened ith cursor pExpr->iTable
95674 sqlite3VdbeAddOp3(v, OP_SeekRowid, pExpr->iTable, destIfFalse, rLhs);
95681 sqlite3VdbeAddOp4Int(v, OP_NotFound, pExpr->iTable, destIfFalse,
95686 addrTruthOp = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0,
95711 addrTop = sqlite3VdbeAddOp2(v, OP_Rewind, pExpr->iTable, destIfFalse);
95726 sqlite3VdbeAddOp3(v, OP_Column, pExpr->iTable, i, r3);
95735 sqlite3VdbeAddOp2(v, OP_Next, pExpr->iTable, addrTop+1);
95859 assert( p->iTable!=iTab || p->iColumn!=iCol );
95880 p->iTable = iTab;
96017 ** There must be an open cursor to pTab in iTable when this routine
96024 int iTable, /* The cursor pointing to the table */
96033 if( p->iTable==iTable && p->iColumn==iColumn ){
96040 sqlite3ExprCodeGetColumnOfTable(v, pTab, iTable, iColumn, iReg);
96044 sqlite3ExprCacheStore(pParse, iTable, iColumn, iReg);
96052 int iTable, /* The cursor pointing to the table */
96055 int r1 = sqlite3ExprCodeGetColumn(pParse, pTab, iColumn, iTable, iReg, 0);
96127 p->iTable = iReg;
96214 int iTab = pExpr->iTable;
96279 return pExpr->iTable;
96563 sqlite3VdbeAddOp3(v, OP_Offset, pArg->iTable, pArg->iColumn, target);
96594 if( pExpr->pLeft->iTable==0 ){
96595 pExpr->pLeft->iTable = sqlite3CodeSubselect(pParse, pExpr->pLeft, 0, 0);
96597 assert( pExpr->iTable==0 || pExpr->pLeft->op==TK_SELECT );
96598 if( pExpr->iTable
96599 && pExpr->iTable!=(n = sqlite3ExprVectorSize(pExpr->pLeft))
96602 pExpr->iTable, n);
96604 return pExpr->pLeft->iTable + pExpr->iColumn;
96644 ** trigger programs. In this case Expr.iTable is set to 1 for the
96668 int p1 = pExpr->iTable * (pTab->nCol+1) + 1 + pExpr->iColumn;
96670 assert( pExpr->iTable==0 || pExpr->iTable==1 );
96677 (pExpr->iTable ? "new" : "old"),
96704 addrINR = sqlite3VdbeAddOp1(v, OP_IfNullRow, pExpr->iTable);
96913 sqlite3VdbeAddOp2(pParse->pVdbe, OP_Copy, pExpr->iTable, target);
97452 ** If any subelement of pB has Expr.iTable==(-1) then it is allowed
97453 ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
97514 if( pA->iTable!=pB->iTable
97515 && (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
97525 ** If any subelement of pB has Expr.iTable==(-1) then it is allowed
97526 ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
97575 ** Expr.iTable<0 then assume a table number given by iTab.
97623 && pExpr->iTable==pWalker->u.pIdxCover->iCur
97686 if( pExpr->iTable==pSrc->a[i].iCursor ) break;
97773 if( pExpr->iTable==pItem->iCursor ){
97783 if( pCol->iTable==pExpr->iTable &&
97793 pCol->iTable = pExpr->iTable;
97805 if( pE->op==TK_COLUMN && pE->iTable==pExpr->iTable &&
97826 } /* endif pExpr->iTable==pItem->iCursor */
101511 if( pExpr->iTable==pTabList->a[iSrc].iCursor ){
103954 ** Write code to erase the table with root-page iTable from database iDb.
103957 ** erasing iTable (this can happen with an auto-vacuum database).
103959 static void destroyRootPage(Parse *pParse, int iTable, int iDb){
103962 assert( iTable>1 );
103963 sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);
103968 ** location iTable. The following code modifies the sqlite_master table to
103977 pParse->db->aDb[iDb].zDbSName, MASTER_NAME, iTable, r1, r1);
109887 pExpr->iTable = regBase + iCol + 1;
109893 pExpr->iTable = regBase;
109913 pExpr->iTable = iCursor;
119024 pEq->iRightJoinTable = (i16)pE2->iTable;
119031 ** And set the Expr.iRightJoinTable to iTable for every term in the
119055 static void setJoinExpr(Expr *p, int iTable){
119060 p->iRightJoinTable = (i16)iTable;
119064 setJoinExpr(p->x.pList->a[i].pExpr, iTable);
119067 setJoinExpr(p->pLeft, iTable);
120083 for(j=0;j<pTabList->nSrc && pTabList->a[j].iCursor!=pExpr->iTable;j++);
121824 ** All references to columns in table iTable are to be replaced by corresponding
121829 int iTable; /* Replace references to this table */
121841 ** a column in table number iTable with a copy of the iColumn-th
121848 ** FORM clause entry is iTable. This routine makes the necessary
121858 && pExpr->iRightJoinTable==pSubst->iTable
121862 if( pExpr->op==TK_COLUMN && pExpr->iTable==pSubst->iTable ){
121879 ifNullRow.iTable = pSubst->iNewTable;
121895 if( pExpr->op==TK_IF_NULL_ROW && pExpr->iTable==pSubst->iTable ){
121896 pExpr->iTable = pSubst->iNewTable;
122449 x.iTable = iParent;
122569 x.iTable = iCursor;
124465 pCol->pTab, pCol->iColumn, pCol->iTable, r1);
128982 ** SrcList_item.iCursor and Expr.iTable fields. For any given WHERE
129719 pTerm->pExpr->iTable = pX->iTable;
129729 iTab = pX->iTable;
129986 && pExpr->iTable==pHint->iTabCur
130048 if( pExpr->iTable!=pHint->iTabCur ){
130052 v, pExpr->pTab, pExpr->iTable, pExpr->iColumn, reg
130055 pExpr->iTable = reg;
130057 pExpr->iTable = pHint->iIdxCur;
130283 pExpr->iTable = pX->iIdxCur;
130475 pRight->iTable = iReg+j+2;
131459 pTerm->truthProb = sqlite3LogEst(p->iTable) - 270;
132317 aiCurCol[0] = pExpr->iTable;
132626 pNewTerm->leftCursor = pLeft->iTable;
132720 pNewTerm->leftCursor = pLeft->iTable;
132821 return sqlite3WhereGetMask(pMaskSet, p->iTable);
132823 mask = (p->op==TK_IF_NULL_ROW) ? sqlite3WhereGetMask(pMaskSet, p->iTable) : 0;
132898 pColRef->iTable = pItem->iCursor;
133145 if( pScan->aiCur[j]==pX->iTable
133151 pScan->aiCur[j] = pX->iTable;
133175 && pX->iTable==pScan->aiCur[0]
133327 && p->iTable==iBase
133384 ** true. Note: The (p->iTable==iBase) part of this test may be false if the
133389 if( p->op==TK_COLUMN && p->iTable==iBase && p->iColumn<0 ) return 1;
133810 if( pExpr->op!=TK_COLUMN || pExpr->iTable!=pSrc->iCursor ) break;
135215 || pLhs->iTable!=iCur
135595 if( pExpr->op==TK_COLUMN && pExpr->iTable==iCursor ){
136520 if( pOBExpr->iTable!=iCur ) continue;
136637 if( pOBExpr->iTable!=iCur ) continue;
141229 if( yymsp[0].minor.yy314 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy314->iTable);