Commit graph

13 commits

Author SHA1 Message Date
Tor Didriksen
18fec1e9c1 Bug#14039955 RPAD FUNCTION LEADS TO UNINITIALIZED VALUES WARNING IN MY_STRTOD
Rewrite the "parser" in my_strtod_int() to avoid
reading past the end of the input string.
2012-05-18 12:57:38 +02:00
MySQL Build Team
5734bae576 Updated/added copyright headers 2012-02-16 10:48:16 +01:00
Tor Didriksen
56a2ff8330 Bug#13359121 LARGE NUMBERS, /STRINGS/DTOA.C:662
Bug#12985021 SIMPLE QUERY WITH DECIMAL NUMBERS TAKE AN

When parsing the fractional part of a string which
is to be converted to double, we can stop after a few digits:
the extra digits will not contribute to the actual result anyways.
2012-01-25 16:11:03 +01:00
Tor Didriksen
8d1c4bba67 Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY
Extra fix: 'if (p5 < p5_a + P5A_MAX)' is not portable.
p5 starts out pointing to a static array, then may point
to a buffer on the stack, then may point to malloc()ed memory.
2011-09-21 13:46:49 +02:00
Tor Didriksen
929c97db61 Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY 2011-09-20 10:59:48 +02:00
Kent Boortz
9da00ebec9 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Alexander Barkov
ae60b47756 Merging Copyright update from 5.1 2011-01-19 16:31:17 +03:00
Alexey Kopytov
c80bf763ff Bug #45882: dtoa.c might not work with gcc 4.4.0
- Ported relevant changes from the upstream version to not
break strict-aliasing rules and to fix compiler warnings and
and infinite loops caused by that issue.

- Fixed compilation with Honor_FLT_ROUNDS defined.

- Fixed an unused variable warning.
2010-06-01 21:37:45 +04:00
Alexey Kopytov
55252a1c1f Reconciling different file ids for dtoa.c in trunk and 6.0-codebase. 2010-04-11 10:52:42 +04:00
Alexey Kopytov
8ccf004f5b Reconciling different file ids for dtoa.c in trunk and 6.0-codebase. 2010-04-11 10:48:58 +04:00
Alexey Kopytov
5a274915ec Bug #52165: Assertion failed: file .\dtoa.c, line 465
The failing assertion was written with the assumption that a NULL
string can never be passed to my_strtod(). However, an empty string
may be passed under some circumstances by passing str == NULL and
*end == NULL.

Fixed the assertion to take the above case into account.
2010-04-07 13:59:02 +04:00
Alexey Kopytov
f02525be83 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"
2009-12-22 19:23:13 +03:00
kaa@polly.(none)
306b0e7dc4 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"
2007-12-07 19:56:17 +03:00