1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Add extra OPTIMIZATION-IF-FALSE comments where required to pcache.c.

FossilOrigin-Name: 9d55b8f541de43deb82d460d32005fd62f5430b2
This commit is contained in:
dan
2016-05-12 17:06:04 +00:00
parent 91ef8ad42c
commit 82c0447701
3 changed files with 14 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
C For\sin-memory\sdatabases,\sit\sdoes\snot\smatter\sif\spcache\sentries\sare\smarked\n"clean"\sor\s"writable". C Add\sextra\sOPTIMIZATION-IF-FALSE\scomments\swhere\srequired\sto\spcache.c.
D 2016-05-12T12:08:48.058 D 2016-05-12T17:06:04.756
F Makefile.in 9eda6e1c90d05c199c3ec8a7069b0682ad307657 F Makefile.in 9eda6e1c90d05c199c3ec8a7069b0682ad307657
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc db82b35aef27f412fef14d8534afc022138bcdfd F Makefile.msc db82b35aef27f412fef14d8534afc022138bcdfd
@@ -367,7 +367,7 @@ F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
F src/pager.c baef5d8d31d220001fc61013f401c98950749201 F src/pager.c baef5d8d31d220001fc61013f401c98950749201
F src/pager.h 329bdf078a4e0a3b35084534d58625d21fd03681 F src/pager.h 329bdf078a4e0a3b35084534d58625d21fd03681
F src/parse.y 10eb2f3fb62341291528c7984498054731f9d31e F src/parse.y 10eb2f3fb62341291528c7984498054731f9d31e
F src/pcache.c 5291b6ab838132f856fe8067ca25772d221c4864 F src/pcache.c 3ef140add88d8d3eee3a80a79412f450bd216d3b
F src/pcache.h 33b40350df1b6c278e019dee37f87e1bac276223 F src/pcache.h 33b40350df1b6c278e019dee37f87e1bac276223
F src/pcache1.c 7f51d2b541aab57596adf62db2c4bb025d34f04d F src/pcache1.c 7f51d2b541aab57596adf62db2c4bb025d34f04d
F src/pragma.c faf42922bb7ab2f6672cb550356c1967abae3c84 F src/pragma.c faf42922bb7ab2f6672cb550356c1967abae3c84
@@ -1488,8 +1488,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 0dc50d9915cd88916229ca5c3834de82fa16f017 ad601c7962a60a11699cf31f1faee09b95d5c710 P 06c1e27ca868f247f8c27b03eb19aac004f28650
R 7667d141b3239c7f232de8ca756273cf R e01f1d97945350d1485afdc3dc2f5468
T +closed ad601c7962a60a11699cf31f1faee09b95d5c710 U dan
U drh Z fe74337e6648e1a589818404220bbdb0
Z 488a663f0afeb720045f9ee67fd9acb5

View File

@@ -1 +1 @@
06c1e27ca868f247f8c27b03eb19aac004f28650 9d55b8f541de43deb82d460d32005fd62f5430b2

View File

@@ -424,8 +424,11 @@ void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){
if( (--p->nRef)==0 ){ if( (--p->nRef)==0 ){
if( p->flags&PGHDR_CLEAN ){ if( p->flags&PGHDR_CLEAN ){
pcacheUnpin(p); pcacheUnpin(p);
}else if( p->pDirtyPrev!=0 ){ }else if( p->pDirtyPrev!=0 ){ /*OPTIMIZATION-IF-FALSE*/
/* Move the page to the head of the dirty list. */ /* Move the page to the head of the dirty list. If p->pDirtyPrev==0,
** then page p is already at the head of the dirty list and the
** following call would be a no-op. Hence the OPTIMIZATION-IF-FALSE
** tag above. */
pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT); pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);
} }
} }
@@ -460,7 +463,7 @@ void sqlite3PcacheDrop(PgHdr *p){
*/ */
void sqlite3PcacheMakeDirty(PgHdr *p){ void sqlite3PcacheMakeDirty(PgHdr *p){
assert( p->nRef>0 ); assert( p->nRef>0 );
if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){ if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){ /*OPTIMIZATION-IF-FALSE*/
p->flags &= ~PGHDR_DONT_WRITE; p->flags &= ~PGHDR_DONT_WRITE;
if( p->flags & PGHDR_CLEAN ){ if( p->flags & PGHDR_CLEAN ){
p->flags ^= (PGHDR_DIRTY|PGHDR_CLEAN); p->flags ^= (PGHDR_DIRTY|PGHDR_CLEAN);