summaryrefslogtreecommitdiff
path: root/sql/sql_cache.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/sql_cache.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/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 5307f4f01f8..b0327153aa2 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -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);
}