1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Remove the aFKey hash table, which was not being used. Simplify the

FKey object.  Simplify the hash.c module since the copyKey parameter
formerly used only by aFKey is now no longer required. (CVS 6594)

FossilOrigin-Name: 80c43a355c6e482457abc2f9c3ad3a565cec55fb
This commit is contained in:
drh
2009-05-02 13:29:37 +00:00
parent 7895fdd452
commit e61922a6a1
8 changed files with 53 additions and 129 deletions

View File

@@ -13,7 +13,7 @@
** This file contains functions used to access the internal hash tables
** of user defined functions and collation sequences.
**
** $Id: callback.c,v 1.37 2009/03/24 15:08:10 drh Exp $
** $Id: callback.c,v 1.38 2009/05/02 13:29:38 drh Exp $
*/
#include "sqliteInt.h"
@@ -413,14 +413,13 @@ void sqlite3SchemaFree(void *p){
temp1 = pSchema->tblHash;
temp2 = pSchema->trigHash;
sqlite3HashInit(&pSchema->trigHash, 0);
sqlite3HashClear(&pSchema->aFKey);
sqlite3HashInit(&pSchema->trigHash);
sqlite3HashClear(&pSchema->idxHash);
for(pElem=sqliteHashFirst(&temp2); pElem; pElem=sqliteHashNext(pElem)){
sqlite3DeleteTrigger(0, (Trigger*)sqliteHashData(pElem));
}
sqlite3HashClear(&temp2);
sqlite3HashInit(&pSchema->tblHash, 0);
sqlite3HashInit(&pSchema->tblHash);
for(pElem=sqliteHashFirst(&temp1); pElem; pElem=sqliteHashNext(pElem)){
Table *pTab = sqliteHashData(pElem);
assert( pTab->dbMem==0 );
@@ -445,10 +444,9 @@ Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
if( !p ){
db->mallocFailed = 1;
}else if ( 0==p->file_format ){
sqlite3HashInit(&p->tblHash, 0);
sqlite3HashInit(&p->idxHash, 0);
sqlite3HashInit(&p->trigHash, 0);
sqlite3HashInit(&p->aFKey, 1);
sqlite3HashInit(&p->tblHash);
sqlite3HashInit(&p->idxHash);
sqlite3HashInit(&p->trigHash);
p->enc = SQLITE_UTF8;
}
return p;