mysql-test/suite/innodb/t/group_commit_crash.test:
remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
my_vsnprintf() is ok here, in 5.5
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.
mysql-test/r/func_str.result:
New tests.
mysql-test/t/func_str.test:
New tests.
strings/dtoa.c:
The problem was s2b() multiplying and adding hundreds-of-thousands
of ever smaller fractions.
Fixed memory leak printing when doing 'mysqld --version', 'mysqld --debug --help' and 'mysqld --debug --help --verbose'
mysys/my_init.c:
Moved checking if we should call DBUG_END() before my_thread_end() as otherwise we will not free DBUG variables and files.
mysys/thr_lock.c:
Fixed compiler warning
sql/mysqld.cc:
Fixed memory leaks when using mysqld --help and mysqld --version
Added --debug as an option that works for all builds. For non debug builds we now get a warning.
strings/dtoa.c:
Fixed valgrind warning (c could contain data outside of the given string)
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
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.
mysql-test/r/func_str.result:
New test cases.
mysql-test/t/func_str.test:
New test cases.
strings/dtoa.c:
Increasing the buffer size slightly made some queries pass without leaks.
Adding Bfree(p51, alloc) fixed the remaining leaks.
- 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.
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.
mysql-test/r/func_misc.result:
Added a test case for bug #52165.
mysql-test/t/func_misc.test:
Added a test case for bug #52165.
strings/dtoa.c:
Fixed the assertion in my_strtod() to take the case of 'str == NULL
&& *end == NULL' into account.
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"
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.