diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-07-08 11:46:52 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-07-08 11:46:52 +0500 |
commit | 6d39ccf18cb23757de5ff3b05b11417b5983aa16 (patch) | |
tree | cb415d77f61a115e2b2142965a236c5ed47cddde /sql | |
parent | bf28faf71ecb01b17277251909962d4a8f6ee80c (diff) | |
parent | 3c2eb9ec80dd3e97ea16aba80827609724599d31 (diff) | |
download | mariadb-git-6d39ccf18cb23757de5ff3b05b11417b5983aa16.tar.gz |
Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into gleb.loc:/home/uchum/work/bk/5.0-opt
Diffstat (limited to 'sql')
-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 f81b1c33fa7..2e227f0e67e 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -2267,6 +2267,7 @@ Field_new_decimal::Field_new_decimal(char *ptr_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); @@ -2286,6 +2287,7 @@ Field_new_decimal::Field_new_decimal(uint32 len_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); |