MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
unknown 0411659765 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"


BitKeeper/deleted/.del-strtod.c:
  Rename: strings/strtod.c -> BitKeeper/deleted/.del-strtod.c
client/Makefile.am:
  Added dtoa.c
client/sql_string.cc:
  Replaced sprintf() with a new wrapper around dtoa()
include/m_string.h:
  Added declarations for the new double to/from string conversion 
  functions.
libmysql/Makefile.shared:
  Removed strtod.c, added dtoa.c
libmysql/libmysql.c:
  Replaced sprintf() with my_gcvt(). We must use the same conversion
  method in both server and client lib.
mysql-test/r/archive_gis.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/r/cast.result:
  Fixed tests to take the formatting changes into account.
mysql-test/r/func_group.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/r/func_math.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/func_str.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/gis.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/r/innodb_gis.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/r/insert.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/r/mysqldump.result:
  No need for result substitution since we do not rely on system behavior
  anymore.
mysql-test/r/ndb_gis.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/r/parser.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/r/ps_2myisam.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/ps_3innodb.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/ps_4heap.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/ps_5merge.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/ps_7ndb.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/select.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/r/sp.result:
  Fixed tests to take additional precision from dtoa() into account.
  Decimal 2.7182818284590452354 is now converted to the double value of
  2.718281828459045, not 2.718281828459. Thus we get additional precision
  from the subsequent calculations.
mysql-test/r/strict.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/type_decimal.result:
  Added a test case for bug #24541.
mysql-test/r/type_float.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
  Added test cases for bugs #12860, #21497 and #26788.
mysql-test/r/type_newdecimal.result:
  Fixed tests to take additional precision from dtoa() and formatting
  changes into account.
mysql-test/r/variables.result:
  Fixed tests to take the formatting changes into account.
mysql-test/r/view.result:
  Fixed tests to take additional precision from dtoa() into account.
mysql-test/t/cast.test:
  No need to replace the results for Windows anymore.
mysql-test/t/insert.test:
  Added test cases from bug #26788.
mysql-test/t/mysqldump.test:
  Fixed tests to take additional precision from dtoa() into account.
  No need for results substitution because we do not rely on system
  behavior anymore.
mysql-test/t/type_decimal.test:
  Added a test case for bug #24541.
mysql-test/t/type_float.test:
  Added test cases for bugs #12860, #21497 and #26788.
mysql-test/t/type_newdecimal.test:
  Removed replace_result which is pointless with our own floating point
  conversion library.
  Added a reference for WL#3977.
sql/field.cc:
  Replaced the field.cc's own constant for the maximum double->string 
  conversion buffer with the one defined in m_string.h
  Replaced double->string conversion code with the new wrappers around
  dtoa().
  Fixed a bug in Field_real::truncate() which led to incorrect results
  when +-Infinity was passed as an input number.
  Fixed Field_blob::store(double) to use NOT_FIXED_DEC instead of 2 as
  precision, so that my_gcvt() is now used for conversion.
sql/field.h:
  Moved NOT_FIXED_DEC to m_string.h because we now use this constant in
  floating point <-> string conversion routines.
sql/item.cc:
  If a result of a numeric functions is stored in a string field, follow
  the same rules as in Field_str::store(double), i.e. take the field width
  into account.
sql/log_event.cc:
  Replaced sprintf() with my_gcvt().
sql/mysql_priv.h:
  Moved log_10[] from strtod.c to mysqld.c, because we don't need it in
  libmystrings anymore.
sql/mysqld.cc:
  Moved log_10[] from strtod.c to mysqld.c, because we don't need it in
  libmystrings anymore.
sql/sql_show.cc:
  Replaced sprintf() with my_fcvt().
sql/sql_string.cc:
  Replace the double->string conversion code with the new wrappers around
  dtoa().
sql/unireg.h:
  Moved FLOATING_POINT_BUFFER from unireg.h to m_string.h so it can be
  used in libmystrings.
strings/Makefile.am:
  Removed strtod.c, added dtoa.c
strings/decimal.c:
  Replaced sprintf() with my_gcvt().
  Changed double2decimal() to print the digits to a string buffer, then
  use my_strtod().
strings/dtoa.c:
  Initial import of the dtoa code and custom wrappers around it to allow
  its usage from the server code.
2007-12-07 19:56:17 +03:00
BitKeeper Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-build 2007-06-15 01:57:33 +02:00
BUILD Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-work-17707 2007-05-30 17:21:07 +02:00
client WL #2934 "Make/find library for doing float/double to string conversions 2007-12-07 19:56:17 +03:00
cmd-line-utils Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint 2007-06-07 09:22:26 +02:00
config/ac-macros sql_parse.cc, config-win.h, config-netware.h: 2007-05-27 23:21:03 +02:00
dbug WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
debian Made changes to debian control files to support building 5.1 packages. 2007-04-20 16:15:30 -07:00
Docs Merge mysql.com:/home/kent/bk/tmp/mysql-5.0-build 2007-03-22 19:44:14 +01:00
extra Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb 2007-06-17 17:21:27 +02:00
include WL #2934 "Make/find library for doing float/double to string conversions 2007-12-07 19:56:17 +03:00
libmysql WL #2934 "Make/find library for doing float/double to string conversions 2007-12-07 19:56:17 +03:00
libmysql_r my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
libmysqld Embedded Server doesn't build on Windows. 2007-06-15 14:32:16 -04:00
man my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql-test WL #2934 "Make/find library for doing float/double to string conversions 2007-12-07 19:56:17 +03:00
mysys Merge chilla.local:/home/mydev/mysql-5.1-amain 2007-06-16 13:14:23 +02:00
netware Merge trift2.:/MySQL/M50/mysql-5.0 2007-05-02 14:08:43 +02:00
plugin Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1 2007-06-01 12:59:06 +02:00
pstack my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
regex WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
scripts fix make_win_bin_dist typo 2007-06-13 19:19:11 +02:00
server-tools Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51 2007-06-05 17:51:30 +02:00
sql WL #2934 "Make/find library for doing float/double to string conversions 2007-12-07 19:56:17 +03:00
sql-bench Fixed compiler warnings 2007-02-23 13:13:55 +02:00
sql-common Embedded Server doesn't build on Windows. 2007-06-15 14:32:16 -04:00
storage Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb 2007-06-17 17:21:27 +02:00
strings WL #2934 "Make/find library for doing float/double to string conversions 2007-12-07 19:56:17 +03:00
support-files Added casts to avoid compiler warnings and fixed a wrong type. 2007-05-31 17:45:22 +03:00
tests Merge magare.gmz:/home/kgeorge/mysql/work/valgrind-errs-5.0-opt 2007-06-14 16:52:30 +03:00
unittest Makefile.am: 2007-05-28 22:18:51 +02:00
vio Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51 2007-06-05 17:51:30 +02:00
win Embedded Server doesn't build on Windows. 2007-06-15 14:32:16 -04:00
zlib Merge mysql.com:/home/kent/bk/tmp3/mysql-5.0-build 2007-04-11 01:48:43 +02:00
.bzrignore Embedded Server doesn't build on Windows. 2007-06-15 14:32:16 -04:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
CMakeLists.txt Embedded Server doesn't build on Windows. 2007-06-15 14:32:16 -04:00
configure.in Merge quadxeon:m/srv/quadxeon/local/bk/maint/jun14/50 2007-06-15 18:56:11 +02:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
EXCEPTIONS-CLIENT EXCEPTIONS-CLIENT: 2007-03-14 18:28:16 +01:00
Makefile.am Makefile.am : Bypass bug#28685 and skip the "rowlock" suite in the release builds. 2007-05-25 23:08:31 +02:00
README make_binary_distribution.sh: 2006-11-07 22:26:37 +01:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file and
  the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading chapter.
- For the new features/bugfix history, see the Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the Problems
  and Common Errors appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.