Rename sqlite3SchemaFree() to sqlite3SchemaClear() to more accurately reflect
its function.
FossilOrigin-Name: 71d7440023f67760d0bff4bd7459fe88bd226f30
diff --git a/src/build.c b/src/build.c
index 39b6e84..41e7c79 100644
--- a/src/build.c
+++ b/src/build.c
@@ -406,14 +406,14 @@
Db *pDb = &db->aDb[iDb];
if( pDb->pSchema ){
assert(iDb==1 || (pDb->pBt && sqlite3BtreeHoldsMutex(pDb->pBt)));
- sqlite3SchemaFree(pDb->pSchema);
+ sqlite3SchemaClear(pDb->pSchema);
}
/* If any database other than TEMP is reset, then also reset TEMP
** since TEMP might be holding triggers that reference tables in the
** other database.
*/
if( iDb!=1 && (pDb = &db->aDb[1])!=0 && pDb->pSchema ){
- sqlite3SchemaFree(pDb->pSchema);
+ sqlite3SchemaClear(pDb->pSchema);
}
return;
}
@@ -425,7 +425,7 @@
Db *pDb = &db->aDb[i];
if( pDb->pSchema ){
assert(i==1 || (pDb->pBt && sqlite3BtreeHoldsMutex(pDb->pBt)));
- sqlite3SchemaFree(pDb->pSchema);
+ sqlite3SchemaClear(pDb->pSchema);
}
}
db->flags &= ~SQLITE_InternChanges;
diff --git a/src/callback.c b/src/callback.c
index fdee9bc..ce84908 100644
--- a/src/callback.c
+++ b/src/callback.c
@@ -400,12 +400,12 @@
/*
** Free all resources held by the schema structure. The void* argument points
** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the
-** pointer itself, it just cleans up subsiduary resources (i.e. the contents
+** pointer itself, it just cleans up subsidiary resources (i.e. the contents
** of the schema hash tables).
**
** The Schema.cache_size variable is not cleared.
*/
-void sqlite3SchemaFree(void *p){
+void sqlite3SchemaClear(void *p){
Hash temp1;
Hash temp2;
HashElem *pElem;
@@ -440,7 +440,7 @@
Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
Schema * p;
if( pBt ){
- p = (Schema *)sqlite3BtreeSchema(pBt, sizeof(Schema), sqlite3SchemaFree);
+ p = (Schema *)sqlite3BtreeSchema(pBt, sizeof(Schema), sqlite3SchemaClear);
}else{
p = (Schema *)sqlite3DbMallocZero(0, sizeof(Schema));
}
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index ba5552d..f7700b7 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -2969,7 +2969,7 @@
void sqlite3RegisterLikeFunctions(sqlite3*, int);
int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
void sqlite3MinimumFileFormat(Parse*, int, int);
-void sqlite3SchemaFree(void *);
+void sqlite3SchemaClear(void *);
Schema *sqlite3SchemaGet(sqlite3 *, Btree *);
int sqlite3SchemaToIndex(sqlite3 *db, Schema *);
KeyInfo *sqlite3IndexKeyinfo(Parse *, Index *);