Bug #48594 the function inet_aton delivers NULL if IP is IPv6
| Submitted: | 6 Nov 2009 8:43 | Modified: | 6 Nov 2009 18:58 |
|---|---|---|---|
| Reporter: | Horst Hunger | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 6.0-codebase | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[6 Nov 2009 8:53]
Horst Hunger
see also bug#48595.
[6 Nov 2009 11:57]
Valeriy Kravchuk
Verified just as described with recent mysql-6.0-codebase from bzr on Linux.
[6 Nov 2009 11:58]
MySQL Verification Team
Thank you for the bug report.
mysql> SET @nip= inet_aton('::1');
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT @nip;
+------+
| @nip |
+------+
| NULL |
+------+
1 row in set (0.00 sec)
[6 Nov 2009 18:41]
Davi Arnaut
::1 is not a dotted-quad representation of a network address. Please re-verify with the documentation of the function in mind.
[6 Nov 2009 18:57]
Valeriy Kravchuk
What about implementation of inet_ntop and inet_pton then, that works both with IPV4 and IPV6 addresses?
[6 Nov 2009 19:00]
Valeriy Kravchuk
OK, so this is a duplicate of Bug #34037.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: While the sequence SET @nip= inet_aton('127.0.0.1'); SELECT @nip; is working well, SET @nip= inet_aton('127.0.0.1'); SELECT @nip; @nip 2130706433 the same sequence with IPv6 delivers NULL. E.g. "::1" SET @nip= inet_aton('::1'); SELECT @nip; results in SET @nip= inet_aton('::1'); SELECT @nip; @nip NULL How to repeat: set "--skip-name-resilve", execute the statements above with mtr or mysql. Try also IP = 0:0:0:0:0:0:0:1 which is only another format of IPv6.