]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove the code that tries to detect OOO header writes on a WAL recovery.
authordrh <drh@noemail.net>
Tue, 20 Dec 2011 22:18:51 +0000 (22:18 +0000)
committerdrh <drh@noemail.net>
Tue, 20 Dec 2011 22:18:51 +0000 (22:18 +0000)
The code is made obsolete by syncing the WAL header.

FossilOrigin-Name: 7ac713a14e24c48651c2a97acc9839850fa7f3c3

manifest
manifest.uuid
src/wal.c

index 5a218072ca5b0572c82726a30d90558033b81d22..f43cdd027220a5e9479914308ce33738be7c450e 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Refactor\sthe\ssqlite3WalFrames()\sroutine\sfor\sclarity\sof\spresentation.\nDo\sthe\spadded\stransaction\ssync\sas\sthe\swrite\spointer\scrosses\sthe\sfinal\nsector\sboundary\sinstead\sof\sat\sthe\send,\sfor\sefficiency.\s\sAlways\ssync\nthe\sWAL\sheader\simmediately\safter\sit\sis\swritten.
-D 2011-12-20T20:13:25.386
+C Remove\sthe\scode\sthat\stries\sto\sdetect\sOOO\sheader\swrites\son\sa\sWAL\srecovery.\nThe\scode\sis\smade\sobsolete\sby\ssyncing\sthe\sWAL\sheader.
+D 2011-12-20T22:18:51.258
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -250,7 +250,7 @@ F src/vdbemem.c 2fc78b3e0fabcc1eaa23cd79dd2e30e6dcfe1e56
 F src/vdbesort.c 468d43c057063e54da4f1988b38b4f46d60e7790
 F src/vdbetrace.c d6e50e04e1ec498150e519058f617d91b8f5c843
 F src/vtab.c e9318d88feac85be8e27ee783ac8f5397933fc8a
-F src/wal.c 311c36af11a721f8601371c1a5a9b15c84ec2dee
+F src/wal.c 86193db30a696ee46a0a0ee052e0cbb9aa6802cb
 F src/wal.h 42f8313f7aaf8913e2d1fdf7b47025c23491ea1d
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
 F src/where.c af623942514571895818b9b7ae11db95ae3b3d88
@@ -984,7 +984,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P e694f7b166144a0afba7846e1e18ad568b33a081
-R 5ba56fa16752a6d0272db759071cab34
+P 92c73b421b6242b09247dfb759777a531a107523
+R 0e9b80c28c07203b08d85530f30aefdc
 U drh
-Z ae8908dc690fbf93e21d9e8cf0a20f23
+Z 960abf57a2870882cf541fd88a471911
index f885437af4371bb1d04e5b82fda71fe514f207d3..e405f4958a5fec79ed3aa9d4194e51edff380ce9 100644 (file)
@@ -1 +1 @@
-92c73b421b6242b09247dfb759777a531a107523
\ No newline at end of file
+7ac713a14e24c48651c2a97acc9839850fa7f3c3
\ No newline at end of file
index d61bfc069fff979611e78a855fbcddfc6a592b7a..ff33d5f30dc843292b0b712411110d8bafc83998 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -1163,15 +1163,8 @@ static int walIndexRecover(Wal *pWal){
       iFrame++;
       rc = sqlite3OsRead(pWal->pWalFd, aFrame, szFrame, iOffset);
       if( rc!=SQLITE_OK ) break;
-      if( sqlite3Get4byte(&aFrame[8]) ==
-            1+sqlite3Get4byte((u8*)&pWal->hdr.aSalt[0]) ){
-        pWal->hdr.mxFrame = 0;
-        pWal->hdr.nPage = 0;
-        break;
-      }
-      if( !isValid ) continue;
       isValid = walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame);
-      if( !isValid ) continue;
+      if( !isValid ) break;
       rc = walIndexAppend(pWal, iFrame, pgno);
       if( rc!=SQLITE_OK ) break;