Commit e9f1b9cb authored by unknown's avatar unknown

Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0

into deer.(none):/home/hf/work/mysql-5.0.8915


sql/item_func.cc:
  Auto merged
parents 5c17ade3 1b8240a3
...@@ -1629,13 +1629,25 @@ void Item_func_int_val::find_num_type() ...@@ -1629,13 +1629,25 @@ void Item_func_int_val::find_num_type()
longlong Item_func_ceiling::int_op() longlong Item_func_ceiling::int_op()
{ {
/* longlong result;
the volatile's for BUG #3051 to calm optimizer down (because of gcc's switch (args[0]->result_type()) {
bug) case INT_RESULT:
*/ result= args[0]->val_int();
volatile double value= args[0]->val_real();
null_value= args[0]->null_value; null_value= args[0]->null_value;
return (longlong) ceil(value); break;
case DECIMAL_RESULT:
{
my_decimal dec_buf, *dec;
if ((dec= decimal_op(&dec_buf)))
my_decimal2int(E_DEC_FATAL_ERROR, dec, unsigned_flag, &result);
else
result= 0;
break;
}
default:
result= (longlong)real_op();
};
return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment