From e3fa9c594d4eb5520f8d81002c51072ee37191d7 Mon Sep 17 00:00:00 2001 From: "holyfoot/hf@mysql.com/hfmain.(none)" <> Date: Wed, 9 May 2007 17:27:14 +0500 Subject: 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 --- strings/decimal.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'strings') diff --git a/strings/decimal.c b/strings/decimal.c index ea92174bfc8..65db68b1b59 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -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)) -- cgit v1.2.1