diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-12-22 19:23:13 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-12-22 19:23:13 +0300 |
commit | f02525be8346b7426f1640fb168a7451d38b1641 (patch) | |
tree | 40437c602d2a9ddaa03a54742cec4884f0974253 /sql/spatial.cc | |
parent | 5bce1e06429c3d58457051f0c439f130609df375 (diff) | |
download | mariadb-git-f02525be8346b7426f1640fb168a7451d38b1641.tar.gz |
Backport of WL #2934: Make/find library for doing float/double
to string conversions and vice versa"
Initial import of the dtoa.c code and custom wrappers around it
to allow its usage from the server code.
Conversion of FLOAT/DOUBLE values to DECIMAL ones or strings
and vice versa has been significantly reworked. As the new
algoritms are more precise than the older ones, results of such
conversions may not always match those obtained from older
server versions. This in turn may break compatibility for some
applications.
This patch also fixes the following bugs:
- bug #12860 "Difference in zero padding of exponent between
Unix and Windows"
- bug #21497 "DOUBLE truncated to unusable value"
- bug #26788 "mysqld (debug) aborts when inserting specific
numbers into char fields"
- bug #24541 "Data truncated..." on decimal type columns
without any good reason"
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r-- | sql/spatial.cc | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc index 9114c81514d..671b8544b8a 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -17,28 +17,7 @@ #ifdef HAVE_SPATIAL -/* - exponential notation : - 1 sign - 1 number before the decimal point - 1 decimal point - 14 number of significant digits (see String::qs_append(double)) - 1 'e' sign - 1 exponent sign - 3 exponent digits - == - 22 - - "f" notation : - 1 optional 0 - 1 sign - 14 number significant digits (see String::qs_append(double) ) - 1 decimal point - == - 17 -*/ - -#define MAX_DIGITS_IN_DOUBLE 22 +#define MAX_DIGITS_IN_DOUBLE MY_GCVT_MAX_FIELD_WIDTH /***************************** Gis_class_info *******************************/ |