Lines Matching defs:pDb
5291 ** pStmt associated with the [database connection] pDb. ^If pStmt is NULL
5293 ** associated with the database connection pDb. ^If no prepared statement
5300 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
58113 ** in connection handle pDb. If such a database cannot be found, return
58120 static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
58121 int i = sqlite3FindDbName(pDb, zDb);
58131 pParse->db = pDb;
58149 return pDb->aDb[i].pBt;
64478 ** with database connection pDb. If pStmt is NULL, return the first
64482 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
64484 sqlite3_mutex_enter(pDb->mutex);
64486 pNext = (sqlite3_stmt*)pDb->pVdbe;
64490 sqlite3_mutex_leave(pDb->mutex);
65612 Db *pDb;
65627 Db *pDb;
65766 Db *pDb;
68376 Db *pDb;
68381 u.aw.pDb = &db->aDb[pOp->p1];
68382 assert( u.aw.pDb->pBt!=0 );
68387 rc = sqlite3BtreeUpdateMeta(u.aw.pDb->pBt, pOp->p2, (int)pIn3->u.i);
68390 u.aw.pDb->pSchema->schema_cookie = (int)pIn3->u.i;
68394 u.aw.pDb->pSchema->file_format = (u8)pIn3->u.i;
68525 Db *pDb;
68542 u.ay.pDb = &db->aDb[u.ay.iDb];
68543 u.ay.pX = u.ay.pDb->pBt;
68548 if( u.ay.pDb->pSchema->file_format < p->minWriteFileFormat ){
68549 p->minWriteFileFormat = u.ay.pDb->pSchema->file_format;
70247 Db *pDb;
70253 u.by.pDb = &db->aDb[pOp->p1];
70254 assert( u.by.pDb->pBt!=0 );
70261 rc = sqlite3BtreeCreateTable(u.by.pDb->pBt, &u.by.pgno, u.by.flags);
80400 Db *pDb;
80405 pDb = &db->aDb[iDb];
80413 if( (pStat = sqlite3FindTable(db, zTab, pDb->zName))==0 ){
80419 "CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
80431 "DELETE FROM %Q.%s WHERE %s=%Q", pDb->zName, zTab, zWhereType, zWhere
81627 Db *pDb = 0;
81634 pDb = &db->aDb[i];
81635 if( pDb->pBt==0 ) continue;
81636 if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
81652 if( sqlite3BtreeIsInReadTrans(pDb->pBt) || sqlite3BtreeIsInBackup(pDb->pBt) ){
81657 sqlite3BtreeClose(pDb->pBt);
81658 pDb->pBt = 0;
81659 pDb->pSchema = 0;
82614 struct Db *pDb = &db->aDb[i];
82615 if( pDb->pBt==0 ){
82616 sqlite3DbFree(db, pDb->zName);
82617 pDb->zName = 0;
82639 Db *pDb;
82643 pDb = &db->aDb[iDb];
82645 assert( pDb->pSchema!=0 );
82646 sqlite3SchemaClear(pDb->pSchema);
82653 pDb = &db->aDb[1];
82654 assert( pDb->pSchema!=0 );
82655 sqlite3SchemaClear(pDb->pSchema);
82668 Db *pDb = &db->aDb[i];
82669 if( pDb->pSchema ){
82670 sqlite3SchemaClear(pDb->pSchema);
82779 Db *pDb;
82786 pDb = &db->aDb[iDb];
82787 p = sqlite3HashInsert(&pDb->pSchema->tblHash, zTabName,
82840 Db *pDb;
82842 for(i=(db->nDb-1), pDb=&db->aDb[i]; i>=0; i--, pDb--){
82843 if( (!OMIT_TEMPDB || i!=1 ) && n==sqlite3Strlen30(pDb->zName) &&
82844 0==sqlite3StrICmp(pDb->zName, zName) ){
83839 Db *pDb = &db->aDb[iDb];
83841 if( pDb->pSchema->pSeqTab==0 ){
83844 pDb->zName
84103 Db *pDb;
84106 pDb = &db->aDb[iDb];
84107 pHash = &pDb->pSchema->tblHash;
84114 pHash = &pDb->pSchema->idxHash;
84243 Db *pDb = &db->aDb[iDb];
84276 pDb->zName, pTab->zName
84290 pDb->zName, SCHEMA_TABLE(iDb), pTab->zName);
84679 Db *pDb; /* The specific table containing the indexed database */
84741 pDb = &db->aDb[iDb];
84789 if( sqlite3FindIndex(db, zName, pDb->zName)!=0 ){
84812 const char *zDb = pDb->zName;
84885 if( pDb->pSchema->file_format>=4 ){
85773 Db *pDb = &db->aDb[i];
85774 if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zName)) ){
85897 Db *pDb; /* A single database */
85900 HashElem *k; /* For looping over tables in pDb */
85904 for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){
85905 assert( pDb!=0 );
85906 for(k=sqliteHashFirst(&pDb->pSchema->tblHash); k; k=sqliteHashNext(k)){
90331 Db *pDb; /* Database only autoinc table */
90343 pDb = &db->aDb[p->iDb];
90345 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
90346 sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);
90391 Db *pDb = &db->aDb[p->iDb];
90397 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
90398 sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
90657 Db *pDb; /* The database containing table being inserted into */
90693 pDb = &db->aDb[iDb];
90694 zDb = pDb->zName;
93696 Db *pDb; /* The specific database being pragmaed */
93707 pDb = &db->aDb[iDb];
93725 zDb = pId2->n>0 ? pDb->zName : 0;
93805 pDb->pSchema->cache_size = size;
93806 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
93822 Btree *pBt = pDb->pBt;
93847 Btree *pBt = pDb->pBt;
93924 assert(pDb==&db->aDb[0]);
93931 pPager = sqlite3BtreePager(pDb->pBt);
94002 Pager *pPager = sqlite3BtreePager(pDb->pBt);
94023 Btree *pBt = pDb->pBt;
94115 returnSingleInt(pParse, "cache_size", pDb->pSchema->cache_size);
94118 pDb->pSchema->cache_size = size;
94119 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
94286 Pager *pPager = sqlite3BtreePager(pDb->pBt);
94300 Pager *pPager = sqlite3BtreePager(pDb->pBt);
94330 returnSingleInt(pParse, "synchronous", pDb->safety_level-1);
94336 pDb->safety_level = getSafetyLevel(zRight,0,1)+1;
95190 sqlite3BtreeSetSafetyLevel(pDb->pBt, pDb->safety_level,
95343 Db *pDb;
95414 pDb = &db->aDb[iDb];
95415 if( pDb->pBt==0 ){
95425 sqlite3BtreeEnter(pDb->pBt);
95426 if( !sqlite3BtreeIsInReadTrans(pDb->pBt) ){
95427 rc = sqlite3BtreeBeginTrans(pDb->pBt, 0);
95453 sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);
95455 pDb->pSchema->schema_cookie = meta[BTREE_SCHEMA_VERSION-1];
95485 pDb->pSchema->enc = ENC(db);
95487 if( pDb->pSchema->cache_size==0 ){
95491 pDb->pSchema->cache_size = size;
95493 pDb->pSchema->cache_size = SQLITE_DEFAULT_CACHE_SIZE;
95495 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
95504 pDb->pSchema->file_format = (u8)meta[BTREE_FILE_FORMAT-1];
95505 if( pDb->pSchema->file_format==0 ){
95506 pDb->pSchema->file_format = 1;
95508 if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
95573 sqlite3BtreeCommit(pDb->pBt);
95575 sqlite3BtreeLeave(pDb->pBt);
103025 Db *pDb = 0; /* Database to detach at end of vacuum */
103075 pDb = &db->aDb[db->nDb-1];
103076 assert( strcmp(pDb->zName,"vacuum_db")==0 );
103256 if( pDb ){
103257 sqlite3BtreeClose(pDb->pBt);
103258 pDb->pBt = 0;
103259 pDb->pSchema = 0;
115697 struct Db *pDb = &db->aDb[j];
115698 if( pDb->pBt ){
115699 sqlite3BtreeClose(pDb->pBt);
115700 pDb->pBt = 0;
115702 pDb->pSchema = 0;