1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge polly.local:/home/kaa/src/maint/mysql-5.0-maint

into  polly.local:/home/kaa/src/maint/mysql-5.1-maint


sql/item_func.cc:
  Auto merged
This commit is contained in:
unknown
2007-04-28 23:27:24 +04:00

View File

@ -2066,7 +2066,7 @@ longlong Item_func_round::int_op()
else
value= (unsigned_flag || value >= 0) ?
my_unsigned_round((ulonglong) value, tmp) :
-my_unsigned_round((ulonglong) -value, tmp);
-(longlong) my_unsigned_round((ulonglong) -value, tmp);
return value;
}
@ -2078,13 +2078,13 @@ my_decimal *Item_func_round::decimal_op(my_decimal *decimal_value)
if (dec > 0 || (dec < 0 && args[1]->unsigned_flag))
{
dec= min((ulonglong) dec, DECIMAL_MAX_SCALE);
decimals= dec; // to get correct output
decimals= (uint8) dec; // to get correct output
}
else if (dec < INT_MIN)
dec= INT_MIN;
if (!(null_value= (args[0]->null_value || args[1]->null_value ||
my_decimal_round(E_DEC_FATAL_ERROR, value, dec,
my_decimal_round(E_DEC_FATAL_ERROR, value, (int) dec,
truncate, decimal_value) > 1)))
return decimal_value;
return 0;