tuple: fix hashing of integer numbers
Integer numbers stored in tuples as MP_FLOAT/MP_DOUBLE are hashed differently from integer numbers stored as MP_INT/MP_UINT. This breaks select() for memtx hash indexes and vinyl indexes (the latter use bloom filters). Fix this by converting MP_FLOAT/MP_DOUBLE to MP_INT/MP_UINT before hashing if the value can be stored as an integer. This is consistent with the behavior of tuple comparators, which treat MP_FLOAT and MP_INT as equal in case they represent the same number. Closes #3907
Showing
- src/box/tuple_hash.cc 29 additions, 0 deletionssrc/box/tuple_hash.cc
- test/box/hash.result 46 additions, 0 deletionstest/box/hash.result
- test/box/hash.test.lua 15 additions, 0 deletionstest/box/hash.test.lua
- test/vinyl/bloom.result 52 additions, 0 deletionstest/vinyl/bloom.result
- test/vinyl/bloom.test.lua 18 additions, 0 deletionstest/vinyl/bloom.test.lua
Loading
Please register or sign in to comment