Home | History | Annotate | Download | only in orig

Lines Matching refs:pTable

10375   Table *pTable;   /* The SQL table being indexed */
49523 iTab = pIdx->pTable->tnum;
80065 analyzeTable(pParse, pIdx->pTable, pIdx);
80080 analyzeTable(pParse, pIdx->pTable, pIdx);
80114 Table *pTable;
80125 pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);
80126 if( pTable==0 ){
80142 if( i==0 ) pTable->nRowEst = v;
81575 if( pIndex->pTable->pIndex==pIndex ){
81576 pIndex->pTable->pIndex = pIndex->pNext;
81581 p = pIndex->pTable->pIndex;
81677 static void sqliteDeleteColumnNames(sqlite3 *db, Table *pTable){
81680 assert( pTable!=0 );
81681 if( (pCol = pTable->aCol)!=0 ){
81682 for(i=0; i<pTable->nCol; i++, pCol++){
81689 sqlite3DbFree(db, pTable->aCol);
81702 SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
81705 assert( !pTable || pTable->nRef>0 );
81708 if( !pTable ) return;
81709 if( ((!db || db->pnBytesFreed==0) && (--pTable->nRef)>0) ) return;
81712 for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){
81714 assert( pIndex->pSchema==pTable->pSchema );
81727 sqlite3FkDelete(db, pTable);
81731 sqliteDeleteColumnNames(db, pTable);
81732 sqlite3DbFree(db, pTable->zName);
81733 sqlite3DbFree(db, pTable->zColAff);
81734 sqlite3SelectDelete(db, pTable->pSelect);
81736 sqlite3ExprDelete(db, pTable->pCheck);
81739 sqlite3VtabClear(db, pTable);
81741 sqlite3DbFree(db, pTable);
81926 Table *pTable;
82006 pTable = sqlite3FindTable(db, zName, zDb);
82007 if( pTable ){
82022 pTable = sqlite3DbMallocZero(db, sizeof(Table));
82023 if( pTable==0 ){
82029 pTable->zName = zName;
82030 pTable->iPKey = -1;
82031 pTable->pSchema = db->aDb[iDb].pSchema;
82032 pTable->nRef = 1;
82033 pTable->nRowEst = 1000000;
82035 pParse->pNewTable = pTable;
82044 pTable->pSchema->pSeqTab = pTable;
82932 ** The Table structure pTable
82933 ** the columns of the view in the pTable structure. Return the number
82936 SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
82944 assert( pTable );
82947 if( sqlite3VtabCallConnect(pParse, pTable) ){
82950 if( IsVirtual(pTable) ) return 0;
82957 if( pTable->nCol>0 ) return 0;
82974 if( pTable->nCol<0 ){
82975 sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
82978 assert( pTable->nCol>=0 );
82987 assert( pTable->pSelect );
82988 pSel = sqlite3SelectDup(db, pTable->pSelect, 0);
82993 pTable->nCol = -1;
83006 assert( pTable->aCol==0 );
83007 pTable->nCol = pSelTab->nCol;
83008 pTable->aCol = pSelTab->aCol;
83012 assert( sqlite3SchemaMutexHeld(db, 0, pTable->pSchema) );
83013 pTable->pSchema->flags |= DB_UnresetViews;
83015 pTable->nCol = 0;
83534 Table *pTab = pIndex->pTable; /* The table that is indexed */
83646 ** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
83677 DbFixer sFix; /* For assigning database names to pTable */
83881 pIndex->pTable = pTab;
84158 a[0] = pIdx->pTable->nRowEst;
84207 Table *pTab = pIndex->pTable;
84400 ** need be. A new entry is created in the SrcList even if pTable is NULL.
84409 ** points to the table name and the pTable points to the database name.
84411 ** come from pTable (if pDatabase is NULL) or from pDatabase.
84412 ** SrcList.a[].zDatabase is filled with the database name from pTable,
84429 ** Both pTable and pDatabase are assumed to be quoted. They are dequoted
84435 Token *pTable, /* Table to append */
84439 assert( pDatabase==0 || pTable!=0 ); /* Cannot have C without B */
84456 pDatabase = pTable;
84457 pTable = pTemp;
84459 pItem->zName = sqlite3NameFromToken(db, pTable);
84506 ** if this is the first term of the FROM clause. pTable and pDatabase
84511 ** SELECT statement that the subquery encodes. The pTable and
84521 Token *pTable, /* Name of the table to add to the FROM clause */
84522 Token *pDatabase, /* Name of the database containing pTable */
84536 p = sqlite3SrcListAppend(db, p, pTable, pDatabase);
86088 int iCur, /* Cursor number for the pIdx->pTable table */
86094 Table *pTab = pIdx->pTable;
88228 assert( !pIdx || pIdx->pTable==pTab );
89030 Table *pTab = pIdx->pTable;
90516 assert( pDest->pTable!=pSrc->pTable );
93009 pTab = pIdx->pTable;
99857 Table *pTable;
99864 pTable = tableOfTrigger(pTrigger);
99865 assert( pTable );
99866 assert( pTable->pSchema==pTrigger->pSchema || iDb==1 );
99873 if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
99882 assert( pTable!=0 );
101710 ** Add a new module argument to pTable->azModuleArg[].
101715 static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
101716 int i = pTable->nModuleArg++;
101717 int nBytes = sizeof(char *)*(1+pTable->nModuleArg);
101719 azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes);
101723 sqlite3DbFree(db, pTable->azModuleArg[j]);
101726 sqlite3DbFree(db, pTable->azModuleArg);
101727 pTable->nModuleArg = 0;
101732 pTable->azModuleArg = azModuleArg;
101748 Table *pTable; /* The new virtual table */
101752 pTable = pParse->pNewTable;
101753 if( pTable==0 ) return;
101754 assert( 0==pTable->pIndex );
101757 iDb = sqlite3SchemaToIndex(db, pTable->pSchema);
101760 pTable->tabFlags |= TF_Virtual;
101761 pTable->nModuleArg = 0;
101762 addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName));
101763 addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName));
101764 addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
101773 if( pTable->azModuleArg ){
101774 sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName,
101775 pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
101783 ** virtual table currently under construction in pParse->pTable.
103146 idxaff = pIdx->pTable->aCol[iColumn].affinity;
104189 if( iColumn==pIdx->pTable->iPKey ){
104468 Table *pTable; /* Table tht might be indexed */
104492 pTable = pSrc->pTab;
104493 nTableRow = pTable->nRowEst;
104541 Table *pTable; /* The table being indexed */
104561 pTable = pSrc->pTab;
104588 mxBitCol = (pTable->nCol >= BMS-1) ? BMS-1 : pTable->nCol;
104589 testcase( pTable->nCol==BMS-1 );
104590 testcase( pTable->nCol==BMS-2 );
104595 nColumn += pTable->nCol - BMS + 1;
104612 pIdx->pTable = pTable;
104641 for(i=BMS-1; i<pTable->nCol; i++){
104654 VdbeComment((v, "for %s", pTable->zName));
105234 u8 aff = p->pTable->aCol[p->aiColumn[0]].affinity;
105314 aff = p->pTable->aCol[p->aiColumn[0]].affinity;
105456 sPk.pTable = pSrc->pTab;