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

Merge the fix for the shared-cache KeyInfo cache bug from trunk.

FossilOrigin-Name: 5a73da6a3083926a3dafd28c0604122296dc9184
This commit is contained in:
drh
2014-12-05 20:05:10 +00:00
5 changed files with 78 additions and 8 deletions

View File

@@ -1032,6 +1032,14 @@ void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
for(j=0; j<db->nDb; j++){
struct Db *pDb = &db->aDb[j];
if( pDb->pBt ){
if( pDb->pSchema ){
/* Must clear the KeyInfo cache. See ticket [e4a18565a36884b00edf] */
for(i=sqliteHashFirst(&pDb->pSchema->idxHash); i; i=sqliteHashNext(i)){
Index *pIdx = sqliteHashData(i);
sqlite3KeyInfoUnref(pIdx->pKeyInfo);
pIdx->pKeyInfo = 0;
}
}
sqlite3BtreeClose(pDb->pBt);
pDb->pBt = 0;
if( j!=1 ){