diff options
author | gshchepa/uchum@gleb.loc <> | 2007-07-08 11:48:57 +0500 |
---|---|---|
committer | gshchepa/uchum@gleb.loc <> | 2007-07-08 11:48:57 +0500 |
commit | 930f711b8f6a8a0ee677ac9e18ccc1d063f030c3 (patch) | |
tree | 9b349c6357c19c50c216c262c63011a4c09c4ecd /sql/field.cc | |
parent | cb86f26d79d04acc304bad908b8656b51fefb3ba (diff) | |
parent | 4d8e0fb50a4b05db02522c7c094f89118ed795d1 (diff) | |
download | mariadb-git-930f711b8f6a8a0ee677ac9e18ccc1d063f030c3.tar.gz |
Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into gleb.loc:/home/uchum/work/bk/5.1-opt
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc index d06d94af3a7..e7008979639 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -2316,6 +2316,7 @@ Field_new_decimal::Field_new_decimal(uchar *ptr_arg, unireg_check_arg, field_name_arg, dec_arg, zero_arg, unsigned_arg) { precision= my_decimal_length_to_precision(len_arg, dec_arg, unsigned_arg); + set_if_smaller(precision, DECIMAL_MAX_PRECISION); DBUG_ASSERT((precision <= DECIMAL_MAX_PRECISION) && (dec <= DECIMAL_MAX_SCALE)); bin_size= my_decimal_get_binary_size(precision, dec); @@ -2332,6 +2333,7 @@ Field_new_decimal::Field_new_decimal(uint32 len_arg, NONE, name, dec_arg, 0, unsigned_arg) { precision= my_decimal_length_to_precision(len_arg, dec_arg, unsigned_arg); + set_if_smaller(precision, DECIMAL_MAX_PRECISION); DBUG_ASSERT((precision <= DECIMAL_MAX_PRECISION) && (dec <= DECIMAL_MAX_SCALE)); bin_size= my_decimal_get_binary_size(precision, dec); |