diff options
author | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-06-22 17:12:40 +0500 |
---|---|---|
committer | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-06-22 17:12:40 +0500 |
commit | aabbd2fb69193bc9c3c9dee1129a4dc79c551f37 (patch) | |
tree | 6ea760dc1d616a537fa6398ed4400d1cdec37df8 /include | |
parent | caebb719b23db45c99225f18215c1fd383ce4f9d (diff) | |
download | mariadb-git-aabbd2fb69193bc9c3c9dee1129a4dc79c551f37.tar.gz |
Fix for bug #29079: Semantics of "bigint" depend on platform specifics (size, signedness of char ?)
Problem: long and long long types mess in a comparison may lead to wrong results on some platforms.
Fix: prefer [unsigned] long long as [u]longlong as it's used unconditionally in many places.
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/my_global.h b/include/my_global.h index b7b200fdcf4..5e31a66e5e3 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -828,7 +828,12 @@ error "Neither int or long is of 4 bytes width" typedef unsigned long ulong; /* Short for unsigned long */ #endif #ifndef longlong_defined -#if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8 +/* + Using [unsigned] long long is preferable as [u]longlong because we use + [unsigned] long long unconditionally in many places, + for example in constants with [U]LL suffix. +*/ +#if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8 typedef unsigned long long int ulonglong; /* ulong or unsigned long long */ typedef long long int longlong; #else |