nMax can be zero and subtracting 1 from an unsigned zero produces undesirable results (CVS 6506)
FossilOrigin-Name: a117d82dad82bc372bc1e3f1adb9540c1accf851
This commit is contained in:
parent
ac80db7845
commit
685cd6f663
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Change\sthe\ssqlite3_bind_value()\simplementation\sto\suse\sa\sdefault\sbranch\son\nthe\stype\sswitch\sso\sthat\sthere\sare\sno\suntested\sjumps\sin\sthe\sswitch.\s(CVS\s6505)
|
||||
D 2009-04-14T12:58:20
|
||||
C nMax\scan\sbe\szero\sand\ssubtracting\s1\sfrom\san\sunsigned\szero\sproduces\sundesirable\sresults\s(CVS\s6506)
|
||||
D 2009-04-14T18:44:39
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -148,7 +148,7 @@ F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f
|
||||
F src/parse.y b7e4341b21736a90b952aa6bb663ec98529b778e
|
||||
F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
|
||||
F src/pcache.h 9b927ccc5a538e31b4c3bc7eec4f976db42a1324
|
||||
F src/pcache1.c f587565f4ba0fd1772067eaa96814dce761b7a4c
|
||||
F src/pcache1.c 35f8601c91c09a1e887a1914ebca07bb5afc7b89
|
||||
F src/pragma.c c26c16c49a80d03c8597f0e6c7daba53f283428f
|
||||
F src/prepare.c 0ad1ba3290e0626aa4e7589ed6ab6af2572875b0
|
||||
F src/printf.c ea2d76000cc5f4579d7e9cb2f5460433eec0d384
|
||||
@ -717,7 +717,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P 3db0c7980668cf38165add13f833863cd00a0cfe
|
||||
R 34f39946bda012d0092593a65918e629
|
||||
U drh
|
||||
Z 98a6c859bf61c1e15172ad734a5c6432
|
||||
P d0a8bd6a53c5da0ac6b88818f82c7f7d330b527a
|
||||
R d56036d84dd34b957b5b44bc1a5365cf
|
||||
U aswift
|
||||
Z d875c935111ab458c0af133f3a6bf1c5
|
||||
|
@ -1 +1 @@
|
||||
d0a8bd6a53c5da0ac6b88818f82c7f7d330b527a
|
||||
a117d82dad82bc372bc1e3f1adb9540c1accf851
|
@ -16,7 +16,7 @@
|
||||
** If the default page cache implementation is overriden, then neither of
|
||||
** these two features are available.
|
||||
**
|
||||
** @(#) $Id: pcache1.c,v 1.10 2009/03/23 04:33:33 danielk1977 Exp $
|
||||
** @(#) $Id: pcache1.c,v 1.11 2009/04/14 18:44:39 aswift Exp $
|
||||
*/
|
||||
|
||||
#include "sqliteInt.h"
|
||||
@ -527,7 +527,7 @@ static void *pcache1Fetch(sqlite3_pcache *p, unsigned int iKey, int createFlag){
|
||||
|
||||
/* Step 4. Try to recycle a page buffer if appropriate. */
|
||||
if( pCache->bPurgeable && pcache1.pLruTail && (
|
||||
pCache->nPage>=pCache->nMax-1 || pcache1.nCurrentPage>=pcache1.nMaxPage
|
||||
(pCache->nPage+1>=pCache->nMax) || pcache1.nCurrentPage>=pcache1.nMaxPage
|
||||
)){
|
||||
pPage = pcache1.pLruTail;
|
||||
pcache1RemoveFromHash(pPage);
|
||||
|
Loading…
Reference in New Issue
Block a user