Lines Matching defs:iTable

16193 **     then the value of the node is the value in Mem[pExpr.iTable].  Any
16255 Pgno iTable, /* Index of root page */
18855 int iTable; /* Cursor number of the source table */
18934 ** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is
18942 ** character '?' in the original SQL) then the Expr.iTable holds the index
18947 ** subquery gives a constant result, then iTable is -1. If the subquery
18949 ** then iTable is the address of a subroutine that computes the subquery.
19006 int iTable; /* TK_COLUMN: cursor number of table holding column
19126 #define EXPR_REDUCEDSIZE offsetof(Expr,iTable) /* Common features */
33113 pExpr->iTable, pExpr->iColumn, zFlgs);
33117 if( pExpr->iTable<0 ){
33130 pExpr->iTable, pExpr->iColumn,
33181 sqlite3TreeViewLine(pView,"REGISTER(%d)", pExpr->iTable);
33336 if( pExpr->iTable ) sqlite3_str_appendf(pStr, " iTable=%d",pExpr->iTable);
33381 ** trigger programs. In this case Expr.iTable is set to 1 for the
33387 pExpr->iTable ? "NEW" : "OLD", pExpr->iColumn);
33413 pExpr->iTable, pExpr->iColumn, zFlgs);
33426 pExpr->iColumn, pExpr->iTable-1,
33433 sqlite3TreeViewLine(pView, "IF-NULL-ROW %d", pExpr->iTable);
69821 ** is opened on the table with root page BtShared.iTable. Locks are removed
69827 Pgno iTable; /* Root page of table */
70724 printf(" %p/%u%s", pLock->pBtree, pLock->iTable,
70728 printf(",%u%s", pLock->iTable, pLock->eLock==READ_LOCK ? "R" : "W");
70821 && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
70913 if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
70928 ** Add a lock on the table with root-page iTable to the shared-btree used
70944 static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
70949 SHARED_LOCK_TRACE(pBt,"setLock", iTable, eLock);
70964 assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );
70968 if( pIter->iTable==iTable && pIter->pBtree==p ){
70975 ** with table iTable, allocate one and link it into the list.
70982 pLock->iTable = iTable;
71026 assert( pLock->iTable!=1 || pLock==&p->lock );
71027 if( pLock->iTable!=1 ){
73119 p->lock.iTable = 1;
74249 assert( p->lock.pBtree==p && p->lock.iTable==1 );
75146 ** iTable. If a read-only cursor is requested, it is assumed that
75179 ** No checking is done to make sure that page iTable really is the
75188 Pgno iTable, /* Root page of table to open */
75205 ** this lock. The iTable<1 term disables the check for corrupt schemas. */
75206 assert( hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, (wrFlag?2:1))
75207 || iTable<1 );
75208 assert( wrFlag==0 || !hasReadConflicts(p, iTable) );
75216 if( iTable<=1 ){
75217 if( iTable<1 ){
75221 iTable = 0;
75227 pCur->pgnoRoot = iTable;
75236 if( pX->pgnoRoot==iTable ){
75255 Pgno iTable, /* Root page of table to open */
75262 rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
75268 Pgno iTable, /* Root page of table to open */
75274 return btreeCursorWithLock(p, iTable, wrFlag, pKeyInfo, pCur);
75276 return btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
80695 ** Delete all information from a single table in the database. iTable is
80706 SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, i64 *pnChange){
80712 rc = saveAllCursors(pBt, (Pgno)iTable, 0);
80715 /* Invalidate all incrblob cursors open on table iTable (assuming iTable
80719 invalidateIncrblobCursors(p, (Pgno)iTable, 0, 1);
80721 rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
80744 ** If AUTOVACUUM is enabled and the page at iTable is not the last
80747 ** iTable and that last slot formerly occupied by the last root page
80748 ** is added to the freelist instead of iTable. In this say, all
80756 static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
80763 assert( iTable>=2 );
80764 if( iTable>btreePagecount(pBt) ){
80765 return SQLITE_CORRUPT_PGNO(iTable);
80768 rc = sqlite3BtreeClearTable(p, iTable, 0);
80770 rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
80786 if( iTable==maxRootPgno ){
80806 rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
80841 SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
80844 rc = btreeDropTable(p, iTable, piMoved);
86670 sqlite3_str_appendf(p, "r[%d]", pExpr->iTable);
90248 assert( (pWalker->u.aMem[pExpr->iTable].flags & MEM_Undefined)==0 );
106940 pNew->iTable = pMatch->iCursor;
106983 ** pExpr->iTable Set to the cursor number for the table obtained
107031 pExpr->iTable = -1;
107230 pExpr->iTable = pMatch->iCursor;
107258 pExpr->iTable = op!=TK_DELETE;
107262 pExpr->iTable = 1;
107265 pExpr->iTable = 0;
107275 pExpr->iTable = EXCLUDED_TABLE_NUMBER;
107303 if( pExpr->iTable==EXCLUDED_TABLE_NUMBER ){
107311 pExpr->iTable = pNC->uNC.pUpsert->regData +
107324 pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable +
107332 }else if( pExpr->iTable==0 ){
107599 p->iTable = pItem->iCursor;
107718 pExpr->iTable = pItem->iCursor;
107870 pExpr->iTable = exprProbability(pList->a[1].pExpr);
107871 if( pExpr->iTable<0 ){
107887 pExpr->iTable = pDef->zName[0]=='u' ? 8388608 : 125829120;
108816 ** Expr.iTable The VDBE cursor number for X.Y
108969 ** In all cases except (4), the Expr.iTable value for Expr.op==TK_COLUMN
109080 assert( pExpr->iColumn < pExpr->iTable );
109082 assert( pExpr->iTable==pExpr->pLeft->x.pSelect->pEList->nExpr );
109593 ** iTable: 0 or the number of columns on the LHS of an assignment
109594 ** pLeft->iTable: First in an array of register holding result, or 0
109607 pRet->iTable = nField;
109676 return pVector->iTable+iField;
111129 /* Remember the size of the LHS in iTable so that we can check that
111131 pFirst->iTable = pColumns->nId;
111494 if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){
111915 assert( p->iTable>=0 ); /* p cannot be part of a CHECK constraint */
111995 assert( pRes->iTable==pSrc->a[0].iCursor ); /* Not a correlated subquery */
112066 ** pX->iTable made to point to the ephemeral table instead of an
112419 ** table is computed, the cursor number is also stored in pExpr->iTable,
112470 assert( iTab!=pExpr->iTable );
112471 sqlite3VdbeAddOp2(v, OP_OpenDup, iTab, pExpr->iTable);
112494 pExpr->iTable = iTab;
112495 addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, nVal);
112658 return pExpr->iTable;
112733 pExpr->iTable = rReg = dest.iSDParm;
113221 ** There must be an open cursor to pTab in iTable when this routine
113228 int iTable, /* The cursor pointing to the table */
113235 sqlite3ExprCodeGetColumnOfTable(pParse->pVdbe, pTab, iTable, iColumn, iReg);
113262 p->iTable = iReg;
113357 if( pArg->op==TK_COLUMN && pArg->iTable>=0 ){
113358 sqlite3VdbeAddOp3(v, OP_Offset, pArg->iTable, pArg->iColumn, target);
113404 sqlite3ExprImpliesNonNullRow(pFarg->a[0].pExpr,pA1->iTable,1),
113505 if( pExpr->iColumn==p->iIdxCol && pExpr->iTable==p->iDataCur ){
113604 sqlite3VdbeAddOp3(v, OP_Column, pExpr->iTable, pExpr->iColumn, target);
113611 int iTab = pExpr->iTable;
113750 return pExpr->iTable;
114050 if( pLeft->iTable==0 || pParse->withinRJSubrtn > pLeft->op2 ){
114051 pLeft->iTable = sqlite3CodeSubselect(pParse, pLeft);
114056 if( pExpr->iTable!=n ){
114058 pExpr->iTable, n);
114060 return pLeft->iTable + pExpr->iColumn;
114117 ** trigger programs. In this case Expr.iTable is set to 1 for the
114147 p1 = pExpr->iTable * (pTab->nCol+1) + 1
114150 assert( pExpr->iTable==0 || pExpr->iTable==1 );
114157 (pExpr->iTable ? "new" : "old"),
114181 ** Expr.iTable value is the table number for the right-hand table.
114203 addrINR = sqlite3VdbeAddOp3(v, OP_IfNullRow, pExpr->iTable, 0, target);
115030 ** If any subelement of pB has Expr.iTable==(-1) then it is allowed
115031 ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
115081 && pB->iTable<0 && pA->iTable==iTab
115131 if( pA->op!=TK_IN && pA->iTable!=pB->iTable && pA->iTable!=iTab ){
115144 ** If any subelement of pB has Expr.iTable==(-1) then it is allowed
115145 ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
115273 ** Expr.iTable<0 then assume a table number given by iTab.
115366 if( pWalker->u.iCur==pExpr->iTable ){
115506 && pExpr->iTable==pWalker->u.pIdxCover->iCur
115606 if( pExpr->iTable==pSrc->a[i].iCursor ){
115611 for(i=0; i<p->nExclude && p->aiExclude[i]!=pExpr->iTable; i++){}
115758 ** Search the AggInfo object for an aCol[] entry that has iTable and iColumn.
115776 if( pCol->iTable==pExpr->iTable
115792 pCol->iTable = pExpr->iTable;
115804 && pE->iTable==pExpr->iTable
115866 tmp.iTable = pIEpr->iIdxCur;
115889 if( pExpr->iTable==pItem->iCursor ){
115892 } /* endif pExpr->iTable==pItem->iCursor */
121263 if( pExpr->iTable==pTabList->a[iSrc].iCursor ){
124631 ** Write code to erase the table with root-page iTable from database iDb.
124634 ** erasing iTable (this can happen with an auto-vacuum database).
124636 static void destroyRootPage(Parse *pParse, int iTable, int iDb){
124639 if( iTable<2 ) sqlite3ErrorMsg(pParse, "corrupt schema");
124640 sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);
124645 ** location iTable. The following code modifies the sqlite_schema table to
124655 pParse->db->aDb[iDb].zDbSName, iTable, r1, r1);
131894 pExpr->iTable = regBase + sqlite3TableColumnToStorage(pTab,iCol) + 1;
131900 pExpr->iTable = regBase;
131921 pExpr->iTable = iCursor;
143281 ** And set the Expr.w.iJoin to iTable for every term in the
143305 SQLITE_PRIVATE void sqlite3SetJoinExpr(Expr *p, int iTable, u32 joinFlag){
143311 p->w.iJoin = iTable;
143317 sqlite3SetJoinExpr(p->x.pList->a[i].pExpr, iTable, joinFlag);
143321 sqlite3SetJoinExpr(p->pLeft, iTable, joinFlag);
143330 ** Convert every term that is marked with EP_OuterON and w.iJoin==iTable into
143331 ** an ordinary term that omits the EP_OuterON mark. Or if iTable<0, then
143340 static void unsetJoinExpr(Expr *p, int iTable, int nullable){
143342 if( iTable<0 || (ExprHasProperty(p, EP_OuterON) && p->w.iJoin==iTable) ){
143344 if( iTable>=0 ) ExprSetProperty(p, EP_InnerON);
143346 if( p->op==TK_COLUMN && p->iTable==iTable && !nullable ){
143355 unsetJoinExpr(p->x.pList->a[i].pExpr, iTable, nullable);
143359 unsetJoinExpr(p->pLeft, iTable, nullable);
143507 pEq->w.iJoin = pE2->iTable;
143948 if( pSort->aDefer[j].iCsr==pExpr->iTable ) break;
143964 pNew->iTable = pExpr->iTable;
143972 pSort->aDefer[nDefer].iCsr = pExpr->iTable;
144816 for(j=0;j<pTabList->nSrc && pTabList->a[j].iCursor!=pExpr->iTable;j++);
146677 ** All references to columns in table iTable are to be replaced by corresponding
146710 int iTable; /* Replace references to this table */
146723 ** a column in table number iTable with a copy of the iColumn-th
146730 ** FORM clause entry is iTable. This routine makes the necessary
146740 && pExpr->w.iJoin==pSubst->iTable
146746 && pExpr->iTable==pSubst->iTable
146769 && (pCopy->op!=TK_COLUMN || pCopy->iTable!=pSubst->iNewTable)
146774 ifNullRow.iTable = pSubst->iNewTable;
146817 if( pExpr->op==TK_IF_NULL_ROW && pExpr->iTable==pSubst->iTable ){
146818 pExpr->iTable = pSubst->iNewTable;
146887 if( pItem->iCursor!=pExpr->iTable ) return WRC_Continue;
146962 renumberCursorDoMapping(pWalker, &pExpr->iTable);
147596 x.iTable = iParent;
147689 if( pE2->iTable==pColumn->iTable
147768 if( pColumn->iTable!=pExpr->iTable ) continue;
148178 x.iTable = pSrc->iCursor;
149380 "agg-column[%d] pTab=%s iTable=%d iColumn=%d iMem=%d"
149383 pCol->iTable, pCol->iColumn, pAggInfo->iFirstReg+ii,
149503 pExpr->iTable = pCol->iTable;
154793 sCol[1].iTable = pTabList->a[0].iCursor;
157171 ** SrcItem.iCursor and Expr.iTable fields. For any given WHERE
158056 if( pExpr->iTable==0 || !ExprHasProperty(pExpr, EP_Subrtn) ){
158062 pExpr->iTable = iTab;
158368 && pExpr->iTable==pHint->iTabCur
158431 if( pExpr->iTable!=pHint->iTabCur ){
158435 pExpr->iTable = reg;
158437 pExpr->iTable = pHint->iIdxCur;
158446 pExpr->iTable = reg;
158974 pRight->iTable = iReg+j+2;
160322 pTerm->truthProb = sqlite3LogEst(p->iTable) - 270;
161264 aiCurCol[0] = pExpr->iTable;
161538 pNewTerm->leftCursor = pLeft->iTable;
161734 pNewTerm->leftCursor = pLeft->iTable;
161823 pVal->iTable = iReg;
161890 if( pExpr->iTable!=iCsr ) return;
161999 mask = (p->op==TK_IF_NULL_ROW) ? sqlite3WhereGetMask(pMaskSet, p->iTable) : 0;
162022 return sqlite3WhereGetMask(pMaskSet, p->iTable);
162095 pColRef->iTable = pItem->iCursor;
162494 if( pScan->aiCur[j]==pX->iTable
162500 pScan->aiCur[j] = pX->iTable;
162532 && pX->iTable==pScan->aiCur[0]
162710 && p->iTable==iBase
162767 ** true. Note: The (p->iTable==iBase) part of this test may be false if the
162774 if( p->iTable==iBase && p->iColumn<0 ) return 1;
163509 if( pExpr->op==TK_COLUMN && pExpr->iTable==pSrc->iCursor ){
163518 && pE2->iTable==pSrc->iCursor
165061 || pLhs->iTable!=iCur
165548 && pExpr->iTable==iCursor
165659 if( pExpr->iTable!=pCk->iTabCur ) return WRC_Continue;
166997 if( pOBExpr->iTable!=iCur ) continue;
167134 if( pOBExpr->iTable!=iCur ) continue;
170113 if( pExpr->iTable==p->pSrc->a[i].iCursor ) break;
170164 pExpr->iTable = p->pWin->iEphCsr;
172630 p->iTable = 0;
176873 if( yymsp[0].minor.yy454 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy454->iTable);