Bug #68454 | Using inet6_ntoa and int6_aton to convert IP causes errors | ||
---|---|---|---|
Submitted: | 21 Feb 2013 9:52 | Modified: | 4 Mar 2013 15:30 |
Reporter: | fengfu zhao | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S1 (Critical) |
Version: | 5.6.11 | OS: | Any |
Assigned to: | Tor Didriksen | CPU Architecture: | Any |
Tags: | inet6_ntoa inet6_aton error |
[21 Feb 2013 9:52]
fengfu zhao
[21 Feb 2013 10:26]
MySQL Verification Team
It does look suspicious indeed: mysql> select id, inet6_ntoa(ip),ip,hex(ip) from ipconvert; +----+----------------+------+----------+ | id | inet6_ntoa(ip) | ip | hex(ip) | +----+----------------+------+----------+ | 1 | 123.183.5.59 | {╖♣; | 7BB7053B | | 2 | NULL | NULL | NULL | | 3 | NULL | {╖♣; | 7BB7053B | | 4 | NULL | {╖♣; | 7BB7053B | +----+----------------+------+----------+ 4 rows in set (0.00 sec) mysql> select id, inet6_ntoa(ip),ip,hex(ip) from ipconvert where ip is not null; +----+----------------+------+----------+ | id | inet6_ntoa(ip) | ip | hex(ip) | +----+----------------+------+----------+ | 1 | 123.183.5.59 | {╖♣; | 7BB7053B | | 3 | 123.183.5.59 | {╖♣; | 7BB7053B | | 4 | 123.183.5.59 | {╖♣; | 7BB7053B | +----+----------------+------+----------+ 3 rows in set (0.00 sec) mysql> mysql> select version(); +--------------+ | version() | +--------------+ | 5.6.11-debug | +--------------+ 1 row in set (0.00 sec)
[4 Mar 2013 15:30]
Paul DuBois
Noted in 5.6.11, 5.7.1 changelogs. If INET6_NTOA() or INET6_ATON() returned NULL for a row in a result set, following rows also returned NULL.