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 /storage/heap | |
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 'storage/heap')
-rw-r--r-- | storage/heap/ha_heap.cc | 4 | ||||
-rw-r--r-- | storage/heap/hp_hash.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index b9ff9d28159..73dce174a09 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -90,7 +90,7 @@ ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg) int ha_heap::open(const char *name, int mode, uint test_if_locked) { - internal_table= test(test_if_locked & HA_OPEN_INTERNAL_TABLE); + internal_table= MY_TEST(test_if_locked & HA_OPEN_INTERNAL_TABLE); if (internal_table || (!(file= heap_open(name, mode)) && my_errno == ENOENT)) { HP_CREATE_INFO create_info; @@ -106,7 +106,7 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) if (rc) goto end; - implicit_emptied= test(created_new_share); + implicit_emptied= MY_TEST(created_new_share); if (internal_table) file= heap_open_from_share(internal_share, mode); else diff --git a/storage/heap/hp_hash.c b/storage/heap/hp_hash.c index 2abed55459c..f96cf866138 100644 --- a/storage/heap/hp_hash.c +++ b/storage/heap/hp_hash.c @@ -640,7 +640,7 @@ int hp_key_cmp(HP_KEYDEF *keydef, const uchar *rec, const uchar *key) { if (seg->null_bit) { - int found_null=test(rec[seg->null_pos] & seg->null_bit); + int found_null= MY_TEST(rec[seg->null_pos] & seg->null_bit); if (found_null != (int) *key++) return 1; if (found_null) @@ -737,7 +737,7 @@ void hp_make_key(HP_KEYDEF *keydef, uchar *key, const uchar *rec) uint char_length= seg->length; uchar *pos= (uchar*) rec + seg->start; if (seg->null_bit) - *key++= test(rec[seg->null_pos] & seg->null_bit); + *key++= MY_TEST(rec[seg->null_pos] & seg->null_bit); if (cs->mbmaxlen > 1) { char_length= my_charpos(cs, pos, pos + seg->length, @@ -776,7 +776,7 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, uchar *key, uint char_length; if (seg->null_bit) { - if (!(*key++= 1 - test(rec[seg->null_pos] & seg->null_bit))) + if (!(*key++= 1 - MY_TEST(rec[seg->null_pos] & seg->null_bit))) continue; } if (seg->flag & HA_SWAP_KEY) |