mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Small fix for Field_str::store() to avoid trying to read past beginning
of log_10 array.
This commit is contained in:
parent
51781b0bfc
commit
0a3fba7f18
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue