diff options
author | konstantin@mysql.com <> | 2003-12-02 19:39:51 +0300 |
---|---|---|
committer | konstantin@mysql.com <> | 2003-12-02 19:39:51 +0300 |
commit | cf192063d14e9121e6f74ee11957f3fb9f989020 (patch) | |
tree | cbf6200a23df5fb40c74eb1e8e0cdde88a34063f /include | |
parent | 21b506ba21277dc3c199dbb0a908ec7339d32f04 (diff) | |
download | mariadb-git-cf192063d14e9121e6f74ee11957f3fb9f989020.tar.gz |
Post-review fixes for bug #1790 'BIT_AND() result in GROUP BY different when
SQL_BIG_RESULT used':
- BIT_AND now returns BIGINT UNSIGNED
- in case there were no matching rows BIT_AND returns 18446744073709551615
(but not NULL), BIT_OR returns 0 (but not NULL). That's how Monty wants it
and how is described in our docs.
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h index 349ac8ac82e..68c331aa414 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -603,11 +603,25 @@ extern double my_atof(const char*); #define HAVE_LONG_LONG 1 #endif +/* + Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define + ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined. +*/ + #if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN) #define LONGLONG_MIN ((long long) 0x8000000000000000LL) #define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL) #endif +#if defined(HAVE_LONG_LONG) && !defined(ULONLONG_MAX) +/* First check for ANSI C99 definition: */ +#ifdef ULLONG_MAX +#define ULONGLONG_MAX ULLONG_MAX +#else +#define ULONGLONG_MAX ((unsigned long long)(~0ULL)) +#endif +#endif /* defined (HAVE_LONG_LONG) && !defined(ULONLONG_MAX)*/ + #if SIZEOF_LONG == 4 #define INT_MIN32 (long) 0x80000000L #define INT_MAX32 (long) 0x7FFFFFFFL |