aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-12-06 15:49:45 +0000
committerdrh <drh@noemail.net>2013-12-06 15:49:45 +0000
commit65106c77bb5436a3a4ab16193cc9b98b9c09e228 (patch)
tree65a7b929e8f072b5fdc2ee321d78ddadd3229ff7 /src/util.c
parent27964431ea27c6b6e979ba874356b1d33c06f88e (diff)
parent6f04b95f02eeb62bcf3901d6d4483bdf68c000ee (diff)
downloadsqlite-65106c77bb5436a3a4ab16193cc9b98b9c09e228.tar.gz
sqlite-65106c77bb5436a3a4ab16193cc9b98b9c09e228.zip
Update to the 3.8.2 release.
FossilOrigin-Name: e579661a7950fe9f8eb10012946100c874ba54b0
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index e59f5238f..9fa2a0fbd 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1281,6 +1281,8 @@ u64 sqlite3LogEstToInt(LogEst x){
x /= 10;
if( n>=5 ) n -= 2;
else if( n>=1 ) n -= 1;
- if( x>=3 ) return (n+8)<<(x-3);
+ if( x>=3 ){
+ return x>60 ? (u64)LARGEST_INT64 : (n+8)<<(x-3);
+ }
return (n+8)>>(3-x);
}