From: drh Date: Fri, 30 Dec 2016 13:55:50 +0000 (+0000) Subject: Clarify the expectations for the behavior of the xFetch method on the X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fpcache1-zero-page;p=thirdparty%2Fsqlite.git Clarify the expectations for the behavior of the xFetch method on the sqlite3_pcache_methods object for the case when the key is zero. FossilOrigin-Name: b0810ac1b22226a0ffcf73868779d7e98b5d8263 --- diff --git a/manifest b/manifest index c9737ac295..81a46bacb4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Improved\sdetection\sof\szero\spage\snumbers\sin\sthe\spage\scache. -D 2016-12-30T13:40:41.684 +C Clarify\sthe\sexpectations\sfor\sthe\sbehavior\sof\sthe\sxFetch\smethod\son\sthe\nsqlite3_pcache_methods\sobject\sfor\sthe\scase\swhen\sthe\skey\sis\szero. +D 2016-12-30T13:55:50.562 F Makefile.in 41bd4cad981487345c4a84081074bcdb876e4b2e F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc b8ca53350ae545e3562403d5da2a69cec79308da @@ -390,7 +390,7 @@ F src/resolve.c bb070cf5f23611c44ab7e4788803684e385fc3fb F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c dfb6cadc3dcfba1b1bdbfba62ebba2b4b673413e F src/shell.c 6095531aa900decdaa765e0f3993fba7153c92c1 -F src/sqlite.h.in e8e2d108d82647f0a812fdb74accf91c1ec08ddc +F src/sqlite.h.in c50b91a917b5a78469e0910a539cf84087ba821e F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 8648034aa702469afb553231677306cc6492a1ae F src/sqliteInt.h 2075e22d50833ca2d9956d0b7a6bfb845ad05dd2 @@ -1540,7 +1540,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 2842bc60538369f888c7df8365858c910322277d -R 055be9062a2560beea507ce779b9565f +P 5550e815dd943b15c3b08f0526280bba76976199 +R 40395c430e6a26d64841635be7560ef8 U drh -Z 9a04ffa20091cdf405452df841cb044b +Z b0285f49e100b02afd5ae0bacab221f8 diff --git a/manifest.uuid b/manifest.uuid index 6b1586a252..ca8a6f6376 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5550e815dd943b15c3b08f0526280bba76976199 \ No newline at end of file +b0810ac1b22226a0ffcf73868779d7e98b5d8263 \ No newline at end of file diff --git a/src/sqlite.h.in b/src/sqlite.h.in index caa89721e1..ed812294f7 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -7215,7 +7215,8 @@ struct sqlite3_pcache_page { ** for each entry in the page cache. ** ** The page to be fetched is determined by the key. ^The minimum key value -** is 1. After it has been retrieved using xFetch, the page is considered +** is 1. The xFetch() method must return NULL if passed a key of 0. +** After it has been retrieved using xFetch, the page is considered ** to be "pinned". ** ** If the requested page is already in the page cache, then the page cache @@ -7227,10 +7228,11 @@ struct sqlite3_pcache_page { ** **
createFlag Behavior when page is not already in cache **
0 Do not allocate a new page. Return NULL. -**
1 Allocate a new page if it easy and convenient to do so. -** Otherwise return NULL. +**
1 Allocate a new page if it easy and convenient to do so +** and the key is not zero. Otherwise return NULL. **
2 Make every effort to allocate a new page. Only return -** NULL if allocating a new page is effectively impossible. +** NULL if the key is zero or if allocating a new page is +** effectively impossible. **
** ** ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite