1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

str2decimal: don't return a negative zero

This commit is contained in:
Sergei Golubchik
2016-06-26 13:37:27 +02:00
parent 4a3acbcfd0
commit 02d153c7b9
4 changed files with 10 additions and 4 deletions

View File

@ -928,6 +928,8 @@ internal_str2dec(const char *from, decimal_t *to, char **end, my_bool fixed)
error= decimal_shift(to, (int) exponent);
}
}
if (to->sign && decimal_is_zero(to))
to->sign= 0;
return error;
fatal_error: