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:
@ -885,7 +885,7 @@ public:
|
||||
m_view_access_denied_message_ptr(NULL)
|
||||
{
|
||||
|
||||
m_sctx = test(m_top_view->security_ctx) ?
|
||||
m_sctx= MY_TEST(m_top_view->security_ctx) ?
|
||||
m_top_view->security_ctx : thd->security_ctx;
|
||||
}
|
||||
|
||||
@ -2011,7 +2011,7 @@ static void store_key_options(THD *thd, String *packet, TABLE *table,
|
||||
end= longlong10_to_str(key_info->block_size, buff, 10);
|
||||
packet->append(buff, (uint) (end - buff));
|
||||
}
|
||||
DBUG_ASSERT(test(key_info->flags & HA_USES_COMMENT) ==
|
||||
DBUG_ASSERT(MY_TEST(key_info->flags & HA_USES_COMMENT) ==
|
||||
(key_info->comment.length > 0));
|
||||
if (key_info->flags & HA_USES_COMMENT)
|
||||
{
|
||||
@ -2398,7 +2398,7 @@ int select_result_explain_buffer::send_data(List<Item> &items)
|
||||
fill_record(thd, dst_table, dst_table->field, items, TRUE, FALSE);
|
||||
res= dst_table->file->ha_write_tmp_row(dst_table->record[0]);
|
||||
set_current_thd(cur_thd);
|
||||
DBUG_RETURN(test(res));
|
||||
DBUG_RETURN(MY_TEST(res));
|
||||
}
|
||||
|
||||
bool select_result_text_buffer::send_result_set_metadata(List<Item> &fields, uint flag)
|
||||
@ -5433,7 +5433,7 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
uint col_access;
|
||||
check_access(thd,SELECT_ACL, db_name->str,
|
||||
&tables->grant.privilege, 0, 0, test(tables->schema_table));
|
||||
&tables->grant.privilege, 0, 0, MY_TEST(tables->schema_table));
|
||||
col_access= get_column_grant(thd, &tables->grant,
|
||||
db_name->str, table_name->str,
|
||||
field->field_name) & COL_ACLS;
|
||||
@ -5572,13 +5572,13 @@ static my_bool iter_schema_engines(THD *thd, plugin_ref plugin,
|
||||
table->field[1]->store(option_name, strlen(option_name), scs);
|
||||
table->field[2]->store(plugin_decl(plugin)->descr,
|
||||
strlen(plugin_decl(plugin)->descr), scs);
|
||||
tmp= &yesno[test(hton->commit)];
|
||||
tmp= &yesno[MY_TEST(hton->commit)];
|
||||
table->field[3]->store(tmp->str, tmp->length, scs);
|
||||
table->field[3]->set_notnull();
|
||||
tmp= &yesno[test(hton->prepare)];
|
||||
tmp= &yesno[MY_TEST(hton->prepare)];
|
||||
table->field[4]->store(tmp->str, tmp->length, scs);
|
||||
table->field[4]->set_notnull();
|
||||
tmp= &yesno[test(hton->savepoint_set)];
|
||||
tmp= &yesno[MY_TEST(hton->savepoint_set)];
|
||||
table->field[5]->store(tmp->str, tmp->length, scs);
|
||||
table->field[5]->set_notnull();
|
||||
|
||||
@ -6145,7 +6145,7 @@ static int get_schema_stat_record(THD *thd, TABLE_LIST *tables,
|
||||
else
|
||||
table->field[14]->store("", 0, cs);
|
||||
table->field[14]->set_notnull();
|
||||
DBUG_ASSERT(test(key_info->flags & HA_USES_COMMENT) ==
|
||||
DBUG_ASSERT(MY_TEST(key_info->flags & HA_USES_COMMENT) ==
|
||||
(key_info->comment.length > 0));
|
||||
if (key_info->flags & HA_USES_COMMENT)
|
||||
table->field[15]->store(key_info->comment.str,
|
||||
|
Reference in New Issue
Block a user