]>
Commit | Line | Data |
---|---|---|
cb3dad37 AM |
1 | diff -urN mysql-5.1.17-beta.org/include/my_global.h mysql-5.1.17-beta/include/my_global.h |
2 | --- mysql-5.1.17-beta.org/include/my_global.h 2007-04-04 15:15:25.000000000 +0200 | |
3 | +++ mysql-5.1.17-beta/include/my_global.h 2007-05-01 19:46:56.111245806 +0200 | |
4 | @@ -543,9 +543,11 @@ | |
11936b50 AM |
5 | #endif |
6 | ||
7 | /* Define some useful general macros */ | |
8 | -#if !defined(max) | |
9 | -#define max(a, b) ((a) > (b) ? (a) : (b)) | |
10 | -#define min(a, b) ((a) < (b) ? (a) : (b)) | |
11 | +#if !defined(mysql_max) | |
cb3dad37 AM |
12 | +#define mysql_max(a, b) ((a) > (b) ? (a) : (b)) |
13 | +#define mysql_min(a, b) ((a) < (b) ? (a) : (b)) | |
11936b50 AM |
14 | +static __inline long min( long a, long b ) { return ( ( a < b ) ? a : b ); } |
15 | +static __inline long max( long a, long b ) { return ( ( a > b ) ? a : b ); } | |
16 | #endif | |
17 | ||
18 | #if !defined(HAVE_UINT) | |
cb3dad37 AM |
19 | diff -urN mysql-5.1.17-beta.org/sql/mysql_tzinfo_to_sql.cc mysql-5.1.17-beta/sql/mysql_tzinfo_to_sql.cc |
20 | --- mysql-5.1.17-beta.org/sql/mysql_tzinfo_to_sql.cc 2007-04-04 15:16:24.000000000 +0200 | |
21 | +++ mysql-5.1.17-beta/sql/mysql_tzinfo_to_sql.cc 2007-05-01 19:47:19.705911429 +0200 | |
22 | @@ -167,7 +167,7 @@ | |
23 | char buf[sizeof(struct tzhead) + sizeof(my_time_t) * TZ_MAX_TIMES + | |
24 | TZ_MAX_TIMES + sizeof(TRAN_TYPE_INFO) * TZ_MAX_TYPES + | |
25 | #ifdef ABBR_ARE_USED | |
26 | - max(TZ_MAX_CHARS + 1, (2 * (MY_TZNAME_MAX + 1))) + | |
27 | + mysql_max(TZ_MAX_CHARS + 1, (2 * (MY_TZNAME_MAX + 1))) + | |
28 | #endif | |
29 | sizeof(LS_INFO) * TZ_MAX_LEAPS]; | |
30 | } u; | |
31 | ||
32 | --- mysql/sql/sql_cache.cc.org 2007-05-01 19:54:50.311298644 +0200 | |
33 | +++ mysql/sql/sql_cache.cc 2007-05-01 19:54:59.958508136 +0200 | |
34 | @@ -2585,7 +2585,7 @@ | |
35 | DBUG_PRINT("qcache", ("len %lu, not less %d, min %lu, uder_guard %d", | |
36 | len, not_less,min,under_guard)); | |
37 | ||
38 | - if (len >= min(query_cache_size, query_cache_limit)) | |
39 | + if (len >= mysql_min(query_cache_size, query_cache_limit)) | |
40 | { | |
41 | DBUG_PRINT("qcache", ("Query cache hase only %lu memory and limit %lu", | |
42 | query_cache_size, query_cache_limit)); |