Lines Matching refs:pDb
5065 ** pStmt associated with the [database connection] pDb. ^If pStmt is NULL
5067 ** associated with the database connection pDb. ^If no prepared statement
5074 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
57715 ** in connection handle pDb. If such a database cannot be found, return
57722 static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
57723 int i = sqlite3FindDbName(pDb, zDb);
57733 pParse->db = pDb;
57751 return pDb->aDb[i].pBt;
64037 ** with database connection pDb. If pStmt is NULL, return the first
64041 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
64043 sqlite3_mutex_enter(pDb->mutex);
64045 pNext = (sqlite3_stmt*)pDb->pVdbe;
64049 sqlite3_mutex_leave(pDb->mutex);
65144 Db *pDb;
65159 Db *pDb;
65298 Db *pDb;
67842 Db *pDb;
67847 u.av.pDb = &db->aDb[pOp->p1];
67848 assert( u.av.pDb->pBt!=0 );
67853 rc = sqlite3BtreeUpdateMeta(u.av.pDb->pBt, pOp->p2, (int)pIn3->u.i);
67856 u.av.pDb->pSchema->schema_cookie = (int)pIn3->u.i;
67860 u.av.pDb->pSchema->file_format = (u8)pIn3->u.i;
67991 Db *pDb;
68005 u.ax.pDb = &db->aDb[u.ax.iDb];
68006 u.ax.pX = u.ax.pDb->pBt;
68011 if( u.ax.pDb->pSchema->file_format < p->minWriteFileFormat ){
68012 p->minWriteFileFormat = u.ax.pDb->pSchema->file_format;
69723 Db *pDb;
69729 u.bx.pDb = &db->aDb[pOp->p1];
69730 assert( u.bx.pDb->pBt!=0 );
69737 rc = sqlite3BtreeCreateTable(u.bx.pDb->pBt, &u.bx.pgno, u.bx.flags);
79416 Db *pDb;
79421 pDb = &db->aDb[iDb];
79429 if( (pStat = sqlite3FindTable(db, zTab, pDb->zName))==0 ){
79435 "CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
79447 "DELETE FROM %Q.%s WHERE %s=%Q", pDb->zName, zTab, zWhereType, zWhere
80644 Db *pDb = 0;
80651 pDb = &db->aDb[i];
80652 if( pDb->pBt==0 ) continue;
80653 if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
80669 if( sqlite3BtreeIsInReadTrans(pDb->pBt) || sqlite3BtreeIsInBackup(pDb->pBt) ){
80674 sqlite3BtreeClose(pDb->pBt);
80675 pDb->pBt = 0;
80676 pDb->pSchema = 0;
81609 Db *pDb = &db->aDb[iDb];
81611 assert( pDb->pSchema!=0 );
81612 sqlite3SchemaClear(pDb->pSchema);
81619 pDb = &db->aDb[1];
81620 assert( pDb->pSchema!=0 );
81621 sqlite3SchemaClear(pDb->pSchema);
81630 Db *pDb = &db->aDb[i];
81631 if( pDb->pSchema ){
81632 sqlite3SchemaClear(pDb->pSchema);
81646 struct Db *pDb = &db->aDb[i];
81647 if( pDb->pBt==0 ){
81648 sqlite3DbFree(db, pDb->zName);
81649 pDb->zName = 0;
81750 Db *pDb;
81757 pDb = &db->aDb[iDb];
81758 p = sqlite3HashInsert(&pDb->pSchema->tblHash, zTabName,
81811 Db *pDb;
81813 for(i=(db->nDb-1), pDb=&db->aDb[i]; i>=0; i--, pDb--){
81814 if( (!OMIT_TEMPDB || i!=1 ) && n==sqlite3Strlen30(pDb->zName) &&
81815 0==sqlite3StrICmp(pDb->zName, zName) ){
82806 Db *pDb = &db->aDb[iDb];
82808 if( pDb->pSchema->pSeqTab==0 ){
82811 pDb->zName
83070 Db *pDb;
83073 pDb = &db->aDb[iDb];
83074 pHash = &pDb->pSchema->tblHash;
83081 pHash = &pDb->pSchema->idxHash;
83209 Db *pDb = &db->aDb[iDb];
83242 pDb->zName, pTab->zName
83256 pDb->zName, SCHEMA_TABLE(iDb), pTab->zName);
83680 Db *pDb; /* The specific table containing the indexed database */
83742 pDb = &db->aDb[iDb];
83790 if( sqlite3FindIndex(db, zName, pDb->zName)!=0 ){
83813 const char *zDb = pDb->zName;
83890 if( pDb->pSchema->file_format>=4 ){
84773 Db *pDb = &db->aDb[i];
84774 if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zName)) ){
84890 Db *pDb; /* A single database */
84893 HashElem *k; /* For looping over tables in pDb */
84897 for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){
84898 assert( pDb!=0 );
84899 for(k=sqliteHashFirst(&pDb->pSchema->tblHash); k; k=sqliteHashNext(k)){
89188 Db *pDb; /* Database only autoinc table */
89200 pDb = &db->aDb[p->iDb];
89202 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
89203 sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);
89248 Db *pDb = &db->aDb[p->iDb];
89254 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
89255 sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
89423 Db *pDb; /* The database containing table being inserted into */
89459 pDb = &db->aDb[iDb];
89460 zDb = pDb->zName;
92381 Db *pDb; /* The specific database being pragmaed */
92392 pDb = &db->aDb[iDb];
92410 zDb = pId2->n>0 ? pDb->zName : 0;
92488 pDb->pSchema->cache_size = size;
92489 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
92505 Btree *pBt = pDb->pBt;
92530 Btree *pBt = pDb->pBt;
92607 assert(pDb==&db->aDb[0]);
92614 pPager = sqlite3BtreePager(pDb->pBt);
92685 Pager *pPager = sqlite3BtreePager(pDb->pBt);
92706 Btree *pBt = pDb->pBt;
92798 returnSingleInt(pParse, "cache_size", pDb->pSchema->cache_size);
92801 pDb->pSchema->cache_size = size;
92802 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
92888 Pager *pPager = sqlite3BtreePager(pDb->pBt);
92902 Pager *pPager = sqlite3BtreePager(pDb->pBt);
92932 returnSingleInt(pParse, "synchronous", pDb->safety_level-1);
92938 pDb->safety_level = getSafetyLevel(zRight,0,1)+1;
93625 sqlite3BtreeSetSafetyLevel(pDb->pBt, pDb->safety_level,
93776 Db *pDb;
93847 pDb = &db->aDb[iDb];
93848 if( pDb->pBt==0 ){
93858 sqlite3BtreeEnter(pDb->pBt);
93859 if( !sqlite3BtreeIsInReadTrans(pDb->pBt) ){
93860 rc = sqlite3BtreeBeginTrans(pDb->pBt, 0);
93886 sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);
93888 pDb->pSchema->schema_cookie = meta[BTREE_SCHEMA_VERSION-1];
93915 pDb->pSchema->enc = ENC(db);
93917 if( pDb->pSchema->cache_size==0 ){
93921 pDb->pSchema->cache_size = size;
93923 pDb->pSchema->cache_size = SQLITE_DEFAULT_CACHE_SIZE;
93925 sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
93934 pDb->pSchema->file_format = (u8)meta[BTREE_FILE_FORMAT-1];
93935 if( pDb->pSchema->file_format==0 ){
93936 pDb->pSchema->file_format = 1;
93938 if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
94003 sqlite3BtreeCommit(pDb->pBt);
94005 sqlite3BtreeLeave(pDb->pBt);
101218 Db *pDb = 0; /* Database to detach at end of vacuum */
101268 pDb = &db->aDb[db->nDb-1];
101269 assert( strcmp(pDb->zName,"vacuum_db")==0 );
101448 if( pDb ){
101449 sqlite3BtreeClose(pDb->pBt);
101450 pDb->pBt = 0;
101451 pDb->pSchema = 0;
113209 struct Db *pDb = &db->aDb[j];
113210 if( pDb->pBt ){
113211 sqlite3BtreeClose(pDb->pBt);
113212 pDb->pBt = 0;
113214 pDb->pSchema = 0;
124786 void *pdb = (void *)db;
124808 rc = sqlite3_create_function(db, zTest2, 0, any, pdb, intTestFunc, 0, 0);