summaryrefslogtreecommitdiff
path: root/sql/my_decimal.h
diff options
context:
space:
mode:
authorTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2011-05-12 04:05:12 +0100
committerTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2011-05-12 04:05:12 +0100
commite0c0bf323bd26c011842c7d97ab7ec5ee4b5d80d (patch)
treec05960ee2cf34663d49c4cbf04a9eb7ee6e3712a /sql/my_decimal.h
parent99a8398f42270ac106b8b7893b76deb0603d2b70 (diff)
parent9990ab901bbe1a99538d062d7b13c29ad84823a9 (diff)
downloadmariadb-git-e0c0bf323bd26c011842c7d97ab7ec5ee4b5d80d.tar.gz
auto-merge Bug#11762799/Bug#55436
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r--sql/my_decimal.h3
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);
}