Rename sqlite3SchemaFree() to sqlite3SchemaClear() to more accurately reflect

its function.

FossilOrigin-Name: 71d7440023f67760d0bff4bd7459fe88bd226f30
This commit is contained in:
drh 2011-04-04 13:40:53 +00:00
parent e038f852c8
commit b6ee66072e
5 changed files with 16 additions and 16 deletions

View File

@ -1,5 +1,5 @@
C Merge\sin\sthe\slatest\schanges\sfrom\strunk.
D 2011-04-04T13:07:02.051
C Rename\ssqlite3SchemaFree()\sto\ssqlite3SchemaClear()\sto\smore\saccurately\sreflect\nits\sfunction.
D 2011-04-04T13:40:53.775
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 7a4d9524721d40ef9ee26f93f9bd6a51dba106f2
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -124,8 +124,8 @@ F src/btmutex.c 3e595ee1bb99e3a1f16824137b435ffc97c98e5f
F src/btree.c 107723ed4f9bdb55213ba6164c30c49af75f4bf9
F src/btree.h a840a20c1969391f98ee06960d5ee2dc460186b3
F src/btreeInt.h 6714ce2f5e879eb9a904a6a4575dc4faa4f29991
F src/build.c 0dd1fd5a9d38534e99d7ed70c325647917e571c5
F src/callback.c 5069f224882cbdccd559f591271d28d7f37745bc
F src/build.c 3377719d96750d6a64b46237f81c6763220e7662
F src/callback.c 0425c6320730e6d3981acfb9202c1bed9016ad1a
F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
F src/ctime.c 52ff72f966cee3087e0138a3ec69371c22be3c01
F src/date.c 1548fdac51377e4e7833251de878b4058c148e1b
@ -180,7 +180,7 @@ F src/select.c d24406c45dd2442eb2eeaac413439066b149c944
F src/shell.c 9dc0b4bb59290c0a35256d278cab0f314987ad6a
F src/sqlite.h.in e047f69a61d604d4f8be6cf1d1bdfc68be9ba7e5
F src/sqlite3ext.h c90bd5507099f62043832d73f6425d8d5c5da754
F src/sqliteInt.h d45b0b1db417d5308e3bf9c8983aaf2d06e7cd36
F src/sqliteInt.h 56a866476ad9b6907ce1e12fef5e97288cb68b0f
F src/sqliteLimit.h a17dcd3fb775d63b64a43a55c54cb282f9726f44
F src/status.c 4997380fbb915426fef9e500b4872e79c99267fc
F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e
@ -926,7 +926,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 0d99229a7a58da07748072326f6261c533c1958f 425e3edb146c497817855dd741878709a25c8b98
R 0ccaf0f101b400777a3c1e84b0615efa
P 47b79c40cf07048f682c44bfef533d4764b20c4d
R 7d7c24df127ba94f05b0be76158e8cae
U drh
Z 3368f164313f101c42a8e8263501ee32
Z 2de83a94583ece938e6b46c216a1a66c

View File

@ -1 +1 @@
47b79c40cf07048f682c44bfef533d4764b20c4d
71d7440023f67760d0bff4bd7459fe88bd226f30

View File

@ -406,14 +406,14 @@ void sqlite3ResetInternalSchema(sqlite3 *db, int iDb){
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 @@ void sqlite3ResetInternalSchema(sqlite3 *db, int iDb){
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;

View File

@ -400,12 +400,12 @@ FuncDef *sqlite3FindFunction(
/*
** 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 @@ void sqlite3SchemaFree(void *p){
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));
}

View File

@ -2969,7 +2969,7 @@ void sqlite3DefaultRowEst(Index*);
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 *);