From d99b4c6a1a4905b3a7954517d70b6cfbc145c141 Mon Sep 17 00:00:00 2001 From: "holyfoot/hf@mysql.com/hfmain.(none)" <> Date: Thu, 10 May 2007 00:17:21 +0500 Subject: Bug #27921 View ignores precision for CAST() Item_decimal_typecast::print properly implemented --- sql/my_decimal.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sql/my_decimal.h') 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*/ -- cgit v1.2.1