/ Check-in [3ddc7e4c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a missing mutex around calls to clear the KeyInfo cache when closing a database connection.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.8.7
Files: files | file ages | folders
SHA1: 3ddc7e4c7778a6708856776471ded65f78825487
User & Date: drh 2014-12-08 17:45:04
Context
2014-12-08
18:08
Add a missing mutex around calls to clear the KeyInfo cache when closing a database connection. check-in: 7047ce32 user: drh tags: trunk
18:02
Increase the version number to 3.8.7.4. check-in: 33c90027 user: drh tags: branch-3.8.7
17:45
Add a missing mutex around calls to clear the KeyInfo cache when closing a database connection. check-in: 3ddc7e4c user: drh tags: branch-3.8.7
2014-12-05
22:29
Version 3.8.7.3 check-in: 647e77e8 user: drh tags: release, version-3.8.7.3, branch-3.8.7
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

   928    928   
   929    929     /* Close all database connections */
   930    930     for(j=0; j<db->nDb; j++){
   931    931       struct Db *pDb = &db->aDb[j];
   932    932       if( pDb->pBt ){
   933    933         if( pDb->pSchema ){
   934    934           /* Must clear the KeyInfo cache.  See ticket [e4a18565a36884b00edf] */
          935  +        sqlite3BtreeEnter(pDb->pBt);
   935    936           for(i=sqliteHashFirst(&pDb->pSchema->idxHash); i; i=sqliteHashNext(i)){
   936    937             Index *pIdx = sqliteHashData(i);
   937    938             sqlite3KeyInfoUnref(pIdx->pKeyInfo);
   938    939             pIdx->pKeyInfo = 0;
   939    940           }
          941  +        sqlite3BtreeLeave(pDb->pBt);
   940    942         }
   941    943         sqlite3BtreeClose(pDb->pBt);
   942    944         pDb->pBt = 0;
   943    945         if( j!=1 ){
   944    946           pDb->pSchema = 0;
   945    947         }
   946    948       }