diff options
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r-- | sql/my_decimal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h index e2f5c95dac2..1ff93c9dab3 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -62,7 +62,7 @@ typedef struct st_mysql_time MYSQL_TIME; /** maximum length of string representation (number of maximum decimal - digits + 1 position for sign + 1 position for decimal point) + digits + 1 position for sign + 1 position for decimal point, no terminator) */ #define DECIMAL_MAX_STR_LENGTH (DECIMAL_MAX_POSSIBLE_PRECISION + 2) @@ -243,6 +243,7 @@ inline uint32 my_decimal_precision_to_length(uint precision, uint8 scale, inline int my_decimal_string_length(const my_decimal *d) { + /* length of string representation including terminating '\0' */ return decimal_string_size(d); } |