Lines Matching defs:iTable

8314   int iTable,                          /* Index of root page */
10448 int iTable; /* Cursor number of the source table */
10510 ** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is
10518 ** character '?' in the original SQL) then the Expr.iTable holds the index
10523 ** subquery gives a constant result, then iTable is -1. If the subquery
10525 ** then iTable is the address of a subroutine that computes the subquery.
10573 int iTable; /* TK_COLUMN: cursor number of table holding column
10642 #define EXPR_REDUCEDSIZE offsetof(Expr,iTable) /* Common features */
11109 int iTable; /* Table cursor number */
48773 ** is opened on the table with root page BtShared.iTable. Locks are removed
48779 Pgno iTable; /* Root page of table */
49563 && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
49655 if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
49670 ** Add a lock on the table with root-page iTable to the shared-btree used
49686 static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
49704 assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );
49708 if( pIter->iTable==iTable && pIter->pBtree==p ){
49715 ** with table iTable, allocate one and link it into the list.
49722 pLock->iTable = iTable;
49764 assert( pLock->iTable!=1 || pLock==&p->lock );
49765 if( pLock->iTable!=1 ){
51144 p->lock.iTable = 1;
52024 assert( p->lock.pBtree==p && p->lock.iTable==1 );
52819 ** iTable. If a read-only cursor is requested, it is assumed that
52842 ** No checking is done to make sure that page iTable really is the
52851 int iTable, /* Root page of table to open */
52865 assert( hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, wrFlag+1) );
52866 assert( wrFlag==0 || !hasReadConflicts(p, iTable) );
52876 if( iTable==1 && btreePagecount(pBt)==0 ){
52878 iTable = 0;
52883 pCur->pgnoRoot = (Pgno)iTable;
52900 int iTable, /* Root page of table to open */
52907 rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
56608 ** Delete all information from a single table in the database. iTable is
56616 ** If pnChange is not NULL, then table iTable must be an intkey table. The
56620 SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){
56626 /* Invalidate all incrblob cursors open on table iTable (assuming iTable
56631 rc = saveAllCursors(pBt, (Pgno)iTable, 0);
56633 rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
56647 ** If AUTOVACUUM is enabled and the page at iTable is not the last
56650 ** iTable and that last slot formerly occupied by the last root page
56651 ** is added to the freelist instead of iTable. In this say, all
56659 static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
56680 rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
56682 rc = sqlite3BtreeClearTable(p, iTable, 0);
56690 if( iTable>1 ){
56699 if( iTable==maxRootPgno ){
56719 rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
56762 SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
56765 rc = btreeDropTable(p, iTable, piMoved);
73273 pDup->iTable = pEList->a[iCol].iAlias;
73329 ** pExpr->iTable Set to the cursor number for the table obtained
73371 pExpr->iTable = -1;
73405 pExpr->iTable = pItem->iCursor;
73421 pExpr->iTable = pItem->iCursor;
73442 pExpr->iTable = 1;
73445 pExpr->iTable = 0;
73469 }else if( pExpr->iTable==0 ){
73583 assert( pMatch->iCursor==pExpr->iTable );
73621 p->iTable = pItem->iCursor;
73680 pExpr->iTable = pItem->iCursor;
74335 ** Expr.iTable The VDBE cursor number for X.Y
75744 assert( p->iTable>=0 ); /* p cannot be part of a CHECK constraint */
75823 ** or ephermal table) is stored in pX->iTable before this function returns.
75980 pX->iTable = iTab;
76082 pExpr->iTable = pParse->nTab++;
76083 addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, !isRowid);
76098 sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
76100 assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
76148 sqlite3VdbeAddOp3(v, OP_InsertInt, pExpr->iTable, r2, iValToIns);
76154 sqlite3VdbeAddOp3(v, OP_Insert, pExpr->iTable, r2, r3);
76158 sqlite3VdbeAddOp2(v, OP_IdxInsert, pExpr->iTable, r2);
76252 ** pExpr->iTable will contains the values that make up the RHS.
76280 sqlite3VdbeAddOp2(v, OP_Rewind, pExpr->iTable, destIfFalse);
76289 sqlite3VdbeAddOp3(v, OP_NotExists, pExpr->iTable, destIfFalse, r1);
76309 sqlite3VdbeAddOp4Int(v, OP_NotFound, pExpr->iTable, destIfFalse, r1, 1);
76322 j1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
76331 j3 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, rRhsHasNull, 1);
76463 if( p->iReg && p->iTable==iTab && p->iColumn==iCol ){
76471 assert( p->iReg==0 || p->iTable!=iTab || p->iColumn!=iCol );
76479 p->iTable = iTab;
76500 p->iTable = iTab;
76597 ** There must be an open cursor to pTab in iTable when this routine
76604 int iTable, /* The cursor pointing to the table */
76612 if( p->iReg>0 && p->iTable==iTable && p->iColumn==iColumn ){
76619 sqlite3ExprCodeGetColumnOfTable(v, pTab, iTable, iColumn, iReg);
76620 sqlite3ExprCacheStore(pParse, iTable, iColumn, iReg);
76742 if( pExpr->iTable<0 ){
76748 pExpr->iColumn, pExpr->iTable, target);
76801 inReg = pExpr->iTable;
77135 ** trigger programs. In this case Expr.iTable is set to 1 for the
77159 int p1 = pExpr->iTable * (pTab->nCol+1) + 1 + pExpr->iColumn;
77161 assert( pExpr->iTable==0 || pExpr->iTable==1 );
77168 (pExpr->iTable ? "new" : "old"),
77231 cacheX.iTable = sqlite3ExprCodeTemp(pParse, pX, &regFree1);
77336 sqlite3VdbeAddOp2(pParse->pVdbe, OP_Copy, pExpr->iTable, target);
77374 pExpr->iTable = iMem;
77397 pExpr->iTable, pExpr->iColumn);
77401 if( pExpr->iTable<0 ){
77406 pExpr->iTable, pExpr->iColumn);
77444 sqlite3ExplainPrintf(pOut,"REGISTER(%d)", pExpr->iTable);
77568 ** trigger programs. In this case Expr.iTable is set to 1 for the
77574 pExpr->iTable ? "NEW" : "OLD", pExpr->iColumn);
77737 pExpr->iTable = r2;
77835 exprX.iTable = sqlite3ExprCodeTemp(pParse, &exprX, &regFree1);
78155 if( pA->iTable!=pB->iTable || pA->iColumn!=pB->iColumn ) return 2;
78253 if( pExpr->iTable==pItem->iCursor ){
78263 if( pCol->iTable==pExpr->iTable &&
78273 pCol->iTable = pExpr->iTable;
78285 if( pE->op==TK_COLUMN && pE->iTable==pExpr->iTable &&
78306 } /* endif pExpr->iTable==pItem->iCursor */
81142 if( pExpr->iTable==pTabList->a[iSrc].iCursor ){
83128 ** Write code to erase the table with root-page iTable from database iDb.
83131 ** erasing iTable (this can happen with an auto-vacuum database).
83133 static void destroyRootPage(Parse *pParse, int iTable, int iDb){
83136 sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);
83141 ** location iTable. The following code modifies the sqlite_master table to
83150 pParse->db->aDb[iDb].zName, SCHEMA_TABLE(iDb), iTable, r1, r1);
88294 pLeft->iTable = regData+iCol+1;
88298 pLeft->iTable = regData;
88321 pLeft->iTable = regData;
88323 pRight->iTable = pSrc->a[0].iCursor;
94806 pEq->iRightJoinTable = (i16)pE2->iTable;
94813 ** And set the Expr.iRightJoinTable to iTable for every term in the
94837 static void setJoinExpr(Expr *p, int iTable){
94842 p->iRightJoinTable = (i16)iTable;
94843 setJoinExpr(p->pLeft, iTable);
95567 for(j=0;j<pTabList->nSrc && pTabList->a[j].iCursor!=pExpr->iTable;j++);
95741 if( pTabList->a[j].iCursor==p->iTable ) break;
97050 ** a column in table number iTable with a copy of the iColumn-th
97057 ** FORM clause entry is iTable. This routine make the necessary
97064 int iTable, /* Table to be substituted */
97068 if( pExpr->op==TK_COLUMN && pExpr->iTable==iTable ){
97083 pExpr->pLeft = substExpr(db, pExpr->pLeft, iTable, pEList);
97084 pExpr->pRight = substExpr(db, pExpr->pRight, iTable, pEList);
97086 substSelect(db, pExpr->x.pSelect, iTable, pEList);
97088 substExprList(db, pExpr->x.pList, iTable, pEList);
97096 int iTable, /* Table to be substituted */
97102 pList->a[i].pExpr = substExpr(db, pList->a[i].pExpr, iTable, pEList);
97108 int iTable, /* Table to be replaced */
97115 substExprList(db, p->pEList, iTable, pEList);
97116 substExprList(db, p->pGroupBy, iTable, pEList);
97117 substExprList(db, p->pOrderBy, iTable, pEList);
97118 p->pHaving = substExpr(db, p->pHaving, iTable, pEList);
97119 p->pWhere = substExpr(db, p->pWhere, iTable, pEList);
97120 substSelect(db, p->pPrior, iTable, pEList);
97125 substSelect(db, pItem->pSelect, iTable, pEList);
98768 pCol->pTab, pCol->iColumn, pCol->iTable, r1);
102746 ** SrcList_item.iCursor and Expr.iTable fields. For any given WHERE
103015 ** sets their opcodes to TK_COLUMN and their Expr.iTable fields to
103026 mask = getMask(pMaskSet, p->iTable);
103741 pTerm->leftCursor = pLeft->iTable;
103768 pNew->leftCursor = pLeft->iTable;
103915 pNewTerm->leftCursor = pLeft->iTable;
103956 pNewTerm->leftCursor = pLeft->iTable;
104017 && p->iTable==iBase
104067 pTerm = findTerm(pWC, p->iTable, p->iColumn, ~(Bitmask)0, WO_EQ, 0);
104074 if( p->iTable!=base ) return 0;
104113 ** true. Note: The (p->iTable==iBase) part of this test may be false if the
104118 if( p->op==TK_COLUMN && p->iTable==iBase && p->iColumn<0 ) return 1;
104214 if( pExpr->op!=TK_COLUMN || pExpr->iTable!=base ){
104751 if( pExpr->op!=TK_COLUMN || pExpr->iTable!=pSrc->iCursor ) break;
106067 iTab = pX->iTable;
110500 if( yygotominor.yy342.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy342.pExpr->iTable);