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:
@ -2416,8 +2416,8 @@ mysql_execute_command(THD *thd)
|
||||
#endif
|
||||
|
||||
status_var_increment(thd->status_var.com_stat[lex->sql_command]);
|
||||
thd->progress.report_to_client= test(sql_command_flags[lex->sql_command] &
|
||||
CF_REPORT_PROGRESS);
|
||||
thd->progress.report_to_client= MY_TEST(sql_command_flags[lex->sql_command] &
|
||||
CF_REPORT_PROGRESS);
|
||||
|
||||
DBUG_ASSERT(thd->transaction.stmt.modified_non_trans_table == FALSE);
|
||||
|
||||
@ -3500,7 +3500,7 @@ end_with_restore_list:
|
||||
case SQLCOM_INSERT_SELECT:
|
||||
{
|
||||
select_result *sel_result;
|
||||
bool explain= test(lex->describe);
|
||||
bool explain= MY_TEST(lex->describe);
|
||||
DBUG_ASSERT(first_table == all_tables && first_table != 0);
|
||||
if ((res= insert_precheck(thd, all_tables)))
|
||||
break;
|
||||
@ -3614,7 +3614,7 @@ end_with_restore_list:
|
||||
{
|
||||
DBUG_ASSERT(first_table == all_tables && first_table != 0);
|
||||
TABLE_LIST *aux_tables= thd->lex->auxiliary_table_list.first;
|
||||
bool explain= test(lex->describe);
|
||||
bool explain= MY_TEST(lex->describe);
|
||||
multi_delete *result;
|
||||
|
||||
if ((res= multi_delete_precheck(thd, all_tables)))
|
||||
@ -6708,7 +6708,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
if (!table)
|
||||
DBUG_RETURN(0); // End of memory
|
||||
alias_str= alias ? alias->str : table->table.str;
|
||||
if (!test(table_options & TL_OPTION_ALIAS) &&
|
||||
if (!MY_TEST(table_options & TL_OPTION_ALIAS) &&
|
||||
check_table_name(table->table.str, table->table.length, FALSE))
|
||||
{
|
||||
my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str);
|
||||
@ -6753,10 +6753,10 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
ptr->table_name=table->table.str;
|
||||
ptr->table_name_length=table->table.length;
|
||||
ptr->lock_type= lock_type;
|
||||
ptr->updating= test(table_options & TL_OPTION_UPDATING);
|
||||
ptr->updating= MY_TEST(table_options & TL_OPTION_UPDATING);
|
||||
/* TODO: remove TL_OPTION_FORCE_INDEX as it looks like it's not used */
|
||||
ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX);
|
||||
ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES);
|
||||
ptr->force_index= MY_TEST(table_options & TL_OPTION_FORCE_INDEX);
|
||||
ptr->ignore_leaves= MY_TEST(table_options & TL_OPTION_IGNORE_LEAVES);
|
||||
ptr->derived= table->sel;
|
||||
if (!ptr->derived && is_infoschema_db(ptr->db, ptr->db_length))
|
||||
{
|
||||
@ -6851,7 +6851,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
lex->add_to_query_tables(ptr);
|
||||
|
||||
// Pure table aliases do not need to be locked:
|
||||
if (!test(table_options & TL_OPTION_ALIAS))
|
||||
if (!MY_TEST(table_options & TL_OPTION_ALIAS))
|
||||
{
|
||||
ptr->mdl_request.init(MDL_key::TABLE, ptr->db, ptr->table_name, mdl_type,
|
||||
MDL_TRANSACTION);
|
||||
|
Reference in New Issue
Block a user