1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect

Missing check for overflow added to the Item_decimal_typecast::val_decimal


include/decimal.h:
  Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
  decimal_intg() declaration
mysql-test/r/cast.result:
  Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
  result fixed
mysql-test/r/type_newdecimal.result:
  Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
  test result
mysql-test/t/type_newdecimal.test:
  Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
  test case added
sql/item_func.cc:
  Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
  now we check for possible ovreflow in Item_decimal_typecast::val_decimal
sql/my_decimal.h:
  Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
  my_decimal_intg() implemented
strings/decimal.c:
  Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
  decimal_intg() implemented
This commit is contained in:
unknown
2007-05-09 17:27:14 +05:00
parent 187ccf4bca
commit 82b7c54338
7 changed files with 97 additions and 1 deletions

View File

@ -1911,6 +1911,14 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to)
return error;
}
int decimal_intg(decimal_t *from)
{
int res;
dec1 *tmp_res;
tmp_res= remove_leading_zeroes(from, &res);
return res;
}
int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to)
{
if (likely(from1->sign == from2->sign))