/illumos-gate/usr/src/lib/libsqlite/src/ |
H A D | copy.c | 39 Table *pTab; local 50 pTab = sqliteSrcListLookup(pParse, pTableName); 51 if( pTab==0 || sqliteIsReadOnly(pParse, pTab, 0) ) goto copy_cleanup; 54 assert( pTab->iDb<db->nDb ); 55 zDb = db->aDb[pTab->iDb].zName; 56 if( sqliteAuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) 57 || sqliteAuthCheck(pParse, SQLITE_COPY, pTab->zName, zFile, zDb) ){ 62 sqliteBeginWriteOperation(pParse, 1, pTab->iDb); 65 sqliteOpenTableAndIndices(pParse, pTab, [all...] |
H A D | auth.c | 113 Table *pTab; /* The table being read */ local 124 pTab = pTabList->a[iSrc].pTab; 133 pTab = pStack->pTab; 135 if( pTab==0 ) return; 137 assert( pExpr->iColumn<pTab->nCol ); 138 zCol = pTab->aCol[pExpr->iColumn].zName; 139 }else if( pTab->iPKey>=0 ){ 140 assert( pTab [all...] |
H A D | delete.c | 28 Table *pTab = 0; local 33 pTab = sqliteLocateTable(pParse, zTab, zDb); 34 pSrc->a[i].pTab = pTab; 36 return pTab; 44 int sqliteIsReadOnly(Parse *pParse, Table *pTab, int viewOk){ argument 45 if( pTab->readOnly ){ 46 sqliteErrorMsg(pParse, "table %s may not be modified", pTab->zName); 49 if( !viewOk && pTab->pSelect ){ 50 sqliteErrorMsg(pParse, "cannot modify %s because it is a view",pTab 65 Table *pTab; /* The table from which records will be deleted */ local 339 sqliteGenerateRowDelete( sqlite *db, Vdbe *v, Table *pTab, int iCur, int count ) argument 370 sqliteGenerateRowIndexDelete( sqlite *db, Vdbe *v, Table *pTab, int iCur, char *aIdxUsed ) argument [all...] |
H A D | update.c | 37 Table *pTab; /* The table to be updated */ local 45 int iCur; /* VDBE Cursor number of pTab */ 74 pTab = sqliteSrcListLookup(pParse, pTabList); 75 if( pTab==0 ) goto update_cleanup; 76 before_triggers = sqliteTriggersExist(pParse, pTab->pTrigger, 78 after_triggers = sqliteTriggersExist(pParse, pTab->pTrigger, 81 isView = pTab->pSelect!=0; 82 if( sqliteIsReadOnly(pParse, pTab, before_triggers) ){ 86 if( sqliteViewGetColumnNames(pParse, pTab) ){ 90 aXRef = sqliteMalloc( sizeof(int) * pTab [all...] |
H A D | insert.c | 97 Table *pTab; /* The table to insert into */ local 104 int base; /* VDBE Cursor number for pTab */ 130 pTab = sqliteSrcListLookup(pParse, pTabList); 131 if( pTab==0 ){ 134 assert( pTab->iDb<db->nDb ); 135 zDb = db->aDb[pTab->iDb].zName; 136 if( sqliteAuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) ){ 144 before_triggers = sqliteTriggersExist(pParse, pTab->pTrigger, TK_INSERT, 146 after_triggers = sqliteTriggersExist(pParse, pTab->pTrigger, TK_INSERT, 149 isView = pTab 623 sqliteGenerateConstraintChecks( Parse *pParse, Table *pTab, int base, char *aIdxUsed, int recnoChng, int isUpdate, int overrideError, int ignoreDest ) argument 866 sqliteCompleteInsertion( Parse *pParse, Table *pTab, int base, char *aIdxUsed, int recnoChng, int isUpdate, int newIdx ) argument 910 sqliteOpenTableAndIndices(Parse *pParse, Table *pTab, int base) argument [all...] |
H A D | pragma.c | 370 Table *pTab; local 371 pTab = sqliteFindTable(db, zRight, 0); 372 if( pTab ){ 383 sqliteViewGetColumnNames(pParse, pTab); 384 for(i=0; i<pTab->nCol; i++){ 386 sqliteVdbeOp3(v, OP_String, 0, 0, pTab->aCol[i].zName, 0); 388 pTab->aCol[i].zType ? pTab->aCol[i].zType : "numeric", 0); 389 sqliteVdbeAddOp(v, OP_Integer, pTab->aCol[i].notNull, 0); 391 pTab 400 Table *pTab; local 424 Table *pTab; local 452 Table *pTab; local 636 Table *pTab = sqliteHashData(x); local [all...] |
H A D | trigger.c | 218 Table *pTab; local 221 pTab = sqliteLocateTable(pParse, nt->table, db->aDb[nt->iTabDb].zName); 222 assert( pTab!=0 ); 223 nt->pNext = pTab->pTrigger; 224 pTab->pTrigger = nt; 687 Table *pTab, /* The table to code triggers from */ 701 pTrigger = pTab->pTrigger; 734 pTriggerStack->pTab = pTab; 682 sqliteCodeRowTrigger( Parse *pParse, int op, ExprList *pChanges, int tr_tm, Table *pTab, int newIdx, int oldIdx, int orconf, int ignoreJump ) argument
|
H A D | expr.c | 200 pNewItem->pTab = 0; 453 Table *pTab = pItem->pTab; local 456 if( pTab==0 ) continue; 457 assert( pTab->nCol>0 ); 463 char *zTabName = pTab->zName; 465 if( zDb!=0 && sqliteStrICmp(db->aDb[pTab->iDb].zName, zDb)!=0 ){ 472 pExpr->iDb = pTab->iDb; 474 for(j=0, pCol=pTab->aCol; j<pTab 492 Table *pTab = 0; local [all...] |
H A D | main.c | 145 Table *pTab; local 149 pTab = sqliteFindTable(pData->db, argv[0], 0); 150 assert( pTab!=0 ); 151 assert( sqliteStrICmp(pTab->zName, argv[0])==0 ); 152 if( pTab ){ 153 pTrig = pTab->pTrigger; 154 pTab->pTrigger = 0; /* Disable all triggers before rebuilding the table */ 169 ** cause the structure that pTab points to be deleted. In case that 170 ** happened, we need to refetch pTab. 172 pTab 194 Table *pTab; local [all...] |
H A D | where.c | 194 ** pOrderBy is an ORDER BY clause from a SELECT statement. pTab is the 198 ** This routine attempts to find an index for pTab that generates the 216 Table *pTab, /* The table to be sorted */ 217 int base, /* Cursor number for pTab */ 255 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ 489 Table *pTab = pTabList->a[i].pTab; local 560 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ 670 Table *pTab; local 673 pTab 215 findSortingIndex( Table *pTab, int base, ExprList *pOrderBy, Index *pPreferredIdx, int nEqCol, int *pbRev ) argument 705 Table *pTab; local 1222 Table *pTab = pTabList->a[i].pTab; local [all...] |
H A D | build.c | 243 Table *pTab = sqliteHashData(pElem); local 244 sqliteDeleteTable(db, pTab); 684 Table *pTab = pParse->pNewTable; local 687 if( pTab==0 ) goto primary_key_exit; 688 if( pTab->hasPrimKey ){ 690 "table \"%s\" has more than one primary key", pTab->zName); 693 pTab->hasPrimKey = 1; 695 iCol = pTab->nCol - 1; 696 pTab->aCol[iCol].isPrimKey = 1; 699 for(iCol=0; iCol<pTab 1149 Table *pTab = sqliteHashData(i); local 1163 Table *pTab; local 1313 Table *pTab; local 1457 Table *pTab; local 1484 Table *pTab; /* Table to be indexed */ local 1785 Table *pTab = pIndex->pTable; local [all...] |
H A D | select.c | 142 static int columnIndex(Table *pTab, const char *zCol){ argument 144 for(i=0; i<pTab->nCol; i++){ 145 if( sqliteStrICmp(pTab->aCol[i].zName, zCol)==0 ) return i; 220 if( pTerm->pTab==0 || pOther->pTab==0 ) continue; 226 Table *pTab; local 232 pTab = pTerm->pTab; 233 for(j=0; j<pTab->nCol; j++){ 234 if( columnIndex(pOther->pTab, pTa 674 Table *pTab; local 728 Table *pTab; local 791 Table *pTab; local 865 Table *pTab; local 972 Table *pTab = pTabList->a[i].pTab; local 1055 Table *pTab; local 1852 Table *pTab; local [all...] |
H A D | sqliteInt.h | 778 Table *pTab; /* An SQL table corresponding to zName */ member in struct:SrcList::SrcList_item 1047 * The pTab member points to the table that triggers are being coded on. The 1069 Table *pTab; /* Table that triggers are currently being coded on */ member in struct:TriggerStack
|