Home
last modified time | relevance | path

Searched refs:iDb (Results 1 – 15 of 15) sorted by relevance

/titanic_50/usr/src/lib/libsqlite/src/
H A Dtrigger.c59 int iDb; /* When database to store the trigger in */ in sqliteBeginTrigger() local
72 && sqliteFixInit(&sFix, pParse, db->init.iDb, "trigger", pName) in sqliteBeginTrigger()
81 iDb = isTemp ? 1 : tab->iDb; in sqliteBeginTrigger()
82 if( iDb>=2 && !db->init.busy ){ in sqliteBeginTrigger()
84 "database %s", db->aDb[tab->iDb].zName); in sqliteBeginTrigger()
90 if( sqliteHashFind(&(db->aDb[iDb].trigHash), zName,pName->n+1) ){ in sqliteBeginTrigger()
112 const char *zDb = db->aDb[tab->iDb].zName; in sqliteBeginTrigger()
114 if( tab->iDb==1 || isTemp ) code = SQLITE_CREATE_TEMP_TRIGGER; in sqliteBeginTrigger()
118 if( sqliteAuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(tab->iDb), 0, zDb)){ in sqliteBeginTrigger()
140 nt->iDb = iDb; in sqliteBeginTrigger()
[all …]
H A Dbuild.c184 pOld = sqliteHashInsert(&db->aDb[p->iDb].idxHash, p->zName, in sqliteDeleteIndex()
187 sqliteHashInsert(&db->aDb[p->iDb].idxHash, pOld->zName, in sqliteDeleteIndex()
221 void sqliteResetInternalSchema(sqlite *db, int iDb){ in sqliteResetInternalSchema() argument
227 assert( iDb>=0 && iDb<db->nDb ); in sqliteResetInternalSchema()
229 for(i=iDb; i<db->nDb; i++){ in sqliteResetInternalSchema()
248 if( iDb>0 ) return; in sqliteResetInternalSchema()
250 assert( iDb==0 ); in sqliteResetInternalSchema()
332 assert( pIndex->iDb==pTable->iDb || (pTable->iDb==0 && pIndex->iDb==1) ); in sqliteDeleteTable()
341 assert( pTable->iDb<db->nDb ); in sqliteDeleteTable()
342 assert( sqliteHashFind(&db->aDb[pTable->iDb].aFKey, in sqliteDeleteTable()
[all …]
H A Dmain.c86 db->init.iDb = atoi(argv[4]); in sqliteInitCallback()
87 assert( db->init.iDb>=0 && db->init.iDb<db->nDb ); in sqliteInitCallback()
93 db->init.iDb = 0; in sqliteInitCallback()
101 int iDb; in sqliteInitCallback() local
104 iDb = atoi(argv[4]); in sqliteInitCallback()
105 assert( iDb>=0 && iDb<db->nDb ); in sqliteInitCallback()
106 pIndex = sqliteFindIndex(db, argv[1], db->aDb[iDb].zName); in sqliteInitCallback()
190 static int sqliteInitOne(sqlite *db, int iDb, char **pzErrMsg){ in sqliteInitOne() argument
225 assert( iDb>=0 && iDb<db->nDb ); in sqliteInitOne()
231 if( iDb==1 ){ in sqliteInitOne()
[all …]
H A Ddelete.c105 assert( pTab->iDb<db->nDb ); in sqliteDeleteFrom()
106 zDb = db->aDb[pTab->iDb].zName; in sqliteDeleteFrom()
148 sqliteBeginWriteOperation(pParse, row_triggers_exist, pTab->iDb); in sqliteDeleteFrom()
177 sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0); in sqliteDeleteFrom()
187 sqliteVdbeAddOp(v, OP_Clear, pTab->tnum, pTab->iDb); in sqliteDeleteFrom()
189 sqliteVdbeAddOp(v, OP_Clear, pIdx->tnum, pIdx->iDb); in sqliteDeleteFrom()
234 sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0); in sqliteDeleteFrom()
H A Dcopy.c54 assert( pTab->iDb<db->nDb ); in sqliteCopy()
55 zDb = db->aDb[pTab->iDb].zName; in sqliteCopy()
62 sqliteBeginWriteOperation(pParse, 1, pTab->iDb); in sqliteCopy()
H A Dattach.c191 int iDb, /* This is the database that must must be used */ in sqliteFixInit() argument
197 if( iDb<0 || iDb==1 ) return 0; in sqliteFixInit()
199 assert( db->nDb>iDb ); in sqliteFixInit()
201 pFix->zDb = db->aDb[iDb].zName; in sqliteFixInit()
H A Dauth.c145 assert( pExpr->iDb<db->nDb ); in sqliteAuthRead()
146 zDBase = db->aDb[pExpr->iDb].zName; in sqliteAuthRead()
152 if( db->nDb>2 || pExpr->iDb!=0 ){ in sqliteAuthRead()
H A Dupdate.c149 pTab->aCol[j].zName, db->aDb[pTab->iDb].zName); in sqliteUpdate()
217 sqliteBeginWriteOperation(pParse, 1, pTab->iDb); in sqliteUpdate()
269 sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0); in sqliteUpdate()
320 sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0); in sqliteUpdate()
335 sqliteVdbeAddOp(v, OP_Integer, pIdx->iDb, 0); in sqliteUpdate()
H A DsqliteInt.h372 int iDb; /* When back is being initialized */ member
508 u8 iDb; /* Index into sqlite.aDb[] of the backend for this table */ member
630 u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */ member
687 u8 iDb; /* Database referenced by this expression */ member
973 u8 iDb; /* Database containing this trigger */ member
H A Dinsert.c134 assert( pTab->iDb<db->nDb ); in sqliteInsert()
135 zDb = db->aDb[pTab->iDb].zName; in sqliteInsert()
165 sqliteBeginWriteOperation(pParse, pSelect || row_triggers_exist, pTab->iDb); in sqliteInsert()
209 if( pOp->opcode==OP_Integer && pOp->p1==pTab->iDb ){ in sqliteInsert()
915 sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0); in sqliteOpenTableAndIndices()
918 sqliteVdbeAddOp(v, OP_Integer, pIdx->iDb, 0); in sqliteOpenTableAndIndices()
H A Dexpr.c465 if( zDb!=0 && sqliteStrICmp(db->aDb[pTab->iDb].zName, zDb)!=0 ){ in lookupName()
472 pExpr->iDb = pTab->iDb; in lookupName()
478 pExpr->iDb = pTab->iDb; in lookupName()
507 pExpr->iDb = pTab->iDb; in lookupName()
H A Dwhere.c710 sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0); in sqliteWhereBegin()
713 sqliteCodeVerifySchema(pParse, pTab->iDb); in sqliteWhereBegin()
715 sqliteVdbeAddOp(v, OP_Integer, pIx->iDb, 0); in sqliteWhereBegin()
H A Dpragma.c645 sqliteVdbeAddOp(v, OP_Integer, pIdx->iDb, 0); in sqlitePragma()
H A Dvdbe.c2399 int iDb; in sqliteVdbeExec() local
2403 iDb = pTos->i; in sqliteVdbeExec()
2405 assert( iDb>=0 && iDb<db->nDb ); in sqliteVdbeExec()
2406 pX = db->aDb[iDb].pBt; in sqliteVdbeExec()
H A Dselect.c1925 sqliteCodeVerifySchema(pParse, pTab->iDb); in simpleMinMaxQuery()
1929 sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0); in simpleMinMaxQuery()
1936 sqliteVdbeAddOp(v, OP_Integer, pIdx->iDb, 0); in simpleMinMaxQuery()