diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-06-26 13:37:27 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-05 10:28:20 +0100 |
commit | 02d153c7b9739ce4c2445805aeaf4b185c6ac6f0 (patch) | |
tree | e756a7089348c400ce4bbfe87d19f3fcb6b47559 /strings | |
parent | 4a3acbcfd07291ecc141f37200eec79eb1713882 (diff) | |
download | mariadb-git-02d153c7b9739ce4c2445805aeaf4b185c6ac6f0.tar.gz |
str2decimal: don't return a negative zero
Diffstat (limited to 'strings')
-rw-r--r-- | strings/decimal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index b0c57d3db0c..3d90a58ea8a 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -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: |