Commit a5a84c84 authored by unknown's avatar unknown

Some Windows-related fixes to make Microsoft compilers happy. This is for bug #28128.


include/m_string.h:
  Reduced the number of elements in log_10[] and log_01[] to not exceed DBL_MAX.
sql/field.cc:
  Avoid the warning on Windows.
strings/strtod.c:
  Reduced the number of elements in log_10[] and log_01[] to not exceed DBL_MAX.
parent 7522742b
......@@ -106,8 +106,8 @@ extern char NEAR _dig_vec_upper[];
extern char NEAR _dig_vec_lower[];
/* Defined in strtod.c */
extern const double log_10[310];
extern const double log_01[310];
extern const double log_10[309];
extern const double log_01[309];
#ifdef BAD_STRING_COMPILER
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
......
......@@ -3676,7 +3676,7 @@ int Field_float::store(const char *from,uint len,CHARSET_INFO *cs)
int Field_float::store(double nr)
{
int error= truncate(&nr, FLT_MAX);
float j= nr;
float j= (float)nr;
#ifdef WORDS_BIGENDIAN
if (table->s->db_low_byte_first)
......
......@@ -63,7 +63,7 @@ const double log_10[] = {
1e270, 1e271, 1e272, 1e273, 1e274, 1e275, 1e276, 1e277, 1e278, 1e279,
1e280, 1e281, 1e282, 1e283, 1e284, 1e285, 1e286, 1e287, 1e288, 1e289,
1e290, 1e291, 1e292, 1e293, 1e294, 1e295, 1e296, 1e297, 1e298, 1e299,
1e300, 1e301, 1e302, 1e303, 1e304, 1e305, 1e306, 1e307, 1e308, 1e309
1e300, 1e301, 1e302, 1e303, 1e304, 1e305, 1e306, 1e307, 1e308
};
const double log_01[] = {
......@@ -97,7 +97,7 @@ const double log_01[] = {
1e-270,1e-271,1e-272,1e-273,1e-274,1e-275,1e-276,1e-277,1e-278,1e-279,
1e-280,1e-281,1e-282,1e-283,1e-284,1e-285,1e-286,1e-287,1e-288,1e-289,
1e-290,1e-291,1e-292,1e-293,1e-294,1e-295,1e-296,1e-297,1e-298,1e-299,
1e-300,1e-301,1e-302,1e-303,1e-304,1e-305,1e-306,1e-307,1e-308,1e-309
1e-300,1e-301,1e-302,1e-303,1e-304,1e-305,1e-306,1e-307,1e-308
};
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment