mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-5314 - Compiling fails on OSX using clang
This is port of fix for MySQL BUG#17647863. revno: 5572 revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj committer: Jon Olav Hauglid <jon.hauglid@oracle.com> timestamp: Thu 2013-10-31 00:22:43 +0100 message: Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM Rename test() macro to MY_TEST() to avoid conflict with libc++.
This commit is contained in:
@ -3308,7 +3308,7 @@ uint32 get_list_array_idx_for_endpoint(partition_info *part_info,
|
||||
}
|
||||
else
|
||||
{
|
||||
DBUG_RETURN(list_index + test(left_endpoint ^ include_endpoint));
|
||||
DBUG_RETURN(list_index + MY_TEST(left_endpoint ^ include_endpoint));
|
||||
}
|
||||
} while (max_list_index >= min_list_index);
|
||||
notfound:
|
||||
@ -5783,7 +5783,7 @@ static bool mysql_change_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
|
||||
if (mysql_trans_commit_alter_copy_data(thd))
|
||||
error= 1; /* The error has been reported */
|
||||
|
||||
DBUG_RETURN(test(error));
|
||||
DBUG_RETURN(MY_TEST(error));
|
||||
}
|
||||
|
||||
|
||||
@ -7892,7 +7892,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
|
||||
index-in-ordered-array-of-list-constants (for LIST) space.
|
||||
*/
|
||||
store_key_image_to_rec(field, min_value, field_len);
|
||||
bool include_endp= !test(flags & NEAR_MIN);
|
||||
bool include_endp= !MY_TEST(flags & NEAR_MIN);
|
||||
part_iter->part_nums.start= get_endpoint(part_info, 1, include_endp);
|
||||
if (!can_match_multiple_values && part_info->part_expr->null_value)
|
||||
{
|
||||
@ -7927,7 +7927,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
|
||||
else
|
||||
{
|
||||
store_key_image_to_rec(field, max_value, field_len);
|
||||
bool include_endp= !test(flags & NEAR_MAX);
|
||||
bool include_endp= !MY_TEST(flags & NEAR_MAX);
|
||||
part_iter->part_nums.end= get_endpoint(part_info, 0, include_endp);
|
||||
if (check_zero_dates &&
|
||||
!zero_in_start_date &&
|
||||
@ -8094,8 +8094,8 @@ int get_part_iter_for_interval_via_walking(partition_info *part_info,
|
||||
if ((ulonglong)b - (ulonglong)a == ~0ULL)
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
a += test(flags & NEAR_MIN);
|
||||
b += test(!(flags & NEAR_MAX));
|
||||
a+= MY_TEST(flags & NEAR_MIN);
|
||||
b+= MY_TEST(!(flags & NEAR_MAX));
|
||||
ulonglong n_values= b - a;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user