Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bug](function) fix conv function get wrong result as parse overflow (a…
…pache#38001) ``` mysql> select conv('ffffffffffffff', 24, 2); +------------------------------------------------------------------+ | conv('ffffffffffffff', 24, 2) | +------------------------------------------------------------------+ | 1111111111111111111111111111111111111111111111111111111111111111 | +------------------------------------------------------------------+ before get wrong result as 'ffffffffffffff' have beyond the max value of int64, so get max value: std::numeric_limits<int64_t>::max() mysql> select conv('ffffffffffffff', 24, 2); +------------------------------------------------------------------+ | conv('ffffffffffffff', 24, 2) | +------------------------------------------------------------------+ | 1011111001100011011111100110111101001101111010011011110100110111 | +------------------------------------------------------------------+ now change it to parse as uint64_t could get result. But if the value is still overflow, will get max value of uint64_t ```
- Loading branch information