summaryrefslogtreecommitdiff
path: root/include/my_decimal_limits.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_decimal_limits.h')
-rw-r--r--include/my_decimal_limits.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/my_decimal_limits.h b/include/my_decimal_limits.h
index 50d70357c42..a287e82f989 100644
--- a/include/my_decimal_limits.h
+++ b/include/my_decimal_limits.h
@@ -31,10 +31,16 @@
digits * number of decimal digits in one our big digit - number of decimal
digits in one our big digit decreased by 1 (because we always put decimal
point on the border of our big digits))
+
+ With normal precession we can handle 65 digits. MariaDB can store in
+ the .frm up to 63 digits. By default we use DECIMAL_NOT_SPECIFIED digits
+ when converting strings to decimal, so we don't want to set this too high.
+ To not use up all digits for the scale we limit the number of decimals to
+ 38.
*/
#define DECIMAL_MAX_PRECISION (DECIMAL_MAX_POSSIBLE_PRECISION - 8*2)
-#define DECIMAL_MAX_SCALE 30
-#define DECIMAL_NOT_SPECIFIED 31
+#define DECIMAL_MAX_SCALE 38
+#define DECIMAL_NOT_SPECIFIED 39
/**
maximum length of string representation (number of maximum decimal