diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2014-02-19 14:05:15 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2014-02-19 14:05:15 +0400 |
commit | d12c7adf715677b118104d4e5adf6f978c27b4ee (patch) | |
tree | 04cdbaf4509cbe485cb992e271ab8d711a867011 /sql/field.cc | |
parent | fd1437dfe532ed78ce2a1c8e05a989fcbf79832e (diff) | |
download | mariadb-git-d12c7adf715677b118104d4e5adf6f978c27b4ee.tar.gz |
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++.
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/field.cc b/sql/field.cc index 755d2f8b625..9ec0e4d3089 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1774,7 +1774,7 @@ int Field_num::store_decimal(const my_decimal *val) ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; int err= 0; longlong i= convert_decimal2longlong(val, unsigned_flag, &err); - return test(err | store(i, unsigned_flag)); + return MY_TEST(err | store(i, unsigned_flag)); } @@ -1926,7 +1926,7 @@ int Field::store_time_dec(MYSQL_TIME *ltime, uint dec) bool Field::optimize_range(uint idx, uint part) { - return test(table->file->index_flags(idx, part, 1) & HA_READ_RANGE); + return MY_TEST(table->file->index_flags(idx, part, 1) & HA_READ_RANGE); } @@ -8487,7 +8487,7 @@ int Field_bit::store_decimal(const my_decimal *val) { int err= 0; longlong i= convert_decimal2longlong(val, 1, &err); - return test(err | store(i, TRUE)); + return MY_TEST(err | store(i, TRUE)); } @@ -8776,7 +8776,7 @@ Field_bit::unpack(uchar *to, const uchar *from, const uchar *from_end, if (param_data == 0 || ((from_bit_len == bit_len) && (from_len == bytes_in_rec))) { - if (from + bytes_in_rec + test(bit_len) > from_end) + if (from + bytes_in_rec + MY_TEST(bit_len) > from_end) return 0; // Error in data if (bit_len > 0) @@ -8931,7 +8931,7 @@ void Create_field::create_length_to_internal_length(void) { pack_length= length / 8; /* We need one extra byte to store the bits we save among the null bits */ - key_length= pack_length + test(length & 7); + key_length= pack_length + MY_TEST(length & 7); } break; case MYSQL_TYPE_NEWDECIMAL: |