mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add a missing mutex around calls to clear the KeyInfo cache when closing
a database connection. FossilOrigin-Name: 7047ce32a234484b8ba15311e6560aa74ff692c9
This commit is contained in:
@@ -1034,11 +1034,13 @@ void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
|
||||
if( pDb->pBt ){
|
||||
if( pDb->pSchema ){
|
||||
/* Must clear the KeyInfo cache. See ticket [e4a18565a36884b00edf] */
|
||||
sqlite3BtreeEnter(pDb->pBt);
|
||||
for(i=sqliteHashFirst(&pDb->pSchema->idxHash); i; i=sqliteHashNext(i)){
|
||||
Index *pIdx = sqliteHashData(i);
|
||||
sqlite3KeyInfoUnref(pIdx->pKeyInfo);
|
||||
pIdx->pKeyInfo = 0;
|
||||
}
|
||||
sqlite3BtreeLeave(pDb->pBt);
|
||||
}
|
||||
sqlite3BtreeClose(pDb->pBt);
|
||||
pDb->pBt = 0;
|
||||
|
Reference in New Issue
Block a user