mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -1404,9 +1404,9 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
|
||||
Query_cache_query_flags flags;
|
||||
// fill all gaps between fields with 0 to get repeatable key
|
||||
bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
|
||||
flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG);
|
||||
flags.client_protocol_41= test(thd->client_capabilities &
|
||||
CLIENT_PROTOCOL_41);
|
||||
flags.client_long_flag= MY_TEST(thd->client_capabilities & CLIENT_LONG_FLAG);
|
||||
flags.client_protocol_41= MY_TEST(thd->client_capabilities &
|
||||
CLIENT_PROTOCOL_41);
|
||||
/*
|
||||
Protocol influences result format, so statement results in the binary
|
||||
protocol (COM_EXECUTE) cannot be served to statements asking for results
|
||||
@ -1415,10 +1415,10 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
|
||||
flags.protocol_type= (unsigned int) thd->protocol->type();
|
||||
/* PROTOCOL_LOCAL results are not cached. */
|
||||
DBUG_ASSERT(flags.protocol_type != (unsigned int) Protocol::PROTOCOL_LOCAL);
|
||||
flags.more_results_exists= test(thd->server_status &
|
||||
SERVER_MORE_RESULTS_EXISTS);
|
||||
flags.more_results_exists= MY_TEST(thd->server_status &
|
||||
SERVER_MORE_RESULTS_EXISTS);
|
||||
flags.in_trans= thd->in_active_multi_stmt_transaction();
|
||||
flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT);
|
||||
flags.autocommit= MY_TEST(thd->server_status & SERVER_STATUS_AUTOCOMMIT);
|
||||
flags.pkt_nr= net->pkt_nr;
|
||||
flags.character_set_client_num=
|
||||
thd->variables.character_set_client->number;
|
||||
@ -1899,14 +1899,14 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length)
|
||||
|
||||
// fill all gaps between fields with 0 to get repeatable key
|
||||
bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
|
||||
flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG);
|
||||
flags.client_protocol_41= test(thd->client_capabilities &
|
||||
CLIENT_PROTOCOL_41);
|
||||
flags.client_long_flag= MY_TEST(thd->client_capabilities & CLIENT_LONG_FLAG);
|
||||
flags.client_protocol_41= MY_TEST(thd->client_capabilities &
|
||||
CLIENT_PROTOCOL_41);
|
||||
flags.protocol_type= (unsigned int) thd->protocol->type();
|
||||
flags.more_results_exists= test(thd->server_status &
|
||||
SERVER_MORE_RESULTS_EXISTS);
|
||||
flags.more_results_exists= MY_TEST(thd->server_status &
|
||||
SERVER_MORE_RESULTS_EXISTS);
|
||||
flags.in_trans= thd->in_active_multi_stmt_transaction();
|
||||
flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT);
|
||||
flags.autocommit= MY_TEST(thd->server_status & SERVER_STATUS_AUTOCOMMIT);
|
||||
flags.pkt_nr= thd->net.pkt_nr;
|
||||
flags.character_set_client_num= thd->variables.character_set_client->number;
|
||||
flags.character_set_results_num=
|
||||
@ -3409,7 +3409,7 @@ my_bool Query_cache::register_all_tables(THD *thd,
|
||||
if (block_table->parent)
|
||||
unlink_table(block_table);
|
||||
}
|
||||
return test(n);
|
||||
return MY_TEST(n);
|
||||
}
|
||||
|
||||
|
||||
@ -4109,7 +4109,7 @@ Query_cache::is_cacheable(THD *thd, LEX *lex,
|
||||
(long) OPTION_TO_QUERY_CACHE,
|
||||
(long) lex->select_lex.options,
|
||||
(int) thd->variables.query_cache_type,
|
||||
(uint) test(qc_is_able_to_intercept_result(thd))));
|
||||
(uint) MY_TEST(qc_is_able_to_intercept_result(thd))));
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user