summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index bed9499834a..b3be7339849 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -36,7 +36,7 @@
ulonglong Item_sum::ram_limitation(THD *thd)
{
- return min(thd->variables.tmp_table_size,
+ return MY_MIN(thd->variables.tmp_table_size,
thd->variables.max_heap_table_size);
}
@@ -1629,18 +1629,18 @@ void Item_sum_avg::fix_length_and_dec()
if (hybrid_type == DECIMAL_RESULT)
{
int precision= args[0]->decimal_precision() + prec_increment;
- decimals= min(args[0]->decimals + prec_increment, DECIMAL_MAX_SCALE);
+ decimals= MY_MIN(args[0]->decimals + prec_increment, DECIMAL_MAX_SCALE);
max_length= my_decimal_precision_to_length_no_truncation(precision,
decimals,
unsigned_flag);
- f_precision= min(precision+DECIMAL_LONGLONG_DIGITS, DECIMAL_MAX_PRECISION);
+ f_precision= MY_MIN(precision+DECIMAL_LONGLONG_DIGITS, DECIMAL_MAX_PRECISION);
f_scale= args[0]->decimals;
dec_bin_size= my_decimal_get_binary_size(f_precision, f_scale);
}
else
{
- decimals= min(args[0]->decimals + prec_increment, NOT_FIXED_DEC);
- max_length= min(args[0]->max_length + prec_increment, float_length(decimals));
+ decimals= MY_MIN(args[0]->decimals + prec_increment, NOT_FIXED_DEC);
+ max_length= MY_MIN(args[0]->max_length + prec_increment, float_length(decimals));
}
}
@@ -1836,13 +1836,13 @@ void Item_sum_variance::fix_length_and_dec()
switch (args[0]->result_type()) {
case REAL_RESULT:
case STRING_RESULT:
- decimals= min(args[0]->decimals + 4, NOT_FIXED_DEC);
+ decimals= MY_MIN(args[0]->decimals + 4, NOT_FIXED_DEC);
break;
case INT_RESULT:
case DECIMAL_RESULT:
{
int precision= args[0]->decimal_precision()*2 + prec_increment;
- decimals= min(args[0]->decimals + prec_increment, DECIMAL_MAX_SCALE);
+ decimals= MY_MIN(args[0]->decimals + prec_increment, DECIMAL_MAX_SCALE);
max_length= my_decimal_precision_to_length_no_truncation(precision,
decimals,
unsigned_flag);
@@ -3127,7 +3127,7 @@ int dump_leaf_key(void* key_arg, element_count count __attribute__((unused)),
&well_formed_error);
result->length(old_length + add_length);
item->warning_for_row= TRUE;
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
ER_CUT_VALUE_GROUP_CONCAT, ER(ER_CUT_VALUE_GROUP_CONCAT),
item->row_count);
@@ -3555,7 +3555,7 @@ bool Item_func_group_concat::setup(THD *thd)
syntax of this function). If there is no ORDER BY clause, we don't
create this tree.
*/
- init_tree(tree, (uint) min(thd->variables.max_heap_table_size,
+ init_tree(tree, (uint) MY_MIN(thd->variables.max_heap_table_size,
thd->variables.sortbuff_size/16), 0,
tree_key_length,
group_concat_key_cmp_with_order, NULL, (void*) this,