diff options
author | unknown <gluh@mysql.com/gluh.(none)> | 2006-08-08 16:03:42 +0500 |
---|---|---|
committer | unknown <gluh@mysql.com/gluh.(none)> | 2006-08-08 16:03:42 +0500 |
commit | 66f6b5ba12ddfcd3c683e5a6df86b1d16751b1bf (patch) | |
tree | 475ca7e04f6aa86e1aaadb5b9381c3f76cb6cf95 /sql/item_create.cc | |
parent | d406c600532766fbd80484d96a910c6836e13300 (diff) | |
download | mariadb-git-66f6b5ba12ddfcd3c683e5a6df86b1d16751b1bf.tar.gz |
Bug#16172 DECIMAL data type processed incorrectly
issue an 'overflow warning' if result value is bigger than max possible value
include/decimal.h:
Bug#16172 DECIMAL data type processed incorrectly
new function decimal_intg()
mysql-test/r/cast.result:
Bug#16172 DECIMAL data type processed incorrectly
result fix
mysql-test/r/type_newdecimal.result:
Bug#16172 DECIMAL data type processed incorrectly
test result
mysql-test/r/view.result:
Bug#16172 DECIMAL data type processed incorrectly
result fix
mysql-test/t/type_newdecimal.test:
Bug#16172 DECIMAL data type processed incorrectly
test case
sql/item_create.cc:
Bug#16172 DECIMAL data type processed incorrectly
do not increase decimal part on 2(according to manual)
sql/my_decimal.h:
Bug#16172 DECIMAL data type processed incorrectly
new function my_decimal_intg()
strings/decimal.c:
Bug#16172 DECIMAL data type processed incorrectly
new function decimal_intg()
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 7147142d8a7..e02ba384717 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -463,7 +463,7 @@ Item *create_func_cast(Item *a, Cast_target cast_type, int len, int dec, case ITEM_CAST_TIME: res= new Item_time_typecast(a); break; case ITEM_CAST_DATETIME: res= new Item_datetime_typecast(a); break; case ITEM_CAST_DECIMAL: - res= new Item_decimal_typecast(a, (len>0) ? len : 10, dec ? dec : 2); + res= new Item_decimal_typecast(a, (len > 0) ? len : 10, dec); break; case ITEM_CAST_CHAR: res= new Item_char_typecast(a, len, cs ? cs : |