/ Check-in [51ee5188]
Login

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

Overview
Comment:Fix an LSM problem with read-only connections and compression (not compression-factory) callbacks.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 51ee5188b03c4b9508e94afaee4bf1f224aef28875efabda8ce09a5ab641d99e
User & Date: dan 2017-11-04 08:53:37
Context
2017-11-06
09:34
Fix a harmless compiler warning from Xcode 9.1. check-in: 66d98310 user: drh tags: trunk
2017-11-04
08:53
Fix an LSM problem with read-only connections and compression (not compression-factory) callbacks. check-in: 51ee5188 user: dan tags: trunk
2017-11-03
08:46
The extensions functions in spellfix are all deterministic. check-in: 29ec855e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/lsm1/lsm_shared.c.

   516    516       rc = lsmFsOpen(pDb, zName, p->bReadonly);
   517    517     }
   518    518   
   519    519     /* If the db handle is read-write, then connect to the system now. Run
   520    520     ** recovery as necessary. Or, if this is a read-only database handle,
   521    521     ** defer attempting to connect to the system until a read-transaction
   522    522     ** is opened.  */
   523         -  if( pDb->bReadonly==0 ){
   524         -    if( rc==LSM_OK ){
   525         -      rc = lsmFsConfigure(pDb);
   526         -    }
   527         -    if( rc==LSM_OK ){
   528         -      rc = doDbConnect(pDb);
   529         -    }
          523  +  if( rc==LSM_OK ){
          524  +    rc = lsmFsConfigure(pDb);
          525  +  }
          526  +  if( rc==LSM_OK && pDb->bReadonly==0 ){
          527  +    rc = doDbConnect(pDb);
   530    528     }
   531    529   
   532    530     return rc;
   533    531   }
   534    532   
   535    533   static void dbDeferClose(lsm_db *pDb){
   536    534     if( pDb->pFS ){