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/my_decimal.h | |
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/my_decimal.h')
-rw-r--r-- | sql/my_decimal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 45270150d22..a30dceab19d 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -387,5 +387,18 @@ int my_decimal_cmp(const my_decimal *a, const my_decimal *b) return decimal_cmp((decimal_t*) a, (decimal_t*) b); } + +inline +void my_decimal_trim(ulong *precision, uint *scale) +{ + if (!(*precision) && !(*scale)) + { + *precision= 10; + *scale= 0; + return; + } +} + + #endif /*my_decimal_h*/ |