sql: fix comparison between DECIMAL and big DOUBLE
This patch fixes the comparison between DECIMAL as a left value and DOUBLE greater than or equal to 1e38 or less than or equal to -1e38 as a right value. Any DOUBLE value greater than or equal to 1e38 is now greater than any DECIMAL value, and a DOUBLE value less than or equal to -1e38 is less than any DECIMAL value. This is because our decimal cannot contain more than 38 digits. Closes #6376
Showing
- changelogs/unreleased/gh-6376-fix-incorrect-dec-inf-cmp.md 3 additions, 0 deletionschangelogs/unreleased/gh-6376-fix-incorrect-dec-inf-cmp.md
- src/box/sql/mem.c 2 additions, 2 deletionssrc/box/sql/mem.c
- test/sql-tap/engine.cfg 1 addition, 0 deletionstest/sql-tap/engine.cfg
- test/sql-tap/gh-6376-wrong-double-to-dec-cmp.test.lua 38 additions, 0 deletionstest/sql-tap/gh-6376-wrong-double-to-dec-cmp.test.lua
Loading
Please register or sign in to comment