Bug #37084 | CONV() function does not convert to and from higher bases properly | ||
---|---|---|---|
Submitted: | 29 May 2008 22:14 | Modified: | 31 May 2008 18:21 |
Reporter: | Tim Soderstrom | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: General | Severity: | S2 (Serious) |
Version: | 5.1.24 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | base, conv, FUNCTION, hex |
[29 May 2008 22:14]
Tim Soderstrom
[31 May 2008 18:21]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php 098f6bcd4621d373cade4e832627b4f6 is greater than FFFFFFFFFFFFFFFF which is maximum allowed value for unsigned integer. So it is just trancated value, not conversion issue. With smaller values conversion works fine: mysql> select conv(18446744073709551614,10,16); +----------------------------------+ | conv(18446744073709551614,10,16) | +----------------------------------+ | FFFFFFFFFFFFFFFE | +----------------------------------+ 1 row in set (0.00 sec) mysql> select conv('FFFFFFFFFFFFFFFE',16,10); +--------------------------------+ | conv('FFFFFFFFFFFFFFFE',16,10) | +--------------------------------+ | 18446744073709551614 | +--------------------------------+ 1 row in set (0.00 sec)