summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2014-02-19 14:05:15 +0400
committerSergey Vojtovich <svoj@mariadb.org>2014-02-19 14:05:15 +0400
commitd12c7adf715677b118104d4e5adf6f978c27b4ee (patch)
tree04cdbaf4509cbe485cb992e271ab8d711a867011 /sql/opt_sum.cc
parentfd1437dfe532ed78ce2a1c8e05a989fcbf79832e (diff)
downloadmariadb-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/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index d4fc458c948..4e8fcefa6d2 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -295,9 +295,9 @@ int opt_sum_query(THD *thd,
if (!(tl->table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT) ||
tl->schema_table)
{
- maybe_exact_count&= test(!tl->schema_table &&
- (tl->table->file->ha_table_flags() &
- HA_HAS_RECORDS));
+ maybe_exact_count&= MY_TEST(!tl->schema_table &&
+ (tl->table->file->ha_table_flags() &
+ HA_HAS_RECORDS));
is_exact_count= FALSE;
count= 1; // ensure count != 0
}
@@ -361,7 +361,7 @@ int opt_sum_query(THD *thd,
case Item_sum::MIN_FUNC:
case Item_sum::MAX_FUNC:
{
- int is_max= test(item_sum->sum_func() == Item_sum::MAX_FUNC);
+ int is_max= MY_TEST(item_sum->sum_func() == Item_sum::MAX_FUNC);
/*
If MIN/MAX(expr) is the first part of a key or if all previous
parts of the key is found in the COND, then we can use
@@ -658,7 +658,7 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
DBUG_RETURN(FALSE);
}
if (!(cond->used_tables() & field->table->map) &&
- test(cond->used_tables() & ~PSEUDO_TABLE_BITS))
+ MY_TEST(cond->used_tables() & ~PSEUDO_TABLE_BITS))
{
/* Condition doesn't restrict the used table */
DBUG_RETURN(!cond->const_item());
@@ -811,7 +811,7 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
Item *value= args[between && max_fl ? 2 : 1];
value->save_in_field_no_warnings(part->field, 1);
if (part->null_bit)
- *key_ptr++= (uchar) test(part->field->is_null());
+ *key_ptr++= (uchar) MY_TEST(part->field->is_null());
part->field->get_key_image(key_ptr, part->length, Field::itRAW);
}
if (is_field_part)
@@ -831,7 +831,7 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
else if (eq_type)
{
if ((!is_null && !cond->val_int()) ||
- (is_null && !test(part->field->is_null())))
+ (is_null && !MY_TEST(part->field->is_null())))
DBUG_RETURN(FALSE); // Impossible test
}
else if (is_field_part)