Commit 0a3fba7f authored by jimw@mysql.com's avatar jimw@mysql.com

Small fix for Field_str::store() to avoid trying to read past beginning

of log_10 array.
parent 51781b0b
......@@ -4307,7 +4307,7 @@ int Field_str::store(double nr)
*/
double anr= fabs(nr);
int neg= (nr < 0.0) ? 1 : 0;
if (field_length < 32 &&
if (field_length > 4 && field_length < 32 &&
(anr < 1.0 ? anr > 1/(log_10[max(0,field_length-neg-2)]) /* -2 for "0." */
: anr < log_10[field_length-neg]-1))
use_scientific_notation= FALSE;
......
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