Home
last modified time | relevance | path

Searched refs:pSchema (Results 1 – 25 of 30) sorted by relevance

12

/sqlite-3.40.0/src/
H A Dstatus.c297 Schema *pSchema = db->aDb[i].pSchema; in sqlite3_db_status() local
298 if( ALWAYS(pSchema!=0) ){ in sqlite3_db_status()
302 pSchema->tblHash.count in sqlite3_db_status()
303 + pSchema->trigHash.count in sqlite3_db_status()
304 + pSchema->idxHash.count in sqlite3_db_status()
305 + pSchema->fkeyHash.count in sqlite3_db_status()
307 nByte += sqlite3_msize(pSchema->tblHash.ht); in sqlite3_db_status()
308 nByte += sqlite3_msize(pSchema->trigHash.ht); in sqlite3_db_status()
309 nByte += sqlite3_msize(pSchema->idxHash.ht); in sqlite3_db_status()
310 nByte += sqlite3_msize(pSchema->fkeyHash.ht); in sqlite3_db_status()
[all …]
H A Dtrigger.c56 pTmpSchema = pParse->db->aDb[1].pSchema; in sqlite3TriggerList()
61 if( pTrig->pTabSchema==pTab->pSchema in sqlite3TriggerList()
75 pTrig->pTabSchema = pTab->pSchema; in sqlite3TriggerList()
166 && pTab->pSchema==db->aDb[1].pSchema ){ in sqlite3BeginTrigger()
261 pTrigger->pSchema = db->aDb[iDb].pSchema; in sqlite3BeginTrigger()
675 assert( (pTable && pTable->pSchema==pTrigger->pSchema) || iDb==1 ); in sqlite3DropTriggerPtr()
863 Schema *pSchema = pStep->pTrig->pSchema; in sqlite3TriggerStepSrc() local
865 if( pSchema!=db->aDb[1].pSchema ){ in sqlite3TriggerStepSrc()
866 pSrc->a[0].pSchema = pSchema; in sqlite3TriggerStepSrc()
1393 assert( p->pSchema!=0 ); in sqlite3CodeRowTrigger()
[all …]
H A Dattach.c113 pNew->pSchema = 0; in attachFunc()
177 pNew->pSchema = sqlite3SchemaGet(db, pNew->pBt); in attachFunc()
178 if( !pNew->pSchema ){ in attachFunc()
180 }else if( pNew->pSchema->file_format && pNew->pSchema->enc!=ENC(db) ){ in attachFunc()
233 db->aDb[iDb].pSchema = 0; in attachFunc()
305 assert( db->aDb[1].pSchema ); in detachFunc()
309 if( pTrig->pTabSchema==pDb->pSchema ){ in detachFunc()
310 pTrig->pTabSchema = pTrig->pSchema; in detachFunc()
317 pDb->pSchema = 0; in detachFunc()
479 pItem->pSchema = pFix->pSchema; in fixSelectCb()
[all …]
H A Dcallback.c492 Schema *pSchema = (Schema *)p; in sqlite3SchemaClear() local
496 temp1 = pSchema->tblHash; in sqlite3SchemaClear()
497 temp2 = pSchema->trigHash; in sqlite3SchemaClear()
498 sqlite3HashInit(&pSchema->trigHash); in sqlite3SchemaClear()
499 sqlite3HashClear(&pSchema->idxHash); in sqlite3SchemaClear()
504 sqlite3HashInit(&pSchema->tblHash); in sqlite3SchemaClear()
510 sqlite3HashClear(&pSchema->fkeyHash); in sqlite3SchemaClear()
511 pSchema->pSeqTab = 0; in sqlite3SchemaClear()
512 if( pSchema->schemaFlags & DB_SchemaLoaded ){ in sqlite3SchemaClear()
513 pSchema->iGeneration++; in sqlite3SchemaClear()
[all …]
H A Dbuild.c217 pSchema = db->aDb[iDb].pSchema; in sqlite3FinishCoding()
547 Schema *pSchema = db->aDb[j].pSchema; in sqlite3FindIndex() local
834 assert( pIndex->pSchema==pTable->pSchema in deleteTable()
1314 pTable->pSchema = db->aDb[iDb].pSchema; in sqlite3StartTable()
1472 pRet->retTrig.pSchema = db->aDb[1].pSchema; in sqlite3AddReturning()
2918 Schema *pSchema = p->pSchema; in sqlite3EndTable() local
3307 assert( pIdx->pSchema==pTab->pSchema ); in destroyTable()
3372 assert( pTrigger->pSchema==pTab->pSchema || in sqlite3CodeDropTable()
3373 pTrigger->pSchema==db->aDb[1].pSchema ); in sqlite3CodeDropTable()
3981 if( iDb==1 && db->aDb[iDb].pSchema!=pTab->pSchema ){ in sqlite3CreateIndex()
[all …]
H A Dprepare.c214 assert( db->aDb[iDb].pSchema ); in sqlite3InitOne()
320 pDb->pSchema->enc = ENC(db); in sqlite3InitOne()
322 if( pDb->pSchema->cache_size==0 ){ in sqlite3InitOne()
326 pDb->pSchema->cache_size = size; in sqlite3InitOne()
328 pDb->pSchema->cache_size = SQLITE_DEFAULT_CACHE_SIZE; in sqlite3InitOne()
340 if( pDb->pSchema->file_format==0 ){ in sqlite3InitOne()
341 pDb->pSchema->file_format = 1; in sqlite3InitOne()
522 if( cookie!=db->aDb[iDb].pSchema->schema_cookie ){ in schemaIsValid()
541 int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){ in sqlite3SchemaToIndex() argument
556 if( pSchema ){ in sqlite3SchemaToIndex()
[all …]
H A Dvdbevtab.c206 Schema *pSchema; in bytecodevtabColumn() local
211 pSchema = db->aDb[iDb].pSchema; in bytecodevtabColumn()
213 for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){ in bytecodevtabColumn()
222 for(k=sqliteHashFirst(&pSchema->idxHash); k; k=sqliteHashNext(k)){ in bytecodevtabColumn()
H A Dpragma.c537 pDb->pSchema->cache_size = size; in sqlite3Pragma()
841 returnSingleInt(v, pDb->pSchema->cache_size); in sqlite3Pragma()
844 pDb->pSchema->cache_size = size; in sqlite3Pragma()
1245 pHash = &db->aDb[ii].pSchema->tblHash; in sqlite3Pragma()
1264 pHash = &db->aDb[ii].pSchema->tblHash; in sqlite3Pragma()
1337 int iIdxDb = sqlite3SchemaToIndex(db, pIdx->pSchema); in sqlite3Pragma()
1513 k = sqliteHashFirst(&db->aDb[iDb].pSchema->tblHash); in sqlite3Pragma()
1523 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3Pragma()
1704 pTbls = &db->aDb[i].pSchema->tblHash; in sqlite3Pragma()
2331 Schema *pSchema; /* The current schema */ in sqlite3Pragma() local
[all …]
H A Dresolve.c248 Schema *pSchema = 0; /* Schema of the expression */ in lookupName() local
280 pSchema = db->aDb[i].pSchema; in lookupName()
287 pSchema = db->aDb[0].pSchema; in lookupName()
360 if( pTab->pSchema!=pSchema ) continue; in lookupName()
361 if( pSchema==0 && strcmp(zDb,"*")!=0 ) continue; in lookupName()
424 pSchema = pExpr->y.pTab->pSchema; in lookupName()
469 pSchema = pTab->pSchema; in lookupName()
742 sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList); in lookupName()
2123 if( pTab->pSchema!=pParse->db->aDb[1].pSchema ){ in sqlite3ResolveSelfReference()
H A Dfkey.c677 return (FKey *)sqlite3HashFind(&pTab->pSchema->fkeyHash, pTab->zName); in sqlite3FkReferences()
706 Hash *pHash = &db->aDb[iDb].pSchema->tblHash; in sqlite3FkClearTriggerCache()
908 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3FkCheck()
1319 int iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in fkActionTrigger()
1392 pTrigger->pSchema = pTab->pSchema; in fkActionTrigger()
1393 pTrigger->pTabSchema = pTab->pSchema; in fkActionTrigger()
1444 assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema) ); in sqlite3FkDelete()
1453 sqlite3HashInsert(&pTab->pSchema->fkeyHash, z, p); in sqlite3FkDelete()
H A Dvtab.c243 assert( db==0 || sqlite3SchemaMutexHeld(db, 0, p->pSchema) ); in vtabDisconnectAll()
422 int iDb = sqlite3SchemaToIndex(db, pTable->pSchema); in sqlite3VtabBeginParse()
487 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3VtabFinishParse()
513 Schema *pSchema = pTab->pSchema; in sqlite3VtabFinishParse() local
517 pOld = sqlite3HashInsert(&pSchema->tblHash, zName, pTab); in sqlite3VtabFinishParse()
602 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in vtabCallConstructor()
1247 pTab->pSchema = db->aDb[0].pSchema; in sqlite3VtabEponymousTableInit()
H A Danalyze.c1015 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in analyzeOneTable()
1110 assert( iDb==sqlite3SchemaToIndex(db, pIdx->pSchema) ); in analyzeOneTable()
1344 Schema *pSchema = db->aDb[iDb].pSchema; /* Schema of database iDb */ in analyzeDatabase() local
1357 for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){ in analyzeDatabase()
1375 iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); in analyzeTable()
1872 Schema *pSchema = db->aDb[iDb].pSchema; local
1880 for(i=sqliteHashFirst(&pSchema->tblHash); i; i=sqliteHashNext(i)){
1884 for(i=sqliteHashFirst(&pSchema->idxHash); i; i=sqliteHashNext(i)){
1911 for(i=sqliteHashFirst(&pSchema->idxHash); i; i=sqliteHashNext(i)){
1923 for(i=sqliteHashFirst(&pSchema->idxHash); i; i=sqliteHashNext(i)){
H A Dvdbeblob.c188 pBlob->zDb = db->aDb[sqlite3SchemaToIndex(db, pTab->pSchema)].zDbSName; in sqlite3_blob_open()
276 int iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3_blob_open()
280 pTab->pSchema->schema_cookie, in sqlite3_blob_open()
281 pTab->pSchema->iGeneration); in sqlite3_blob_open()
H A Dbtmutex.c252 int sqlite3SchemaMutexHeld(sqlite3 *db, int iDb, Schema *pSchema){ in sqlite3SchemaMutexHeld() argument
256 if( pSchema ) iDb = sqlite3SchemaToIndex(db, pSchema); in sqlite3SchemaMutexHeld()
H A Dinsert.c408 assert( pParse->db->aDb[iDb].pSchema!=0 ); in autoIncBegin()
414 Table *pSeqTab = pParse->db->aDb[iDb].pSchema->pSeqTab; in autoIncBegin()
485 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) ); in sqlite3AutoincrementBegin()
548 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) ); in autoIncrementEnd()
755 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3Insert()
2507 if( pTab->pSchema->file_format<2 ) return; in sqlite3SetMakeRecordP5()
2665 iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); in sqlite3OpenTableAndIndices()
2679 assert( pIdx->pSchema==pTab->pSchema ); in sqlite3OpenTableAndIndices()
2865 if( pSrc->tnum==pDest->tnum && pSrc->pSchema==pDest->pSchema ){ in xferOptimization()
2965 if( pSrcIdx->tnum==pDestIdx->tnum && pSrc->pSchema==pDest->pSchema in xferOptimization()
[all …]
H A Dauth.c143 Schema *pSchema, /* The schema of the expression */ in sqlite3AuthRead() argument
155 iDb = sqlite3SchemaToIndex(pParse->db, pSchema); in sqlite3AuthRead()
H A Dmain.c1163 Schema *pSchema = db->aDb[i].pSchema; in disconnectAllVtab() local
1164 if( pSchema ){ in disconnectAllVtab()
1165 for(p=sqliteHashFirst(&pSchema->tblHash); p; p=sqliteHashNext(p)){ in disconnectAllVtab()
1338 pDb->pSchema = 0; in sqlite3LeaveMutexAndCloseZombie()
1343 if( db->aDb[1].pSchema ){ in sqlite3LeaveMutexAndCloseZombie()
1344 sqlite3SchemaClear(db->aDb[1].pSchema); in sqlite3LeaveMutexAndCloseZombie()
1405 sqlite3DbFree(db, db->aDb[1].pSchema); in sqlite3LeaveMutexAndCloseZombie()
3416 db->aDb[0].pSchema = sqlite3SchemaGet(db, db->aDb[0].pBt); in openDatabase()
3421 db->aDb[1].pSchema = sqlite3SchemaGet(db, 0); in openDatabase()
4019 assert( db==0 || db->aDb[0].pSchema!=0 ); in sqlite3_test_control()
[all …]
H A Ddelete.c150 int iDb = sqlite3SchemaToIndex(db, pView->pSchema); in sqlite3MaterializeView()
380 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3DeleteFrom()
475 assert( pIdx->pSchema==pTab->pSchema ); in sqlite3DeleteFrom()
H A Dalter.c145 iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); in sqlite3AlterRenameTable()
334 iDb = sqlite3SchemaToIndex(db, pNew->pSchema); in sqlite3AlterFinishAddColumn()
512 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3AlterBeginAddColumn()
543 pNew->pSchema = db->aDb[iDb].pSchema; in sqlite3AlterBeginAddColumn()
615 iSchema = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3AlterRenameColumn()
1785 && sCtx.pTab->pSchema==pTrigger->pTabSchema in renameTableFunc()
2174 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in sqlite3AlterDropColumn()
H A Dvacuum.c244 sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size); in sqlite3RunVacuum()
403 pDb->pSchema = 0; in sqlite3RunVacuum()
H A DsqliteInt.h1323 Schema *pSchema; /* Pointer to database schema (possibly shared) */ member
1361 #define DbHasProperty(D,I,P) (((D)->aDb[I].pSchema->schemaFlags&(P))==(P))
1362 #define DbHasAnyProperty(D,I,P) (((D)->aDb[I].pSchema->schemaFlags&(P))!=0)
1363 #define DbSetProperty(D,I,P) (D)->aDb[I].pSchema->schemaFlags|=(P)
1364 #define DbClearProperty(D,I,P) (D)->aDb[I].pSchema->schemaFlags&=~(P)
1683 #define SCHEMA_ENC(db) ((db)->aDb[0].pSchema->enc)
2310 Schema *pSchema; /* Schema that contains this table */ member
2614 Schema *pSchema; /* Schema containing this index */ member
3113 Schema *pSchema; /* Schema to which this item is fixed */ member
3840 Schema *pSchema; /* Schema containing the trigger */ member
[all …]
H A DbtreeInt.h448 void *pSchema; /* Pointer to space allocated by sqlite3BtreeSchema() */ member
H A Dselect.c1662 int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); in generateSortTail()
1953 if( pNC->pParse && pTab->pSchema ){ in columnTypeImpl()
1954 int iDb = sqlite3SchemaToIndex(pNC->pParse->db, pTab->pSchema); in columnTypeImpl()
5811 && pTab->pSchema!=db->aDb[1].pSchema in selectExpander()
5933 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); in selectExpander()
6493 if( pItem->pTab->pSchema!=pThis->pTab->pSchema ) continue; in isSelfJoinView()
6496 if( pItem->pTab->pSchema==0 && pThis->pSelect->selId!=pS1->selId ){ in isSelfJoinView()
7727 const int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); in sqlite3Select()
H A Dbtree.c185 Schema *pSchema = (Schema *)pBtree->pBt->pSchema; in hasSharedCacheTableLock() local
204 if( isIndex && (!pSchema || (pSchema->schemaFlags&DB_SchemaLoaded)==0) ){ in hasSharedCacheTableLock()
215 for(p=sqliteHashFirst(&pSchema->idxHash); p; p=sqliteHashNext(p)){ in hasSharedCacheTableLock()
2855 if( pBt->xFreeSchema && pBt->pSchema ){ in sqlite3BtreeClose()
2856 pBt->xFreeSchema(pBt->pSchema); in sqlite3BtreeClose()
2858 sqlite3DbFree(0, pBt->pSchema); in sqlite3BtreeClose()
10905 if( !pBt->pSchema && nBytes ){ in sqlite3BtreeSchema()
10906 pBt->pSchema = sqlite3DbMallocZero(0, nBytes); in sqlite3BtreeSchema()
10910 return pBt->pSchema; in sqlite3BtreeSchema()
/sqlite-3.40.0/ext/expert/
H A Dsqlite3expert.c1397 sqlite3_stmt *pSchema = 0; in idxCreateVtabSchema() local
1404 rc = idxPrepareStmt(p->db, &pSchema, pzErrmsg, in idxCreateVtabSchema()
1413 while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSchema) ){ in idxCreateVtabSchema()
1414 const char *zType = (const char*)sqlite3_column_text(pSchema, 0); in idxCreateVtabSchema()
1415 const char *zName = (const char*)sqlite3_column_text(pSchema, 1); in idxCreateVtabSchema()
1416 const char *zSql = (const char*)sqlite3_column_text(pSchema, 2); in idxCreateVtabSchema()
1452 idxFinalize(&rc, pSchema); in idxCreateVtabSchema()

12