summaryrefslogtreecommitdiff
path: root/sql/my_decimal.h
diff options
context:
space:
mode:
authorTatiana Azundris Nurnberg <azundris@sun.com>2011-05-05 06:39:38 +0100
committerTatiana Azundris Nurnberg <azundris@sun.com>2011-05-05 06:39:38 +0100
commit4e9e69e5f894c08c3cf2859eda578f0837b9d4ad (patch)
treeb4a1f26750c960fb55759c1246aa8ad2db10cda6 /sql/my_decimal.h
parentdbb832c02e5282e2703e08065f5288aabfebd9ba (diff)
parent1d0a11fd159fb05cd1c5c553b152c3848ceb552f (diff)
downloadmariadb-git-4e9e69e5f894c08c3cf2859eda578f0837b9d4ad.tar.gz
auto-merge conservative fix for Bug#55436/Bug#11762799
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 a5077f397e3..97546c91da1 100644
--- a/sql/my_decimal.h
+++ b/sql/my_decimal.h
@@ -55,7 +55,7 @@ C_MODE_END
/**
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)
@@ -212,6 +212,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);
}