Lines Matching defs:iTable

15293 **     then the value of the node is the value in Mem[pExpr.iTable].  Any
15355 Pgno iTable, /* Index of root page */
18069 int iTable; /* Cursor number of the source table */
18131 ** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is
18139 ** character '?' in the original SQL) then the Expr.iTable holds the index
18144 ** subquery gives a constant result, then iTable is -1. If the subquery
18146 ** then iTable is the address of a subroutine that computes the subquery.
18203 int iTable; /* TK_COLUMN: cursor number of table holding column
18310 #define EXPR_REDUCEDSIZE offsetof(Expr,iTable) /* Common features */
30182 pExpr->iTable, pExpr->iColumn, zFlgs);
30186 if( pExpr->iTable<0 ){
30198 pExpr->iTable, pExpr->iColumn,
30245 sqlite3TreeViewLine(pView,"REGISTER(%d)", pExpr->iTable);
30413 ** trigger programs. In this case Expr.iTable is set to 1 for the
30419 pExpr->iTable ? "NEW" : "OLD", pExpr->iColumn);
30443 pExpr->iTable, pExpr->iColumn, zFlgs);
30459 sqlite3TreeViewLine(pView, "IF-NULL-ROW %d", pExpr->iTable);
64238 ** is opened on the table with root page BtShared.iTable. Locks are removed
64244 Pgno iTable; /* Root page of table */
65193 && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
65285 if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
65300 ** Add a lock on the table with root-page iTable to the shared-btree used
65316 static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
65334 assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );
65338 if( pIter->iTable==iTable && pIter->pBtree==p ){
65345 ** with table iTable, allocate one and link it into the list.
65352 pLock->iTable = iTable;
65394 assert( pLock->iTable!=1 || pLock==&p->lock );
65395 if( pLock->iTable!=1 ){
67371 p->lock.iTable = 1;
68482 assert( p->lock.pBtree==p && p->lock.iTable==1 );
69322 ** iTable. If a read-only cursor is requested, it is assumed that
69355 ** No checking is done to make sure that page iTable really is the
69364 Pgno iTable, /* Root page of table to open */
69381 ** this lock. The iTable<1 term disables the check for corrupt schemas. */
69382 assert( hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, (wrFlag?2:1))
69383 || iTable<1 );
69384 assert( wrFlag==0 || !hasReadConflicts(p, iTable) );
69396 if( iTable<=1 ){
69397 if( iTable<1 ){
69401 iTable = 0;
69407 pCur->pgnoRoot = iTable;
69417 if( pX->pgnoRoot==iTable ){
69429 Pgno iTable, /* Root page of table to open */
69436 rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
69442 Pgno iTable, /* Root page of table to open */
69448 return btreeCursorWithLock(p, iTable, wrFlag, pKeyInfo, pCur);
69450 return btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
74440 ** Delete all information from a single table in the database. iTable is
74448 ** If pnChange is not NULL, then table iTable must be an intkey table. The
74452 SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){
74458 rc = saveAllCursors(pBt, (Pgno)iTable, 0);
74461 /* Invalidate all incrblob cursors open on table iTable (assuming iTable
74464 invalidateIncrblobCursors(p, (Pgno)iTable, 0, 1);
74465 rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
74488 ** If AUTOVACUUM is enabled and the page at iTable is not the last
74491 ** iTable and that last slot formerly occupied by the last root page
74492 ** is added to the freelist instead of iTable. In this say, all
74500 static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
74507 assert( iTable>=2 );
74508 if( iTable>btreePagecount(pBt) ){
74512 rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
74514 rc = sqlite3BtreeClearTable(p, iTable, 0);
74530 if( iTable==maxRootPgno ){
74550 rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
74585 SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
74588 rc = btreeDropTable(p, iTable, piMoved);
79951 sqlite3_str_appendf(p, "r[%d]", pExpr->iTable);
98843 ** pExpr->iTable Set to the cursor number for the table obtained
98888 pExpr->iTable = -1;
98983 pExpr->iTable = pMatch->iCursor;
99010 pExpr->iTable = op!=TK_DELETE;
99014 pExpr->iTable = 1;
99017 pExpr->iTable = 0;
99027 pExpr->iTable = EXCLUDED_TABLE_NUMBER;
99053 if( pExpr->iTable==EXCLUDED_TABLE_NUMBER ){
99060 pExpr->iTable = pNC->uNC.pUpsert->regData +
99070 pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable +
99078 }else if( pExpr->iTable==0 ){
99307 p->iTable = pItem->iCursor;
99422 pExpr->iTable = pItem->iCursor;
99545 pExpr->iTable = exprProbability(pList->a[1].pExpr);
99546 if( pExpr->iTable<0 ){
99562 pExpr->iTable = pDef->zName[0]=='u' ? 8388608 : 125829120;
100462 ** Expr.iTable The VDBE cursor number for X.Y
100610 ** In all cases except (4), the Expr.iTable value for Expr.op==TK_COLUMN
101157 ** iTable: 0 or the number of columns on the LHS of an assignment
101158 ** pLeft->iTable: First in an array of register holding result, or 0
101173 assert( pRet==0 || pRet->iTable==0 );
101230 return pVector->iTable+iField;
102398 assert( pSubExpr==0 || pSubExpr->iTable==0 );
102400 pSubExpr->iTable = pColumns->nId;
102419 /* Remember the size of the LHS in iTable so that we can check that
102421 pFirst->iTable = pColumns->nId;
102728 if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){
103024 assert( p->iTable>=0 ); /* p cannot be part of a CHECK constraint */
103083 assert( pRes->iTable==pSrc->a[0].iCursor ); /* Not a correlated subquery */
103135 ** and pX->iTable is set to the index of that cursor.
103154 ** pX->iTable made to point to the ephemeral table instead of an
103502 ** table is computed, the cursor number is also stored in pExpr->iTable,
103552 sqlite3VdbeAddOp2(v, OP_OpenDup, iTab, pExpr->iTable);
103575 pExpr->iTable = iTab;
103576 addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, nVal);
103735 return pExpr->iTable;
103795 pExpr->iTable = rReg = dest.iSDParm;
104273 ** There must be an open cursor to pTab in iTable when this routine
104280 int iTable, /* The cursor pointing to the table */
104285 sqlite3ExprCodeGetColumnOfTable(pParse->pVdbe, pTab, iTable, iColumn, iReg);
104311 p->iTable = iReg;
104441 sqlite3ExprImpliesNonNullRow(pFarg->a[0].pExpr,pA1->iTable),
104528 int iTab = pExpr->iTable;
104669 return pExpr->iTable;
104933 sqlite3VdbeAddOp3(v, OP_Offset, pArg->iTable, pArg->iColumn, target);
104969 if( pExpr->pLeft->iTable==0 ){
104970 pExpr->pLeft->iTable = sqlite3CodeSubselect(pParse, pExpr->pLeft);
104972 assert( pExpr->iTable==0 || pExpr->pLeft->op==TK_SELECT );
104973 if( pExpr->iTable!=0
104974 && pExpr->iTable!=(n = sqlite3ExprVectorSize(pExpr->pLeft))
104977 pExpr->iTable, n);
104979 return pExpr->pLeft->iTable + pExpr->iColumn;
105020 ** trigger programs. In this case Expr.iTable is set to 1 for the
105045 int p1 = pExpr->iTable * (pTab->nCol+1) + 1
105048 assert( pExpr->iTable==0 || pExpr->iTable==1 );
105055 (pExpr->iTable ? "new" : "old"),
105079 ** Expr.iTable value is the table number for the right-hand table.
105086 addrINR = sqlite3VdbeAddOp1(v, OP_IfNullRow, pExpr->iTable);
105897 ** If any subelement of pB has Expr.iTable==(-1) then it is allowed
105898 ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
105980 if( pA->op!=TK_IN && pA->iTable!=pB->iTable && pA->iTable!=iTab ){
105993 ** If any subelement of pB has Expr.iTable==(-1) then it is allowed
105994 ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
106121 ** Expr.iTable<0 then assume a table number given by iTab.
106186 if( pWalker->u.iCur==pExpr->iTable ){
106304 && pExpr->iTable==pWalker->u.pIdxCover->iCur
106383 if( pExpr->iTable==pSrc->a[i].iCursor ) break;
106387 }else if( pExpr->iTable<p->iSrcInner ){
106389 ** TK_COLUMN nodes with smaller Expr.iTable values are in an
106537 if( pExpr->iTable==pItem->iCursor ){
106547 if( pCol->iTable==pExpr->iTable &&
106557 pCol->iTable = pExpr->iTable;
106569 if( pE->op==TK_COLUMN && pE->iTable==pExpr->iTable &&
106590 } /* endif pExpr->iTable==pItem->iCursor */
111475 if( pExpr->iTable==pTabList->a[iSrc].iCursor ){
114531 ** Write code to erase the table with root-page iTable from database iDb.
114534 ** erasing iTable (this can happen with an auto-vacuum database).
114536 static void destroyRootPage(Parse *pParse, int iTable, int iDb){
114539 if( iTable<2 ) sqlite3ErrorMsg(pParse, "corrupt schema");
114540 sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);
114545 ** location iTable. The following code modifies the sqlite_schema table to
114555 pParse->db->aDb[iDb].zDbSName, iTable, r1, r1);
121199 pExpr->iTable = regBase + sqlite3TableColumnToStorage(pTab,iCol) + 1;
121205 pExpr->iTable = regBase;
121225 pExpr->iTable = iCursor;
131512 pEq->iRightJoinTable = pE2->iTable;
131519 ** And set the Expr.iRightJoinTable to iTable for every term in the
131543 SQLITE_PRIVATE void sqlite3SetJoinExpr(Expr *p, int iTable){
131548 p->iRightJoinTable = iTable;
131552 sqlite3SetJoinExpr(p->x.pList->a[i].pExpr, iTable);
131555 sqlite3SetJoinExpr(p->pLeft, iTable);
131561 ** term that is marked with EP_FromJoin and iRightJoinTable==iTable into
131566 static void unsetJoinExpr(Expr *p, int iTable){
131569 && (iTable<0 || p->iRightJoinTable==iTable) ){
131572 if( p->op==TK_COLUMN && p->iTable==iTable ){
131578 unsetJoinExpr(p->x.pList->a[i].pExpr, iTable);
131581 unsetJoinExpr(p->pLeft, iTable);
131973 if( pSort->aDefer[j].iCsr==pExpr->iTable ) break;
131989 pNew->iTable = pExpr->iTable;
131996 pSort->aDefer[nDefer].iCsr = pExpr->iTable;
132856 for(j=0;j<pTabList->nSrc && pTabList->a[j].iCursor!=pExpr->iTable;j++);
134636 ** All references to columns in table iTable are to be replaced by corresponding
134641 int iTable; /* Replace references to this table */
134653 ** a column in table number iTable with a copy of the iColumn-th
134660 ** FORM clause entry is iTable. This routine makes the necessary
134670 && pExpr->iRightJoinTable==pSubst->iTable
134675 && pExpr->iTable==pSubst->iTable
134694 ifNullRow.iTable = pSubst->iNewTable;
134723 if( pExpr->op==TK_IF_NULL_ROW && pExpr->iTable==pSubst->iTable ){
134724 pExpr->iTable = pSubst->iNewTable;
134793 if( pItem->iCursor!=pExpr->iTable ) return WRC_Continue;
134853 if( (op==TK_COLUMN || op==TK_IF_NULL_ROW) && aCsrMap[pExpr->iTable] ){
134854 pExpr->iTable = aCsrMap[pExpr->iTable];
135422 x.iTable = iParent;
135511 if( pE2->iTable==pColumn->iTable
135576 if( pColumn->iTable!=pExpr->iTable ) continue;
135813 x.iTable = iCursor;
138003 pCol->pTab, pCol->iTable, pCol->iColumn, r1);
141397 sCol[1].iTable = pTabList->a[0].iCursor;
143671 ** SrcList_item.iCursor and Expr.iTable fields. For any given WHERE
144461 pTerm->pExpr->iTable = iTab;
144743 && pExpr->iTable==pHint->iTabCur
144805 if( pExpr->iTable!=pHint->iTabCur ){
144809 pExpr->iTable = reg;
144811 pExpr->iTable = pHint->iIdxCur;
145062 pExpr->iTable = pX->iIdxCur;
145081 if( pExpr->iTable==pX->iTabCur && pExpr->iColumn==pX->iTabCol ){
145085 pExpr->iTable = pX->iIdxCur;
145354 pRight->iTable = iReg+j+2;
146487 pTerm->truthProb = sqlite3LogEst(p->iTable) - 270;
147406 aiCurCol[0] = pExpr->iTable;
147421 int iCsr = pExpr->iTable;
147911 pNewTerm->leftCursor = pLeft->iTable;
148099 pNewTerm->leftCursor = pLeft->iTable;
148204 return sqlite3WhereGetMask(pMaskSet, p->iTable);
148209 mask = (p->op==TK_IF_NULL_ROW) ? sqlite3WhereGetMask(pMaskSet, p->iTable) : 0;
148294 pColRef->iTable = pItem->iCursor;
148610 if( pScan->aiCur[j]==pX->iTable
148616 pScan->aiCur[j] = pX->iTable;
148639 && pX->iTable==pScan->aiCur[0]
148805 && p->iTable==iBase
148862 ** true. Note: The (p->iTable==iBase) part of this test may be false if the
148868 if( p->op==TK_COLUMN && p->iTable==iBase && p->iColumn<0 ) return 1;
149287 if( pExpr->op!=TK_COLUMN || pExpr->iTable!=pSrc->iCursor ) break;
150713 || pLhs->iTable!=iCur
151154 if( pExpr->op==TK_COLUMN && pExpr->iTable==iCursor ){
152134 if( pOBExpr->iTable!=iCur ) continue;
152263 if( pOBExpr->iTable!=iCur ) continue;
154703 if( pExpr->iTable==p->pSrc->a[i].iCursor ) break;
154752 pExpr->iTable = p->pWin->iEphCsr;
157162 p->iTable = 0;
161263 if( yymsp[0].minor.yy602 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy602->iTable);