diff options
author | drh <drh@noemail.net> | 2013-12-06 15:49:45 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-12-06 15:49:45 +0000 |
commit | 65106c77bb5436a3a4ab16193cc9b98b9c09e228 (patch) | |
tree | 65a7b929e8f072b5fdc2ee321d78ddadd3229ff7 /src | |
parent | 27964431ea27c6b6e979ba874356b1d33c06f88e (diff) | |
parent | 6f04b95f02eeb62bcf3901d6d4483bdf68c000ee (diff) | |
download | sqlite-65106c77bb5436a3a4ab16193cc9b98b9c09e228.tar.gz sqlite-65106c77bb5436a3a4ab16193cc9b98b9c09e228.zip |
Update to the 3.8.2 release.
FossilOrigin-Name: e579661a7950fe9f8eb10012946100c874ba54b0
Diffstat (limited to 'src')
-rw-r--r-- | src/ctime.c | 6 | ||||
-rw-r--r-- | src/mem5.c | 4 | ||||
-rw-r--r-- | src/os_unix.c | 2 | ||||
-rw-r--r-- | src/util.c | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/src/ctime.c b/src/ctime.c index 7c915d58c..c863cbed5 100644 --- a/src/ctime.c +++ b/src/ctime.c @@ -347,6 +347,9 @@ static const char * const azCompileOpt[] = { #ifdef SQLITE_SOUNDEX "SOUNDEX", #endif +#ifdef SQLITE_SYSTEM_MALLOC + "SYSTEM_MALLOC", +#endif #ifdef SQLITE_TCL "TCL", #endif @@ -362,6 +365,9 @@ static const char * const azCompileOpt[] = { #ifdef SQLITE_USE_ALLOCA "USE_ALLOCA", #endif +#ifdef SQLITE_WIN32_MALLOC + "WIN32_MALLOC", +#endif #ifdef SQLITE_ZERO_MALLOC "ZERO_MALLOC" #endif diff --git a/src/mem5.c b/src/mem5.c index 3870e9148..4674ec68f 100644 --- a/src/mem5.c +++ b/src/mem5.c @@ -202,7 +202,7 @@ static void memsys5Leave(void){ static int memsys5Size(void *p){ int iSize = 0; if( p ){ - int i = ((u8 *)p-mem5.zPool)/mem5.szAtom; + int i = (int)(((u8 *)p-mem5.zPool)/mem5.szAtom); assert( i>=0 && i<mem5.nBlock ); iSize = mem5.szAtom * (1 << (mem5.aCtrl[i]&CTRL_LOGSIZE)); } @@ -289,7 +289,7 @@ static void memsys5FreeUnsafe(void *pOld){ /* Set iBlock to the index of the block pointed to by pOld in ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool. */ - iBlock = ((u8 *)pOld-mem5.zPool)/mem5.szAtom; + iBlock = (int)(((u8 *)pOld-mem5.zPool)/mem5.szAtom); /* Check that the pointer pOld points to a valid, non-free block. */ assert( iBlock>=0 && iBlock<mem5.nBlock ); diff --git a/src/os_unix.c b/src/os_unix.c index 501b1b769..ab657dc7b 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4081,7 +4081,7 @@ static int unixShmSystemLock( #ifdef SQLITE_DEBUG { u16 mask; OSTRACE(("SHM-LOCK ")); - mask = (1<<(ofst+n)) - (1<<ofst); + mask = ofst>31 ? 0xffffffff : (1<<(ofst+n)) - (1<<ofst); if( rc==SQLITE_OK ){ if( lockType==F_UNLCK ){ OSTRACE(("unlock %d ok", ofst)); 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); } |