Lines Matching refs:pTable
8245 Table *pTable; /* The SQL table being indexed */ member
49068 Token *pTable; in nameResolverStep() local
49076 pTable = &pExpr->pLeft->token; in nameResolverStep()
49081 pTable = &pRight->pLeft->token; in nameResolverStep()
49084 lookupName(pParse, pDb, pTable, pColumn, pNC, pExpr); in nameResolverStep()
53361 if( pIndex->pTable->pIndex==pIndex ){ in sqlite3UnlinkAndDeleteIndex()
53362 pIndex->pTable->pIndex = pIndex->pNext; in sqlite3UnlinkAndDeleteIndex()
53365 for(p=pIndex->pTable->pIndex; p && p->pNext!=pIndex; p=p->pNext){} in sqlite3UnlinkAndDeleteIndex()
53449 static void sqliteResetColumnNames(Table *pTable){ in sqliteResetColumnNames() argument
53452 assert( pTable!=0 ); in sqliteResetColumnNames()
53453 if( (pCol = pTable->aCol)!=0 ){ in sqliteResetColumnNames()
53454 for(i=0; i<pTable->nCol; i++, pCol++){ in sqliteResetColumnNames()
53460 sqlite3_free(pTable->aCol); in sqliteResetColumnNames()
53462 pTable->aCol = 0; in sqliteResetColumnNames()
53463 pTable->nCol = 0; in sqliteResetColumnNames()
53476 SQLITE_PRIVATE void sqlite3DeleteTable(Table *pTable){ in sqlite3DeleteTable() argument
53480 if( pTable==0 ) return; in sqlite3DeleteTable()
53483 pTable->nRef--; in sqlite3DeleteTable()
53484 if( pTable->nRef>0 ){ in sqlite3DeleteTable()
53487 assert( pTable->nRef==0 ); in sqlite3DeleteTable()
53491 for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){ in sqlite3DeleteTable()
53493 assert( pIndex->pSchema==pTable->pSchema ); in sqlite3DeleteTable()
53501 for(pFKey=pTable->pFKey; pFKey; pFKey=pNextFKey){ in sqlite3DeleteTable()
53503 assert( sqlite3HashFind(&pTable->pSchema->aFKey, in sqlite3DeleteTable()
53511 sqliteResetColumnNames(pTable); in sqlite3DeleteTable()
53512 sqlite3_free(pTable->zName); in sqlite3DeleteTable()
53513 sqlite3_free(pTable->zColAff); in sqlite3DeleteTable()
53514 sqlite3SelectDelete(pTable->pSelect); in sqlite3DeleteTable()
53516 sqlite3ExprDelete(pTable->pCheck); in sqlite3DeleteTable()
53518 sqlite3VtabClear(pTable); in sqlite3DeleteTable()
53519 sqlite3_free(pTable); in sqlite3DeleteTable()
53698 Table *pTable; in sqlite3StartTable() local
53776 pTable = sqlite3FindTable(db, zName, db->aDb[iDb].zName); in sqlite3StartTable()
53777 if( pTable ){ in sqlite3StartTable()
53789 pTable = sqlite3DbMallocZero(db, sizeof(Table)); in sqlite3StartTable()
53790 if( pTable==0 ){ in sqlite3StartTable()
53796 pTable->zName = zName; in sqlite3StartTable()
53797 pTable->iPKey = -1; in sqlite3StartTable()
53798 pTable->pSchema = db->aDb[iDb].pSchema; in sqlite3StartTable()
53799 pTable->nRef = 1; in sqlite3StartTable()
53801 pParse->pNewTable = pTable; in sqlite3StartTable()
53809 pTable->pSchema->pSeqTab = pTable; in sqlite3StartTable()
54684 SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){ in sqlite3ViewGetColumnNames() argument
54692 assert( pTable ); in sqlite3ViewGetColumnNames()
54695 if( sqlite3VtabCallConnect(pParse, pTable) ){ in sqlite3ViewGetColumnNames()
54698 if( IsVirtual(pTable) ) return 0; in sqlite3ViewGetColumnNames()
54705 if( pTable->nCol>0 ) return 0; in sqlite3ViewGetColumnNames()
54717 if( pTable->nCol<0 ){ in sqlite3ViewGetColumnNames()
54718 sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName); in sqlite3ViewGetColumnNames()
54721 assert( pTable->nCol>=0 ); in sqlite3ViewGetColumnNames()
54730 assert( pTable->pSelect ); in sqlite3ViewGetColumnNames()
54731 pSel = sqlite3SelectDup(db, pTable->pSelect); in sqlite3ViewGetColumnNames()
54735 pTable->nCol = -1; in sqlite3ViewGetColumnNames()
54746 assert( pTable->aCol==0 ); in sqlite3ViewGetColumnNames()
54747 pTable->nCol = pSelTab->nCol; in sqlite3ViewGetColumnNames()
54748 pTable->aCol = pSelTab->aCol; in sqlite3ViewGetColumnNames()
54752 pTable->pSchema->flags |= DB_UnresetViews; in sqlite3ViewGetColumnNames()
54754 pTable->nCol = 0; in sqlite3ViewGetColumnNames()
55223 Table *pTab = pIndex->pTable; /* The table that is indexed */ in sqlite3RefillIndex()
55501 pIndex->pTable = pTab; in sqlite3CreateIndex()
55820 Table *pTab = pIndex->pTable; in sqlite3DropIndex()
55985 Token *pTable, /* Table to append */ in sqlite3SrcListAppend() argument
56010 if( pDatabase && pTable ){ in sqlite3SrcListAppend()
56012 pDatabase = pTable; in sqlite3SrcListAppend()
56013 pTable = pTemp; in sqlite3SrcListAppend()
56015 pItem->zName = sqlite3NameFromToken(db, pTable); in sqlite3SrcListAppend()
56079 Token *pTable, /* Name of the table to add to the FROM clause */ in sqlite3SrcListAppendFromTerm() argument
56088 p = sqlite3SrcListAppend(db, p, pTable, pDatabase); in sqlite3SrcListAppendFromTerm()
57357 Table *pTab = pIdx->pTable; in sqlite3GenerateIndexKey()
58898 Table *pTab = pIdx->pTable; in sqlite3IndexAffinityStr()
60239 assert( pDest->pTable!=pSrc->pTable ); in xferCompatibleIndex()
62321 pTab = pIdx->pTable; in sqlite3Pragma()
68107 Table *pTable; in sqlite3DropTriggerPtr() local
68114 pTable = tableOfTrigger(pTrigger); in sqlite3DropTriggerPtr()
68115 assert( pTable ); in sqlite3DropTriggerPtr()
68116 assert( pTable->pSchema==pTrigger->pSchema || iDb==1 ); in sqlite3DropTriggerPtr()
68123 if( sqlite3AuthCheck(pParse, code, pTrigger->name, pTable->zName, zDb) || in sqlite3DropTriggerPtr()
68132 assert( pTable!=0 ); in sqlite3DropTriggerPtr()
68167 Table *pTable = tableOfTrigger(pTrigger); in sqlite3UnlinkAndDeleteTrigger() local
68168 assert( pTable!=0 ); in sqlite3UnlinkAndDeleteTrigger()
68169 if( pTable->pTrigger == pTrigger ){ in sqlite3UnlinkAndDeleteTrigger()
68170 pTable->pTrigger = pTrigger->pNext; in sqlite3UnlinkAndDeleteTrigger()
68172 Trigger *cc = pTable->pTrigger; in sqlite3UnlinkAndDeleteTrigger()
69556 static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){ in addModuleArgument() argument
69557 int i = pTable->nModuleArg++; in addModuleArgument()
69558 int nBytes = sizeof(char *)*(1+pTable->nModuleArg); in addModuleArgument()
69560 azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes); in addModuleArgument()
69564 sqlite3_free(pTable->azModuleArg[j]); in addModuleArgument()
69567 sqlite3_free(pTable->azModuleArg); in addModuleArgument()
69568 pTable->nModuleArg = 0; in addModuleArgument()
69573 pTable->azModuleArg = azModuleArg; in addModuleArgument()
69588 Table *pTable; /* The new virtual table */ in sqlite3VtabBeginParse() local
69597 pTable = pParse->pNewTable; in sqlite3VtabBeginParse()
69598 if( pTable==0 || pParse->nErr ) return; in sqlite3VtabBeginParse()
69599 assert( 0==pTable->pIndex ); in sqlite3VtabBeginParse()
69602 iDb = sqlite3SchemaToIndex(db, pTable->pSchema); in sqlite3VtabBeginParse()
69605 pTable->isVirtual = 1; in sqlite3VtabBeginParse()
69606 pTable->nModuleArg = 0; in sqlite3VtabBeginParse()
69607 addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName)); in sqlite3VtabBeginParse()
69608 addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName)); in sqlite3VtabBeginParse()
69609 addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName)); in sqlite3VtabBeginParse()
69618 if( pTable->azModuleArg ){ in sqlite3VtabBeginParse()
69619 sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName, in sqlite3VtabBeginParse()
69620 pTable->azModuleArg[0], pParse->db->aDb[iDb].zName); in sqlite3VtabBeginParse()
70715 idxaff = pIdx->pTable->aCol[iColumn].affinity; in findTerm()
71322 if( iColumn==pIdx->pTable->iPKey ){ in isSortingIndex()