From: drh <> Date: Wed, 7 Sep 2022 20:14:38 +0000 (+0000) Subject: Enhance an assert() to impose for tighter constraints on the operation of pcache. X-Git-Tag: version-3.39.4~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77aa809a375c5de4375727ec0379013687e65308;p=thirdparty%2Fsqlite.git Enhance an assert() to impose for tighter constraints on the operation of pcache. FossilOrigin-Name: 461511cc99e5b1f936d0acbfcfe117c4ceb721a28eed50bb6db7a2244aedb599 --- diff --git a/manifest b/manifest index 18a032ded5..6cd2cdb281 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sthe\swindows\sbuild\sso\sthat\sit\sworks\swith\s-DSQLITE_OMIT_AUTOINIT. -D 2022-09-07T19:58:48.936 +C Enhance\san\sassert()\sto\simpose\sfor\stighter\sconstraints\son\sthe\soperation\sof\spcache. +D 2022-09-07T20:14:38.920 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -562,7 +562,7 @@ F src/pager.h f82e9844166e1585f5786837ddc7709966138ced17f568c16af7ccf946c2baa3 F src/parse.y 8e67d820030d2655b9942ffe61c1e7e6b96cea2f2f72183533299393907d0564 F src/pcache.c 5df59c993907b742dfac6aa9038d2515856bede56040a7640d39d06e1c93b494 F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586 -F src/pcache1.c ae71c0d92f2c8462bc75886bc466fe2cd55613991bc76caecd1404c4ada3ea51 +F src/pcache1.c cfffa35ee38dd6a1d5f9f6a3d7b08e9756882589789894f4dbfd7a30617f91b0 F src/pragma.c 404c0fe37b51f6def2c9ec6b07c80f0355673f0e74d720dc9a58a78725502417 F src/pragma.h e690a356c18e98414d2e870ea791c1be1545a714ba623719deb63f7f226d8bb7 F src/prepare.c c62820c15dcb63013519c8e41d9f928d7478672cc902cfd0581c733c271dbf45 @@ -1978,9 +1978,9 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P cd1e40064ccd9fe2189feb4fd3b77be265990baba8be3d53256b85716650f5bc -Q +f74a5ea8c986dc33d3afcda169c38abbe55728c56716cf9991a5e2ef7fc4917a -R ae2c8470dbee646449a5a3daa1d17770 +P 1662eb07d8fa01457b3e3f37894234aae27c25a67059da968ab8cb599d3bd8f6 +Q +42105eb43a916a7cd839fa6c582eaffaef17f50b23c3e05142400c379feb73c7 +R 012d4db6d9dd0feee90f3cdbb4b5948b U drh -Z 2cc129aa89c925564d469314dc44b7cf +Z cea974c1dce9d7ab515b2ee6bacd87f4 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 37140402bf..ffa7a6f92c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1662eb07d8fa01457b3e3f37894234aae27c25a67059da968ab8cb599d3bd8f6 \ No newline at end of file +461511cc99e5b1f936d0acbfcfe117c4ceb721a28eed50bb6db7a2244aedb599 \ No newline at end of file diff --git a/src/pcache1.c b/src/pcache1.c index 308a0673c3..82e6569182 100644 --- a/src/pcache1.c +++ b/src/pcache1.c @@ -1138,7 +1138,7 @@ static void pcache1Rekey( } *pp = pPage->pNext; - assert( pcache1FetchNoMutex(p, iOld, 0)==0 ); /* iOld not in cache */ + assert( pcache1FetchNoMutex(p, iNew, 0)==0 ); /* iNew not in cache */ hNew = iNew%pCache->nHash; pPage->iKey = iNew; pPage->pNext = pCache->apHash[hNew];