=== modified file 'include/my_global.h' --- include/my_global.h 2013-06-26 14:15:01 +0000 +++ include/my_global.h 2013-10-30 03:58:09 +0000 @@ -461,7 +461,7 @@ #endif #define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; } -#define test(a) ((a) ? 1 : 0) +#define mysql_test(a) ((a) ? 1 : 0) #define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) #define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) #define test_all_bits(a,b) (((a) & (b)) == (b)) === modified file 'include/myisam.h' --- include/myisam.h 2012-03-06 14:29:42 +0000 +++ include/myisam.h 2013-10-30 04:08:08 +0000 @@ -80,8 +80,8 @@ #define mi_is_key_active(_keymap_,_keyno_) \ (((_keyno_) < MI_KEYMAP_BITS) ? \ - test((_keymap_) & (ULL(1) << (_keyno_))) : \ - test((_keymap_) & MI_KEYMAP_HIGH_MASK)) + mysql_test((_keymap_) & (ULL(1) << (_keyno_))) : \ + mysql_test((_keymap_) & MI_KEYMAP_HIGH_MASK)) #define mi_set_key_active(_keymap_,_keyno_) \ (_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \ (ULL(1) << (_keyno_)) : \ @@ -94,7 +94,7 @@ #else #define mi_is_key_active(_keymap_,_keyno_) \ - test((_keymap_) & (ULL(1) << (_keyno_))) + mysql_test((_keymap_) & (ULL(1) << (_keyno_))) #define mi_set_key_active(_keymap_,_keyno_) \ (_keymap_)|= (ULL(1) << (_keyno_)) #define mi_clear_key_active(_keymap_,_keyno_) \ @@ -103,7 +103,7 @@ #endif #define mi_is_any_key_active(_keymap_) \ - test((_keymap_)) + mysql_test((_keymap_)) #define mi_is_all_keys_active(_keymap_,_keys_) \ ((_keymap_) == mi_get_mask_all_keys_active(_keys_)) #define mi_set_all_keys_active(_keymap_,_keys_) \ === modified file 'libmysql/libmysql.c' --- libmysql/libmysql.c 2013-01-10 11:11:36 +0000 +++ libmysql/libmysql.c 2013-10-30 05:10:49 +0000 @@ -2071,7 +2071,7 @@ buff[4]= (char) stmt->flags; int4store(buff+5, 1); /* iteration count */ - res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), + res= mysql_test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), (uchar*) packet, length, 1, stmt) || (*mysql->methods->read_query_result)(mysql)); stmt->affected_rows= mysql->affected_rows; @@ -2559,7 +2559,7 @@ reinit_result_set_metadata(stmt); prepare_to_fetch_result(stmt); } - DBUG_RETURN(test(stmt->last_errno)); + DBUG_RETURN(mysql_test(stmt->last_errno)); } @@ -3179,7 +3179,7 @@ int err; double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err); float fdata= (float) data; - *param->error= (fdata != data) | test(err); + *param->error= (fdata != data) | mysql_test(err); floatstore(buffer, fdata); break; } @@ -3187,7 +3187,7 @@ { int err; double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err); - *param->error= test(err); + *param->error= mysql_test(err); doublestore(buffer, data); break; } @@ -3196,7 +3196,7 @@ MYSQL_TIME_STATUS status; MYSQL_TIME *tm= (MYSQL_TIME *)buffer; str_to_time(value, length, tm, &status); - *param->error= test(status.warnings); + *param->error= mysql_test(status.warnings); break; } case MYSQL_TYPE_DATE: @@ -3206,7 +3206,7 @@ MYSQL_TIME_STATUS status; MYSQL_TIME *tm= (MYSQL_TIME *)buffer; (void) str_to_datetime(value, length, tm, TIME_FUZZY_DATE, &status); - *param->error= test(status.warnings) && + *param->error= mysql_test(status.warnings) && (param->buffer_type == MYSQL_TYPE_DATE && tm->time_type != MYSQL_TIMESTAMP_DATE); break; @@ -3331,7 +3331,7 @@ int error; value= number_to_datetime(value, (MYSQL_TIME *) buffer, TIME_FUZZY_DATE, &error); - *param->error= test(error); + *param->error= mysql_test(error); break; } default: @@ -3679,7 +3679,7 @@ static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row) { - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); + my_bool field_is_unsigned= mysql_test(field->flags & UNSIGNED_FLAG); uchar data= **row; *(uchar *)param->buffer= data; *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX8; @@ -3689,7 +3689,7 @@ static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row) { - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); + my_bool field_is_unsigned= mysql_test(field->flags & UNSIGNED_FLAG); ushort data= (ushort) sint2korr(*row); shortstore(param->buffer, data); *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX16; @@ -3700,7 +3700,7 @@ MYSQL_FIELD *field __attribute__((unused)), uchar **row) { - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); + my_bool field_is_unsigned= mysql_test(field->flags & UNSIGNED_FLAG); uint32 data= (uint32) sint4korr(*row); longstore(param->buffer, data); *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX32; @@ -3711,7 +3711,7 @@ MYSQL_FIELD *field __attribute__((unused)), uchar **row) { - my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); + my_bool field_is_unsigned= mysql_test(field->flags & UNSIGNED_FLAG); ulonglong data= (ulonglong) sint8korr(*row); *param->error= param->is_unsigned != field_is_unsigned && data > LONGLONG_MAX; longlongstore(param->buffer, data); @@ -4705,7 +4705,7 @@ my_free(stmt->extension); my_free(stmt); - DBUG_RETURN(test(rc)); + DBUG_RETURN(mysql_test(rc)); } /* === modified file 'libmysqld/lib_sql.cc' --- libmysqld/lib_sql.cc 2013-08-23 03:57:09 +0000 +++ libmysqld/lib_sql.cc 2013-10-30 04:38:30 +0000 @@ -337,7 +337,7 @@ thd->client_param_count= stmt->param_count; thd->client_params= stmt->params; - res= test(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0, + res= mysql_test(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0, header, sizeof(header), 1, stmt) || emb_read_query_result(stmt->mysql)); stmt->affected_rows= stmt->mysql->affected_rows; === modified file 'mysys/mf_iocache.c' --- mysys/mf_iocache.c 2012-11-01 13:36:39 +0000 +++ mysys/mf_iocache.c 2013-10-30 03:59:11 +0000 @@ -180,7 +180,7 @@ DBUG_ASSERT(seek_offset == 0); } else - info->seek_not_done= test(seek_offset != pos); + info->seek_not_done= mysql_test(seek_offset != pos); } info->disk_writes= 0; === modified file 'mysys/my_copy.c' --- mysys/my_copy.c 2012-03-06 14:29:42 +0000 +++ mysys/my_copy.c 2013-10-30 03:59:40 +0000 @@ -63,7 +63,7 @@ from_file=to_file= -1; DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */ if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ - new_file_stat= test(my_stat((char*) to, &new_stat_buff, MYF(0))); + new_file_stat= mysql_test(my_stat((char*) to, &new_stat_buff, MYF(0))); if ((from_file=my_open(from,O_RDONLY | O_SHARE,MyFlags)) >= 0) { === modified file 'mysys/my_getwd.c' --- mysys/my_getwd.c 2012-03-06 14:29:42 +0000 +++ mysys/my_getwd.c 2013-10-30 04:00:02 +0000 @@ -162,7 +162,7 @@ my_bool has_path(const char *name) { - return test(strchr(name, FN_LIBCHAR)) + return mysql_test(strchr(name, FN_LIBCHAR)) #if FN_LIBCHAR != '/' || test(strchr(name,'/')) #endif === modified file 'sql-common/client.c' --- sql-common/client.c 2013-08-23 12:41:06 +0000 +++ sql-common/client.c 2013-10-30 05:08:49 +0000 @@ -1299,7 +1299,7 @@ options->secure_auth= TRUE; break; case OPT_report_data_truncation: - options->report_data_truncation= opt_arg ? test(atoi(opt_arg)) : 1; + options->report_data_truncation= opt_arg ? mysql_test(atoi(opt_arg)) : 1; break; case OPT_plugin_dir: { @@ -4350,7 +4350,7 @@ mysql->options.protocol=MYSQL_PROTOCOL_PIPE; /* Force named pipe */ break; case MYSQL_OPT_LOCAL_INFILE: /* Allow LOAD DATA LOCAL ?*/ - if (!arg || test(*(uint*) arg)) + if (!arg || mysql_test(*(uint*) arg)) mysql->options.client_flag|= CLIENT_LOCAL_FILES; else mysql->options.client_flag&= ~CLIENT_LOCAL_FILES; @@ -4396,7 +4396,7 @@ mysql->options.secure_auth= *(my_bool *) arg; break; case MYSQL_REPORT_DATA_TRUNCATION: - mysql->options.report_data_truncation= test(*(my_bool *) arg); + mysql->options.report_data_truncation= mysql_test(*(my_bool *) arg); break; case MYSQL_OPT_RECONNECT: mysql->reconnect= *(my_bool *) arg; === modified file 'sql/event_db_repository.cc' --- sql/event_db_repository.cc 2013-08-12 05:34:44 +0000 +++ sql/event_db_repository.cc 2013-10-30 04:59:50 +0000 @@ -469,7 +469,7 @@ end: event_table->file->ha_index_end(); - DBUG_RETURN(test(ret)); + DBUG_RETURN(mysql_test(ret)); } @@ -751,7 +751,7 @@ thd->mdl_context.rollback_to_savepoint(mdl_savepoint); thd->variables.sql_mode= saved_mode; - DBUG_RETURN(test(ret)); + DBUG_RETURN(mysql_test(ret)); } @@ -866,7 +866,7 @@ thd->mdl_context.rollback_to_savepoint(mdl_savepoint); thd->variables.sql_mode= saved_mode; - DBUG_RETURN(test(ret)); + DBUG_RETURN(mysql_test(ret)); } @@ -926,7 +926,7 @@ close_thread_tables(thd); thd->mdl_context.rollback_to_savepoint(mdl_savepoint); - DBUG_RETURN(test(ret)); + DBUG_RETURN(mysql_test(ret)); } @@ -1168,7 +1168,7 @@ if (save_binlog_row_based) thd->set_current_stmt_binlog_format_row(); - DBUG_RETURN(test(ret)); + DBUG_RETURN(mysql_test(ret)); } @@ -1245,7 +1245,7 @@ close_mysql_tables(thd); } - DBUG_RETURN(test(ret)); + DBUG_RETURN(mysql_test(ret)); } /** === modified file 'sql/field.cc' --- sql/field.cc 2013-06-14 14:57:08 +0000 +++ sql/field.cc 2013-10-30 04:17:30 +0000 @@ -1855,7 +1855,7 @@ bool Field::optimize_range(uint idx, uint part) { - return test(table->file->index_flags(idx, part, 1) & HA_READ_RANGE); + return mysql_test(table->file->index_flags(idx, part, 1) & HA_READ_RANGE); } @@ -9571,7 +9571,7 @@ { pack_length= length / 8; /* We need one extra byte to store the bits we save among the null bits */ - key_length= pack_length + test(length & 7); + key_length= pack_length + mysql_test(length & 7); } break; case MYSQL_TYPE_NEWDECIMAL: === modified file 'sql/field.h' --- sql/field.h 2013-06-19 10:24:08 +0000 +++ sql/field.h 2013-10-30 04:02:19 +0000 @@ -891,14 +891,14 @@ */ return real_maybe_null() ? - test(null_ptr[row_offset] & null_bit) : table->null_row; + mysql_test(null_ptr[row_offset] & null_bit) : table->null_row; } bool is_real_null(my_ptrdiff_t row_offset= 0) const - { return real_maybe_null() ? test(null_ptr[row_offset] & null_bit) : false; } + { return real_maybe_null() ? mysql_test(null_ptr[row_offset] & null_bit) : false; } bool is_null_in_record(const uchar *record) const - { return real_maybe_null() ? test(record[null_offset()] & null_bit) : false; } + { return real_maybe_null() ? mysql_test(record[null_offset()] & null_bit) : false; } void set_null(my_ptrdiff_t row_offset= 0) { @@ -3670,9 +3670,9 @@ { DBUG_ASSERT(ptr == a || ptr == b); if (ptr == a) - return Field_bit::key_cmp(b, bytes_in_rec+test(bit_len)); + return Field_bit::key_cmp(b, bytes_in_rec+mysql_test(bit_len)); else - return Field_bit::key_cmp(a, bytes_in_rec+test(bit_len)) * -1; + return Field_bit::key_cmp(a, bytes_in_rec+mysql_test(bit_len)) * -1; } int cmp_binary_offset(uint row_offset) { return cmp_offset(row_offset); } === modified file 'sql/field_conv.cc' --- sql/field_conv.cc 2013-06-18 09:18:04 +0000 +++ sql/field_conv.cc 2013-10-30 04:17:49 +0000 @@ -331,7 +331,7 @@ { longlong value= copy->from_field->val_int(); copy->to_field->store(value, - test(copy->from_field->flags & UNSIGNED_FLAG)); + mysql_test(copy->from_field->flags & UNSIGNED_FLAG)); } static void do_field_real(Copy_field *copy) @@ -901,5 +901,5 @@ return to->store_decimal(from->val_decimal(&buff)); } else - return to->store(from->val_int(), test(from->flags & UNSIGNED_FLAG)); + return to->store(from->val_int(), mysql_test(from->flags & UNSIGNED_FLAG)); } === modified file 'sql/ha_ndbcluster.cc' --- sql/ha_ndbcluster.cc 2012-12-19 09:33:45 +0000 +++ sql/ha_ndbcluster.cc 2013-10-30 04:39:19 +0000 @@ -2807,7 +2807,7 @@ if (check_index_fields_not_null(key_info)) m_index[i].null_in_unique_index= TRUE; - if (error == 0 && test(index_flags(i, 0, 0) & HA_READ_RANGE)) + if (error == 0 && mysql_test(index_flags(i, 0, 0) & HA_READ_RANGE)) btree_keys.set_bit(i); } === modified file 'sql/ha_partition.cc' --- sql/ha_partition.cc 2013-08-19 06:51:20 +0000 +++ sql/ha_partition.cc 2013-10-30 04:14:21 +0000 @@ -3222,7 +3222,7 @@ m_mode= mode; m_open_test_lock= test_if_locked; m_part_field_array= m_part_info->full_part_field_array; - if (get_from_handler_file(name, &table->mem_root, test(m_is_clone_of))) + if (get_from_handler_file(name, &table->mem_root, mysql_test(m_is_clone_of))) DBUG_RETURN(error); name_buffer_ptr= m_name_buffer_ptr; if (populate_partition_name_hash()) @@ -5484,7 +5484,7 @@ m_start_key.key= NULL; m_index_scan_type= partition_read_range; - error= common_index_read(m_rec0, test(start_key)); + error= common_index_read(m_rec0, mysql_test(start_key)); DBUG_RETURN(error); } @@ -7480,7 +7480,7 @@ ulong nr1= 1; ulong nr2= 4; bool use_51_hash; - use_51_hash= test((*field_array)->table->part_info->key_algorithm == + use_51_hash= mysql_test((*field_array)->table->part_info->key_algorithm == partition_info::KEY_ALGORITHM_51); do === modified file 'sql/handler.cc' --- sql/handler.cc 2013-08-20 09:15:15 +0000 +++ sql/handler.cc 2013-10-30 04:18:21 +0000 @@ -5742,7 +5742,7 @@ DBUG_ENTER("handler::multi_range_read_init"); mrr_iter= seq_funcs->init(seq_init_param, n_ranges, mode); mrr_funcs= *seq_funcs; - mrr_is_output_sorted= test(mode & HA_MRR_SORTED); + mrr_is_output_sorted= mysql_test(mode & HA_MRR_SORTED); mrr_have_range= FALSE; DBUG_RETURN(0); } @@ -5798,7 +5798,7 @@ &mrr_cur_range.start_key : 0, mrr_cur_range.end_key.keypart_map ? &mrr_cur_range.end_key : 0, - test(mrr_cur_range.range_flag & EQ_RANGE), + mysql_test(mrr_cur_range.range_flag & EQ_RANGE), mrr_is_output_sorted); if (result != HA_ERR_END_OF_FILE) break; @@ -5895,7 +5895,7 @@ rowids_buf= buf->buffer; - is_mrr_assoc= !test(mode & HA_MRR_NO_ASSOCIATION); + is_mrr_assoc= !mysql_test(mode & HA_MRR_NO_ASSOCIATION); if (is_mrr_assoc) status_var_increment(table->in_use->status_var.ha_multi_range_read_init_count); @@ -6133,7 +6133,7 @@ if (res && res != HA_ERR_END_OF_FILE) DBUG_RETURN(res); - dsmrr_eof= test(res == HA_ERR_END_OF_FILE); + dsmrr_eof= mysql_test(res == HA_ERR_END_OF_FILE); /* Sort the buffer contents by rowid */ uint elem_size= h->ref_length + (int)is_mrr_assoc * sizeof(void*); @@ -6186,7 +6186,7 @@ if (is_mrr_assoc) memcpy(&cur_range_info, rowids_buf_cur + h->ref_length, sizeof(uchar*)); - rowids_buf_cur += h->ref_length + sizeof(void*) * test(is_mrr_assoc); + rowids_buf_cur += h->ref_length + sizeof(void*) * mysql_test(is_mrr_assoc); if (h2->mrr_funcs.skip_record && h2->mrr_funcs.skip_record(h2->mrr_iter, (char *) cur_range_info, rowid)) continue; @@ -6408,7 +6408,7 @@ double index_read_cost; const uint elem_size= h->ref_length + - sizeof(void*) * (!test(flags & HA_MRR_NO_ASSOCIATION)); + sizeof(void*) * (!mysql_test(flags & HA_MRR_NO_ASSOCIATION)); const ha_rows max_buff_entries= *buffer_size / elem_size; if (!max_buff_entries) === modified file 'sql/handler.h' --- sql/handler.h 2013-05-24 00:53:14 +0000 +++ sql/handler.h 2013-10-30 04:01:22 +0000 @@ -3347,7 +3347,7 @@ static inline bool ha_check_storage_engine_flag(const handlerton *db_type, uint32 flag) { - return db_type == NULL ? FALSE : test(db_type->flags & flag); + return db_type == NULL ? FALSE : mysql_test(db_type->flags & flag); } static inline bool ha_storage_engine_is_enabled(const handlerton *db_type) === modified file 'sql/item.cc' --- sql/item.cc 2013-06-13 13:06:30 +0000 +++ sql/item.cc 2013-10-30 04:18:40 +0000 @@ -2545,7 +2545,7 @@ field_name= field_par->field_name; db_name= field_par->table->s->db.str; alias_name_used= field_par->table->alias_name_used; - unsigned_flag=test(field_par->flags & UNSIGNED_FLAG); + unsigned_flag=mysql_test(field_par->flags & UNSIGNED_FLAG); collation.set(field_par->charset(), field_par->derivation(), field_par->repertoire()); fix_char_length(field_par->char_length()); === modified file 'sql/item.h' --- sql/item.h 2013-08-22 13:29:57 +0000 +++ sql/item.h 2013-10-30 04:02:43 +0000 @@ -1661,7 +1661,7 @@ { if (is_expensive_cache < 0) is_expensive_cache= walk(&Item::is_expensive_processor, 0, (uchar*)0); - return test(is_expensive_cache); + return mysql_test(is_expensive_cache); } virtual bool can_be_evaluated_now() const; uint32 max_char_length() const @@ -2598,7 +2598,7 @@ virtual void print(String *str, enum_query_type query_type); Item_num *neg() { value= -value; return this; } uint decimal_precision() const - { return (uint)(max_length - test(value < 0)); } + { return (uint)(max_length - mysql_test(value < 0)); } bool eq(const Item *, bool binary_cmp) const; bool check_partition_func_processor(uchar *bool_arg) { return FALSE;} }; @@ -4198,7 +4198,7 @@ virtual void store(Item *item); virtual bool cache_value()= 0; bool basic_const_item() const - { return test(example && example->basic_const_item());} + { return mysql_test(example && example->basic_const_item());} bool walk (Item_processor processor, bool walk_subquery, uchar *argument); virtual void clear() { null_value= TRUE; value_cached= FALSE; } bool is_null() { return value_cached ? null_value : example->is_null(); } === modified file 'sql/item_cmpfunc.cc' --- sql/item_cmpfunc.cc 2013-06-27 06:50:06 +0000 +++ sql/item_cmpfunc.cc 2013-10-30 04:19:22 +0000 @@ -497,7 +497,7 @@ *item) : #endif new Item_int_with_ref(field->val_int(), *item, - test(field->flags & UNSIGNED_FLAG)); + mysql_test(field->flags & UNSIGNED_FLAG)); if (tmp) thd->change_item_tree(item, tmp); result= 1; // Item was replaced @@ -1425,8 +1425,8 @@ res1= (*a)->val_str(&value1); res2= (*b)->val_str(&value2); if (!res1 || !res2) - return test(res1 == res2); - return test(sortcmp(res1, res2, cmp_collation.collation) == 0); + return mysql_test(res1 == res2); + return mysql_test(sortcmp(res1, res2, cmp_collation.collation) == 0); } @@ -1436,8 +1436,8 @@ res1= (*a)->val_str(&value1); res2= (*b)->val_str(&value2); if (!res1 || !res2) - return test(res1 == res2); - return test(stringcmp(res1, res2) == 0); + return mysql_test(res1 == res2); + return mysql_test(stringcmp(res1, res2) == 0); } @@ -1492,8 +1492,8 @@ double val1= (*a)->val_real(); double val2= (*b)->val_real(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(val1 == val2); + return mysql_test((*a)->null_value && (*b)->null_value); + return mysql_test(val1 == val2); } int Arg_comparator::compare_e_decimal() @@ -1502,8 +1502,8 @@ my_decimal *val1= (*a)->val_decimal(&decimal1); my_decimal *val2= (*b)->val_decimal(&decimal2); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(my_decimal_cmp(val1, val2) == 0); + return mysql_test((*a)->null_value && (*b)->null_value); + return mysql_test(my_decimal_cmp(val1, val2) == 0); } @@ -1541,8 +1541,8 @@ double val1= (*a)->val_real(); double val2= (*b)->val_real(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(val1 == val2 || fabs(val1 - val2) < precision); + return mysql_test((*a)->null_value && (*b)->null_value); + return mysql_test(val1 == val2 || fabs(val1 - val2) < precision); } @@ -1616,8 +1616,8 @@ longlong val1= (*a)->val_time_temporal(); longlong val2= (*b)->val_time_temporal(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(val1 == val2); + return mysql_test((*a)->null_value && (*b)->null_value); + return mysql_test(val1 == val2); } @@ -1708,8 +1708,8 @@ longlong val1= (*a)->val_int(); longlong val2= (*b)->val_int(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return test(val1 == val2); + return mysql_test((*a)->null_value && (*b)->null_value); + return mysql_test(val1 == val2); } /** @@ -1720,8 +1720,8 @@ longlong val1= (*a)->val_int(); longlong val2= (*b)->val_int(); if ((*a)->null_value || (*b)->null_value) - return test((*a)->null_value && (*b)->null_value); - return (val1 >= 0) && test(val1 == val2); + return mysql_test((*a)->null_value && (*b)->null_value); + return (val1 >= 0) && mysql_test(val1 == val2); } int Arg_comparator::compare_row() === modified file 'sql/item_cmpfunc.h' --- sql/item_cmpfunc.h 2013-06-11 11:37:20 +0000 +++ sql/item_cmpfunc.h 2013-10-30 04:03:04 +0000 @@ -400,7 +400,7 @@ Item_func::print_op(str, query_type); } - bool is_null() { return test(args[0]->is_null() || args[1]->is_null()); } + bool is_null() { return mysql_test(args[0]->is_null() || args[1]->is_null()); } const CHARSET_INFO *compare_collation() { return cmp.cmp_collation.collation; } void top_level_item() { abort_on_null= TRUE; } @@ -950,7 +950,7 @@ /* Compare values number pos1 and pos2 for equality */ bool compare_elems(uint pos1, uint pos2) { - return test(compare(collation, base + pos1*size, base + pos2*size)); + return mysql_test(compare(collation, base + pos1*size, base + pos2*size)); } virtual Item_result result_type()= 0; }; === modified file 'sql/item_func.cc' --- sql/item_func.cc 2013-06-19 13:06:32 +0000 +++ sql/item_func.cc 2013-10-30 04:19:50 +0000 @@ -2474,7 +2474,7 @@ case INT_RESULT: if ((!decimals_to_set && truncate) || (args[0]->decimal_precision() < DECIMAL_LONGLONG_DIGITS)) { - int length_can_increase= test(!truncate && (val1 < 0) && !val1_unsigned); + int length_can_increase= mysql_test(!truncate && (val1 < 0) && !val1_unsigned); max_length= args[0]->max_length + length_can_increase; /* Here we can keep INT_RESULT */ hybrid_type= INT_RESULT; @@ -4555,7 +4555,7 @@ mysql_cond_destroy(&cond); - return test(!error); // Return 1 killed + return mysql_test(!error); // Return 1 killed } @@ -4726,7 +4726,7 @@ bool user_var_entry::store(void *from, uint length, Item_result type) { // Store strings with end \0 - if (realloc(length + test(type == STRING_RESULT))) + if (realloc(length + mysql_test(type == STRING_RESULT))) return true; if (type == STRING_RESULT) m_ptr[length]= 0; // Store end \0 @@ -6712,7 +6712,7 @@ max_length= sp_result_field->field_length; collation.set(sp_result_field->charset()); maybe_null= 1; - unsigned_flag= test(sp_result_field->flags & UNSIGNED_FLAG); + unsigned_flag= mysql_test(sp_result_field->flags & UNSIGNED_FLAG); DBUG_VOID_RETURN; } === modified file 'sql/item_geofunc.cc' --- sql/item_geofunc.cc 2013-04-27 13:23:03 +0000 +++ sql/item_geofunc.cc 2013-10-30 04:20:09 +0000 @@ -261,7 +261,7 @@ srid= uint4korr(swkb->ptr()); str->q_append(srid); - return (null_value= test(geom->centroid(str))) ? 0 : str; + return (null_value= mysql_test(geom->centroid(str))) ? 0 : str; } === modified file 'sql/item_subselect.cc' --- sql/item_subselect.cc 2013-08-23 11:30:04 +0000 +++ sql/item_subselect.cc 2013-10-30 04:20:55 +0000 @@ -3744,7 +3744,7 @@ goto err; /* purecov: inspected */ materialize_engine->join->exec(); - if ((res= test(materialize_engine->join->error || thd->is_fatal_error))) + if ((res= mysql_test(materialize_engine->join->error || thd->is_fatal_error))) goto err; /* === modified file 'sql/item_subselect.h' --- sql/item_subselect.h 2013-02-21 12:37:50 +0000 +++ sql/item_subselect.h 2013-10-30 04:03:15 +0000 @@ -433,7 +433,7 @@ if ( pushed_cond_guards) pushed_cond_guards[i]= v; } - bool have_guarded_conds() { return test(pushed_cond_guards); } + bool have_guarded_conds() { return mysql_test(pushed_cond_guards); } Item_in_subselect(Item * left_expr, st_select_lex *select_lex); Item_in_subselect() === modified file 'sql/item_sum.cc' --- sql/item_sum.cc 2013-06-26 14:15:01 +0000 +++ sql/item_sum.cc 2013-10-30 04:21:23 +0000 @@ -3426,7 +3426,7 @@ { List list; SELECT_LEX *select_lex= thd->lex->current_select; - const bool order_or_distinct= test(arg_count_order > 0 || distinct); + const bool order_or_distinct= mysql_test(arg_count_order > 0 || distinct); DBUG_ENTER("Item_func_group_concat::setup"); /* === modified file 'sql/item_timefunc.cc' --- sql/item_timefunc.cc 2013-02-20 12:45:02 +0000 +++ sql/item_timefunc.cc 2013-10-30 04:21:42 +0000 @@ -1337,7 +1337,7 @@ return (longlong) calc_weekday(calc_daynr(ltime.year, ltime.month, ltime.day), - odbc_type) + test(odbc_type); + odbc_type) + mysql_test(odbc_type); } void Item_func_dayname::fix_length_and_dec() === modified file 'sql/key.cc' --- sql/key.cc 2013-04-03 13:22:48 +0000 +++ sql/key.cc 2013-10-30 04:24:15 +0000 @@ -123,7 +123,7 @@ { if (key_part->null_bit) { - *to_key++= test(from_record[key_part->null_offset] & + *to_key++= mysql_test(from_record[key_part->null_offset] & key_part->null_bit); key_length--; } @@ -299,7 +299,7 @@ if (key_part->null_bit) { - if (*key != test(table->record[0][key_part->null_offset] & + if (*key != mysql_test(table->record[0][key_part->null_offset] & key_part->null_bit)) return 1; if (*key) @@ -438,7 +438,7 @@ } } field_unpack(to, key_part->field, table->record[0], key_part->length, - test(key_part->key_part_flag & HA_PART_KEY_SEG)); + mysql_test(key_part->key_part_flag & HA_PART_KEY_SEG)); } dbug_tmp_restore_column_map(table->read_set, old_map); DBUG_VOID_RETURN; === modified file 'sql/log_event.cc' --- sql/log_event.cc 2013-08-20 09:15:15 +0000 +++ sql/log_event.cc 2013-10-30 04:41:32 +0000 @@ -644,7 +644,7 @@ { if (*need_comma) my_b_printf(file,", "); - my_b_printf(file,"%s=%d", name, test(flags & option)); + my_b_printf(file,"%s=%d", name, mysql_test(flags & option)); *need_comma= 1; } } === modified file 'sql/mysqld.cc' --- sql/mysqld.cc 2013-08-23 03:57:09 +0000 +++ sql/mysqld.cc 2013-10-30 04:41:48 +0000 @@ -8406,7 +8406,7 @@ opt_myisam_log=1; break; case (int) OPT_BIN_LOG: - opt_bin_log= test(argument != disabled_my_option); + opt_bin_log= mysql_test(argument != disabled_my_option); break; #ifdef HAVE_REPLICATION case (int)OPT_REPLICATE_IGNORE_DB: @@ -8940,7 +8940,7 @@ Set some global variables from the global_system_variables In most cases the global variables will not be used */ - my_disable_locking= myisam_single_user= test(opt_external_locking == 0); + my_disable_locking= myisam_single_user= mysql_test(opt_external_locking == 0); my_default_record_cache_size=global_system_variables.read_buff_size; global_system_variables.long_query_time= (ulonglong) @@ -8967,7 +8967,7 @@ #endif global_system_variables.engine_condition_pushdown= - test(global_system_variables.optimizer_switch & + mysql_test(global_system_variables.optimizer_switch & OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); opt_readonly= read_only; === modified file 'sql/net_serv.cc' --- sql/net_serv.cc 2013-08-28 18:13:23 +0000 +++ sql/net_serv.cc 2013-10-30 04:24:40 +0000 @@ -316,7 +316,7 @@ #ifndef DEBUG_DATA_PACKETS DBUG_DUMP("packet_header", buff, NET_HEADER_SIZE); #endif - rc= test(net_write_buff(net,packet,len)); + rc= mysql_test(net_write_buff(net,packet,len)); MYSQL_NET_WRITE_DONE(rc); return rc; } @@ -390,7 +390,7 @@ } int3store(buff,length); buff[3]= (uchar) net->pkt_nr++; - rc= test(net_write_buff(net, buff, header_size) || + rc= mysql_test(net_write_buff(net, buff, header_size) || (head_len && net_write_buff(net, header, head_len)) || net_write_buff(net, packet, len) || net_flush(net)); MYSQL_NET_WRITE_DONE(rc); @@ -525,7 +525,7 @@ #endif } - return test(count); + return mysql_test(count); } @@ -700,7 +700,7 @@ #endif } - return test(count); + return mysql_test(count); } === modified file 'sql/opt_range.cc' --- sql/opt_range.cc 2013-06-28 07:27:11 +0000 +++ sql/opt_range.cc 2013-10-30 04:25:19 +0000 @@ -468,7 +468,7 @@ new_max=arg->max_value; flag_max=arg->max_flag; } return new SEL_ARG(field, part, new_min, new_max, flag_min, flag_max, - test(maybe_flag && arg->maybe_flag)); + mysql_test(maybe_flag && arg->maybe_flag)); } SEL_ARG *clone_first(SEL_ARG *arg) { // min <= X < arg->min @@ -2947,7 +2947,7 @@ Assume that if the user is using 'limit' we will only need to scan limit rows if we are using a key */ - DBUG_RETURN(records ? test(quick) : -1); + DBUG_RETURN(records ? mysql_test(quick) : -1); } /**************************************************************************** @@ -3077,7 +3077,7 @@ int last_subpart_partno; /* Same as above for supartitioning */ /* - is_part_keypart[i] == test(keypart #i in partitioning index is a member + is_part_keypart[i] == mysql_test(keypart #i in partitioning index is a member used in partitioning) Used to maintain current values of cur_part_fields and cur_subpart_fields */ @@ -3960,7 +3960,7 @@ ppar->mark_full_partition_used(ppar->part_info, part_id); found= TRUE; } - res= test(found); + res= mysql_test(found); } /* Restore the "used partitions iterator" to the default setting that @@ -4988,7 +4988,7 @@ SEL_ARG *sel_arg, *tuple_arg= NULL; key_part_map keypart_map= 0; bool cur_covered; - bool prev_covered= test(bitmap_is_set(&info->covered_fields, + bool prev_covered= mysql_test(bitmap_is_set(&info->covered_fields, key_part->fieldnr-1)); key_range min_range; key_range max_range; @@ -5003,7 +5003,7 @@ sel_arg= sel_arg->next_key_part) { DBUG_PRINT("info",("sel_arg step")); - cur_covered= test(bitmap_is_set(&info->covered_fields, + cur_covered= mysql_test(bitmap_is_set(&info->covered_fields, key_part[sel_arg->part].fieldnr-1)); if (cur_covered != prev_covered) { @@ -9603,12 +9603,12 @@ if (param->table->key_info[param->real_keynr[idx]].flags & HA_SPATIAL) quick=new QUICK_RANGE_SELECT_GEOM(param->thd, param->table, param->real_keynr[idx], - test(parent_alloc), + mysql_test(parent_alloc), parent_alloc, &create_err); else quick=new QUICK_RANGE_SELECT(param->thd, param->table, param->real_keynr[idx], - test(parent_alloc), NULL, &create_err); + mysql_test(parent_alloc), NULL, &create_err); if (quick) { @@ -10660,7 +10660,7 @@ const bool sorted= (mrr_flags & HA_MRR_SORTED); result= file->read_range_first(last_range->min_keypart_map ? &start_key : 0, last_range->max_keypart_map ? &end_key : 0, - test(last_range->flag & EQ_RANGE), + mysql_test(last_range->flag & EQ_RANGE), sorted); if (last_range->flag == (UNIQUE_RANGE | EQ_RANGE)) last_range= 0; // Stop searching === modified file 'sql/opt_range.h' --- sql/opt_range.h 2013-02-28 13:04:02 +0000 +++ sql/opt_range.h 2013-10-30 04:16:36 +0000 @@ -596,7 +596,7 @@ THD *thd; int read_keys_and_merge(); - bool clustered_pk_range() { return test(pk_quick_select); } + bool clustered_pk_range() { return mysql_test(pk_quick_select); } virtual bool is_valid() { === modified file 'sql/opt_sum.cc' --- sql/opt_sum.cc 2012-12-13 08:22:59 +0000 +++ sql/opt_sum.cc 2013-10-30 04:29:50 +0000 @@ -304,7 +304,7 @@ } else { - maybe_exact_count&= test(table_filled && + maybe_exact_count&= mysql_test(table_filled && (tl->table->file->ha_table_flags() & HA_HAS_RECORDS)); is_exact_count= FALSE; @@ -379,7 +379,7 @@ 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= mysql_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 @@ -811,7 +811,7 @@ Item *value= args[between && max_fl ? 2 : 1]; value->save_in_field_no_warnings(part->field, true); if (part->null_bit) - *key_ptr++= (uchar) test(part->field->is_null()); + *key_ptr++= (uchar) mysql_test(part->field->is_null()); part->field->get_key_image(key_ptr, part->length, Field::itRAW); } if (is_field_part) @@ -831,7 +831,7 @@ else if (eq_type) { if ((!is_null && !cond->val_int()) || - (is_null && !test(part->field->is_null()))) + (is_null && !mysql_test(part->field->is_null()))) DBUG_RETURN(FALSE); // Impossible test } else if (is_field_part) === modified file 'sql/password.c' --- sql/password.c 2013-02-26 05:45:28 +0000 +++ sql/password.c 2013-10-30 04:30:20 +0000 @@ -545,7 +545,7 @@ /* now buf supposedly contains hash_stage1: so we can get hash_stage2 */ compute_sha1_hash(hash_stage2_reassured, (const char *) buf, SHA1_HASH_SIZE); - return test(memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)); + return mysql_test(memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)); } my_bool === modified file 'sql/rpl_mi.cc' --- sql/rpl_mi.cc 2012-08-20 08:44:27 +0000 +++ sql/rpl_mi.cc 2013-10-30 04:42:04 +0000 @@ -478,10 +478,10 @@ DBUG_RETURN(true); } - ssl= (my_bool) test(temp_ssl); - ssl_verify_server_cert= (my_bool) test(temp_ssl_verify_server_cert); + ssl= (my_bool) mysql_test(temp_ssl); + ssl_verify_server_cert= (my_bool) mysql_test(temp_ssl_verify_server_cert); master_log_pos= (my_off_t) temp_master_log_pos; - auto_position= test(temp_auto_position); + auto_position= mysql_test(temp_auto_position); if (auto_position != 0 && gtid_mode != 3) { === modified file 'sql/rpl_slave.cc' --- sql/rpl_slave.cc 2013-08-22 11:13:10 +0000 +++ sql/rpl_slave.cc 2013-10-30 04:42:18 +0000 @@ -3608,7 +3608,7 @@ "skipped because event skip counter was non-zero" }; DBUG_PRINT("info", ("OPTION_BEGIN: %d; IN_STMT: %d", - test(thd->variables.option_bits & OPTION_BEGIN), + mysql_test(thd->variables.option_bits & OPTION_BEGIN), rli->get_flag(Relay_log_info::IN_STMT))); DBUG_PRINT("skip_event", ("%s event was %s", ev->get_type_str(), explain[reason])); === modified file 'sql/set_var.cc' --- sql/set_var.cc 2013-04-12 11:45:00 +0000 +++ sql/set_var.cc 2013-10-30 04:31:32 +0000 @@ -566,7 +566,7 @@ if ((error= var->check(thd))) goto err; } - if (!(error= test(thd->is_error()))) + if (!(error= mysql_test(thd->is_error()))) { it.rewind(); while ((var= it++)) === modified file 'sql/sp_head.h' --- sql/sp_head.h 2013-02-26 05:45:28 +0000 +++ sql/sp_head.h 2013-10-30 04:12:23 +0000 @@ -859,7 +859,7 @@ else if (m_flags & HAS_SQLCOM_FLUSH) my_error(ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0), "FLUSH"); - return test(m_flags & + return mysql_test(m_flags & (CONTAINS_DYNAMIC_SQL|MULTI_RESULTS|HAS_SET_AUTOCOMMIT_STMT| HAS_COMMIT_OR_ROLLBACK|HAS_SQLCOM_RESET|HAS_SQLCOM_FLUSH)); } === modified file 'sql/sp_rcontext.h' --- sql/sp_rcontext.h 2013-08-08 02:52:37 +0000 +++ sql/sp_rcontext.h 2013-10-30 04:16:07 +0000 @@ -465,7 +465,7 @@ bool close(THD *thd); bool is_open() const - { return test(m_server_side_cursor); } + { return mysql_test(m_server_side_cursor); } bool fetch(THD *thd, List *vars); === modified file 'sql/sql_acl.cc' --- sql/sql_acl.cc 2013-08-23 03:57:09 +0000 +++ sql/sql_acl.cc 2013-10-30 04:42:41 +0000 @@ -2896,9 +2896,9 @@ static bool test_if_create_new_users(THD *thd) { Security_context *sctx= thd->security_ctx; - bool create_new_users= test(sctx->master_access & INSERT_ACL) || + bool create_new_users= mysql_test(sctx->master_access & INSERT_ACL) || (!opt_safe_user_create && - test(sctx->master_access & CREATE_USER_ACL)); + mysql_test(sctx->master_access & CREATE_USER_ACL)); if (!create_new_users) { TABLE_LIST tl; @@ -4687,7 +4687,7 @@ /* Create user if needed */ error=replace_user_table(thd, tables[0].table, Str, 0, revoke_grant, create_new_users, - test(thd->variables.sql_mode & + mysql_test(thd->variables.sql_mode & MODE_NO_AUTO_CREATE_USER)); if (error) { @@ -4932,7 +4932,7 @@ /* Create user if needed */ error=replace_user_table(thd, tables[0].table, Str, 0, revoke_grant, create_new_users, - test(thd->variables.sql_mode & + mysql_test(thd->variables.sql_mode & MODE_NO_AUTO_CREATE_USER)); if (error) { @@ -5209,7 +5209,7 @@ if (replace_user_table(thd, tables[0].table, Str, (!db ? rights : 0), revoke_grant, create_new_users, - test(thd->variables.sql_mode & + mysql_test(thd->variables.sql_mode & MODE_NO_AUTO_CREATE_USER))) result= -1; else if (db) @@ -5708,7 +5708,7 @@ tl && number-- && tl != first_not_own_table; tl= tl->next_global) { - sctx = test(tl->security_ctx) ? tl->security_ctx : thd->security_ctx; + sctx = mysql_test(tl->security_ctx) ? tl->security_ctx : thd->security_ctx; const ACL_internal_table_access *access= get_cached_table_access(&tl->grant.m_internal, @@ -5919,7 +5919,7 @@ GRANT_INFO *grant; const char *db_name; const char *table_name; - Security_context *sctx= test(table_ref->security_ctx) ? + Security_context *sctx= mysql_test(table_ref->security_ctx) ? table_ref->security_ctx : thd->security_ctx; if (table_ref->view || table_ref->field_translation) === modified file 'sql/sql_admin.cc' --- sql/sql_admin.cc 2013-08-20 09:15:15 +0000 +++ sql/sql_admin.cc 2013-10-30 04:42:56 +0000 @@ -1135,7 +1135,7 @@ thd->enable_slow_log= opt_log_slow_admin_statements; res= mysql_admin_table(thd, first_table, &thd->lex->check_opt, "repair", TL_WRITE, 1, - test(thd->lex->check_opt.sql_flags & TT_USEFRM), + mysql_test(thd->lex->check_opt.sql_flags & TT_USEFRM), HA_OPEN_FOR_REPAIR, &prepare_for_repair, &handler::ha_repair, 0); === modified file 'sql/sql_base.cc' --- sql/sql_base.cc 2013-08-20 09:15:15 +0000 +++ sql/sql_base.cc 2013-10-30 04:52:06 +0000 @@ -1612,7 +1612,7 @@ /* We always quote db,table names though it is slight overkill */ if (found_user_tables && - !(was_quote_show= test(thd->variables.option_bits & OPTION_QUOTE_SHOW_CREATE))) + !(was_quote_show= mysql_test(thd->variables.option_bits & OPTION_QUOTE_SHOW_CREATE))) { thd->variables.option_bits |= OPTION_QUOTE_SHOW_CREATE; } @@ -8241,7 +8241,7 @@ thd->lex->allow_sum_func= save_allow_sum_func; thd->mark_used_columns= save_mark_used_columns; DBUG_PRINT("info", ("thd->mark_used_columns: %d", thd->mark_used_columns)); - DBUG_RETURN(test(thd->is_error())); + DBUG_RETURN(mysql_test(thd->is_error())); } @@ -8805,7 +8805,7 @@ } thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup; - DBUG_RETURN(test(thd->is_error())); + DBUG_RETURN(mysql_test(thd->is_error())); err_no_arena: select_lex->is_item_list_lookup= save_is_item_list_lookup; === modified file 'sql/sql_bitmap.h' --- sql/sql_bitmap.h 2013-05-13 11:47:05 +0000 +++ sql/sql_bitmap.h 2013-10-30 04:01:38 +0000 @@ -60,7 +60,7 @@ intersect(map2buff); if (map.n_bits > sizeof(ulonglong) * 8) bitmap_set_above(&map, sizeof(ulonglong), - test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1)))); + mysql_test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1)))); } void subtract(const Bitmap& map2) { bitmap_subtract(&map, &map2.map); } void merge(const Bitmap& map2) { bitmap_union(&map, &map2.map); } @@ -135,7 +135,7 @@ void intersect_extended(ulonglong map2) { map&= map2; } void subtract(const Bitmap<64>& map2) { map&= ~map2.map; } void merge(const Bitmap<64>& map2) { map|= map2.map; } - my_bool is_set(uint n) const { return test(map & (((ulonglong)1) << n)); } + my_bool is_set(uint n) const { return mysql_test(map & (((ulonglong)1) << n)); } my_bool is_prefix(uint n) const { return map == (((ulonglong)1) << n)-1; } my_bool is_clear_all() const { return map == (ulonglong)0; } my_bool is_set_all() const { return map == ~(ulonglong)0; } === modified file 'sql/sql_cache.cc' --- sql/sql_cache.cc 2013-08-20 09:15:15 +0000 +++ sql/sql_cache.cc 2013-10-30 04:43:32 +0000 @@ -1209,8 +1209,8 @@ Query_cache_query_flags flags; // fill all gaps between fields with 0 to get repeatable key memset(&flags, 0, QUERY_CACHE_FLAGS_SIZE); - flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG); - flags.client_protocol_41= test(thd->client_capabilities & + flags.client_long_flag= mysql_test(thd->client_capabilities & CLIENT_LONG_FLAG); + flags.client_protocol_41= mysql_test(thd->client_capabilities & CLIENT_PROTOCOL_41); /* Protocol influences result format, so statement results in the binary @@ -1220,10 +1220,10 @@ 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 & + flags.more_results_exists= mysql_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= mysql_test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); flags.pkt_nr= net->pkt_nr; flags.character_set_client_num= thd->variables.character_set_client->number; @@ -1595,14 +1595,14 @@ // fill all gaps between fields with 0 to get repeatable key memset(&flags, 0, QUERY_CACHE_FLAGS_SIZE); - flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG); - flags.client_protocol_41= test(thd->client_capabilities & + flags.client_long_flag= mysql_test(thd->client_capabilities & CLIENT_LONG_FLAG); + flags.client_protocol_41= mysql_test(thd->client_capabilities & CLIENT_PROTOCOL_41); flags.protocol_type= (unsigned int) thd->protocol->type(); - flags.more_results_exists= test(thd->server_status & + flags.more_results_exists= mysql_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= mysql_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= @@ -3056,7 +3056,7 @@ tmp++) unlink_table(tmp); } - return test(n); + return mysql_test(n); } === modified file 'sql/sql_class.cc' --- sql/sql_class.cc 2013-08-23 03:57:09 +0000 +++ sql/sql_class.cc 2013-10-30 04:43:45 +0000 @@ -553,14 +553,14 @@ extern "C" int thd_in_lock_tables(const THD *thd) { - return test(thd->in_lock_tables); + return mysql_test(thd->in_lock_tables); } extern "C" int thd_tablespace_op(const THD *thd) { - return test(thd->tablespace_op); + return mysql_test(thd->tablespace_op); } @@ -2542,7 +2542,7 @@ bool select_to_file::send_eof() { - int error= test(end_io_cache(&cache)); + int error= mysql_test(end_io_cache(&cache)); if (mysql_file_close(file, MYF(MY_WME)) || thd->is_error()) error= true; @@ -2723,8 +2723,8 @@ escape_char= (int) (uchar) (*exchange->escaped)[0]; else escape_char= -1; - is_ambiguous_field_sep= test(strchr(ESCAPE_CHARS, field_sep_char)); - is_unsafe_field_sep= test(strchr(NUMERIC_CHARS, field_sep_char)); + is_ambiguous_field_sep= mysql_test(strchr(ESCAPE_CHARS, field_sep_char)); + is_unsafe_field_sep= mysql_test(strchr(NUMERIC_CHARS, field_sep_char)); line_sep_char= (exchange->line_term->length() ? (int) (uchar) (*exchange->line_term)[0] : INT_MAX); if (!field_term_length) === modified file 'sql/sql_class.h' --- sql/sql_class.h 2013-08-23 03:57:09 +0000 +++ sql/sql_class.h 2013-10-30 04:03:42 +0000 @@ -3305,7 +3305,7 @@ } inline bool is_strict_mode() const { - return test(variables.sql_mode & (MODE_STRICT_TRANS_TABLES | + return mysql_test(variables.sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)); } inline Time_zone *time_zone() @@ -4781,7 +4781,7 @@ table.str= internal_table_name; table.length=1; } - bool is_derived_table() const { return test(sel); } + bool is_derived_table() const { return mysql_test(sel); } inline void change_db(char *db_name) { db.str= db_name; db.length= (uint) strlen(db_name); === modified file 'sql/sql_delete.cc' --- sql/sql_delete.cc 2013-05-18 21:52:26 +0000 +++ sql/sql_delete.cc 2013-10-30 04:53:21 +0000 @@ -119,7 +119,7 @@ DBUG_RETURN(true); const_cond= (!conds || conds->const_item()); - safe_update=test(thd->variables.option_bits & OPTION_SAFE_UPDATES); + safe_update=mysql_test(thd->variables.option_bits & OPTION_SAFE_UPDATES); if (safe_update && const_cond) { my_message(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, === modified file 'sql/sql_executor.cc' --- sql/sql_executor.cc 2013-07-03 08:13:51 +0000 +++ sql/sql_executor.cc 2013-10-30 04:43:57 +0000 @@ -1455,7 +1455,7 @@ if (condition) { - found= test(condition->val_int()); + found= mysql_test(condition->val_int()); if (join->thd->killed) { @@ -1863,7 +1863,7 @@ { // We cannot handle outer-joined tables with expensive join conditions here: DBUG_ASSERT(!(*tab->on_expr_ref)->is_expensive()); - if ((table->null_row= test((*tab->on_expr_ref)->val_int() == 0))) + if ((table->null_row= mysql_test((*tab->on_expr_ref)->val_int() == 0))) mark_as_null_row(table); } if (!table->null_row) === modified file 'sql/sql_insert.cc' --- sql/sql_insert.cc 2013-08-23 03:57:09 +0000 +++ sql/sql_insert.cc 2013-10-30 04:53:51 +0000 @@ -793,7 +793,7 @@ update, update_fields, fields, - !test(values->elements), + !mysql_test(values->elements), &can_prune_partitions, &prune_needs_default_values, &used_partitions)) @@ -1978,7 +1978,7 @@ if (table_list) { table_list= table_list->top_table(); - view= test(table_list->view); + view= mysql_test(table_list->view); } if (view) { @@ -3980,7 +3980,7 @@ tmp_table.s->db_create_options=0; tmp_table.s->db_low_byte_first= - test(create_info->db_type == myisam_hton || + mysql_test(create_info->db_type == myisam_hton || create_info->db_type == heap_hton); tmp_table.null_row=tmp_table.maybe_null=0; === modified file 'sql/sql_join_buffer.cc' --- sql/sql_join_buffer.cc 2013-02-26 11:08:53 +0000 +++ sql/sql_join_buffer.cc 2013-10-30 04:54:20 +0000 @@ -184,8 +184,8 @@ for ( ; tab < join_tab ; tab++) { calc_used_field_length(join->thd, tab); - flag_fields+= test(tab->used_null_fields || tab->used_uneven_bit_fields); - flag_fields+= test(tab->table->maybe_null); + flag_fields+= mysql_test(tab->used_null_fields || tab->used_uneven_bit_fields); + flag_fields+= mysql_test(tab->table->maybe_null); fields+= tab->used_fields; blobs+= tab->used_blobs; @@ -1350,7 +1350,7 @@ bool JOIN_CACHE::get_match_flag_by_pos(uchar *rec_ptr) { if (with_match_flag) - return test(*rec_ptr); + return mysql_test(*rec_ptr); if (prev_cache) { uchar *prev_rec_ptr= prev_cache->get_rec_ref(rec_ptr); @@ -1593,7 +1593,7 @@ if (prev_cache) offset+= prev_cache->get_size_of_rec_offset(); /* Check whether the match flag is on */ - if (test(*(pos+offset))) + if (mysql_test(*(pos+offset))) { pos+= size_of_rec_len + get_rec_length(pos); return TRUE; @@ -1886,7 +1886,7 @@ reset_cache(false); /* Read each record from the join buffer and look for matches */ - for (cnt= records - test(skip_last) ; cnt; cnt--) + for (cnt= records - mysql_test(skip_last) ; cnt; cnt--) { /* If only the first match is needed and it has been already found for @@ -2131,7 +2131,7 @@ if (!records) DBUG_RETURN(NESTED_LOOP_OK); - cnt= records - (is_key_access() ? 0 : test(skip_last)); + cnt= records - (is_key_access() ? 0 : mysql_test(skip_last)); /* This function may be called only for inner tables of outer joins */ DBUG_ASSERT(join_tab->first_inner); === modified file 'sql/sql_lex.cc' --- sql/sql_lex.cc 2013-08-22 13:29:57 +0000 +++ sql/sql_lex.cc 2013-10-30 04:44:36 +0000 @@ -248,7 +248,7 @@ m_cpp_utf8_processed_ptr= NULL; next_state= MY_LEX_START; found_semicolon= NULL; - ignore_space= test(m_thd->variables.sql_mode & MODE_IGNORE_SPACE); + ignore_space= mysql_test(m_thd->variables.sql_mode & MODE_IGNORE_SPACE); stmt_prepare_mode= FALSE; multi_statements= TRUE; in_comment=NO_COMMENT; @@ -3454,7 +3454,7 @@ /* and from local list if it is not empty */ - if ((*link_to_local= test(select_lex.table_list.first))) + if ((*link_to_local= mysql_test(select_lex.table_list.first))) { select_lex.context.table_list= select_lex.context.first_name_resolution_table= first->next_local; === modified file 'sql/sql_lex.h' --- sql/sql_lex.h 2013-08-22 13:29:57 +0000 +++ sql/sql_lex.h 2013-10-30 04:03:29 +0000 @@ -1218,7 +1218,7 @@ } bool requires_prelocking() { - return test(query_tables_own_last); + return mysql_test(query_tables_own_last); } void mark_as_requiring_prelocking(TABLE_LIST **tables_own_last) { === modified file 'sql/sql_load.cc' --- sql/sql_load.cc 2013-06-24 06:00:42 +0000 +++ sql/sql_load.cc 2013-10-30 04:54:50 +0000 @@ -475,7 +475,7 @@ } } - if (!(error=test(read_info.error))) + if (!(error=mysql_test(read_info.error))) { table->next_number_field=table->found_next_number_field; @@ -919,7 +919,7 @@ thd->get_stmt_da()->inc_current_row_for_warning(); continue_loop:; } - DBUG_RETURN(test(read_info.error)); + DBUG_RETURN(mysql_test(read_info.error)); } @@ -1138,7 +1138,7 @@ thd->get_stmt_da()->inc_current_row_for_warning(); continue_loop:; } - DBUG_RETURN(test(read_info.error)); + DBUG_RETURN(mysql_test(read_info.error)); } @@ -1309,7 +1309,7 @@ thd->get_stmt_da()->inc_current_row_for_warning(); continue_loop:; } - DBUG_RETURN(test(read_info.error) || thd->is_error()); + DBUG_RETURN(mysql_test(read_info.error) || thd->is_error()); } /* load xml end */ === modified file 'sql/sql_optimizer.cc' --- sql/sql_optimizer.cc 2013-08-21 14:21:00 +0000 +++ sql/sql_optimizer.cc 2013-10-30 04:44:57 +0000 @@ -737,13 +737,13 @@ need_tmp= ((!plan_is_const() && ((select_distinct || !simple_order || !simple_group) || (group_list && order) || - test(select_options & OPTION_BUFFER_RESULT))) || + mysql_test(select_options & OPTION_BUFFER_RESULT))) || (rollup.state != ROLLUP::STATE_NONE && select_distinct)); /* Perform FULLTEXT search before all regular searches */ if (!(select_options & SELECT_DESCRIBE)) { - init_ftfuncs(thd, select_lex, test(order)); + init_ftfuncs(thd, select_lex, mysql_test(order)); optimize_fts_query(); } @@ -2541,7 +2541,7 @@ NESTED_JOIN *nested_join; TABLE_LIST *prev_table= 0; List_iterator li(*join_list); - bool straight_join= test(join->select_options & SELECT_STRAIGHT_JOIN); + bool straight_join= mysql_test(join->select_options & SELECT_STRAIGHT_JOIN); DBUG_ENTER("simplify_joins"); /* @@ -5468,8 +5468,8 @@ if (a->keypart != b->keypart) return (int) (a->keypart - b->keypart); // Place const values before other ones - if ((res= test((a->used_tables & ~OUTER_REF_TABLE_BIT)) - - test((b->used_tables & ~OUTER_REF_TABLE_BIT)))) + if ((res= mysql_test((a->used_tables & ~OUTER_REF_TABLE_BIT)) - + mysql_test((b->used_tables & ~OUTER_REF_TABLE_BIT)))) return res; /* Place rows that are not 'OPTIMIZE_REF_OR_NULL' first */ return (int) ((a->optimize & KEY_OPTIMIZE_REF_OR_NULL) - === modified file 'sql/sql_optimizer.h' --- sql/sql_optimizer.h 2013-08-21 14:21:00 +0000 +++ sql/sql_optimizer.h 2013-10-30 04:16:56 +0000 @@ -433,7 +433,7 @@ result= result_arg; lock= thd_arg->lock; select_lex= 0; //for safety - select_distinct= test(select_options & SELECT_DISTINCT); + select_distinct= mysql_test(select_options & SELECT_DISTINCT); no_order= 0; simple_order= 0; simple_group= 0; === modified file 'sql/sql_parse.cc' --- sql/sql_parse.cc 2013-08-23 03:57:09 +0000 +++ sql/sql_parse.cc 2013-10-30 04:55:27 +0000 @@ -6501,7 +6501,7 @@ if (!table) DBUG_RETURN(0); // End of memory alias_str= alias ? alias->str : table->table.str; - if (!test(table_options & TL_OPTION_ALIAS)) + if (!mysql_test(table_options & TL_OPTION_ALIAS)) { enum_ident_name_check ident_check_status= check_table_name(table->table.str, table->table.length, FALSE); @@ -6551,10 +6551,10 @@ 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= mysql_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= mysql_test(table_options & TL_OPTION_FORCE_INDEX); + ptr->ignore_leaves= mysql_test(table_options & TL_OPTION_IGNORE_LEAVES); ptr->derived= table->sel; if (!ptr->derived && is_infoschema_db(ptr->db, ptr->db_length)) { @@ -6645,7 +6645,7 @@ lex->add_to_query_tables(ptr); // Pure table aliases do not need to be locked: - if (!test(table_options & TL_OPTION_ALIAS)) + if (!mysql_test(table_options & TL_OPTION_ALIAS)) { ptr->mdl_request.init(MDL_key::TABLE, ptr->db, ptr->table_name, mdl_type, MDL_TRANSACTION); === modified file 'sql/sql_partition.cc' --- sql/sql_partition.cc 2013-08-12 14:22:41 +0000 +++ sql/sql_partition.cc 2013-10-30 04:55:55 +0000 @@ -3378,7 +3378,7 @@ } else { - DBUG_RETURN(list_index + test(left_endpoint ^ include_endpoint)); + DBUG_RETURN(list_index + mysql_test(left_endpoint ^ include_endpoint)); } } while (max_list_index >= min_list_index); notfound: @@ -5854,7 +5854,7 @@ if (mysql_trans_commit_alter_copy_data(thd)) error= 1; /* The error has been reported */ - DBUG_RETURN(test(error)); + DBUG_RETURN(mysql_test(error)); } @@ -7968,7 +7968,7 @@ index-in-ordered-array-of-list-constants (for LIST) space. */ store_key_image_to_rec(field, min_value, field_len); - bool include_endp= !test(flags & NEAR_MIN); + bool include_endp= !mysql_test(flags & NEAR_MIN); part_iter->part_nums.start= get_endpoint(part_info, 1, include_endp); if (!can_match_multiple_values && part_info->part_expr->null_value) { @@ -8003,7 +8003,7 @@ else { store_key_image_to_rec(field, max_value, field_len); - bool include_endp= !test(flags & NEAR_MAX); + bool include_endp= !mysql_test(flags & NEAR_MAX); part_iter->part_nums.end= get_endpoint(part_info, 0, include_endp); if (check_zero_dates && !zero_in_start_date && @@ -8170,8 +8170,8 @@ if ((ulonglong)b - (ulonglong)a == ~0ULL) DBUG_RETURN(-1); - a += test(flags & NEAR_MIN); - b += test(!(flags & NEAR_MAX)); + a += mysql_test(flags & NEAR_MIN); + b += mysql_test(!(flags & NEAR_MAX)); ulonglong n_values= b - a; /* === modified file 'sql/sql_planner.cc' --- sql/sql_planner.cc 2013-02-18 15:01:01 +0000 +++ sql/sql_planner.cc 2013-10-30 04:56:25 +0000 @@ -193,7 +193,7 @@ } } - bool have_a_case() { return test(handled_sj_equalities); } + bool have_a_case() { return mysql_test(handled_sj_equalities); } /** Check if an index can be used for LooseScan, part 1 @@ -571,7 +571,7 @@ } else { - found_constraint= test(found_part); + found_constraint= mysql_test(found_part); loose_scan_opt.check_ref_access_part1(s, key, start_key, found_part); /* Check if we found full key */ @@ -711,7 +711,7 @@ */ if (table->quick_keys.is_set(key) && !found_ref && //(C1) table->quick_key_parts[key] == max_key_part && //(C2) - table->quick_n_ranges[key] == 1+test(ref_or_null_part)) //(C3) + table->quick_n_ranges[key] == 1+mysql_test(ref_or_null_part)) //(C3) { tmp= records= (double) table->quick_rows[key]; } @@ -813,7 +813,7 @@ table->quick_key_parts[key] <= max_key_part && const_part & ((key_part_map)1 << table->quick_key_parts[key]) && - table->quick_n_ranges[key] == 1 + test(ref_or_null_part & + table->quick_n_ranges[key] == 1 + mysql_test(ref_or_null_part & const_part) && records > (double) table->quick_rows[key]) { @@ -1037,7 +1037,7 @@ best_key= 0; /* range/index_merge/ALL/index access method are "independent", so: */ best_ref_depends_map= 0; - best_uses_jbuf= test(!disable_jbuf); + best_uses_jbuf= mysql_test(!disable_jbuf); } } @@ -1101,7 +1101,7 @@ reset_nj_counters(join->join_list); - const bool straight_join= test(join->select_options & SELECT_STRAIGHT_JOIN); + const bool straight_join= mysql_test(join->select_options & SELECT_STRAIGHT_JOIN); table_map join_tables; ///< The tables involved in order selection if (emb_sjm_nest) === modified file 'sql/sql_prepare.cc' --- sql/sql_prepare.cc 2013-08-20 09:15:15 +0000 +++ sql/sql_prepare.cc 2013-10-30 04:46:01 +0000 @@ -1013,7 +1013,7 @@ typecode= sint2korr(read_pos); read_pos+= 2; - (**it).unsigned_flag= test(typecode & signed_bit); + (**it).unsigned_flag= mysql_test(typecode & signed_bit); setup_one_conversion_function(thd, *it, (uchar) (typecode & ~signed_bit)); } } @@ -2694,7 +2694,7 @@ DBUG_PRINT("exec_query", ("%s", stmt->query())); DBUG_PRINT("info",("stmt: 0x%lx", (long) stmt)); - open_cursor= test(flags & (ulong) CURSOR_TYPE_READ_ONLY); + open_cursor= mysql_test(flags & (ulong) CURSOR_TYPE_READ_ONLY); thd->protocol= &thd->protocol_binary; stmt->execute_loop(&expanded_query, open_cursor, packet, packet_end); === modified file 'sql/sql_prepare.h' --- sql/sql_prepare.h 2013-06-03 11:50:30 +0000 +++ sql/sql_prepare.h 2013-10-30 04:50:01 +0000 @@ -289,7 +289,7 @@ one. Never fails. */ - bool has_next_result() const { return test(m_current_rset->m_next_rset); } + bool has_next_result() const { return mysql_test(m_current_rset->m_next_rset); } /** Only valid to call if has_next_result() returned true. Otherwise the result is undefined. @@ -297,7 +297,7 @@ bool move_to_next_result() { m_current_rset= m_current_rset->m_next_rset; - return test(m_current_rset); + return mysql_test(m_current_rset); } ~Ed_connection() { free_old_result(); } === modified file 'sql/sql_select.cc' --- sql/sql_select.cc 2013-08-21 14:21:00 +0000 +++ sql/sql_select.cc 2013-10-30 04:57:05 +0000 @@ -789,7 +789,7 @@ } if (!(select_options & SELECT_DESCRIBE)) - init_ftfuncs(thd, select_lex, test(order)); + init_ftfuncs(thd, select_lex, mysql_test(order)); DBUG_VOID_RETURN; } @@ -931,7 +931,7 @@ sjm_exec_list.empty(); keyuse.clear(); - DBUG_RETURN(test(error)); + DBUG_RETURN(mysql_test(error)); } @@ -1696,7 +1696,7 @@ for (uint part_no= 0 ; part_no < keyparts ; part_no++) { keyuse= chosen_keyuses[part_no]; - uint maybe_null= test(keyinfo->key_part[part_no].null_bit); + uint maybe_null= mysql_test(keyinfo->key_part[part_no].null_bit); if (keyuse->val->type() == Item::FIELD_ITEM) { @@ -1934,7 +1934,7 @@ new_cond->argument_list()->push_back(fix); used_tables|= fix->used_tables(); } - n_marked += test(item->marker == ICP_COND_USES_INDEX_ONLY); + n_marked += mysql_test(item->marker == ICP_COND_USES_INDEX_ONLY); } if (n_marked ==((Item_cond*)cond)->argument_list()->elements) cond->marker= ICP_COND_USES_INDEX_ONLY; @@ -1963,7 +1963,7 @@ if (!fix) return NULL; new_cond->argument_list()->push_back(fix); - n_marked += test(item->marker == ICP_COND_USES_INDEX_ONLY); + n_marked += mysql_test(item->marker == ICP_COND_USES_INDEX_ONLY); } if (n_marked ==((Item_cond*)cond)->argument_list()->elements) cond->marker= ICP_COND_USES_INDEX_ONLY; @@ -2768,7 +2768,7 @@ bool make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) { - const bool statistics= test(!(join->select_options & SELECT_DESCRIBE)); + const bool statistics= mysql_test(!(join->select_options & SELECT_DESCRIBE)); DBUG_ENTER("make_join_readinfo"); @@ -4437,7 +4437,7 @@ else return 0; } - return test(!b); + return mysql_test(!b); } /** @@ -5187,7 +5187,7 @@ or end_write_group()) if JOIN::group is set to false. */ // the temporary table was explicitly requested - DBUG_ASSERT(test(select_options & OPTION_BUFFER_RESULT)); + DBUG_ASSERT(mysql_test(select_options & OPTION_BUFFER_RESULT)); // the temporary table does not have a grouping expression DBUG_ASSERT(!join_tab[curr_tmp_table].table->group); } === modified file 'sql/sql_select.h' --- sql/sql_select.h 2013-06-25 06:34:10 +0000 +++ sql/sql_select.h 2013-10-30 04:16:48 +0000 @@ -808,7 +808,7 @@ used_rowid_fields= 1; used_fieldlength+= table->file->ref_length; } - return test(used_rowid_fields); + return mysql_test(used_rowid_fields); } bool is_inner_table_of_outer_join() { === modified file 'sql/sql_show.cc' --- sql/sql_show.cc 2013-08-23 13:28:13 +0000 +++ sql/sql_show.cc 2013-10-30 04:57:37 +0000 @@ -740,7 +740,7 @@ m_view_access_denied_message_ptr(NULL) { - m_sctx = test(m_top_view->security_ctx) ? + m_sctx = mysql_test(m_top_view->security_ctx) ? m_top_view->security_ctx : thd->security_ctx; } @@ -1835,7 +1835,7 @@ 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(mysql_test(key_info->flags & HA_USES_COMMENT) == (key_info->comment.length > 0)); if (key_info->flags & HA_USES_COMMENT) { @@ -4645,7 +4645,7 @@ #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, mysql_test(tables->schema_table)); col_access= get_column_grant(thd, &tables->grant, db_name->str, table_name->str, field->field_name) & COL_ACLS; @@ -4786,13 +4786,13 @@ 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[mysql_test(hton->commit)]; table->field[3]->store(tmp->str, tmp->length, scs); table->field[3]->set_notnull(); - tmp= &yesno[test(hton->prepare)]; + tmp= &yesno[mysql_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[mysql_test(hton->savepoint_set)]; table->field[5]->store(tmp->str, tmp->length, scs); table->field[5]->set_notnull(); @@ -5368,7 +5368,7 @@ else table->field[14]->store("", 0, cs); table->field[14]->set_notnull(); - DBUG_ASSERT(test(key_info->flags & HA_USES_COMMENT) == + DBUG_ASSERT(mysql_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, === modified file 'sql/sql_table.cc' --- sql/sql_table.cc 2013-08-20 09:15:15 +0000 +++ sql/sql_table.cc 2013-10-30 04:58:05 +0000 @@ -3890,7 +3890,7 @@ with length (unlike blobs, where ft code takes data length from a data prefix, ignoring column->length). */ - column->length=test(f_is_blob(sql_field->pack_flag)); + column->length=mysql_test(f_is_blob(sql_field->pack_flag)); } else { @@ -7063,7 +7063,7 @@ key= new Key(key_type, key_name, strlen(key_name), &key_create_info, - test(key_info->flags & HA_GENERATED_KEY), + mysql_test(key_info->flags & HA_GENERATED_KEY), key_parts); new_key_list.push_back(key); } @@ -9102,7 +9102,7 @@ handlerton **new_engine= &create_info->db_type; handlerton *req_engine= *new_engine; bool no_substitution= - test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION); + mysql_test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION); if (!(*new_engine= ha_checktype(thd, ha_legacy_type(req_engine), no_substitution, 1))) DBUG_RETURN(true); === modified file 'sql/sql_time.cc' --- sql/sql_time.cc 2012-04-27 11:57:38 +0000 +++ sql/sql_time.cc 2013-10-30 04:47:05 +0000 @@ -105,9 +105,9 @@ uint days; ulong daynr=calc_daynr(l_time->year,l_time->month,l_time->day); ulong first_daynr=calc_daynr(l_time->year,1,1); - bool monday_first= test(week_behaviour & WEEK_MONDAY_FIRST); - bool week_year= test(week_behaviour & WEEK_YEAR); - bool first_weekday= test(week_behaviour & WEEK_FIRST_WEEKDAY); + bool monday_first= mysql_test(week_behaviour & WEEK_MONDAY_FIRST); + bool week_year= mysql_test(week_behaviour & WEEK_YEAR); + bool first_weekday= mysql_test(week_behaviour & WEEK_FIRST_WEEKDAY); uint weekday=calc_weekday(first_daynr, !monday_first); *year=l_time->year; === modified file 'sql/sql_tmp_table.cc' --- sql/sql_tmp_table.cc 2013-07-03 08:13:51 +0000 +++ sql/sql_tmp_table.cc 2013-10-30 04:47:19 +0000 @@ -1009,7 +1009,7 @@ table->group=group; /* Table is grouped by key */ param->group_buff=group_buff; share->keys=1; - share->uniques= test(using_unique_constraint); + share->uniques= mysql_test(using_unique_constraint); table->key_info= share->key_info= keyinfo; keyinfo->key_part= key_part_info; keyinfo->flags=HA_NOSAME; @@ -1031,7 +1031,7 @@ { cur_group->buff=(char*) group_buff; cur_group->field= field->new_key_field(thd->mem_root, table, - group_buff + test(maybe_null)); + group_buff + mysql_test(maybe_null)); if (!cur_group->field) goto err; /* purecov: inspected */ @@ -1079,7 +1079,7 @@ null_pack_length-=hidden_null_pack_length; keyinfo->user_defined_key_parts= ((field_count-param->hidden_field_count) + - (share->uniques ? test(null_pack_length) : 0)); + (share->uniques ? mysql_test(null_pack_length) : 0)); keyinfo->actual_key_parts= keyinfo->user_defined_key_parts; table->distinct= 1; share->keys= 1; @@ -1403,7 +1403,7 @@ { DBUG_PRINT("info",("Creating group key in temporary table")); share->keys=1; - share->uniques= test(using_unique_constraint); + share->uniques= mysql_test(using_unique_constraint); table->key_info= table->s->key_info= keyinfo; keyinfo->key_part=key_part_info; keyinfo->actual_flags= keyinfo->flags= HA_NOSAME; === modified file 'sql/sql_union.cc' --- sql/sql_union.cc 2013-08-21 13:03:29 +0000 +++ sql/sql_union.cc 2013-10-30 04:47:32 +0000 @@ -271,7 +271,7 @@ bool is_union_select; DBUG_ENTER("st_select_lex_unit::prepare"); - describe= test(additional_options & SELECT_DESCRIBE); + describe= mysql_test(additional_options & SELECT_DESCRIBE); /* result object should be reassigned even if preparing already done for @@ -462,7 +462,7 @@ if (global_parameters->ftfunc_list->elements) create_options= create_options | TMP_TABLE_FORCE_MYISAM; - if (union_result->create_result_table(thd, &types, test(union_distinct), + if (union_result->create_result_table(thd, &types, mysql_test(union_distinct), create_options, "", FALSE, TRUE)) goto err; memset(&result_table_list, 0, sizeof(result_table_list)); === modified file 'sql/sql_update.cc' --- sql/sql_update.cc 2013-06-06 13:59:11 +0000 +++ sql/sql_update.cc 2013-10-30 04:47:44 +0000 @@ -222,7 +222,7 @@ ha_rows *found_return, ha_rows *updated_return) { bool using_limit= limit != HA_POS_ERROR; - bool safe_update= test(thd->variables.option_bits & OPTION_SAFE_UPDATES); + bool safe_update= mysql_test(thd->variables.option_bits & OPTION_SAFE_UPDATES); bool used_key_is_modified= FALSE, transactional_table, will_batch; int res; int error= 1; === modified file 'sql/sys_vars.cc' --- sql/sys_vars.cc 2013-07-24 12:07:08 +0000 +++ sql/sys_vars.cc 2013-10-30 04:48:22 +0000 @@ -2067,7 +2067,7 @@ { SV *sv= (type == OPT_GLOBAL) ? &global_system_variables : &thd->variables; sv->engine_condition_pushdown= - test(sv->optimizer_switch & OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); + mysql_test(sv->optimizer_switch & OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN); return false; } === modified file 'sql/table.cc' --- sql/table.cc 2013-05-29 05:41:46 +0000 +++ sql/table.cc 2013-10-30 04:48:37 +0000 @@ -1076,7 +1076,7 @@ } share->db_record_offset= 1; /* Set temporarily a good value for db_low_byte_first */ - share->db_low_byte_first= test(legacy_db_type != DB_TYPE_ISAM); + share->db_low_byte_first= mysql_test(legacy_db_type != DB_TYPE_ISAM); error=4; share->max_rows= uint4korr(head+18); share->min_rows= uint4korr(head+22); @@ -2388,9 +2388,9 @@ else if (outparam->file) { handler::Table_flags flags= outparam->file->ha_table_flags(); - outparam->no_replicate= ! test(flags & (HA_BINLOG_STMT_CAPABLE + outparam->no_replicate= ! mysql_test(flags & (HA_BINLOG_STMT_CAPABLE | HA_BINLOG_ROW_CAPABLE)) - || test(flags & HA_HAS_OWN_BINLOGGING); + || mysql_test(flags & HA_HAS_OWN_BINLOGGING); } else { @@ -2942,7 +2942,7 @@ /* header */ fileinfo[0]=(uchar) 254; fileinfo[1]= 1; - fileinfo[2]= FRM_VER+3+ test(create_info->varchar); + fileinfo[2]= FRM_VER+3+ mysql_test(create_info->varchar); fileinfo[3]= (uchar) ha_legacy_type( ha_checktype(thd,ha_legacy_type(create_info->db_type),0,0)); === modified file 'sql/transaction.cc' --- sql/transaction.cc 2013-08-26 11:25:54 +0000 +++ sql/transaction.cc 2013-10-30 04:59:11 +0000 @@ -143,7 +143,7 @@ thd->server_status&= ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); - res= test(ha_commit_trans(thd, TRUE)); + res= mysql_test(ha_commit_trans(thd, TRUE)); } thd->variables.option_bits&= ~OPTION_BEGIN; @@ -172,7 +172,7 @@ compatibility. */ const bool user_is_super= - test(thd->security_ctx->master_access & SUPER_ACL); + mysql_test(thd->security_ctx->master_access & SUPER_ACL); if (opt_readonly && !user_is_super) { my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only"); @@ -191,7 +191,7 @@ if (flags & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT) res= ha_start_consistent_snapshot(thd); - DBUG_RETURN(test(res)); + DBUG_RETURN(mysql_test(res)); } @@ -230,7 +230,7 @@ thd->transaction.all.reset_unsafe_rollback_flags(); thd->lex->start_transaction_opt= 0; - DBUG_RETURN(test(res)); + DBUG_RETURN(mysql_test(res)); } @@ -278,7 +278,7 @@ thd->server_status&= ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); - res= test(ha_commit_trans(thd, TRUE)); + res= mysql_test(ha_commit_trans(thd, TRUE)); } else if (tc_log) tc_log->commit(thd, true); @@ -334,7 +334,7 @@ thd->transaction.all.reset_unsafe_rollback_flags(); thd->lex->start_transaction_opt= 0; - DBUG_RETURN(test(res)); + DBUG_RETURN(mysql_test(res)); } @@ -380,7 +380,7 @@ /* Rollback should clear transaction_rollback_request flag. */ DBUG_ASSERT(! thd->transaction_rollback_request); - DBUG_RETURN(test(res)); + DBUG_RETURN(mysql_test(res)); } @@ -443,7 +443,7 @@ thd->transaction.stmt.reset(); - DBUG_RETURN(test(res)); + DBUG_RETURN(mysql_test(res)); } @@ -647,7 +647,7 @@ if (!res && !binlog_on) thd->mdl_context.rollback_to_savepoint(sv->mdl_savepoint); - DBUG_RETURN(test(res)); + DBUG_RETURN(mysql_test(res)); } @@ -689,7 +689,7 @@ thd->transaction.savepoints= sv->prev; - DBUG_RETURN(test(res)); + DBUG_RETURN(mysql_test(res)); } @@ -853,7 +853,7 @@ else if (xa_state == XA_IDLE && thd->lex->xa_opt == XA_ONE_PHASE) { int r= ha_commit_trans(thd, TRUE); - if ((res= test(r))) + if ((res= mysql_test(r))) my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0)); } else if (xa_state == XA_PREPARED && thd->lex->xa_opt == XA_NONE) @@ -881,9 +881,9 @@ DEBUG_SYNC(thd, "trans_xa_commit_after_acquire_commit_lock"); if (tc_log) - res= test(tc_log->commit(thd, /* all */ true)); + res= mysql_test(tc_log->commit(thd, /* all */ true)); else - res= test(ha_commit_low(thd, /* all */ true)); + res= mysql_test(ha_commit_low(thd, /* all */ true)); if (res) my_error(ER_XAER_RMERR, MYF(0)); === modified file 'sql/tztime.cc' --- sql/tztime.cc 2013-02-26 05:45:28 +0000 +++ sql/tztime.cc 2013-10-30 04:49:10 +0000 @@ -2643,7 +2643,7 @@ if (TYPE_SIGNED(time_t)) { t= -100; - localtime_negative= test(localtime_r(&t, &tmp) != 0); + localtime_negative= mysql_test(localtime_r(&t, &tmp) != 0); printf("localtime_r %s negative params \ (time_t=%d is %d-%d-%d %d:%d:%d)\n", (localtime_negative ? "supports" : "doesn't support"), (int)t, === modified file 'sql/unireg.cc' --- sql/unireg.cc 2012-11-01 12:10:22 +0000 +++ sql/unireg.cc 2013-10-30 04:49:27 +0000 @@ -287,7 +287,7 @@ maxlength=(uint) next_io_size((ulong) (uint2korr(forminfo_p)+1000)); int2store(forminfo+2,maxlength); int4store(fileinfo+10,(ulong) (filepos+maxlength)); - fileinfo[26]= (uchar) test((create_info->max_rows == 1) && + fileinfo[26]= (uchar) mysql_test((create_info->max_rows == 1) && (create_info->min_rows == 1) && (keys == 0)); int2store(fileinfo+28,key_info_length); === modified file 'storage/federated/ha_federated.cc' --- storage/federated/ha_federated.cc 2013-04-02 09:11:49 +0000 +++ storage/federated/ha_federated.cc 2013-10-30 04:04:05 +0000 @@ -1462,7 +1462,7 @@ ptr was incremented by 1. Since store_length still counts null-byte, we need to subtract 1 from store_length. */ - ptr+= store_length - test(key_part->null_bit); + ptr+= store_length - mysql_test(key_part->null_bit); if (tmp.append(STRING_WITH_LEN(" AND "))) goto err; @@ -2104,7 +2104,7 @@ this? Because we only are updating one record, and LIMIT enforces this. */ - bool has_a_primary_key= test(table->s->primary_key != MAX_KEY); + bool has_a_primary_key= mysql_test(table->s->primary_key != MAX_KEY); /* buffers for following strings === modified file 'storage/heap/ha_heap.cc' --- storage/heap/ha_heap.cc 2012-10-30 07:59:01 +0000 +++ storage/heap/ha_heap.cc 2013-10-30 04:04:27 +0000 @@ -97,7 +97,7 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) { - internal_table= test(test_if_locked & HA_OPEN_INTERNAL_TABLE); + internal_table= mysql_test(test_if_locked & HA_OPEN_INTERNAL_TABLE); if (internal_table || (!(file= heap_open(name, mode)) && my_errno == ENOENT)) { HP_CREATE_INFO create_info; @@ -113,7 +113,7 @@ if (rc) goto end; - implicit_emptied= test(created_new_share); + implicit_emptied= mysql_test(created_new_share); if (internal_table) file= heap_open_from_share(internal_share, mode); else === modified file 'storage/heap/hp_hash.c' --- storage/heap/hp_hash.c 2012-03-06 14:29:42 +0000 +++ storage/heap/hp_hash.c 2013-10-30 04:05:03 +0000 @@ -596,7 +596,7 @@ { if (seg->null_bit) { - int found_null=test(rec[seg->null_pos] & seg->null_bit); + int found_null=mysql_test(rec[seg->null_pos] & seg->null_bit); if (found_null != (int) *key++) return 1; if (found_null) @@ -684,7 +684,7 @@ uint char_length= seg->length; uchar *pos= (uchar*) rec + seg->start; if (seg->null_bit) - *key++= test(rec[seg->null_pos] & seg->null_bit); + *key++= mysql_test(rec[seg->null_pos] & seg->null_bit); if (cs->mbmaxlen > 1) { char_length= my_charpos(cs, pos, pos + seg->length, @@ -717,7 +717,7 @@ uint char_length; if (seg->null_bit) { - if (!(*key++= 1 - test(rec[seg->null_pos] & seg->null_bit))) + if (!(*key++= 1 - mysql_test(rec[seg->null_pos] & seg->null_bit))) continue; } if (seg->flag & HA_SWAP_KEY) === modified file 'storage/myisam/ft_boolean_search.c' --- storage/myisam/ft_boolean_search.c 2013-02-26 05:45:28 +0000 +++ storage/myisam/ft_boolean_search.c 2013-10-30 04:06:42 +0000 @@ -533,7 +533,7 @@ { if (ftbe->flags & FTB_FLAG_NO || /* 2 */ ftbe->up->ythresh - ftbe->up->yweaks > - (uint) test(ftbe->flags & FTB_FLAG_YES)) /* 1 */ + (uint) mysql_test(ftbe->flags & FTB_FLAG_YES)) /* 1 */ { FTB_EXPR *top_ftbe=ftbe->up; ftbw->docid[0]=HA_OFFSET_ERROR; === modified file 'storage/myisam/ha_myisam.cc' --- storage/myisam/ha_myisam.cc 2012-10-30 07:59:01 +0000 +++ storage/myisam/ha_myisam.cc 2013-10-30 04:07:11 +0000 @@ -464,8 +464,8 @@ { DBUG_PRINT("error", ("Key %d has different definition", i)); DBUG_PRINT("error", ("t1_fulltext= %d, t2_fulltext=%d", - test(t1_keyinfo[i].flag & HA_FULLTEXT), - test(t2_keyinfo[i].flag & HA_FULLTEXT))); + mysql_test(t1_keyinfo[i].flag & HA_FULLTEXT), + mysql_test(t2_keyinfo[i].flag & HA_FULLTEXT))); DBUG_RETURN(1); } if (t1_keyinfo[i].flag & HA_SPATIAL && t2_keyinfo[i].flag & HA_SPATIAL) @@ -475,8 +475,8 @@ { DBUG_PRINT("error", ("Key %d has different definition", i)); DBUG_PRINT("error", ("t1_spatial= %d, t2_spatial=%d", - test(t1_keyinfo[i].flag & HA_SPATIAL), - test(t2_keyinfo[i].flag & HA_SPATIAL))); + mysql_test(t1_keyinfo[i].flag & HA_SPATIAL), + mysql_test(t2_keyinfo[i].flag & HA_SPATIAL))); DBUG_RETURN(1); } if ((!mysql_40_compat && @@ -1067,7 +1067,7 @@ share->state.key_map); uint testflag=param.testflag; #ifdef HAVE_MMAP - bool remap= test(share->file_map); + bool remap= mysql_test(share->file_map); /* mi_repair*() functions family use file I/O even if memory mapping is available. @@ -1609,7 +1609,7 @@ if (h->end_range && h->compare_key_icp(h->end_range) > 0) return ICP_OUT_OF_RANGE; /* caller should return HA_ERR_END_OF_FILE already */ - return (ICP_RESULT) test(h->pushed_idx_cond->val_int()); + return (ICP_RESULT) mysql_test(h->pushed_idx_cond->val_int()); } C_MODE_END === modified file 'storage/myisam/mi_check.c' --- storage/myisam/mi_check.c 2013-07-24 12:07:08 +0000 +++ storage/myisam/mi_check.c 2013-10-30 04:11:29 +0000 @@ -1159,7 +1159,7 @@ if (param->testflag & (T_EXTEND | T_MEDIUM | T_VERBOSE)) { if (_mi_rec_check(info,record, info->rec_buff,block_info.rec_len, - test(info->s->calc_checksum))) + mysql_test(info->s->calc_checksum))) { mi_check_print_error(param,"Found wrong packed record at %s", llstr(start_recpos,llbuff)); @@ -2386,7 +2386,7 @@ if (keyseg[i].flag & HA_SPACE_PACK) sort_param.key_length+=get_pack_length(keyseg[i].length); if (keyseg[i].flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART)) - sort_param.key_length+=2 + test(keyseg[i].length >= 127); + sort_param.key_length+=2 + mysql_test(keyseg[i].length >= 127); if (keyseg[i].flag & HA_NULL_PART) sort_param.key_length++; } @@ -2878,7 +2878,7 @@ if (keyseg->flag & HA_SPACE_PACK) sort_param[i].key_length+=get_pack_length(keyseg->length); if (keyseg->flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART)) - sort_param[i].key_length+=2 + test(keyseg->length >= 127); + sort_param[i].key_length+=2 + mysql_test(keyseg->length >= 127); if (keyseg->flag & HA_NULL_PART) sort_param[i].key_length++; } @@ -2895,7 +2895,7 @@ sort_info.total_keys=i; sort_param[0].master= 1; sort_param[0].fix_datafile= (my_bool)(! rep_quick); - sort_param[0].calc_checksum= test(param->testflag & T_CALC_CHECKSUM); + sort_param[0].calc_checksum= mysql_test(param->testflag & T_CALC_CHECKSUM); if (!ftparser_alloc_param(info)) goto err; @@ -3566,7 +3566,7 @@ sort_param->find_length, (param->testflag & T_QUICK) && sort_param->calc_checksum && - test(info->s->calc_checksum))) + mysql_test(info->s->calc_checksum))) { mi_check_print_info(param,"Found wrong packed record at %s", llstr(sort_param->start_recpos,llbuff)); @@ -3724,7 +3724,7 @@ do { - block_length=reclength+ 3 + test(reclength >= (65520-3)); + block_length=reclength+ 3 + mysql_test(reclength >= (65520-3)); if (block_length < share->base.min_block_length) block_length=share->base.min_block_length; info->update|=HA_STATE_WRITE_AT_END; @@ -4643,7 +4643,7 @@ const uchar *end=buf+length; for (crc=0; buf != end; buf++) crc=((crc << 1) + *((uchar*) buf)) + - test(crc & (((ha_checksum) 1) << (8*sizeof(ha_checksum)-1))); + mysql_test(crc & (((ha_checksum) 1) << (8*sizeof(ha_checksum)-1))); return crc; } === modified file 'storage/myisam/mi_create.c' --- storage/myisam/mi_create.c 2012-08-29 12:49:37 +0000 +++ storage/myisam/mi_create.c 2013-10-30 04:09:43 +0000 @@ -134,7 +134,7 @@ pack_reclength++; min_pack_length++; /* We must test for 257 as length includes pack-length */ - if (test(rec->length >= 257)) + if (mysql_test(rec->length >= 257)) { long_varchar_count++; pack_reclength+= 2; /* May be packed on 3 bytes */ @@ -193,7 +193,7 @@ packed=(packed+7)/8; if (pack_reclength != INT_MAX32) pack_reclength+= reclength+packed + - test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_OPTION_PACK_RECORD)); + mysql_test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_OPTION_PACK_RECORD)); min_pack_length+=packed; if (!ci->data_file_length && ci->max_rows) @@ -544,7 +544,7 @@ share.base.records=ci->max_rows; share.base.reloc= ci->reloc_rows; share.base.reclength=real_reclength; - share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM); + share.base.pack_reclength=reclength+ mysql_test(options & HA_OPTION_CHECKSUM); share.base.max_pack_length=pack_reclength; share.base.min_pack_length=min_pack_length; share.base.pack_bits=packed; === modified file 'storage/myisam/mi_delete.c' --- storage/myisam/mi_delete.c 2011-09-07 10:08:09 +0000 +++ storage/myisam/mi_delete.c 2013-10-30 04:09:56 +0000 @@ -352,7 +352,7 @@ DBUG_RETURN(-1); } /* Page will be update later if we return 1 */ - DBUG_RETURN(test(length <= (info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH : + DBUG_RETURN(mysql_test(length <= (info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH : (uint) keyinfo->underflow_block_length))); } save_flag=1; === modified file 'storage/myisam/mi_dynrec.c' --- storage/myisam/mi_dynrec.c 2012-10-29 07:30:22 +0000 +++ storage/myisam/mi_dynrec.c 2013-10-30 04:10:28 +0000 @@ -414,7 +414,7 @@ { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; - if ((tmp=reclength+3 + test(reclength >= (65520-3))) < + if ((tmp=reclength+3 + mysql_test(reclength >= (65520-3))) < info->s->base.min_block_length) tmp= info->s->base.min_block_length; else @@ -862,7 +862,7 @@ if (length < reclength) { uint tmp=MY_ALIGN(reclength - length + 3 + - test(reclength >= 65520L),MI_DYN_ALIGN_SIZE); + mysql_test(reclength >= 65520L),MI_DYN_ALIGN_SIZE); /* Don't create a block bigger than MI_MAX_BLOCK_LENGTH */ tmp= MY_MIN(length+tmp, MI_MAX_BLOCK_LENGTH)-length; /* Check if we can extend this block */ @@ -1023,7 +1023,7 @@ pos++; } new_length=(uint) (end-pos); - if (new_length +1 + test(rec->length > 255 && new_length > 127) + if (new_length +1 + mysql_test(rec->length > 255 && new_length > 127) < length) { if (rec->length > 255 && new_length > 127) @@ -1143,7 +1143,7 @@ pos++; } new_length=(uint) (end-pos); - if (new_length +1 + test(rec->length > 255 && new_length > 127) + if (new_length +1 + mysql_test(rec->length > 255 && new_length > 127) < length) { if (!(flag & bit)) @@ -1195,7 +1195,7 @@ else to+= length; } - if (packed_length != (uint) (to - rec_buff) + test(info->s->calc_checksum) || + if (packed_length != (uint) (to - rec_buff) + mysql_test(info->s->calc_checksum) || (bit != 1 && (flag & ~(bit - 1)))) goto err; if (with_checksum && ((uchar) info->checksum != (uchar) *to)) === modified file 'storage/myisam/mi_extra.c' --- storage/myisam/mi_extra.c 2011-12-09 21:08:37 +0000 +++ storage/myisam/mi_extra.c 2013-10-30 04:10:42 +0000 @@ -55,7 +55,7 @@ { reinit_io_cache(&info->rec_cache,READ_CACHE,0, (pbool) (info->lock_type != F_UNLCK), - (pbool) test(info->update & HA_STATE_ROW_CHANGED) + (pbool) mysql_test(info->update & HA_STATE_ROW_CHANGED) ); } info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND | @@ -116,7 +116,7 @@ { reinit_io_cache(&info->rec_cache,READ_CACHE,info->nextpos, (pbool) (info->lock_type != F_UNLCK), - (pbool) test(info->update & HA_STATE_ROW_CHANGED)); + (pbool) mysql_test(info->update & HA_STATE_ROW_CHANGED)); info->update&= ~HA_STATE_ROW_CHANGED; if (share->concurrent_insert) info->rec_cache.end_of_file=info->state->data_file_length; === modified file 'storage/myisam/mi_locking.c' --- storage/myisam/mi_locking.c 2011-09-07 10:08:09 +0000 +++ storage/myisam/mi_locking.c 2013-10-30 04:10:54 +0000 @@ -567,5 +567,5 @@ if (!lock_error) lock_error=mi_lock_database(info,old_lock); } - return test(lock_error || write_error); + return mysql_test(lock_error || write_error); } === modified file 'storage/myisam/mi_open.c' --- storage/myisam/mi_open.c 2012-11-14 11:44:35 +0000 +++ storage/myisam/mi_open.c 2013-10-30 04:11:03 +0000 @@ -510,7 +510,7 @@ info.s=share; if (_mi_read_pack_info(&info, (pbool) - test(!(share->options & + mysql_test(!(share->options & (HA_OPTION_PACK_RECORD | HA_OPTION_TEMP_COMPRESS_RECORD))))) goto err; === modified file 'storage/myisam/mi_search.c' --- storage/myisam/mi_search.c 2012-11-09 13:51:46 +0000 +++ storage/myisam/mi_search.c 2013-10-30 04:11:16 +0000 @@ -82,7 +82,7 @@ } if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, - test(!(nextflag & SEARCH_SAVE_BUFF))))) + mysql_test(!(nextflag & SEARCH_SAVE_BUFF))))) goto err; DBUG_DUMP("page", buff, mi_getint(buff)); @@ -125,7 +125,7 @@ { uchar *old_buff=buff; if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, - test(!(nextflag & SEARCH_SAVE_BUFF))))) + mysql_test(!(nextflag & SEARCH_SAVE_BUFF))))) goto err; keypos=buff+(keypos-old_buff); maxpos=buff+(maxpos-old_buff); === modified file 'storage/myisam/myisamchk.c' --- storage/myisam/myisamchk.c 2013-03-20 05:56:02 +0000 +++ storage/myisam/myisamchk.c 2013-10-30 04:11:52 +0000 @@ -1118,7 +1118,7 @@ if ((param->testflag & T_AUTO_INC) || ((param->testflag & T_REP_ANY) && info->s->base.auto_key)) update_auto_increment_key(param, info, - (my_bool) !test(param->testflag & T_AUTO_INC)); + (my_bool) !mysql_test(param->testflag & T_AUTO_INC)); if (!(param->testflag & T_DESCRIPT)) { === modified file 'strings/decimal.c' --- strings/decimal.c 2013-05-23 08:16:26 +0000 +++ strings/decimal.c 2013-10-30 05:02:01 +0000 @@ -353,7 +353,7 @@ if (!(intg_len= fixed_precision ? fixed_intg : intg)) intg_len= 1; frac_len= fixed_precision ? fixed_decimals : frac; - len= from->sign + intg_len + test(frac) + frac_len; + len= from->sign + intg_len + mysql_test(frac) + frac_len; if (fixed_precision) { if (frac > fixed_decimals) @@ -387,7 +387,7 @@ else frac-=j; frac_len= frac; - len= from->sign + intg_len + test(frac) + frac_len; + len= from->sign + intg_len + mysql_test(frac) + frac_len; } *to_len= len; s[len]= 0; === modified file 'vio/vio.c' --- vio/vio.c 2013-01-02 07:54:14 +0000 +++ vio/vio.c 2013-10-30 04:13:42 +0000 @@ -202,7 +202,7 @@ if (old_vio.write_timeout >= 0) ret|= vio_timeout(vio, 1, old_vio.write_timeout); - DBUG_RETURN(test(ret)); + DBUG_RETURN(mysql_test(ret)); } === modified file 'vio/viosocket.c' --- vio/viosocket.c 2013-02-26 05:45:28 +0000 +++ vio/viosocket.c 2013-10-30 04:14:08 +0000 @@ -854,16 +854,16 @@ switch (event) { case VIO_IO_EVENT_READ: - ret= test(FD_ISSET(fd, &readfds)); + ret= mysql_test(FD_ISSET(fd, &readfds)); break; case VIO_IO_EVENT_WRITE: case VIO_IO_EVENT_CONNECT: - ret= test(FD_ISSET(fd, &writefds)); + ret= mysql_test(FD_ISSET(fd, &writefds)); break; } /* Error conditions pending? */ - ret|= test(FD_ISSET(fd, &exceptfds)); + ret|= mysql_test(FD_ISSET(fd, &exceptfds)); /* Not a timeout, ensure that a condition was met. */ DBUG_ASSERT(ret); @@ -946,7 +946,7 @@ #else errno= error; #endif - ret= test(error); + ret= mysql_test(error); } } @@ -957,7 +957,7 @@ DBUG_RETURN(TRUE); } - DBUG_RETURN(test(ret)); + DBUG_RETURN(mysql_test(ret)); }