Lines Matching defs:pDb
4907 ** pStmt associated with the [database connection] pDb. ^If pStmt is NULL
4909 ** associated with the database connection pDb. ^If no prepared statement
4916 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
56526 ** in connection handle pDb. If such a database cannot be found, return
56533 static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
56534 int i = sqlite3FindDbName(pDb, zDb);
56544 pParse->db = pDb;
56562 return pDb->aDb[i].pBt;
62826 ** with database connection pDb. If pStmt is NULL, return the first
62830 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
62832 sqlite3_mutex_enter(pDb->mutex);
62834 pNext = (sqlite3_stmt*)pDb->pVdbe;
62838 sqlite3_mutex_leave(pDb->mutex);
63819 Db *pDb;
63834 Db *pDb;
63973 Db *pDb;
66492 Db *pDb;
66497 u.au.pDb = &db->aDb[pOp->p1];
66498 assert( u.au.pDb->pBt!=0 );
66503 rc = sqlite3BtreeUpdateMeta(u.au.pDb->pBt, pOp->p2, (int)pIn3->u.i);
66506 u.au.pDb->pSchema->schema_cookie = (int)pIn3->u.i;
66510 u.au.pDb->pSchema->file_format = (u8)pIn3->u.i;
66641 Db *pDb;
66655 u.aw.pDb = &db->aDb[u.aw.iDb];
66656 u.aw.pX = u.aw.pDb->pBt;
66661 if( u.aw.pDb->pSchema->file_format < p->minWriteFileFormat ){
66662 p->minWriteFileFormat = u.aw.pDb->pSchema->file_format;
68374 Db *pDb;
68380 u.bw.pDb = &db->aDb[pOp->p1];
68381 assert( u.bw.pDb->pBt!=0 );
68388 rc = sqlite3BtreeCreateTable(u.bw.pDb->pBt, &u.bw.pgno, u.bw.flags);
77660 Db *pDb;
77665 pDb = &db->aDb[iDb];
77670 if( (pStat = sqlite3FindTable(db, zTab, pDb->zName))==0 ){
77676 "CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
77688 "DELETE FROM %Q.%s WHERE %s=%Q", pDb->zName, zTab, zWhereType, zWhere
78584 Db *pDb = 0;
78591 pDb = &db->aDb[i];
78592 if( pDb->pBt==0 ) continue;
78593 if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
78609 if( sqlite3BtreeIsInReadTrans(pDb->pBt) || sqlite3BtreeIsInBackup(pDb->pBt) ){
78614 sqlite3BtreeClose(pDb->pBt);
78615 pDb->pBt = 0;
78616 pDb->pSchema = 0;
79549 Db *pDb = &db->aDb[iDb];
79551 assert( pDb->pSchema!=0 );
79552 sqlite3SchemaClear(pDb->pSchema);
79559 pDb = &db->aDb[1];
79560 assert( pDb->pSchema!=0 );
79561 sqlite3SchemaClear(pDb->pSchema);
79570 Db *pDb = &db->aDb[i];
79571 if( pDb->pSchema ){
79572 sqlite3SchemaClear(pDb->pSchema);
79586 struct Db *pDb = &db->aDb[i];
79587 if( pDb->pBt==0 ){
79588 sqlite3DbFree(db, pDb->zName);
79589 pDb->zName = 0;
79690 Db *pDb;
79697 pDb = &db->aDb[iDb];
79698 p = sqlite3HashInsert(&pDb->pSchema->tblHash, zTabName,
79751 Db *pDb;
79753 for(i=(db->nDb-1), pDb=&db->aDb[i]; i>=0; i--, pDb--){
79754 if( (!OMIT_TEMPDB || i!=1 ) && n==sqlite3Strlen30(pDb->zName) &&
79755 0==sqlite3StrICmp(pDb->zName, zName) ){
80746 Db *pDb = &db->aDb[iDb];
80748 if( pDb->pSchema->pSeqTab==0 ){
80751 pDb->zName
81011 Db *pDb;
81014 pDb = &db->aDb[iDb];
81015 pHash = &pDb->pSchema->tblHash;
81022 pHash = &pDb->pSchema->idxHash;
81235 Db *pDb = &db->aDb[iDb];
81266 pDb->zName, pTab->zName
81280 pDb->zName, SCHEMA_TABLE(iDb), pTab->zName);
81601 Db *pDb; /* The specific table containing the indexed database */
81661 pDb = &db->aDb[iDb];
81708 if( sqlite3FindIndex(db, zName, pDb->zName)!=0 ){
81731 const char *zDb = pDb->zName;
81804 if( pDb->pSchema->file_format>=4 ){
82700 Db *pDb = &db->aDb[i];
82701 if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zName)) ){
82817 Db *pDb; /* A single database */
82820 HashElem *k; /* For looping over tables in pDb */
82824 for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){
82825 assert( pDb!=0 );
82826 for(k=sqliteHashFirst(&pDb->pSchema->tblHash); k; k=sqliteHashNext(k)){
87106 Db *pDb; /* Database only autoinc table */
87118 pDb = &db->aDb[p->iDb];
87120 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
87121 sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);
87165 Db *pDb = &db->aDb[p->iDb];
87171 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
87172 sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
87340 Db *pDb; /* The database containing table being inserted into */
87376 pDb = &db->aDb[iDb];
87377 zDb = pDb->zName;
90275 Db *pDb;
90285 pDb = &db->aDb[iDb];
90303 zDb = pId2->n>0 ? pDb->zName : 0;
90353 pDb->pSchema->cache_size = size;
90354 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
90368 Btree *pBt = pDb->pBt;
90393 Btree *pBt = pDb->pBt;
90465 assert(pDb==&db->aDb[0]);
90472 pPager = sqlite3BtreePager(pDb->pBt);
90541 Pager *pPager = sqlite3BtreePager(pDb->pBt);
90562 Btree *pBt = pDb->pBt;
90657 returnSingleInt(pParse, "cache_size", pDb->pSchema->cache_size);
90660 pDb->pSchema->cache_size = size;
90661 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
90748 Pager *pPager = sqlite3BtreePager(pDb->pBt);
90762 Pager *pPager = sqlite3BtreePager(pDb->pBt);
90792 returnSingleInt(pParse, "synchronous", pDb->safety_level-1);
90798 pDb->safety_level = getSafetyLevel(zRight)+1;
91475 sqlite3BtreeSetSafetyLevel(pDb->pBt, pDb->safety_level,
91626 Db *pDb;
91697 pDb = &db->aDb[iDb];
91698 if( pDb->pBt==0 ){
91708 sqlite3BtreeEnter(pDb->pBt);
91709 if( !sqlite3BtreeIsInReadTrans(pDb->pBt) ){
91710 rc = sqlite3BtreeBeginTrans(pDb->pBt, 0);
91736 sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);
91738 pDb->pSchema->schema_cookie = meta[BTREE_SCHEMA_VERSION-1];
91765 pDb->pSchema->enc = ENC(db);
91767 if( pDb->pSchema->cache_size==0 ){
91770 pDb->pSchema->cache_size = size;
91771 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
91780 pDb->pSchema->file_format = (u8)meta[BTREE_FILE_FORMAT-1];
91781 if( pDb->pSchema->file_format==0 ){
91782 pDb->pSchema->file_format = 1;
91784 if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
91849 sqlite3BtreeCommit(pDb->pBt);
91851 sqlite3BtreeLeave(pDb->pBt);
99034 Db *pDb = 0; /* Database to detach at end of vacuum */
99084 pDb = &db->aDb[db->nDb-1];
99085 assert( strcmp(pDb->zName,"vacuum_db")==0 );
99262 if( pDb ){
99263 sqlite3BtreeClose(pDb->pBt);
99264 pDb->pBt = 0;
99265 pDb->pSchema = 0;
110884 struct Db *pDb = &db->aDb[j];
110885 if( pDb->pBt ){
110886 sqlite3BtreeClose(pDb->pBt);
110887 pDb->pBt = 0;
110889 pDb->pSchema = 0;