From d12c7adf715677b118104d4e5adf6f978c27b4ee Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Wed, 19 Feb 2014 14:05:15 +0400 Subject: 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 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++. --- sql/item_cmpfunc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/item_cmpfunc.h') diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a0d9b7c20fa..6159014a10c 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -388,7 +388,7 @@ public: Item_func::print_op(str, query_type); } - bool is_null() { return test(args[0]->is_null() || args[1]->is_null()); } + bool is_null() { return MY_TEST(args[0]->is_null() || args[1]->is_null()); } bool is_bool_func() { return 1; } CHARSET_INFO *compare_collation() { return cmp.cmp_collation.collation; } uint decimal_precision() const { return 1; } @@ -874,7 +874,7 @@ public: /* Compare values number pos1 and pos2 for equality */ bool compare_elems(uint pos1, uint pos2) { - return test(compare(collation, base + pos1*size, base + pos2*size)); + return MY_TEST(compare(collation, base + pos1 * size, base + pos2 * size)); } virtual Item_result result_type()= 0; }; @@ -1838,7 +1838,7 @@ public: bool contains(Field *field); Item* get_first(struct st_join_table *context, Item *field); /** Get number of field items / references to field items in this object */ - uint n_field_items() { return equal_items.elements-test(with_const); } + uint n_field_items() { return equal_items.elements - MY_TEST(with_const); } void merge(Item_equal *item); bool merge_with_check(Item_equal *equal_item, bool save_merged); void merge_into_list(List *list, bool save_merged, -- cgit v1.2.1