core: fix a wrong assertion on decimal comparison with double
mp_compare_decimal_any_number erroneously assumed that any float or double from which a decimal can't be created is either infinite or NaN. This is not true. Any float greater than 1e38 can't fit into our decimal representation. When such a float got compared to a decimal, an assertion fired, which was wrong. Luckily, on release build the comparison was correct. Only the assertion is wrong. Fix it. Closes #8472 NO_DOC=bugfix (cherry picked from commit f1b23896)
Showing
- changelogs/unreleased/gh-8472-decimal-compare-float-assertion.md 6 additions, 0 deletions...ogs/unreleased/gh-8472-decimal-compare-float-assertion.md
- src/box/tuple_compare.cc 7 additions, 6 deletionssrc/box/tuple_compare.cc
- test/engine-luatest/gh_6377_decimal_compare_inf_crash_test.lua 44 additions, 8 deletions...engine-luatest/gh_6377_decimal_compare_inf_crash_test.lua
Loading
Please register or sign in to comment