summaryrefslogtreecommitdiff
path: root/sql/my_decimal.h
diff options
context:
space:
mode:
authorunknown <tsmith@siva.hindu.god>2007-05-17 14:17:50 -0600
committerunknown <tsmith@siva.hindu.god>2007-05-17 14:17:50 -0600
commitce5f0d1bc3ced3ea987d5fcb2f64204cb5c17661 (patch)
treee1f124ea0e96bfa5ff03cb4885b9f2dde79eb0d4 /sql/my_decimal.h
parentdb18dc9da096bdd0adf5d8b89896d6b041ee7f30 (diff)
parent75392f37078a8e3bf3098f40c84a24c18cd91d5b (diff)
downloadmariadb-git-ce5f0d1bc3ced3ea987d5fcb2f64204cb5c17661.tar.gz
Merge siva.hindu.god:/home/tsmith/m/bk/50
into siva.hindu.god:/home/tsmith/m/bk/maint/50 mysql-test/r/type_datetime.result: Auto merged mysql-test/t/outfile.test: Auto merged mysql-test/t/type_datetime.test: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/my_decimal.h: Auto merged sql/mysql_priv.h: Auto merged sql/sp.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r--sql/my_decimal.h20
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*/