From 613723d9fda58600335959dd38a31968e1323bd9 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 12 May 2016 09:48:23 +0000 Subject: [PATCH] Add a missing OPTIMIZATION-IF-FALSE comment to pcache.c. FossilOrigin-Name: bc202e5b418d5a57bfc766883c4417c94829d96e --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/pcache.c | 10 +++++++++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 6c5a26e092..796ba4e548 100644 --- 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 diff --git a/manifest.uuid b/manifest.uuid index 034ae63216..5372f9c927 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3bfd2621d13b4f842f3af6d35519653f4eb8cad7 \ No newline at end of file +bc202e5b418d5a57bfc766883c4417c94829d96e \ No newline at end of file diff --git a/src/pcache.c b/src/pcache.c index 4051bee00e..8634a79188 100644 --- a/src/pcache.c +++ b/src/pcache.c @@ -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; } }