- C Improved\slogging\sof\smaster-journal\sname\sconflicts.
- D 2011-12-16T15:11:39.468
-C Experimental\sfix\sfor\s[a1fa75cbdd].
-D 2011-12-16T13:24:27.257
++C Merge\sthe\sfix\sfor\s[a1fa75cbdd02]\sfrom\sthe\sexperimental\sbranch.\s\sAlso\nfix\sthe\spersistent-wal\smode\sfeature\sof\struncating\sthe\sWAL\son\sclose\sso\sthat\nit\salways\struncates\sthe\sWAL\sto\szero\sbytes.
++D 2011-12-16T15:38:52.854
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/vdbesort.c 468d43c057063e54da4f1988b38b4f46d60e7790
F src/vdbetrace.c d6e50e04e1ec498150e519058f617d91b8f5c843
F src/vtab.c e9318d88feac85be8e27ee783ac8f5397933fc8a
- F src/wal.c 7e6e7fe68ee649505dca38c8ab83eda0d0d96ae5
-F src/wal.c dc5c0606db24a1c6b982de212bfbf6e56ac1c01c
++F src/wal.c 8575f2bdaed48e7ffbea8608b614bb7abd382a54
F src/wal.h 66b40bd91bc29a5be1c88ddd1f5ade8f3f48728a
F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
F src/where.c af623942514571895818b9b7ae11db95ae3b3d88
F test/walhook.test ed00a40ba7255da22d6b66433ab61fab16a63483
F test/walmode.test 4022fe03ae6e830583672caa101f046438a0473c
F test/walnoshm.test 84ca10c544632a756467336b7c3b864d493ee496
--F test/walpersist.test 710b1b6cf6f8333e984f437724d1fa9e0511c5aa
++F test/walpersist.test 4d308b7f16470e85cb389636e59c455fe6b3a61a
F test/walro.test e6bb27762c9f22601cbb8bff6e0acfd124e74b63
F test/walshared.test 6dda2293880c300baf5d791c307f653094585761
F test/walslow.test e7be6d9888f83aa5d3d3c7c08aa9b5c28b93609a
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
- P cf3bccc2e944cd2dd3efb8554682994a06115f16
- R 9cdd098939326e460c36a0ff01e82e7f
-P 322bd15f97143d39b3a88d5f6cf7afb454e0666e
-R c026e9599d51ae1a18c03cd1d5a83b3e
-T *branch * experimental
-T *sym-experimental *
-T -sym-trunk *
-U dan
-Z 172fee4764ec1b8014a478816f19a037
++P b1005ef46cc2b46dd8e448ae1a9a9508bd5666ab 6492af76ea6585a1b377d69751af930c0ccfe688
++R 5e90bbe7156facb03e2de52b2217bc8c
+U drh
- Z f579d2bc7a13e23fcc9e8ceaf02a267f
++Z 290df3a9d2eb83a09d72442af4b2f315
*/
rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE);
if( rc==SQLITE_OK ){
-- int bPersistWal = -1;
if( pWal->exclusiveMode==WAL_NORMAL_MODE ){
pWal->exclusiveMode = WAL_EXCLUSIVE_MODE;
}
rc = sqlite3WalCheckpoint(
pWal, SQLITE_CHECKPOINT_PASSIVE, 0, 0, sync_flags, nBuf, zBuf, 0, 0
);
-- sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_PERSIST_WAL, &bPersistWal);
-- if( rc==SQLITE_OK && bPersistWal!=1 ){
-- isDelete = 1;
- }else{
- walLimitSize(pWal);
- }else if( pWal->mxWalSize>=0 ){
- walLimitSize(pWal, pWal->mxWalSize);
++ if( rc==SQLITE_OK ){
++ int bPersist = -1;
++ sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_PERSIST_WAL, &bPersist);
++ if( bPersist!=1 ){
++ /* Try to delete the WAL file if the checkpoint completed and
++ ** fsyned (rc==SQLITE_OK) and if we are not in persistent-wal
++ ** mode (!bPersist) */
++ isDelete = 1;
++ }else if( pWal->mxWalSize>=0 ){
++ /* Try to truncate the WAL file to zero bytes if the checkpoint
++ ** completed and fsynced (rc==SQLITE_OK) and we are in persistent
++ ** WAL mode (bPersist) and if the PRAGMA journal_size_limit is a
++ ** non-negative value (pWal->mxWalSize>=0). Note that we truncate
++ ** to zero bytes as truncating to the journal_size_limit might
++ ** leave a corrupt WAL file on disk. */
++ walLimitSize(pWal, 0);
++ }
}
}