/ Check-in [a13cfe61]
Login

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

Overview
Comment:Fix a faulty assert() in the WAL-mode logic for read-only shared memory.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a13cfe616284f4ee86f0406e7b8fe8f9ba6e6990
User & Date: drh 2011-06-02 17:24:49
Context
2011-06-03
12:15
Fix an #ifdef of SQLITE_OMIT_VIRTUALTABLE that had an extra "_" character. check-in: 93e0be2b user: drh tags: trunk
2011-06-02
17:24
Fix a faulty assert() in the WAL-mode logic for read-only shared memory. check-in: a13cfe61 user: drh tags: trunk
15:48
Add a missing check for out-of-memory in the lemon code generator. check-in: efb20b9d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

  2148   2148             break;
  2149   2149           }else if( rc!=SQLITE_BUSY ){
  2150   2150             return rc;
  2151   2151           }
  2152   2152         }
  2153   2153       }
  2154   2154       if( mxI==0 ){
  2155         -      assert( rc==SQLITE_BUSY );
         2155  +      assert( rc==SQLITE_BUSY || (pWal->readOnly & WAL_SHM_RDONLY)!=0 );
  2156   2156         return rc==SQLITE_BUSY ? WAL_RETRY : SQLITE_READONLY_CANTLOCK;
  2157   2157       }
  2158   2158   
  2159   2159       rc = walLockShared(pWal, WAL_READ_LOCK(mxI));
  2160   2160       if( rc ){
  2161   2161         return rc==SQLITE_BUSY ? WAL_RETRY : rc;
  2162   2162       }