diff options
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r-- | sql/my_decimal.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 08f897e6ab5..2de8b9add11 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -387,5 +387,25 @@ int my_decimal_cmp(const my_decimal *a, const my_decimal *b) return decimal_cmp((decimal_t*) a, (decimal_t*) b); } + +inline +int my_decimal_intg(const my_decimal *a) +{ + return decimal_intg((decimal_t*) a); +} + + +inline +void my_decimal_trim(ulong *precision, uint *scale) +{ + if (!(*precision) && !(*scale)) + { + *precision= 10; + *scale= 0; + return; + } +} + + #endif /*my_decimal_h*/ |