Searched defs:iDb (Results 1 - 25 of 28) sorted by relevance

12

/external/chromium_org/third_party/sqlite/src/src/
H A Dbtmutex.c241 ** db->aDb[iDb].pSchema structure. The mutexes required for schema
245 ** (2) if iDb!=1, then the mutex on db->aDb[iDb].pBt.
247 ** If pSchema is not NULL, then iDb is computed from pSchema and
250 int sqlite3SchemaMutexHeld(sqlite3 *db, int iDb, Schema *pSchema){ argument
253 if( pSchema ) iDb = sqlite3SchemaToIndex(db, pSchema);
254 assert( iDb>=0 && iDb<db->nDb );
256 if( iDb==1 ) return 1;
257 p = db->aDb[iDb]
[all...]
H A Dauth.c105 int iDb /* Index of containing database. */
108 char *zDb = db->aDb[iDb].zName; /* Name of attached database */
113 if( db->nDb>2 || iDb!=0 ){
144 int iDb; /* The index of the database the expression refers to */ local
148 iDb = sqlite3SchemaToIndex(pParse->db, pSchema);
149 if( iDb<0 ){
179 assert( iDb>=0 && iDb<db->nDb );
180 if( SQLITE_IGNORE==sqlite3AuthReadCol(pParse, pTab->zName, zCol, iDb) ){
H A Dvdbeblob.c257 int iDb = sqlite3SchemaToIndex(db, pTab->pSchema); local
263 sqlite3VdbeChangeP1(v, 0, iDb);
267 sqlite3VdbeChangeP1(v, 1, iDb);
272 sqlite3VdbeUsesBtree(v, iDb);
278 sqlite3VdbeChangeP1(v, 2, iDb);
288 sqlite3VdbeChangeP3(v, 3 + flags, iDb);
H A Dattach.c198 int iDb = db->nDb - 1; local
199 assert( iDb>=2 );
200 if( db->aDb[iDb].pBt ){
201 sqlite3BtreeClose(db->aDb[iDb].pBt);
202 db->aDb[iDb].pBt = 0;
203 db->aDb[iDb].pSchema = 0;
206 db->nDb = iDb;
412 int iDb, /* This is the database that must be used */
418 if( NEVER(iDb<0) || iDb
409 sqlite3FixInit( DbFixer *pFix, Parse *pParse, int iDb, const char *zType, const Token *pName ) argument
[all...]
H A Ddelete.c239 int iDb; /* Database number */ local
287 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
288 assert( iDb<db->nDb );
289 zDb = db->aDb[iDb].zName;
318 sqlite3BeginWriteOperation(pParse, 1, iDb);
355 sqlite3VdbeAddOp4(v, OP_Clear, pTab->tnum, iDb, memCnt,
359 sqlite3VdbeAddOp2(v, OP_Clear, pIdx->tnum, iDb);
H A Dtest3.c528 int iDb = 0; local
541 iDb = atoi(argv[2]);
547 pBt = db->aDb[iDb].pBt;
H A Dupdate.c113 int iDb; /* Database containing the table being updated */ local
143 iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
222 pTab->aCol[j].zName, db->aDb[iDb].zName);
264 sqlite3BeginWriteOperation(pParse, 1, iDb);
343 if( !okOnePass ) sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite);
358 sqlite3VdbeAddOp4(v, OP_OpenWrite, iCur+i+1, pIdx->tnum, iDb,
H A Dalter.c335 int iDb; /* Index of database containing pTab */ local
343 iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
344 assert( iDb>=0 );
350 assert( iTrigDb==iDb || iTrigDb==1 );
356 sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
361 sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);
398 int iDb; /* Database that contains the table */ local
399 char *zDb; /* Name of database iDb */
419 iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
420 zDb = db->aDb[iDb]
594 sqlite3MinimumFileFormat(Parse *pParse, int iDb, int minFormat) argument
626 int iDb; /* Database number */ local
751 int iDb; local
[all...]
H A Danalyze.c35 int iDb, /* The database we are looking in */
60 pDb = &db->aDb[iDb];
80 sqlite3TableLock(pParse, iDb, aRoot[i], 1, zTab);
87 sqlite3VdbeAddOp2(v, OP_Clear, aRoot[i], iDb);
94 sqlite3VdbeAddOp3(v, OP_OpenWrite, iStatCur+i, aRoot[i], iDb);
119 int iDb; /* Index of database containing pTab */ local
150 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
151 assert( iDb>=0 );
152 assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
155 db->aDb[iDb]
33 openStatTable( Parse *pParse, int iDb, int iStatCur, const char *zWhere, const char *zWhereType ) argument
372 loadAnalysis(Parse *pParse, int iDb) argument
382 analyzeDatabase(Parse *pParse, int iDb) argument
408 int iDb; local
440 int iDb; local
601 sqlite3AnalysisLoad(sqlite3 *db, int iDb) argument
[all...]
H A Dprepare.c55 int iDb = pData->iDb; local
60 DbClearProperty(db, iDb, DB_Empty);
66 assert( iDb>=0 && iDb<db->nDb );
81 db->init.iDb = iDb;
87 db->init.iDb = 0;
90 assert( iDb==1 );
111 pIndex = sqlite3FindIndex(db, argv[0], db->aDb[iDb]
134 sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg) argument
446 int iDb; local
[all...]
H A Dresolve.c107 ** pExpr->iDb Set the index in db->aDb[] of the database X
163 int iDb; local
168 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
179 if( zDb!=0 && sqlite3StrICmp(db->aDb[iDb].zName, zDb)!=0 ){
H A Dfkey.c316 int iDb, /* Index of database housing pTab */
368 sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);
380 sqlite3VdbeAddOp3(v, OP_OpenRead, iCur, pIdx->tnum, iDb);
691 int iDb; /* Index of database containing pTab */ local
701 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
702 zDb = db->aDb[iDb].zName;
747 rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
756 sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);
763 fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1,isIgnore);
768 fkLookupParent(pParse, iDb, pT
314 fkLookupParent( Parse *pParse, int iDb, Table *pTab, Index *pIdx, FKey *pFKey, int *aiCol, int regData, int nIncr, int isIgnore ) argument
[all...]
H A Dpragma.c312 int iDb; /* Database index for <database> */ local
320 /* Interpret the [database.] part of the pragma statement. iDb is the
322 iDb = sqlite3TwoPartName(pParse, pId1, pId2, &pId);
323 if( iDb<0 ) return;
324 pDb = &db->aDb[iDb];
329 if( iDb==1 && sqlite3OpenTempDatabase(pParse) ){
377 sqlite3VdbeUsesBtree(v, iDb);
383 sqlite3VdbeChangeP1(v, addr, iDb);
384 sqlite3VdbeChangeP1(v, addr+1, iDb);
388 sqlite3BeginWriteOperation(pParse, 0, iDb);
[all...]
H A Dtrigger.c96 int iDb; /* The database to store the trigger in */ local
111 iDb = 1;
115 iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
116 if( iDb<0 ){
122 ** then set iDb to 1 to create the trigger in the temporary database.
132 iDb = 1;
138 if( sqlite3FixInit(&sFix, pParse, iDb, "trigger", pName) &&
145 if( db->init.iDb==1 ){
169 assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
170 if( sqlite3HashFind(&(db->aDb[iDb]
267 int iDb; /* Database containing the trigger */ local
534 int iDb; local
588 sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName) argument
671 int iDb; /* Index of the database to use */ local
[all...]
H A Dvtab.c271 int iDb; /* The database the table is being created in */ local
281 iDb = sqlite3SchemaToIndex(db, pTable->pSchema);
282 assert( iDb>=0 );
287 addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName));
299 pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
340 int iDb; local
357 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
362 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
370 sqlite3ChangeCookie(pParse, iDb);
599 sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr) argument
701 sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab) argument
[all...]
H A Dinsert.c23 int iDb, /* The database index in sqlite3.aDb[] */
31 sqlite3TableLock(p, iDb, pTab->tnum, (opcode==OP_OpenWrite)?1:0, pTab->zName);
32 sqlite3VdbeAddOp3(v, opcode, iCur, pTab->tnum, iDb);
130 ** Return non-zero if the table pTab in database iDb or any of its indices
133 ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can
136 static int readsTable(Parse *p, int iStartAddr, int iDb, Table *pTab){ argument
147 if( pOp->opcode==OP_OpenRead && pOp->p3==iDb ){
173 ** which is in database iDb. Return the register number for the register
193 int iDb, /* Index of the database holding pTab */
209 pInfo->iDb
20 sqlite3OpenTable( Parse *p, int iCur, int iDb, Table *pTab, int opcode ) argument
191 autoIncBegin( Parse *pParse, int iDb, Table *pTab ) argument
459 int iDb; /* Index of database holding TABLE */ local
1490 int iDb; local
[all...]
H A DvdbeInt.h47 int iDb; /* Index of cursor database in db->aDb[] (or -1) */ member in struct:VdbeCursor
H A Dbuild.c42 int iDb; /* The database containing the table to be locked */ member in struct:TableLock
51 ** The table to be locked has root page iTab and is found in database iDb.
60 int iDb, /* Index of the database containing the table to lock */
69 assert( iDb>=0 );
73 if( p->iDb==iDb && p->iTab==iTab ){
84 p->iDb = iDb;
107 int p1 = p->iDb;
152 int iDb; local
58 sqlite3TableLock( Parse *pParse, int iDb, int iTab, u8 isWriteLock, const char *zName ) argument
371 sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName) argument
409 sqlite3ResetInternalSchema(sqlite3 *db, int iDb) argument
554 sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName) argument
598 sqlite3OpenMasterTable(Parse *p, int iDb) argument
666 int iDb; /* Database holding the object */ local
736 int iDb; /* Database number to create the table in */ local
1306 sqlite3ChangeCookie(Parse *pParse, int iDb) argument
1465 int iDb; local
1680 int iDb; local
1874 sqlite3RootPageMoved(sqlite3 *db, int iDb, int iFrom, int iTo) argument
1904 destroyRootPage(Parse *pParse, int iTable, int iDb) argument
1935 int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); local
1993 int iDb; local
2320 int iDb = sqlite3SchemaToIndex(db, pIndex->pSchema); local
2416 int iDb; /* Index of the database that is being written */ local
2907 int iDb; local
3485 sqlite3CodeVerifySchema(Parse *pParse, int iDb) argument
3540 sqlite3BeginWriteOperation(Parse *pParse, int setStatement, int iDb) argument
3622 int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); local
3638 int iDb; /* The database index number */ local
3674 int iDb; /* The database index number */ local
[all...]
H A Dmain.c1393 int iDb = SQLITE_MAX_ATTACHED; /* sqlite3.aDb[] index of db to checkpoint */
1408 iDb = sqlite3FindDbName(db, zDb);
1410 if( iDb<0 ){
1414 rc = sqlite3Checkpoint(db, iDb, eMode, pnLog, pnCkpt);
1435 ** Run a checkpoint on database iDb. This is a no-op if database iDb is
1447 ** If iDb is passed SQLITE_MAX_ATTACHED, then all attached databases are
1453 int sqlite3Checkpoint(sqlite3 *db, int iDb, int eMode, int *pnLog, int *pnCkpt){ argument
1463 if( i==iDb || iDb
2415 int iDb; local
[all...]
H A Dvdbe.c192 int iDb, /* When database the cursor belongs to, or -1 */
230 pCx->iDb = iDb;
2849 int iDb; local
2852 iDb = pOp->p1;
2855 assert( iDb>=0 && iDb<db->nDb );
2856 assert( db->aDb[iDb].pBt!=0 );
2857 assert( (p->btreeMask & (((yDbMask)1)<<iDb))!=0 );
2859 sqlite3BtreeGetMeta(db->aDb[iDb]
188 allocateCursor( Vdbe *p, int iCur, int nField, int iDb, int isBtreeCursor ) argument
3016 int iDb; local
4510 int iDb; local
4634 int iDb; local
[all...]
H A Dexpr.c1447 int iDb; /* Database idx for pTab */ local
1450 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
1451 sqlite3CodeVerifySchema(pParse, iDb);
1452 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
1466 sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
1498 sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb,
H A Dselect.c1066 int iDb = sqlite3SchemaToIndex(pNC->pParse->db, pTab->pSchema); local
1067 zOriginDb = pNC->pParse->db->aDb[iDb].zName;
4224 const int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); local
4231 sqlite3CodeVerifySchema(pParse, iDb);
4232 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
4256 sqlite3VdbeAddOp3(v, OP_OpenRead, iCsr, iRoot, iDb);
H A Dwhere.c4730 int iDb; /* Index of database containing table/index */ local
4736 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
4750 sqlite3OpenTable(pParse, pTabItem->iCursor, iDb, pTab, op);
4762 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
4775 sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIx->tnum, iDb,
4779 sqlite3CodeVerifySchema(pParse, iDb);
H A Dbtree.c1773 int iDb; local
1774 for(iDb=db->nDb-1; iDb>=0; iDb--){
1775 Btree *pExisting = db->aDb[iDb].pBt;
H A DsqliteInt.h824 int iDb; /* When back is being initialized */ member in struct:sqlite3::sqlite3InitInfo
1258 ** database file. If Table.iDb is the index of the database table backend
2106 int iDb; /* Index in sqlite3.aDb[] of database holding pTab */ member in struct:AutoincInfo
2409 int iDb; /* 0 for main database. 1 for TEMP, 2.. for ATTACHed */ member in struct:__anon15503
2737 void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int);

Completed in 2752 milliseconds

12