diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-05-10 00:17:21 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-05-10 00:17:21 +0500 |
commit | f2a52dd0f021b02177c10443cb1ee6b7ad20281a (patch) | |
tree | 5a715b5abe3283afbc2d322486f1f725316b9932 /sql/field.cc | |
parent | 187ccf4bca5bf865fec86581d894fb8e6df0792a (diff) | |
download | mariadb-git-f2a52dd0f021b02177c10443cb1ee6b7ad20281a.tar.gz |
Bug #27921 View ignores precision for CAST()
Item_decimal_typecast::print properly implemented
mysql-test/r/view.result:
Bug #27921 View ignores precision for CAST()
test result
mysql-test/t/view.test:
Bug #27921 View ignores precision for CAST()
test case
sql/field.cc:
zero decimals handling unified
sql/item_create.cc:
Bug #27921 View ignores precision for CAST()
create_func_cast parameters changed, zero precision handling unified
sql/item_create.h:
Bug #27921 View ignores precision for CAST()
create_func_cast parameters changed
sql/item_func.cc:
Bug #27921 View ignores precision for CAST()
Item_decimal_typecast::print properly implemented
sql/item_func.h:
Bug #27921 View ignores precision for CAST()
max_length counting fixed
sql/my_decimal.h:
Bug #27921 View ignores precision for CAST()
my_decimal_trim() implemented to unify zero precision handling
sql/sql_yacc.yy:
Bug #27921 View ignores precision for CAST()
create_func_cast calls simplified
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/field.cc b/sql/field.cc index b2def4ca8d2..d2e72371bc1 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -8426,8 +8426,7 @@ bool create_field::init(THD *thd, char *fld_name, enum_field_types fld_type, case FIELD_TYPE_NULL: break; case FIELD_TYPE_NEWDECIMAL: - if (!fld_length && !decimals) - length= 10; + my_decimal_trim(&length, &decimals); if (length > DECIMAL_MAX_PRECISION) { my_error(ER_TOO_BIG_PRECISION, MYF(0), length, fld_name, |