← Back to team overview

maria-developers team mailing list archive

Re: Ipv6


  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 )


Le 23/08/2010 15:47, Sergei Golubchik a écrit :
Hi, Dolf!

On Aug 23, Dolf Schimmel wrote:

My proposal would be to introduce two new datatypes, one for 128bit
integers, and one extending the 128bit integer type for ipv6
addresses. Meaning that the latter accept ipv6 addresses only, but
relies on the first one for storing it, and displaying it again as
ipv6 address.

With ipv6 one usually will do much more rangechecks than ipv4 because
with ipv6 residential homes simply get a /64 block (2^(128-64)= a lot
of addresses) instead of simply one address.  Therefore a nice feature
would be to allow queries like: `SELECT * FROM table WHERE columnName
IN 2001:db8:85a3::8a2e:370:7334/62` which essentially would select all
rows where columnName is in the same /64 block as
2001:db8:85a3::8a2e:370:7334 is.

I'm a simple PHP developer so I can't supply a patch, but I would be
really curious in what you think about the above, and hope someone is
able and willing to pick it up.
This looks moderately easy to do. Without 128-bit integers, at least.
But you don't need them, as far as I understand, who needs math
operations on ipv6 addresses.

Making MySQL to use indexes for selects like in your example would be a
bit more involved, but still doable.

If, indeed, "someone is able and willing to pick it up", I could help
this someone to understand what to change, where, and how.


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

Follow ups