← Back to team overview

maria-developers team mailing list archive

Re: Ipv6



ipv6 INET_ATON and INET_NTOA would be mainly usefull to application compatibility, and painless ipv6 migration.

For example, in my PHP script I'm using almost everywhere INET_ATON to store $_SERVER['REMOTE_ADDR']. If INET_ATON and NTOA are supported, I only have to change the column type storing my IP values to be able to store 128-bit integers, without changing anything else in the code.


Le 23/08/2010 18:53, Sergei Golubchik a écrit :
Hi, Jocelyn!

On Aug 23, Jocelyn Fournier wrote:
Hi Sergei,

What about INET_ATON / INET_NTOA ipv6 support ?
(there's a feature request opened on mysql since jan 2008 :
http://bugs.mysql.com/bug.php?id=34037 )
They would need to convert to and from DECIMAL.
It's doable.

If you mean 128-bit integers, adding them is more complex, I guess, than
adding a native ipv6 type (which is implemented on top of binary(16)

Why one would need INET_NTOA6 and INET_ATON6 ?

INET_ATON can be used to convert an ip address to store it in the table,
to save storage space.

INET_ATON can be used to convert an ip address to a number to check
against a subnet mask.

Anything else ?

Because if there is IPv6 native type there will be no need to convert
for storage and no need to convert for a mask check.


Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp