diff options
author | drh <drh@noemail.net> | 2015-08-20 23:54:25 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-08-20 23:54:25 +0000 |
commit | 89a10b2d5312ce304906e2ee2f9932302ed2b85b (patch) | |
tree | efa18c5656cf051fb0d10a1576ec6f12f957dfc7 /src/main.c | |
parent | 87c44ef2f76229eeb5086e8e5ddb41a0fc6db150 (diff) | |
parent | 0fee5969c8928e4043416fdc6cdfff738ce40f55 (diff) | |
download | sqlite-89a10b2d5312ce304906e2ee2f9932302ed2b85b.tar.gz sqlite-89a10b2d5312ce304906e2ee2f9932302ed2b85b.zip |
Merge recent trunk enhancements, include table-valued functions.
FossilOrigin-Name: e9196d566690de0e9815f8cd85be7844322b5a79
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index d0545ccf1..fbb7da437 100644 --- a/src/main.c +++ b/src/main.c @@ -932,17 +932,23 @@ static void functionDestroy(sqlite3 *db, FuncDef *p){ static void disconnectAllVtab(sqlite3 *db){ #ifndef SQLITE_OMIT_VIRTUALTABLE int i; + HashElem *p; sqlite3BtreeEnterAll(db); for(i=0; i<db->nDb; i++){ Schema *pSchema = db->aDb[i].pSchema; if( db->aDb[i].pSchema ){ - HashElem *p; for(p=sqliteHashFirst(&pSchema->tblHash); p; p=sqliteHashNext(p)){ Table *pTab = (Table *)sqliteHashData(p); if( IsVirtual(pTab) ) sqlite3VtabDisconnect(db, pTab); } } } + for(p=sqliteHashFirst(&db->aModule); p; p=sqliteHashNext(p)){ + Module *pMod = (Module *)sqliteHashData(p); + if( pMod->pEpoTab ){ + sqlite3VtabDisconnect(db, pMod->pEpoTab); + } + } sqlite3VtabUnlockList(db); sqlite3BtreeLeaveAll(db); #else @@ -1120,6 +1126,7 @@ void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){ if( pMod->xDestroy ){ pMod->xDestroy(pMod->pAux); } + sqlite3VtabEponymousTableClear(db, pMod); sqlite3DbFree(db, pMod); } sqlite3HashClear(&db->aModule); |