Skip to content

[3.0] Update IPv6 support for MySQL #8545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jdarwood007 opened this issue Apr 1, 2025 · 2 comments
Open

[3.0] Update IPv6 support for MySQL #8545

jdarwood007 opened this issue Apr 1, 2025 · 2 comments

Comments

@jdarwood007
Copy link
Member

jdarwood007 commented Apr 1, 2025

When we added IPv6 to 2.1, we ran into an issue that, due to older MySQL support, we could not use the native INET6_ATON and INET6_NTOA support. Now that we have upgraded our MySQL support. We can improve this now. I think it could also some performance benefits and allow some more native queries.

INET6_ATON => IP to Binary
INET6_NTOA => Binary to IP

@albertlast Any thoughts otherwise?

return sprintf('unhex(\'%1$s\')', $ip->toHex());

@Sesquipedalian
Copy link
Member

This is a good idea

@albertlast
Copy link
Collaborator

the important one is, that it can handle ipv6 and ipv4 and this it does: https://dbfiddle.uk/CG_Tbrra
the binary of both ways(php and mysql implementation) should be the same, at least was this target of the php implementation with hex way.
But performancewise shouldn't be a measurable improvment exists,
so end of the day you make it for look.

@Sesquipedalian Sesquipedalian added Housekeeping SMF code reorganization and removed Housekeeping SMF code reorganization labels Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants