/ Check-in [48c821fd]
Login

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

Overview
Comment:Ensure that if the "psow=0" URI option or FCNTL_POWERSAFE_OVERWRITE file-control is used to clear the power-safe overwrite flag, extra padding frames are added to the WAL file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 48c821fd97a8f03757c90560c37a46bd0843570e
User & Date: dan 2014-02-13 19:27:08
Context
2014-02-13
21:57
Improvements to the makefile and README for MSVC. check-in: b22b6140 user: mistachkin tags: trunk
19:27
Ensure that if the "psow=0" URI option or FCNTL_POWERSAFE_OVERWRITE file-control is used to clear the power-safe overwrite flag, extra padding frames are added to the WAL file. check-in: 48c821fd user: dan tags: trunk
19:10
Change README to README.md and expand it. Remove unrelated and obsolete files. check-in: 18d4e258 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

  1302   1302     }
  1303   1303   
  1304   1304     if( rc!=SQLITE_OK ){
  1305   1305       walIndexClose(pRet, 0);
  1306   1306       sqlite3OsClose(pRet->pWalFd);
  1307   1307       sqlite3_free(pRet);
  1308   1308     }else{
  1309         -    int iDC = sqlite3OsDeviceCharacteristics(pRet->pWalFd);
         1309  +    int iDC = sqlite3OsDeviceCharacteristics(pDbFd);
  1310   1310       if( iDC & SQLITE_IOCAP_SEQUENTIAL ){ pRet->syncHeader = 0; }
  1311   1311       if( iDC & SQLITE_IOCAP_POWERSAFE_OVERWRITE ){
  1312   1312         pRet->padToSectorBoundary = 0;
  1313   1313       }
  1314   1314       *ppWal = pRet;
  1315   1315       WALTRACE(("WAL%d: opened\n", pRet));
  1316   1316     }

Changes to test/unixexcl.test.

   105    105         sql2 { 
   106    106           BEGIN;
   107    107             SELECT * FROM t1;
   108    108         }
   109    109       } {1 2}
   110    110       do_test unixexcl-3.$tn.3 {
   111    111         sql1 { PRAGMA wal_checkpoint; INSERT INTO t1 VALUES(3, 4); }
   112         -    } {0 3 3}
          112  +    } {0 5 5}
   113    113       do_test unixexcl-3.$tn.4 {
   114    114         sql2 { SELECT * FROM t1; }
   115    115       } {1 2}
   116    116       do_test unixexcl-3.$tn.5 {
   117    117         sql1 { SELECT * FROM t1; }
   118    118       } {1 2 3 4}
   119    119       do_test unixexcl-3.$tn.6 {
   120    120         sql2 { COMMIT; SELECT * FROM t1; }
   121    121       } {1 2 3 4}
   122    122       do_test unixexcl-3.$tn.7 {
   123    123         sql1 { PRAGMA wal_checkpoint; }
   124         -    } {0 4 4}
          124  +    } {0 7 7}
   125    125     }
   126    126   }
   127    127   
   128    128   finish_test

Changes to test/zerodamage.test.

   111    111     do_test zerodamage-3.1 {
   112    112       db close
   113    113       sqlite3 db file:test.db?psow=FALSE -uri 1
   114    114       db eval {
   115    115          UPDATE t1 SET y=randomblob(50) WHERE x=124;
   116    116       }
   117    117       file size test.db-wal
   118         -  } {8416}
          118  +  } {16800}
   119    119   }
   120    120   
   121    121   finish_test