]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a missing OPTIMIZATION-IF-FALSE comment to pcache.c.
authordan <dan@noemail.net>
Thu, 12 May 2016 09:48:23 +0000 (09:48 +0000)
committerdan <dan@noemail.net>
Thu, 12 May 2016 09:48:23 +0000 (09:48 +0000)
FossilOrigin-Name: bc202e5b418d5a57bfc766883c4417c94829d96e

manifest
manifest.uuid
src/pcache.c

index 6c5a26e09260cca49511b291a63ca40c461051f6..796ba4e54878245b242b8b6e9ca6a34f5fcb546d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sa\sredundant\scondition\sfrom\spcache.c.\sAdd\san\sOPTIMIZATION-IF-TRUE\scomment\sto\sanother\scondition\sthat\srequires\sit.
-D 2016-05-11T20:03:23.145
+C Add\sa\smissing\sOPTIMIZATION-IF-FALSE\scomment\sto\spcache.c.
+D 2016-05-12T09:48:23.099
 F Makefile.in 9eda6e1c90d05c199c3ec8a7069b0682ad307657
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc db82b35aef27f412fef14d8534afc022138bcdfd
@@ -367,7 +367,7 @@ F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
 F src/pager.c cb7a3990eabd895f6487c0856a7fec02b5e40faa
 F src/pager.h 329bdf078a4e0a3b35084534d58625d21fd03681
 F src/parse.y 10eb2f3fb62341291528c7984498054731f9d31e
-F src/pcache.c 95ee5008eddda9c61b8d053de8eebf72cf5df7c6
+F src/pcache.c 481e549dec06c01e8db84f80af835b3386a83bb0
 F src/pcache.h 6b865be765d1ebd06145219550b10921c7da7cc9
 F src/pcache1.c 7f51d2b541aab57596adf62db2c4bb025d34f04d
 F src/pragma.c faf42922bb7ab2f6672cb550356c1967abae3c84
@@ -1488,7 +1488,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 9cc8cad78fdfe044ad6726ebfe6909c1e242fa55
-R bd613f88cc94ba593741d724ce8bf946
+P 3bfd2621d13b4f842f3af6d35519653f4eb8cad7
+R 1f5b4032d8f04ae7caac9d7a76ea1776
 U dan
-Z ba94a14dc94ea0c9562dd2071f1152d6
+Z c8fcd1a1ab31e8e9159bebaf1a63834b
index 034ae63216ae2beef96d213fcad6c3a11ec5aff8..5372f9c927e6cffead36b448a080248049d40d4f 100644 (file)
@@ -1 +1 @@
-3bfd2621d13b4f842f3af6d35519653f4eb8cad7
\ No newline at end of file
+bc202e5b418d5a57bfc766883c4417c94829d96e
\ No newline at end of file
index 4051bee00e92cc81d0c4ed44ea3ff84a634fbd39..8634a7918894a7f5c01612a61ba6a728a930c1df 100644 (file)
@@ -124,7 +124,15 @@ static void pcacheManageDirtyList(PgHdr *pPage, u8 addRemove){
       }
     }
     p->pDirty = pPage;
-    if( !p->pSynced && 0==(pPage->flags&PGHDR_NEED_SYNC) ){
+
+    /* If pSynced is NULL and this page has a clear NEED_SYNC flag, set
+    ** pSynced to point to it. Checking the NEED_SYNC flag is an 
+    ** optimization, as if pSynced points to a page with the NEED_SYNC
+    ** flag set sqlite3PcacheFetchStress() searches through all newer 
+    ** entries of the dirty-list for a page with NEED_SYNC clear anyway.  */
+    if( !p->pSynced 
+     && 0==(pPage->flags&PGHDR_NEED_SYNC)   /*OPTIMIZATION-IF-FALSE*/
+    ){
       p->pSynced = pPage;
     }
   }