Home | History | Annotate | Download | only in dist

Lines Matching refs:pTable

10375   Table *pTable;   /* The SQL table being indexed */
49551 iTab = pIdx->pTable->tnum;
80101 analyzeTable(pParse, pIdx->pTable, pIdx);
80116 analyzeTable(pParse, pIdx->pTable, pIdx);
80150 Table *pTable;
80161 pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);
80162 if( pTable==0 ){
80178 if( i==0 ) pTable->nRowEst = v;
81611 if( pIndex->pTable->pIndex==pIndex ){
81612 pIndex->pTable->pIndex = pIndex->pNext;
81617 p = pIndex->pTable->pIndex;
81713 static void sqliteDeleteColumnNames(sqlite3 *db, Table *pTable){
81716 assert( pTable!=0 );
81717 if( (pCol = pTable->aCol)!=0 ){
81718 for(i=0; i<pTable->nCol; i++, pCol++){
81725 sqlite3DbFree(db, pTable->aCol);
81738 SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
81741 assert( !pTable || pTable->nRef>0 );
81744 if( !pTable ) return;
81745 if( ((!db || db->pnBytesFreed==0) && (--pTable->nRef)>0) ) return;
81748 for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){
81750 assert( pIndex->pSchema==pTable->pSchema );
81763 sqlite3FkDelete(db, pTable);
81767 sqliteDeleteColumnNames(db, pTable);
81768 sqlite3DbFree(db, pTable->zName);
81769 sqlite3DbFree(db, pTable->zColAff);
81770 sqlite3SelectDelete(db, pTable->pSelect);
81772 sqlite3ExprDelete(db, pTable->pCheck);
81775 sqlite3VtabClear(db, pTable);
81777 sqlite3DbFree(db, pTable);
81962 Table *pTable;
82042 pTable = sqlite3FindTable(db, zName, zDb);
82043 if( pTable ){
82058 pTable = sqlite3DbMallocZero(db, sizeof(Table));
82059 if( pTable==0 ){
82065 pTable->zName = zName;
82066 pTable->iPKey = -1;
82067 pTable->pSchema = db->aDb[iDb].pSchema;
82068 pTable->nRef = 1;
82069 pTable->nRowEst = 1000000;
82071 pParse->pNewTable = pTable;
82080 pTable->pSchema->pSeqTab = pTable;
82968 ** The Table structure pTable is really a VIEW. Fill in the names of
82969 ** the columns of the view in the pTable structure. Return the number
82972 SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
82980 assert( pTable );
82983 if( sqlite3VtabCallConnect(pParse, pTable) ){
82986 if( IsVirtual(pTable) ) return 0;
82993 if( pTable->nCol>0 ) return 0;
83010 if( pTable->nCol<0 ){
83011 sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
83014 assert( pTable->nCol>=0 );
83023 assert( pTable->pSelect );
83024 pSel = sqlite3SelectDup(db, pTable->pSelect, 0);
83029 pTable->nCol = -1;
83042 assert( pTable->aCol==0 );
83043 pTable->nCol = pSelTab->nCol;
83044 pTable->aCol = pSelTab->aCol;
83048 assert( sqlite3SchemaMutexHeld(db, 0, pTable->pSchema) );
83049 pTable->pSchema->flags |= DB_UnresetViews;
83051 pTable->nCol = 0;
83570 Table *pTab = pIndex->pTable; /* The table that is indexed */
83682 ** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
83713 DbFixer sFix; /* For assigning database names to pTable */
83917 pIndex->pTable = pTab;
84194 a[0] = pIdx->pTable->nRowEst;
84243 Table *pTab = pIndex->pTable;
84436 ** need be. A new entry is created in the SrcList even if pTable is NULL.
84445 ** points to the table name and the pTable points to the database name.
84447 ** come from pTable (if pDatabase is NULL) or from pDatabase.
84448 ** SrcList.a[].zDatabase is filled with the database name from pTable,
84465 ** Both pTable and pDatabase are assumed to be quoted. They are dequoted
84471 Token *pTable, /* Table to append */
84475 assert( pDatabase==0 || pTable!=0 ); /* Cannot have C without B */
84492 pDatabase = pTable;
84493 pTable = pTemp;
84495 pItem->zName = sqlite3NameFromToken(db, pTable);
84542 ** if this is the first term of the FROM clause. pTable and pDatabase
84547 ** SELECT statement that the subquery encodes. The pTable and
84557 Token *pTable, /* Name of the table to add to the FROM clause */
84558 Token *pDatabase, /* Name of the database containing pTable */
84572 p = sqlite3SrcListAppend(db, p, pTable, pDatabase);
86124 int iCur, /* Cursor number for the pIdx->pTable table */
86130 Table *pTab = pIdx->pTable;
88264 assert( !pIdx || pIdx->pTable==pTab );
89066 Table *pTab = pIdx->pTable;
90552 assert( pDest->pTable!=pSrc->pTable );
93045 pTab = pIdx->pTable;
99893 Table *pTable;
99900 pTable = tableOfTrigger(pTrigger);
99901 assert( pTable );
99902 assert( pTable->pSchema==pTrigger->pSchema || iDb==1 );
99909 if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
99918 assert( pTable!=0 );
101746 ** Add a new module argument to pTable->azModuleArg[].
101751 static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
101752 int i = pTable->nModuleArg++;
101753 int nBytes = sizeof(char *)*(1+pTable->nModuleArg);
101755 azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes);
101759 sqlite3DbFree(db, pTable->azModuleArg[j]);
101762 sqlite3DbFree(db, pTable->azModuleArg);
101763 pTable->nModuleArg = 0;
101768 pTable->azModuleArg = azModuleArg;
101784 Table *pTable; /* The new virtual table */
101788 pTable = pParse->pNewTable;
101789 if( pTable==0 ) return;
101790 assert( 0==pTable->pIndex );
101793 iDb = sqlite3SchemaToIndex(db, pTable->pSchema);
101796 pTable->tabFlags |= TF_Virtual;
101797 pTable->nModuleArg = 0;
101798 addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName));
101799 addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName));
101800 addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
101809 if( pTable->azModuleArg ){
101810 sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName,
101811 pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
101819 ** virtual table currently under construction in pParse->pTable.
103182 idxaff = pIdx->pTable->aCol[iColumn].affinity;
104225 if( iColumn==pIdx->pTable->iPKey ){
104504 Table *pTable; /* Table tht might be indexed */
104528 pTable = pSrc->pTab;
104529 nTableRow = pTable->nRowEst;
104577 Table *pTable; /* The table being indexed */
104597 pTable = pSrc->pTab;
104624 mxBitCol = (pTable->nCol >= BMS-1) ? BMS-1 : pTable->nCol;
104625 testcase( pTable->nCol==BMS-1 );
104626 testcase( pTable->nCol==BMS-2 );
104631 nColumn += pTable->nCol - BMS + 1;
104648 pIdx->pTable = pTable;
104677 for(i=BMS-1; i<pTable->nCol; i++){
104690 VdbeComment((v, "for %s", pTable->zName));
105270 u8 aff = p->pTable->aCol[p->aiColumn[0]].affinity;
105350 aff = p->pTable->aCol[p->aiColumn[0]].affinity;
105492 sPk.pTable = pSrc->pTab;