/ Check-in [56a17dae]
Login

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

Overview
Comment:After throwing an error to say that one cannot change into WAL mode within a tranactions, do not then go and change into WAL mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 56a17dae91600a3863903f8d654ed52a0f720caf
User & Date: drh 2010-05-06 16:06:38
Context
2010-05-06
17:28
Fix a bug whereby an old snapshot could be checkpointed (and subsequent transactions discarded) if the last connection to disconnect from a WAL database happended to be holding an out-of-date wal-index header. check-in: d0c0034b user: dan tags: trunk
16:06
After throwing an error to say that one cannot change into WAL mode within a tranactions, do not then go and change into WAL mode. check-in: 56a17dae user: drh tags: trunk
15:56
Further coverage tests. check-in: 98a9713e user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

5253
5254
5255
5256
5257
5258
5259

5260
5261
5262
5263
5264
5265
5266
    ){
      if( !db->autoCommit || db->activeVdbeCnt>1 ){
        rc = SQLITE_ERROR;
        sqlite3SetString(&p->zErrMsg, db, 
            "cannot change %s wal mode from within a transaction",
            (eNew==PAGER_JOURNALMODE_WAL ? "into" : "out of")
        );

      }else{
  
        if( eOld==PAGER_JOURNALMODE_WAL ){
          /* If leaving WAL mode, close the log file. If successful, the call
          ** to PagerCloseWal() checkpoints and deletes the write-ahead-log 
          ** file. An EXCLUSIVE lock may still be held on the database file 
          ** after a successful return. 







>







5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
    ){
      if( !db->autoCommit || db->activeVdbeCnt>1 ){
        rc = SQLITE_ERROR;
        sqlite3SetString(&p->zErrMsg, db, 
            "cannot change %s wal mode from within a transaction",
            (eNew==PAGER_JOURNALMODE_WAL ? "into" : "out of")
        );
        break;
      }else{
  
        if( eOld==PAGER_JOURNALMODE_WAL ){
          /* If leaving WAL mode, close the log file. If successful, the call
          ** to PagerCloseWal() checkpoints and deletes the write-ahead-log 
          ** file. An EXCLUSIVE lock may still be held on the database file 
          ** after a successful return.